已删除7个文件
已添加122个文件
已修改4个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | |
| | | namespace WIDESEAWCS_BasicRepository |
| | | { |
| | | public class BasicRepository : IBasicRepository |
| | | { |
| | | |
| | | public ILocationInfoRepository LocationInfoRepository { get; } |
| | | |
| | | public IMaterielInfoRepository MaterielInfoRepository { get; } |
| | | |
| | | public BasicRepository(ILocationInfoRepository locationInfoRepository, IMaterielInfoRepository materielInfoRepository) |
| | | { |
| | | LocationInfoRepository = locationInfoRepository; |
| | | MaterielInfoRepository = materielInfoRepository; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.Basic; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_BasicRepository |
| | | { |
| | | public class LocationInfoRepository : RepositoryBase<Dt_LocationInfo>, ILocationInfoRepository |
| | | { |
| | | public LocationInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_BasicRepository |
| | | { |
| | | public class MaterielInfoRepository : RepositoryBase<Dt_MaterielInfo>, IMaterielInfoRepository |
| | | { |
| | | public MaterielInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_IBasicRepository\WIDESEAWCS_IBasicRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.CommonEnum; |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.Utilities; |
| | | using WIDESEAWCS_DTO.Basic; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_BasicService |
| | | { |
| | | public partial class LocationInfoService : ServiceBase<Dt_LocationInfo, ILocationInfoRepository>, ILocationInfoService |
| | | { |
| | | private readonly IBasicRepository _basicRepository; |
| | | public ILocationInfoRepository Repository => BaseDal; |
| | | |
| | | public LocationInfoService(ILocationInfoRepository BaseDal, IBasicRepository basicRepository) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | } |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | Dt_LocationInfo locationInfo = saveModel.MainData.DicToModel<Dt_LocationInfo>(); |
| | | return base.AddData(locationInfo); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent DeleteData(object[] keys) |
| | | { |
| | | return base.DeleteData(keys); |
| | | } |
| | | |
| | | public WebResponseContent LocationEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | locationInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(locationInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent LocationDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | locationInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(locationInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent LocationEnableStatus(int key) |
| | | { |
| | | return LocationEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent LocationDisableStatus(int key) |
| | | { |
| | | return LocationDisableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO) |
| | | { |
| | | try |
| | | { |
| | | (bool, string, object?) result = ModelValidate.ValidateModelData(initializationLocationDTO); |
| | | if (!result.Item1) return WebResponseContent.Instance.Error(result.Item2); |
| | | |
| | | int side = 1; |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | for (int i = 0; i < initializationLocationDTO.MaxRow; i++) |
| | | { |
| | | for (int j = 0; j < initializationLocationDTO.MaxColumn; j++) |
| | | { |
| | | for (int k = 0; k < initializationLocationDTO.MaxLayer; k++) |
| | | { |
| | | Dt_LocationInfo locationInfo = new Dt_LocationInfo() |
| | | { |
| | | AreaId = 0, |
| | | Column = j + 1, |
| | | EnableStatus = EnableStatusEnum.Normal.ObjToInt(), |
| | | Layer = k + 1, |
| | | LocationStatus = LocationStatusEnum.Free.ObjToInt(), |
| | | LocationType = 1, |
| | | RoadwayNo = initializationLocationDTO.Roadway, |
| | | Row = i + 1, |
| | | }; |
| | | |
| | | if (initializationLocationDTO.IsSingleDepth) |
| | | { |
| | | locationInfo.Depth = 1; |
| | | locationInfo.LocationCode = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}"; |
| | | locationInfo.LocationName = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}å··é{locationInfo.Row.ToString().PadLeft(3, '0')}è¡{locationInfo.Column.ToString().PadLeft(3, '0')}å{locationInfo.Layer.ToString().PadLeft(3, '0')}å±{locationInfo.Depth.ToString().PadLeft(2, '0')}æ·±"; |
| | | } |
| | | else |
| | | { |
| | | if (initializationLocationDTO.FirstDepthRows.Contains(i + 1)) |
| | | { |
| | | locationInfo.Depth = 1; |
| | | } |
| | | else |
| | | { |
| | | locationInfo.Depth = 2; |
| | | } |
| | | locationInfo.LocationCode = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}"; |
| | | locationInfo.LocationName = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}å··é{locationInfo.Row.ToString().PadLeft(3, '0')}è¡{locationInfo.Column.ToString().PadLeft(3, '0')}å{locationInfo.Layer.ToString().PadLeft(3, '0')}å±{locationInfo.Depth.ToString().PadLeft(2, '0')}æ·±"; |
| | | } |
| | | |
| | | locationInfos.Add(locationInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | BaseDal.AddData(locationInfos); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_BasicService |
| | | { |
| | | public partial class MaterielInfoService : ServiceBase<Dt_MaterielInfo, IMaterielInfoRepository>, IMaterielInfoService |
| | | { |
| | | public MaterielInfoService(IMaterielInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IMaterielInfoRepository Repository => BaseDal; |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | return base.AddData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent DeleteData(object[] keys) |
| | | { |
| | | return base.DeleteData(keys); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Core.Helper; |
| | | |
| | | namespace WIDESEAWCS_BasicService |
| | | { |
| | | public class BasicService : IBasicService |
| | | { |
| | | |
| | | public ILocationInfoService LocationInfoService { get; } |
| | | |
| | | public IMaterielInfoService MaterielInfoService { get; } |
| | | |
| | | public BasicService(ILocationInfoService locationInfoService, IMaterielInfoService materielInfoService) |
| | | { |
| | | LocationInfoService = locationInfoService; |
| | | MaterielInfoService = materielInfoService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.Utilities; |
| | | using WIDESEAWCS_DTO.Basic; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_BasicService |
| | | { |
| | | public partial class LocationInfoService : ServiceBase<Dt_LocationInfo, ILocationInfoRepository>, ILocationInfoService |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_BasicService |
| | | { |
| | | public partial class MaterielInfoService : ServiceBase<Dt_MaterielInfo, IMaterielInfoRepository>, IMaterielInfoService |
| | | { |
| | | |
| | | public bool ExsitMateriel(string materielCode) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.MaterielCode == materielCode) != null; |
| | | } |
| | | |
| | | public bool ExsitMateriels(List<string> materielCodes) |
| | | { |
| | | return BaseDal.QueryFirst(x => materielCodes.Contains(x.MaterielCode)) != null; |
| | | } |
| | | |
| | | public Dt_MaterielInfo GetMaterielInfo(string materielCode) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.MaterielCode == materielCode); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢ç©æä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="materielCodes"></param> |
| | | /// <returns></returns> |
| | | public List<Dt_MaterielInfo> GetMaterielInfos(List<string> materielCodes) |
| | | { |
| | | return BaseDal.QueryData(x => materielCodes.Contains(x.MaterielCode)); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_IBasicService\WIDESEAWCS_IBasicService.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.CommonEnum |
| | | { |
| | | /// <summary> |
| | | /// å¯ç¦ç¶æ |
| | | /// </summary> |
| | | public enum EnableEnum |
| | | { |
| | | /// <summary> |
| | | /// ç¦ç¨ |
| | | /// </summary> |
| | | [Description("ç¦ç¨")] |
| | | Disable = 0, |
| | | |
| | | /// <summary> |
| | | /// å¯ç¨ |
| | | /// </summary> |
| | | [Description("å¯ç¨")] |
| | | Enable = 1, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.CommonEnum |
| | | { |
| | | public enum OperateType |
| | | { |
| | | 人工å é¤ = 1, |
| | | èªå¨å é¤ = 2, |
| | | 人工æ¢å¤ = 3, |
| | | èªå¨æ¢å¤ = 4, |
| | | äººå·¥å®æ = 5, |
| | | èªå¨å®æ = 6, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.LocationEnum |
| | | { |
| | | public enum EnableStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æ£å¸¸ |
| | | /// </summary> |
| | | [Description("æ£å¸¸")] |
| | | Normal = 0, |
| | | |
| | | /// <summary> |
| | | /// åªå
¥ |
| | | /// </summary> |
| | | [Description("åªå
¥")] |
| | | OnlyIn = 1, |
| | | |
| | | /// <summary> |
| | | /// åªåº |
| | | /// </summary> |
| | | [Description("åªåº")] |
| | | OnlyOut = 2, |
| | | |
| | | /// <summary> |
| | | /// ç¦ç¨ |
| | | /// </summary> |
| | | [Description("ç¦ç¨")] |
| | | Disable = 3 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.LocationEnum |
| | | { |
| | | /// <summary> |
| | | /// è´§ä½ç¶æ |
| | | /// </summary> |
| | | public enum LocationStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// ç©ºé² |
| | | /// </summary> |
| | | [Description("空é²")] |
| | | Free = 0, |
| | | |
| | | /// <summary> |
| | | /// éå® |
| | | /// </summary> |
| | | [Description("éå®")] |
| | | Lock = 1, |
| | | |
| | | /// <summary> |
| | | /// æè´§ |
| | | /// </summary> |
| | | [Description("æè´§")] |
| | | InStock = 2, |
| | | |
| | | |
| | | PalletLock = 98, |
| | | |
| | | [Description("空æç")] |
| | | Pallet = 99 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.OrderEnum |
| | | { |
| | | public enum OrderDetailStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æ°å»º |
| | | /// </summary> |
| | | [Description("æ°å»º")] |
| | | New = 0, |
| | | |
| | | /// <summary> |
| | | /// ç»çå
¥åº |
| | | /// </summary> |
| | | [Description("ç»çå
¥åº")] |
| | | GroupAndInbound = 10, |
| | | |
| | | [Description("åºåºé¨ååé
宿")] |
| | | AssignOverPartial = 60, |
| | | |
| | | [Description("åºåºåé
宿")] |
| | | AssignOver = 70, |
| | | |
| | | [Description("åºåºä¸")] |
| | | Outbound = 80, |
| | | /// <summary> |
| | | /// 宿 |
| | | /// </summary> |
| | | [Description("宿")] |
| | | Over = 100 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.OrderEnum |
| | | { |
| | | /// <summary> |
| | | /// åºåºåç±»å |
| | | /// </summary> |
| | | public enum OutOrderTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// ç产è¿å·¥å |
| | | /// </summary> |
| | | [Description("ç产è¿å·¥å")] |
| | | Rework = 200, |
| | | |
| | | /// <summary> |
| | | /// ç产åæå |
| | | /// </summary> |
| | | [Description("ç产åæå")] |
| | | Issue = 205, |
| | | |
| | | /// <summary> |
| | | /// éè´éè´§å |
| | | /// </summary> |
| | | [Description("éè´éè´§å")] |
| | | ProcureReturn = 210, |
| | | |
| | | /// <summary> |
| | | /// è°æ¨åºåºå |
| | | /// </summary> |
| | | [Description("è°æ¨åºåºå")] |
| | | Allocate = 215, |
| | | |
| | | /// <summary> |
| | | /// éå®åºåºå |
| | | /// </summary> |
| | | [Description("éå®åºåºå")] |
| | | SaleOut = 220, |
| | | |
| | | /// <summary> |
| | | /// 空çåºåºå |
| | | /// </summary> |
| | | [Description("空çåºåºå")] |
| | | EmptyDisk = 225, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£åºåºå |
| | | /// </summary> |
| | | [Description("è´¨æ£åºåºå")] |
| | | Quality = 230, |
| | | |
| | | /// <summary> |
| | | /// å
¶ä»åºåºå |
| | | /// </summary> |
| | | [Description("å
¶ä»åºåºå")] |
| | | Other = 235 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.OrderEnum |
| | | { |
| | | #region |
| | | public enum OutboundStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æªå¼å§ |
| | | /// </summary> |
| | | [Description("æªå¼å§")] |
| | | æªå¼å§ = 0, |
| | | |
| | | /// <summary> |
| | | /// åºåºä¸ |
| | | /// </summary> |
| | | [Description("åºåºä¸")] |
| | | å
¥åºä¸ = 1, |
| | | |
| | | /// <summary> |
| | | /// åºåºå®æ |
| | | /// </summary> |
| | | [Description("åºåºå®æ")] |
| | | å
¥åºå®æ = 2, |
| | | |
| | | /// <summary> |
| | | /// å
³é |
| | | /// </summary> |
| | | [Description("å
³é")] |
| | | å
³é = 99, |
| | | |
| | | /// <summary> |
| | | /// åæ¶ |
| | | /// </summary> |
| | | [Description("åæ¶")] |
| | | åæ¶ = 98 |
| | | } |
| | | #endregion |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common |
| | | { |
| | | public enum SequenceEnum |
| | | { |
| | | SeqTaskNum |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.StockEnum |
| | | { |
| | | public enum OutStockStatus |
| | | { |
| | | [Description("å·²åé
")] |
| | | å·²åé
= 0, |
| | | |
| | | [Description("åºåºä¸")] |
| | | åºåºä¸ = 1, |
| | | |
| | | [Description("åºåºå®æ")] |
| | | åºåºå®æ = 2, |
| | | |
| | | [Description("æ¤é")] |
| | | æ¤é = 99 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.StockEnum |
| | | { |
| | | public enum StockChangeType |
| | | { |
| | | /// <summary> |
| | | /// ç»ç |
| | | /// </summary> |
| | | [Description("")] |
| | | MaterielGroup, |
| | | |
| | | /// <summary> |
| | | /// å
¥åº |
| | | /// </summary> |
| | | [Description("")] |
| | | Inbound, |
| | | |
| | | /// <summary> |
| | | /// åºåº |
| | | /// </summary> |
| | | [Description("")] |
| | | Outbound, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.StockEnum |
| | | { |
| | | public enum StockStatusEmun |
| | | { |
| | | [Description("ç»çæå")] |
| | | ç»çæå = 1, |
| | | |
| | | [Description("ç»çæ¤é")] |
| | | ç»çæ¤é = 2, |
| | | |
| | | [Description("å
¥åºç¡®è®¤")] |
| | | å
¥åºç¡®è®¤ = 3, |
| | | |
| | | [Description("å
¥åºæ¤é")] |
| | | å
¥åºæ¤é = 4, |
| | | |
| | | [Description("å·²å
¥åº")] |
| | | å·²å
¥åº = 5, |
| | | |
| | | [Description("å
¥åºå®æ")] |
| | | å
¥åºå®æ = 6, |
| | | |
| | | [Description("åºåºéå®")] |
| | | åºåºéå® = 7, |
| | | |
| | | [Description("åºåºå®æ")] |
| | | åºåºå®æ = 8, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_DTO.Basic |
| | | { |
| | | public class CachePointGroupDTO |
| | | { |
| | | public int IdA { get; set; } |
| | | |
| | | public int IdB { get; set; } |
| | | |
| | | public string PointCodeA { get; set; } |
| | | |
| | | public string PointCodeB { get; set; } |
| | | |
| | | public int PointTypeA { get; set; } |
| | | |
| | | public int PointTypeB { get; set; } |
| | | |
| | | public int PointStatusA { get; set; } |
| | | |
| | | public int PointStatusB { get; set; } |
| | | |
| | | public int DepthA { get; set; } |
| | | |
| | | public int DepthB { get; set; } |
| | | |
| | | public int EnableStatusA { get; set; } |
| | | |
| | | public int EnableStatusB { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | |
| | | namespace WIDESEAWCS_DTO.Basic |
| | | { |
| | | [ModelValidate] |
| | | public class InitializationLocationDTO |
| | | { |
| | | /// <summary> |
| | | /// å··éå· |
| | | /// </summary> |
| | | [PropertyValidate("å··éå·", NotNullAndEmpty = true)] |
| | | public string Roadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¡ |
| | | /// </summary> |
| | | [PropertyValidate("è¡", MinValue = 0, IsContainMinValue = false)] |
| | | public int MaxRow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å |
| | | /// </summary> |
| | | [PropertyValidate("å", MinValue = 0, IsContainMinValue = false)] |
| | | public int MaxColumn { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å± |
| | | /// </summary> |
| | | [PropertyValidate("å±", MinValue = 0, IsContainMinValue = false)] |
| | | public int MaxLayer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åæ·±è´§ä½ |
| | | /// </summary> |
| | | [PropertyValidate("æ¯å¦å深货ä½", NotNullAndEmpty = true)] |
| | | public bool IsSingleDepth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 䏿·±è¡å· |
| | | /// </summary> |
| | | [PropertyValidate("䏿·±è¡å·", NotNullAndEmptyWithPropertyAndValue = new string[] { nameof(IsSingleDepth), "false" })] |
| | | public List<int> FirstDepthRows { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_DTO.Basic |
| | | { |
| | | public class LocationGroupDTO |
| | | { |
| | | public int IdA { get; set; } |
| | | |
| | | public int IdB { get; set; } |
| | | |
| | | public string LocationCodeA { get; set; } |
| | | |
| | | public string LocationCodeB { get; set; } |
| | | |
| | | public int LocationTypeA { get; set; } |
| | | |
| | | public int LocationTypeB { get; set; } |
| | | |
| | | public int LocationStatusA { get; set; } |
| | | |
| | | public int LocationStatusB { get; set; } |
| | | |
| | | public int DepthA { get; set; } |
| | | |
| | | public int DepthB { get; set; } |
| | | |
| | | public int EnableStatusA { get; set; } |
| | | |
| | | public int EnableStatusB { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | |
| | | namespace WIDESEAWCS_DTO.Outbound |
| | | { |
| | | [ModelValidate] |
| | | public class OutboundOrderAddDTO |
| | | { |
| | | /// <summary> |
| | | /// 䏿¸¸åæ®ç¼å· |
| | | /// </summary> |
| | | public string UpperOrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç±»å |
| | | /// </summary> |
| | | [PropertyValidate("åæ®ç±»å", NotNullAndEmpty = true)] |
| | | public int OrderType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public string Remark { get; set; } |
| | | |
| | | [PropertyValidate("åæ®æç»ä¿¡æ¯", NotNullAndEmpty = true)] |
| | | public List<OutboundOrderDetailAddDTO> Details { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | |
| | | namespace WIDESEAWCS_DTO.Outbound |
| | | { |
| | | [ModelValidate] |
| | | public class OutboundOrderDetailAddDTO |
| | | { |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | | /// </summary> |
| | | [PropertyValidate("ç©æç¼å·", NotNullAndEmpty = true)] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®æ°é |
| | | /// </summary> |
| | | [PropertyValidate("åæ®æ°é", NotNullAndEmpty = true, MinValue = 0, IsContainMinValue = false)] |
| | | public decimal OrderQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_DTO.Stock |
| | | { |
| | | public class StockSelectViewDTO |
| | | { |
| | | |
| | | public string MaterielCode { get; set; } |
| | | |
| | | public string MaterielName { get; set; } |
| | | |
| | | public decimal UseableQuantity { get; set; } |
| | | |
| | | public string PalletCode { get; set; } |
| | | |
| | | public string LocationCode { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_DTO.Stock |
| | | { |
| | | public class StockViewDTO |
| | | { |
| | | public int AreaId { get; set; } |
| | | |
| | | public string LocationCode { get; set; } |
| | | |
| | | public string LocationName { get; set; } |
| | | |
| | | public int Column { get; set; } |
| | | |
| | | public int Row { get; set; } |
| | | |
| | | public int Layer { get; set; } |
| | | |
| | | public int Depth { get; set; } |
| | | |
| | | public int LocationStatus { get; set; } |
| | | |
| | | public int LocationType { get; set; } |
| | | |
| | | public string RoadwayNo { get; set; } |
| | | |
| | | public int EnalbeStatus { get; set; } |
| | | |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int StockId { get; set; } |
| | | |
| | | public string PalletCode { get; set; } |
| | | |
| | | public bool IsFull { get; set; } |
| | | |
| | | public int StockStatus { get; set; } |
| | | |
| | | public string StockRemark { get; set; } |
| | | |
| | | public string Creater { get; set; } |
| | | |
| | | public DateTime CreateDate { get; set; } |
| | | |
| | | public string Modifier { get; set; } |
| | | |
| | | public DateTime? ModifyDate { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(StockId))] |
| | | public List<Dt_StockInfoDetail> Details { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | |
| | | namespace WIDESEAWCS_IBasicRepository |
| | | { |
| | | public interface IBasicRepository : IDependency |
| | | { |
| | | |
| | | ILocationInfoRepository LocationInfoRepository { get; } |
| | | |
| | | IMaterielInfoRepository MaterielInfoRepository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_DTO.Basic; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IBasicRepository |
| | | { |
| | | public interface ILocationInfoRepository : IRepository<Dt_LocationInfo> |
| | | { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IBasicRepository |
| | | { |
| | | public interface IMaterielInfoRepository : IRepository<Dt_MaterielInfo> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_DTO\WIDESEAWCS_DTO.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | |
| | | namespace WIDESEAWCS_IBasicService |
| | | { |
| | | public interface IBasicService: IDependency |
| | | { |
| | | ILocationInfoService LocationInfoService { get; } |
| | | |
| | | IMaterielInfoService MaterielInfoService { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_DTO.Basic; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IBasicService |
| | | { |
| | | public interface ILocationInfoService : IService<Dt_LocationInfo> |
| | | { |
| | | ILocationInfoRepository Repository { get; } |
| | | |
| | | WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO); |
| | | |
| | | WebResponseContent LocationEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent LocationDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent LocationEnableStatus(int key); |
| | | |
| | | WebResponseContent LocationDisableStatus(int key); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IBasicService |
| | | { |
| | | public interface IMaterielInfoService : IService<Dt_MaterielInfo> |
| | | { |
| | | IMaterielInfoRepository Repository { get; } |
| | | |
| | | bool ExsitMateriel(string materielCode); |
| | | |
| | | bool ExsitMateriels(List<string> materielCodes); |
| | | |
| | | Dt_MaterielInfo GetMaterielInfo(string materielCode); |
| | | |
| | | List<Dt_MaterielInfo> GetMaterielInfos(List<string> materielCodes); |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_BasicRepository\WIDESEAWCS_BasicRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IOutboundRepository |
| | | { |
| | | public interface IOutStockLockInfoRepository : IRepository<Dt_OutStockLockInfo> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IOutboundRepository |
| | | { |
| | | public interface IOutboundOrderDetailRepository : IRepository<Dt_OutboundOrderDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IOutboundRepository |
| | | { |
| | | public interface IOutboundOrderRepository : IRepository<Dt_OutboundOrder> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | |
| | | namespace WIDESEAWCS_IOutboundRepository |
| | | { |
| | | public interface IOutboundRepository : IDependency |
| | | { |
| | | IOutboundOrderDetailRepository OutboundOrderDetailRepository { get; } |
| | | |
| | | IOutboundOrderRepository OutboundOrderRepository { get; } |
| | | |
| | | IOutStockLockInfoRepository OutboundStockLockInfoRepository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_DTO\WIDESEAWCS_DTO.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.StockEnum; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IOutboundService |
| | | { |
| | | public interface IOutStockLockInfoService : IService<Dt_OutStockLockInfo> |
| | | { |
| | | IOutStockLockInfoRepository Repository { get; } |
| | | |
| | | List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null); |
| | | |
| | | List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId); |
| | | |
| | | List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutStockStatus outStockStatus); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IOutboundService |
| | | { |
| | | public interface IOutboundOrderDetailService : IService<Dt_OutboundOrderDetail> |
| | | { |
| | | IOutboundOrderDetailRepository Repository { get; } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_DTO.Outbound; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IOutboundService |
| | | { |
| | | public interface IOutboundOrderService : IService<Dt_OutboundOrder> |
| | | { |
| | | IOutboundOrderRepository Repository { get; } |
| | | |
| | | WebResponseContent AddOutboundOrder(OutboundOrderAddDTO orderAddDTO); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | |
| | | namespace WIDESEAWCS_IOutboundService |
| | | { |
| | | public interface IOutboundService : IDependency |
| | | { |
| | | IOutboundOrderDetailService OutboundOrderDetailService { get; } |
| | | |
| | | IOutboundOrderService OutboundOrderService { get; } |
| | | |
| | | IOutStockLockInfoService OutboundStockLockInfoService { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_OutboundRepository\WIDESEAWCS_OutboundRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IRecordRepository |
| | | { |
| | | public interface ILocationStatusChangeRecordRepository : IRepository<Dt_LocationStatusChangeRecord> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | |
| | | namespace WIDESEAWCS_IRecordRepository |
| | | { |
| | | public interface IRecordRepository : IDependency |
| | | { |
| | | ILocationStatusChangeRecordRepository LocationStatusChangeRecordRepository { get; } |
| | | |
| | | IStockQuantityChangeRecordRepository StockQuantityChangeRecordRepository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IRecordRepository |
| | | { |
| | | public interface IStockQuantityChangeRecordRepository : IRepository<Dt_StockQuantityChangeRecord> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_DTO\WIDESEAWCS_DTO.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IRecordService |
| | | { |
| | | public interface ILocationStatusChangeRecordSetvice : IService<Dt_LocationStatusChangeRecord> |
| | | { |
| | | ILocationStatusChangeRecordRepository Repository { get; } |
| | | |
| | | void AddLocationStatusChangeRecord(Dt_LocationInfo locationInfo, int lastStatus, int changeType, string orderNo, int? taskNum); |
| | | |
| | | void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, int newStatus, int changeType, string? orderNo, List<int>? taskNums); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | |
| | | namespace WIDESEAWCS_IRecordService |
| | | { |
| | | public interface IRecordService : IDependency |
| | | { |
| | | ILocationStatusChangeRecordSetvice LocationStatusChangeRecordSetvice { get; } |
| | | |
| | | IStockQuantityChangeRecordService StockQuantityChangeRecordService { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.StockEnum; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IRecordService |
| | | { |
| | | public interface IStockQuantityChangeRecordService : IService<Dt_StockQuantityChangeRecord> |
| | | { |
| | | IStockQuantityChangeRecordRepository Repository { get; } |
| | | |
| | | void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> stockInfoDetails, decimal beforeQuantity, decimal totalQuantity, StockChangeType changeType); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_RecordRepository\WIDESEAWCS_RecordRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IStockRepository |
| | | { |
| | | public interface IStockInfoDetailRepository : IRepository<Dt_StockInfoDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IStockRepository |
| | | { |
| | | public interface IStockInfoRepository : IRepository<Dt_StockInfo> |
| | | { |
| | | List<StockViewDTO> GetAllStockViews(); |
| | | |
| | | Dt_StockInfo GetStockInfo(string palletCode); |
| | | |
| | | List<Dt_StockInfo> GetStockInfos(string materielCode); |
| | | |
| | | List<Dt_StockInfo> GetStockInfos(string materielCode, List<string> locationCodes); |
| | | |
| | | List<Dt_StockInfo> GetStockInfosByIds(List<int> ids); |
| | | |
| | | List<Dt_StockInfo> GetStockInfosByPalletCodes(List<string> palletCodes); |
| | | |
| | | List<Dt_StockInfo> GetStockInfosExclude(string materielCode, List<string> palletCodes); |
| | | |
| | | bool UpdateDataWithDetail(Dt_StockInfo stockInfo); |
| | | |
| | | Dt_StockInfo GetPalletStockInfo(string roadwayNo); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | |
| | | namespace WIDESEAWCS_IStockRepository |
| | | { |
| | | public interface IStockRepository : IDependency |
| | | { |
| | | IStockInfoDetailRepository StockInfoDetailRepository { get; } |
| | | |
| | | IStockInfoRepository StockInfoRepository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_DTO\WIDESEAWCS_DTO.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IStockService |
| | | { |
| | | public interface IStockInfoDetailService : IService<Dt_StockInfoDetail> |
| | | { |
| | | IStockInfoDetailRepository Repository { get; } |
| | | |
| | | bool ExistSerialNumber(string SerialNumber); |
| | | |
| | | bool ExistSerialNumbers(List<string> SerialNumbers); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IStockService |
| | | { |
| | | public interface IStockInfoService : IService<Dt_StockInfo> |
| | | { |
| | | IStockInfoRepository Repository { get; } |
| | | |
| | | Dt_StockInfo? GetStockByPalletCode(string palletCode); |
| | | |
| | | void AddMaterielGroup(Dt_StockInfo stockInfo); |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | |
| | | namespace WIDESEAWCS_IStockService |
| | | { |
| | | public interface IStockService : IDependency |
| | | { |
| | | IStockInfoDetailService StockInfoDetailService { get; } |
| | | |
| | | IStockInfoService StockInfoService { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | |
| | | namespace WIDESEAWCS_IStockService |
| | | { |
| | | public interface IStockViewService : IDependency |
| | | { |
| | | PageGridData<StockViewDTO> GetPageData(PageDataOptions options); |
| | | |
| | | object GetDetailPage(PageDataOptions pageData); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_StockRepository\WIDESEAWCS_StockRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_LocationInfo), "è´§ä½ä¿¡æ¯")] |
| | | public class Dt_LocationInfo : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºå主é®")] |
| | | public int AreaId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "è´§ä½ç¼å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "è´§ä½åç§°")] |
| | | public string LocationName { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "å··éç¼å·")] |
| | | public string RoadwayNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½è¡")] |
| | | public int Row { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½å")] |
| | | public int Column { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½å±")] |
| | | public int Layer { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½æ·±åº¦")] |
| | | public int Depth { get; set; } |
| | | |
| | | //[SugarColumn(IsNullable = false, ColumnDescription = "左侧/å³ä¾§")] |
| | | //public int LocationSide { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½ç±»å")] |
| | | public int LocationType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "è´§ä½ç¶æ")] |
| | | public int LocationStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "ç¦ç¨ç¶æ")] |
| | | public int EnableStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_MaterielInfo), "ç©æä¿¡æ¯")] |
| | | public class Dt_MaterielInfo : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºå主é®")] |
| | | public int AreaId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 500, ColumnDescription = "ç©ææè¿°")] |
| | | public string MaterielDes { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "容å¨ç±»å", DefaultValue = "0")] |
| | | public int CotainerType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "å
è£
è§æ ¼")] |
| | | public string Packspes { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç©æå±æ§", DefaultValue = "0")] |
| | | public int Attribute { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "计éåä½", DefaultValue = "0")] |
| | | public string Unit { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æææ", DefaultValue = "-1")] |
| | | public int Validity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "å®å
¨åºå", DefaultValue = "-1")] |
| | | public decimal SafetyStock { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æ¯å¦å
许混æ¹")] |
| | | public bool IsMixBatch { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æ¯å¦å
许混æ")] |
| | | public bool IsMixMateriel { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_OutStockLockInfo), "åºåºè¯¦æ
")] |
| | | public class Dt_OutStockLockInfo : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®æç»ä¸»é®")] |
| | | public int OrderDetailId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç±»å")] |
| | | public int OrderType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºå主é®")] |
| | | public int StockId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åæ®æ°é")] |
| | | public decimal OrderQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åå§åºåé")] |
| | | public decimal OriginalQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åé
åºåºé")] |
| | | public decimal AssignQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "è´§ä½ç¼å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æçç¼å·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä»»å¡å·")] |
| | | public int? TaskNum { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç¶æ")] |
| | | public int Status { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_OutboundOrder), "åºåºå")] |
| | | public class Dt_OutboundOrder : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | //[CodeRule(WIDESEA_Core.Enums.RuleCode.OutboundOrderRule)] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·", IsOnlyIgnoreUpdate = true)] |
| | | public string OrderNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "䏿¸¸åæ®ç¼å·", IsOnlyIgnoreUpdate = true)] |
| | | public string UpperOrderNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç±»å", IsOnlyIgnoreUpdate = true)] |
| | | public int OrderType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç¶æ")] |
| | | public int OrderStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¹å¼", IsOnlyIgnoreUpdate = true)] |
| | | public int CreateType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_OutboundOrderDetail.OrderId), nameof(Id))] |
| | | public List<Dt_OutboundOrderDetail> Details { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_OutboundOrderDetail), "åºåºåæç»")] |
| | | public class Dt_OutboundOrderDetail : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºå主é®")] |
| | | public int OrderId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åæ®æ°é")] |
| | | public decimal OrderQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "é宿°é", DefaultValue = "0")] |
| | | public decimal LockQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "å·²åºæ°é", DefaultValue = "0")] |
| | | public decimal OverOutQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "订åæç»ç¶æ")] |
| | | public int OrderDetailStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_LocationStatusChangeRecord),"è´§ä½ç¶æåå¨è®°å½")] |
| | | public class Dt_LocationStatusChangeRecord : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½ä¸»é®")] |
| | | public int LocationId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "è´§ä½ç¼å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åå¨åè´§ä½ç¶æ")] |
| | | public int BeforeStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åå¨åè´§ä½ç¶æ")] |
| | | public int AfterStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åå¨ç±»åï¼åºåºãå
¥åºãæå¨è°æ´...ï¼")] |
| | | public int ChangeType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "忮䏻é®")] |
| | | public int? OrderId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "åæ®ç¼å·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä»»å¡å·")] |
| | | public int? TaskNum { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_StockQuantityChangeRecord), "åºååå¨ä¿¡æ¯è®°å½")] |
| | | public class Dt_StockQuantityChangeRecord : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåæç»ä¸»é®")] |
| | | public int StockDetailId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æçç¼å·")] |
| | | public string PalleCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "åºåå·")] |
| | | public string SerilNumber { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "åæ®ç¼å·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä»»å¡å·")] |
| | | public int? TaskNum { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åå¨ç±»åï¼åºåºãå
¥åºãæå¨è°æ´...ï¼")] |
| | | public int ChangeType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "å卿°éï¼æ£æ°è¡¨ç¤ºå¢å ï¼è´æ°è¡¨ç¤ºåå°ï¼")] |
| | | public decimal ChangeQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åå¨ååºåé", DefaultValue = "0")] |
| | | public decimal BeforeQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åå¨ååºåé", DefaultValue = "0")] |
| | | public decimal AfterQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_StockInfo), "åºåä¿¡æ¯")] |
| | | public class Dt_StockInfo : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æçç¼å·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "è´§ä½ç¼å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æ¯å¦æ»¡ç", DefaultValue = "0")] |
| | | public bool IsFull { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåç¶æ")] |
| | | public int StockStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(Id))] |
| | | public List<Dt_StockInfoDetail> Details { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_StockInfoDetail), "åºåä¿¡æ¯æç»")] |
| | | public class Dt_StockInfoDetail : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåä¿¡æ¯ä¸»é®")] |
| | | public int StockId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "åºåå·")] |
| | | public string SerialNumber { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åºåæ°é")] |
| | | public decimal StockQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åºåºæ°é", DefaultValue = "0")] |
| | | public decimal OutboundQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåæç»ç¶æ")] |
| | | public int Status { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))] |
| | | public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; } |
| | | } |
| | | } |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä»»å¡å·")] |
| | | [ExporterHeader(DisplayName = "ä»»å¡å·")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»»å¡å·")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»»å¡å·"), SequenceAttirbute(nameof(SequenceEnum.SeqTaskNum), 6000)] |
| | | public int TaskNum { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" /> |
| | | <PackageReference Include="WIDESEAWCS_Core" Version="1.0.5" /> |
| | | <PackageReference Include="WIDESEAWCS_Core" Version="1.0.6" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_IOutboundRepository |
| | | { |
| | | public class OutStockLockInfoRepository : RepositoryBase<Dt_OutStockLockInfo>, IOutStockLockInfoRepository |
| | | { |
| | | public OutStockLockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_OutboundRepository |
| | | { |
| | | public class OutboundOrderDetailRepository : RepositoryBase<Dt_OutboundOrderDetail>, IOutboundOrderDetailRepository |
| | | { |
| | | public OutboundOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_OutboundRepository |
| | | { |
| | | public class OutboundOrderRepository : RepositoryBase<Dt_OutboundOrder>, IOutboundOrderRepository |
| | | { |
| | | public OutboundOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | |
| | | namespace WIDESEAWCS_OutboundRepository |
| | | { |
| | | public class OutboundRepository : IOutboundRepository |
| | | { |
| | | public IOutboundOrderDetailRepository OutboundOrderDetailRepository { get; } |
| | | |
| | | public IOutboundOrderRepository OutboundOrderRepository { get; } |
| | | |
| | | public IOutStockLockInfoRepository OutboundStockLockInfoRepository { get; } |
| | | |
| | | public OutboundRepository(IOutboundOrderDetailRepository outboundOrderDetailRepository, IOutboundOrderRepository outboundOrderRepository, IOutStockLockInfoRepository outboundStockLockInfoRepository) |
| | | { |
| | | OutboundOrderDetailRepository = outboundOrderDetailRepository; |
| | | OutboundOrderRepository = outboundOrderRepository; |
| | | OutboundStockLockInfoRepository = outboundStockLockInfoRepository; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_IOutboundRepository\WIDESEAWCS_IOutboundRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.StockEnum; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_IOutboundService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_OutboundService |
| | | { |
| | | public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService |
| | | { |
| | | public IOutStockLockInfoRepository Repository => BaseDal; |
| | | |
| | | public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null) |
| | | { |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); |
| | | |
| | | foreach (var item in outStocks) |
| | | { |
| | | Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo() |
| | | { |
| | | PalletCode = item.PalletCode, |
| | | AssignQuantity = item.Details.Where(x => x.MaterielCode == outboundOrderDetail.MaterielCode).Sum(x => x.OutboundQuantity), |
| | | MaterielCode = outboundOrderDetail.MaterielCode, |
| | | BatchNo = outboundOrderDetail.BatchNo, |
| | | LocationCode = item.LocationCode, |
| | | MaterielName = outboundOrderDetail.MaterielName, |
| | | OrderDetailId = outboundOrderDetail.Id, |
| | | OrderNo = outboundOrder.OrderNo, |
| | | OrderType = outboundOrder.OrderType, |
| | | OriginalQuantity = item.Details.Where(x => x.MaterielCode == outboundOrderDetail.MaterielCode).Sum(x => x.StockQuantity), |
| | | Status = taskNum == null ? OutStockStatus.å·²åé
.ObjToInt() : OutStockStatus.åºåºä¸.ObjToInt(), |
| | | StockId = item.Id, |
| | | TaskNum = taskNum |
| | | }; |
| | | outStockLockInfos.Add(outStockLockInfo); |
| | | } |
| | | |
| | | return outStockLockInfos; |
| | | } |
| | | |
| | | public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId) |
| | | { |
| | | return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId); |
| | | } |
| | | |
| | | public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutStockStatus outStockStatus) |
| | | { |
| | | return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && x.Status == outStockStatus.ObjToInt()); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_IOutboundService; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_StockRepository; |
| | | |
| | | namespace WIDESEAWCS_OutboundService |
| | | { |
| | | public partial class OutboundOrderDetailService : ServiceBase<Dt_OutboundOrderDetail, IOutboundOrderDetailRepository>, IOutboundOrderDetailService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | |
| | | private readonly IStockService _stockService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | private readonly IOutboundRepository _outboundRepository; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | |
| | | public IOutboundOrderDetailRepository Repository => BaseDal; |
| | | |
| | | public OutboundOrderDetailService(IOutboundOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockService stockService, IBasicService basicService, IRecordService recordService, IOutboundRepository outboundRepository, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _stockService = stockService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | _outboundRepository = outboundRepository; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Serialization; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.OrderEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.Utilities; |
| | | using WIDESEAWCS_DTO.Outbound; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_IOutboundService; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_OutboundService |
| | | { |
| | | public partial class OutboundOrderService : ServiceBase<Dt_OutboundOrder, IOutboundOrderRepository>, IOutboundOrderService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | private readonly IMaterielInfoService _materielInfoService; |
| | | private readonly IStockInfoService _stockService; |
| | | private readonly IStockInfoDetailService _stockDetailService; |
| | | |
| | | public IOutboundOrderRepository Repository => BaseDal; |
| | | |
| | | public OutboundOrderService(IOutboundOrderRepository BaseDal, IMapper mapper, IMaterielInfoService materielInfoService, IStockInfoDetailService stockDetailService, IStockInfoService stockInfoService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _materielInfoService = materielInfoService; |
| | | _stockDetailService = stockDetailService; |
| | | _stockService = stockInfoService; |
| | | } |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | OutboundOrderAddDTO outboundOrder = saveModel.MainData.DicToModel<OutboundOrderAddDTO>(); |
| | | List<OutboundOrderDetailAddDTO> orderDetailAddDTOs = saveModel.DetailData.DicToIEnumerable<OutboundOrderDetailAddDTO>(); |
| | | outboundOrder.Details = orderDetailAddDTOs.GroupBy(x => x.MaterielCode).Select(x => new OutboundOrderDetailAddDTO |
| | | { |
| | | BatchNo = x.FirstOrDefault()?.BatchNo ?? "", |
| | | MaterielCode = x.Key, |
| | | OrderQuantity = x.Sum(x => x.OrderQuantity), |
| | | Remark = x.FirstOrDefault(v => !string.IsNullOrEmpty(v.Remark))?.Remark ?? "" |
| | | }).ToList(); |
| | | return AddOutboundOrder(outboundOrder); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | List<Dt_OutboundOrderDetail> outboundOrderDetails = saveModel.DetailData.DicToIEnumerable<Dt_OutboundOrderDetail>(); |
| | | if (outboundOrderDetails.GroupBy(x => x.MaterielCode).Select(x => x.Count()).Any(x => x > 1)) |
| | | { |
| | | return WebResponseContent.Instance.Error("ç©æéå¤"); |
| | | } |
| | | outboundOrderDetails = outboundOrderDetails.Where(x => (x.Id > 0 && x.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt()) || x.Id == 0).ToList(); |
| | | |
| | | List<Dictionary<string, object>> dics = new List<Dictionary<string, object>>(); |
| | | JsonSerializerSettings settings = new JsonSerializerSettings(); |
| | | settings.ContractResolver = new CamelCasePropertyNamesContractResolver(); |
| | | foreach (var item in outboundOrderDetails) |
| | | { |
| | | string str = JsonConvert.SerializeObject(item, settings); |
| | | Dictionary<string, object>? dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(str); |
| | | if (dic != null) |
| | | dics.Add(dic); |
| | | } |
| | | saveModel.DetailData = dics; |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public WebResponseContent AddOutboundOrder(OutboundOrderAddDTO orderAddDTO) |
| | | { |
| | | WebResponseContent content = new(); |
| | | try |
| | | { |
| | | #region éªè¯æ°æ® |
| | | (bool, string, object?) result = CheckOutboundOrderAddData(orderAddDTO); |
| | | if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2); |
| | | #endregion |
| | | |
| | | Dt_OutboundOrder outboundOrder = _mapper.Map<Dt_OutboundOrder>(orderAddDTO); |
| | | outboundOrder.OrderStatus = OutboundStatusEnum.æªå¼å§.ObjToInt(); |
| | | bool a = BaseDal.Db.InsertNav(outboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | private (bool, string, object?) CheckOutboundOrderAddData(OutboundOrderAddDTO outboundOrderAddDTO) |
| | | { |
| | | (bool, string, object?) result1 = ModelValidate.ValidateModelData(outboundOrderAddDTO); |
| | | if (!result1.Item1) return result1; |
| | | |
| | | (bool, string, object?) result2 = ModelValidate.ValidateModelData(outboundOrderAddDTO.Details); |
| | | if (!result2.Item1) return result2; |
| | | |
| | | IEnumerable<int> inOrderTypes = Enum.GetValues<OutOrderTypeEnum>().Cast<int>(); |
| | | if (!inOrderTypes.Contains(outboundOrderAddDTO.OrderType)) |
| | | { |
| | | return (false, "æªæ¾å°è¯¥åæ®ç±»å", outboundOrderAddDTO); |
| | | } |
| | | |
| | | List<string> materielCodes = outboundOrderAddDTO.Details.Select(x => x.MaterielCode).ToList(); |
| | | if (!_materielInfoService.ExsitMateriels(materielCodes)) |
| | | { |
| | | return (false, "æç©æä¿¡æ¯æªå½å
¥ï¼è¯·å½å
¥ç©æä¿¡æ¯", outboundOrderAddDTO); |
| | | } |
| | | |
| | | if (BaseDal.QueryFirst(x => x.UpperOrderNo == outboundOrderAddDTO.UpperOrderNo && !string.IsNullOrEmpty(x.UpperOrderNo)) != null) |
| | | { |
| | | return (false, "忮已åå¨", outboundOrderAddDTO); |
| | | } |
| | | return (true, "æå", outboundOrderAddDTO); |
| | | } |
| | | |
| | | public WebResponseContent ReleaseOutOrder(int orderId) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IOutboundService; |
| | | |
| | | namespace WIDESEAWCS_OutboundService |
| | | { |
| | | public class OutboundService : IOutboundService |
| | | { |
| | | public IOutboundOrderDetailService OutboundOrderDetailService { get; } |
| | | |
| | | public IOutboundOrderService OutboundOrderService { get; } |
| | | |
| | | public IOutStockLockInfoService OutboundStockLockInfoService { get; } |
| | | |
| | | public OutboundService(IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService) |
| | | { |
| | | OutboundOrderDetailService = outboundOrderDetailService; |
| | | OutboundOrderService = outboundOrderService; |
| | | OutboundStockLockInfoService = outboundStockLockInfoService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_IOutboundService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_OutboundService |
| | | { |
| | | public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService |
| | | { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | using WIDESEAWCS_Common.OrderEnum; |
| | | using WIDESEAWCS_Common.StockEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_IOutboundService; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_StockRepository; |
| | | |
| | | namespace WIDESEAWCS_OutboundService |
| | | { |
| | | public partial class OutboundOrderDetailService : ServiceBase<Dt_OutboundOrderDetail, IOutboundOrderDetailRepository>, IOutboundOrderDetailService |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Serialization; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.Utilities; |
| | | using WIDESEAWCS_DTO.Outbound; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_IOutboundRepository; |
| | | using WIDESEAWCS_IOutboundService; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_OutboundService |
| | | { |
| | | public partial class OutboundOrderService : ServiceBase<Dt_OutboundOrder, IOutboundOrderRepository>, IOutboundOrderService |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_IBasicService\WIDESEAWCS_IBasicService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_IOutboundService\WIDESEAWCS_IOutboundService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_IRecordService\WIDESEAWCS_IRecordService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_IStockService\WIDESEAWCS_IStockService.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_RecordRepository |
| | | { |
| | | public class LocationStatusChangeRecordRepository : RepositoryBase<Dt_LocationStatusChangeRecord>, ILocationStatusChangeRecordRepository |
| | | { |
| | | public LocationStatusChangeRecordRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | |
| | | namespace WIDESEAWCS_RecordRepository |
| | | { |
| | | public class RecordRepository : IRecordRepository |
| | | { |
| | | public ILocationStatusChangeRecordRepository LocationStatusChangeRecordRepository { get; } |
| | | |
| | | public IStockQuantityChangeRecordRepository StockQuantityChangeRecordRepository { get; } |
| | | |
| | | public RecordRepository(ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository, IStockQuantityChangeRecordRepository stockQuantityChangeRecordRepository) |
| | | { |
| | | LocationStatusChangeRecordRepository = locationStatusChangeRecordRepository; |
| | | StockQuantityChangeRecordRepository = stockQuantityChangeRecordRepository; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_RecordRepository |
| | | { |
| | | public class StockQuantityChangeRecordRepository : RepositoryBase<Dt_StockQuantityChangeRecord>, IStockQuantityChangeRecordRepository |
| | | { |
| | | public StockQuantityChangeRecordRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_IRecordRepository\WIDESEAWCS_IRecordRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.DB; |
| | | using WIDESEAWCS_Core.Seed; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_RecordService |
| | | { |
| | | public partial class LocationStatusChangeRecordSetvice : ServiceBase<Dt_LocationStatusChangeRecord, ILocationStatusChangeRecordRepository>, ILocationStatusChangeRecordSetvice |
| | | { |
| | | public LocationStatusChangeRecordSetvice(ILocationStatusChangeRecordRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public ILocationStatusChangeRecordRepository Repository => BaseDal; |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_RecordService |
| | | { |
| | | public partial class StockQuantityChangeRecordService : ServiceBase<Dt_StockQuantityChangeRecord, IStockQuantityChangeRecordRepository>, IStockQuantityChangeRecordService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | public StockQuantityChangeRecordService(IStockQuantityChangeRecordRepository BaseDal, IMapper mapper) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | } |
| | | |
| | | public IStockQuantityChangeRecordRepository Repository => BaseDal; |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IRecordService; |
| | | |
| | | namespace WIDESEAWCS_RecordService |
| | | { |
| | | public class RecordService : IRecordService |
| | | { |
| | | public ILocationStatusChangeRecordSetvice LocationStatusChangeRecordSetvice { get; } |
| | | |
| | | public IStockQuantityChangeRecordService StockQuantityChangeRecordService { get; } |
| | | |
| | | public RecordService(ILocationStatusChangeRecordSetvice locationStatusChangeRecordSetvice, IStockQuantityChangeRecordService stockQuantityChangeRecordService) |
| | | { |
| | | LocationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice; |
| | | StockQuantityChangeRecordService = stockQuantityChangeRecordService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.DB; |
| | | using WIDESEAWCS_Core.Seed; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_RecordService |
| | | { |
| | | public partial class LocationStatusChangeRecordSetvice : ServiceBase<Dt_LocationStatusChangeRecord, ILocationStatusChangeRecordRepository>, ILocationStatusChangeRecordSetvice |
| | | { |
| | | public void AddLocationStatusChangeRecord(Dt_LocationInfo locationInfo, int lastStatus, int changeType, string? orderNo, int? taskNum) |
| | | { |
| | | Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord() |
| | | { |
| | | AfterStatus = locationInfo.LocationStatus, |
| | | BeforeStatus = lastStatus, |
| | | ChangeType = changeType, |
| | | LocationCode = locationInfo.LocationCode, |
| | | LocationId = locationInfo.Id, |
| | | TaskNum = taskNum, |
| | | OrderNo = orderNo ?? "" |
| | | }; |
| | | |
| | | BaseDal.AddData(locationStatusChangeRecord); |
| | | } |
| | | |
| | | public void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, int newStatus, int changeType, string? orderNo, List<int>? taskNums) |
| | | { |
| | | List< Dt_LocationStatusChangeRecord > records = new List<Dt_LocationStatusChangeRecord> (); |
| | | for (int i = 0; i < locationInfos.Count; i++) |
| | | { |
| | | Dt_LocationInfo locationInfo = locationInfos[i]; |
| | | int? taskNum = (taskNums != null && taskNums.Count > 0 && taskNums.Count == locationInfos.Count) ? taskNums[i] : null; |
| | | Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord() |
| | | { |
| | | AfterStatus = newStatus, |
| | | BeforeStatus = locationInfo.LocationStatus, |
| | | ChangeType = changeType, |
| | | LocationCode = locationInfo.LocationCode, |
| | | LocationId = locationInfo.Id, |
| | | TaskNum = taskNum, |
| | | OrderNo = orderNo ?? "" |
| | | }; |
| | | records.Add(locationStatusChangeRecord); |
| | | } |
| | | |
| | | |
| | | BaseDal.AddData(records); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.StockEnum; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_RecordService |
| | | { |
| | | public partial class StockQuantityChangeRecordService : ServiceBase<Dt_StockQuantityChangeRecord, IStockQuantityChangeRecordRepository>, IStockQuantityChangeRecordService |
| | | { |
| | | public void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> stockInfoDetails, decimal beforeQuantity, decimal totalQuantity, StockChangeType changeType) |
| | | { |
| | | List<Dt_StockQuantityChangeRecord> stockQuantityChangeRecords = new List<Dt_StockQuantityChangeRecord>(); |
| | | stockQuantityChangeRecords = _mapper.Map<List<Dt_StockQuantityChangeRecord>>(stockInfoDetails); |
| | | int index = 0; |
| | | decimal currentQuantity = 0; |
| | | stockQuantityChangeRecords.ForEach(x => |
| | | { |
| | | x.PalleCode = stockInfo.PalletCode; |
| | | x.BeforeQuantity = beforeQuantity; |
| | | if (totalQuantity > beforeQuantity) |
| | | { |
| | | x.ChangeQuantity = stockInfoDetails[index].StockQuantity; |
| | | currentQuantity += stockInfoDetails[index].StockQuantity; |
| | | x.AfterQuantity = stockInfoDetails[index].StockQuantity + beforeQuantity; |
| | | } |
| | | else |
| | | { |
| | | x.ChangeQuantity = -stockInfoDetails[index].StockQuantity; |
| | | currentQuantity -= stockInfoDetails[index].StockQuantity; |
| | | x.AfterQuantity = beforeQuantity - stockInfoDetails[index].StockQuantity; |
| | | } |
| | | |
| | | x.ChangeType = changeType.ObjToInt(); |
| | | beforeQuantity += x.ChangeQuantity; |
| | | }); |
| | | BaseDal.AddData(stockQuantityChangeRecords); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_IRecordService\WIDESEAWCS_IRecordService.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_BasicInfoService", "WIDESEAWCS_BasicInfoService\WIDESEAWCS_BasicInfoService.csproj", "{FFAB2C76-1C9E-4006-95C8-A0B2AA53139D}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Outbound", "Outbound", "{91992A8E-5C32-4628-A87E-5FB68A940673}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_IOutboundRepository", "WIDESEAWCS_IOutboundRepository\WIDESEAWCS_IOutboundRepository.csproj", "{C31D0FE4-3B8A-447E-A0AC-EB04C7ADAB28}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_OutboundRepository", "WIDESEAWCS_OutboundRepository\WIDESEAWCS_OutboundRepository.csproj", "{C2F2EA39-C294-44EE-A715-830BCE7EDFEB}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Outbound", "Outbound", "{E40D6570-54E0-48DB-BA13-E55952031012}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_IOutboundService", "WIDESEAWCS_IOutboundService\WIDESEAWCS_IOutboundService.csproj", "{84B7B4FA-044A-454D-AC5C-35B4921F519A}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_OutboundService", "WIDESEAWCS_OutboundService\WIDESEAWCS_OutboundService.csproj", "{B66F0CBE-FADA-4080-AAD7-84DB53288B63}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Basic", "Basic", "{18AE3ECB-AE33-40F9-A9D6-CEAE6A6CA1B2}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_BasicRepository", "WIDESEAWCS_BasicRepository\WIDESEAWCS_BasicRepository.csproj", "{BD34D122-7820-47FB-9A13-CF9DD850D986}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_IBasicRepository", "WIDESEAWCS_IBasicRepository\WIDESEAWCS_IBasicRepository.csproj", "{D2D6E6D2-EFB4-4C3A-ACFA-B06A5AC3B9F7}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Basic", "Basic", "{5ADC35E4-8D20-48B8-830D-EDA02864015F}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_BasicService", "WIDESEAWCS_BasicService\WIDESEAWCS_BasicService.csproj", "{FE53E6F8-3B2B-4260-941A-73763FA6B6EA}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_IBasicService", "WIDESEAWCS_IBasicService\WIDESEAWCS_IBasicService.csproj", "{47CDC721-B4A4-4860-ADBD-ECDFCD534232}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Record", "Record", "{17E05677-EF38-458A-B93B-D03E50FCB362}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Stock", "Stock", "{28E53B78-C0EA-47F6-91F5-1DCE95B87783}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_IRecordRepository", "WIDESEAWCS_IRecordRepository\WIDESEAWCS_IRecordRepository.csproj", "{91B58846-6397-4AEF-AEA7-3FF7C10BF07E}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_RecordRepository", "WIDESEAWCS_RecordRepository\WIDESEAWCS_RecordRepository.csproj", "{741FE3C3-5D5B-4A60-BB15-C0F4769FC4AC}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Stock", "Stock", "{CDC177FA-580E-4AF9-8D2E-ED4C1B2AC09C}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_IStockRepository", "WIDESEAWCS_IStockRepository\WIDESEAWCS_IStockRepository.csproj", "{7191A47C-6340-4554-8992-B1DBED162E47}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_StockRepository", "WIDESEAWCS_StockRepository\WIDESEAWCS_StockRepository.csproj", "{25304960-ED70-47B3-A91F-24DB3E57B0A1}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_IStockService", "WIDESEAWCS_IStockService\WIDESEAWCS_IStockService.csproj", "{DACC6D96-39FA-472A-92CF-58D78D647929}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_StockService", "WIDESEAWCS_StockService\WIDESEAWCS_StockService.csproj", "{089B42C7-67C2-4448-9606-58E610BE16C3}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Record", "Record", "{4368400A-F8BE-4E15-98F0-3404F075CA4C}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WIDESEAWCS_IRecordService", "WIDESEAWCS_IRecordService\WIDESEAWCS_IRecordService.csproj", "{2A617E6B-350B-4A5E-96DE-37AD1506A77B}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WIDESEAWCS_RecordService", "WIDESEAWCS_RecordService\WIDESEAWCS_RecordService.csproj", "{36B8B996-B738-4079-8301-E51A1010ADA4}" |
| | | EndProject |
| | | Global |
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
| | | Debug|Any CPU = Debug|Any CPU |
| | |
| | | {FFAB2C76-1C9E-4006-95C8-A0B2AA53139D}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {FFAB2C76-1C9E-4006-95C8-A0B2AA53139D}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {FFAB2C76-1C9E-4006-95C8-A0B2AA53139D}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {C31D0FE4-3B8A-447E-A0AC-EB04C7ADAB28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {C31D0FE4-3B8A-447E-A0AC-EB04C7ADAB28}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {C31D0FE4-3B8A-447E-A0AC-EB04C7ADAB28}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {C31D0FE4-3B8A-447E-A0AC-EB04C7ADAB28}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {C2F2EA39-C294-44EE-A715-830BCE7EDFEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {C2F2EA39-C294-44EE-A715-830BCE7EDFEB}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {C2F2EA39-C294-44EE-A715-830BCE7EDFEB}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {C2F2EA39-C294-44EE-A715-830BCE7EDFEB}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {84B7B4FA-044A-454D-AC5C-35B4921F519A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {84B7B4FA-044A-454D-AC5C-35B4921F519A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {84B7B4FA-044A-454D-AC5C-35B4921F519A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {84B7B4FA-044A-454D-AC5C-35B4921F519A}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {B66F0CBE-FADA-4080-AAD7-84DB53288B63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {B66F0CBE-FADA-4080-AAD7-84DB53288B63}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {B66F0CBE-FADA-4080-AAD7-84DB53288B63}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {B66F0CBE-FADA-4080-AAD7-84DB53288B63}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {BD34D122-7820-47FB-9A13-CF9DD850D986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {BD34D122-7820-47FB-9A13-CF9DD850D986}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {BD34D122-7820-47FB-9A13-CF9DD850D986}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {BD34D122-7820-47FB-9A13-CF9DD850D986}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {D2D6E6D2-EFB4-4C3A-ACFA-B06A5AC3B9F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {D2D6E6D2-EFB4-4C3A-ACFA-B06A5AC3B9F7}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {D2D6E6D2-EFB4-4C3A-ACFA-B06A5AC3B9F7}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {D2D6E6D2-EFB4-4C3A-ACFA-B06A5AC3B9F7}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {FE53E6F8-3B2B-4260-941A-73763FA6B6EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {FE53E6F8-3B2B-4260-941A-73763FA6B6EA}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {FE53E6F8-3B2B-4260-941A-73763FA6B6EA}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {FE53E6F8-3B2B-4260-941A-73763FA6B6EA}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {47CDC721-B4A4-4860-ADBD-ECDFCD534232}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {47CDC721-B4A4-4860-ADBD-ECDFCD534232}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {47CDC721-B4A4-4860-ADBD-ECDFCD534232}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {47CDC721-B4A4-4860-ADBD-ECDFCD534232}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {91B58846-6397-4AEF-AEA7-3FF7C10BF07E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {91B58846-6397-4AEF-AEA7-3FF7C10BF07E}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {91B58846-6397-4AEF-AEA7-3FF7C10BF07E}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {91B58846-6397-4AEF-AEA7-3FF7C10BF07E}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {741FE3C3-5D5B-4A60-BB15-C0F4769FC4AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {741FE3C3-5D5B-4A60-BB15-C0F4769FC4AC}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {741FE3C3-5D5B-4A60-BB15-C0F4769FC4AC}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {741FE3C3-5D5B-4A60-BB15-C0F4769FC4AC}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {7191A47C-6340-4554-8992-B1DBED162E47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {7191A47C-6340-4554-8992-B1DBED162E47}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {7191A47C-6340-4554-8992-B1DBED162E47}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {7191A47C-6340-4554-8992-B1DBED162E47}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {25304960-ED70-47B3-A91F-24DB3E57B0A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {25304960-ED70-47B3-A91F-24DB3E57B0A1}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {25304960-ED70-47B3-A91F-24DB3E57B0A1}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {25304960-ED70-47B3-A91F-24DB3E57B0A1}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {DACC6D96-39FA-472A-92CF-58D78D647929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {DACC6D96-39FA-472A-92CF-58D78D647929}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {DACC6D96-39FA-472A-92CF-58D78D647929}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {DACC6D96-39FA-472A-92CF-58D78D647929}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {089B42C7-67C2-4448-9606-58E610BE16C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {089B42C7-67C2-4448-9606-58E610BE16C3}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {089B42C7-67C2-4448-9606-58E610BE16C3}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {089B42C7-67C2-4448-9606-58E610BE16C3}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {2A617E6B-350B-4A5E-96DE-37AD1506A77B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {2A617E6B-350B-4A5E-96DE-37AD1506A77B}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {2A617E6B-350B-4A5E-96DE-37AD1506A77B}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {2A617E6B-350B-4A5E-96DE-37AD1506A77B}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {36B8B996-B738-4079-8301-E51A1010ADA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {36B8B996-B738-4079-8301-E51A1010ADA4}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {36B8B996-B738-4079-8301-E51A1010ADA4}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {36B8B996-B738-4079-8301-E51A1010ADA4}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | EndGlobalSection |
| | | GlobalSection(SolutionProperties) = preSolution |
| | | HideSolutionNode = FALSE |
| | |
| | | {206FDF79-9BF3-433A-B7FF-627287BBD760} = {5CC8AEFF-2F75-4053-9569-73419839875A} |
| | | {8C2CC25B-DE5D-433E-A550-63864C7A716D} = {9CB2F821-BB23-48E5-88E8-C326477733C0} |
| | | {FFAB2C76-1C9E-4006-95C8-A0B2AA53139D} = {9CB2F821-BB23-48E5-88E8-C326477733C0} |
| | | {91992A8E-5C32-4628-A87E-5FB68A940673} = {4FF30CF7-DA79-4EDD-9A6E-0B0BEAD72A1A} |
| | | {C31D0FE4-3B8A-447E-A0AC-EB04C7ADAB28} = {91992A8E-5C32-4628-A87E-5FB68A940673} |
| | | {C2F2EA39-C294-44EE-A715-830BCE7EDFEB} = {91992A8E-5C32-4628-A87E-5FB68A940673} |
| | | {E40D6570-54E0-48DB-BA13-E55952031012} = {A12315CA-9D81-412C-A09B-B23D95CFFE16} |
| | | {84B7B4FA-044A-454D-AC5C-35B4921F519A} = {E40D6570-54E0-48DB-BA13-E55952031012} |
| | | {B66F0CBE-FADA-4080-AAD7-84DB53288B63} = {E40D6570-54E0-48DB-BA13-E55952031012} |
| | | {18AE3ECB-AE33-40F9-A9D6-CEAE6A6CA1B2} = {4FF30CF7-DA79-4EDD-9A6E-0B0BEAD72A1A} |
| | | {BD34D122-7820-47FB-9A13-CF9DD850D986} = {18AE3ECB-AE33-40F9-A9D6-CEAE6A6CA1B2} |
| | | {D2D6E6D2-EFB4-4C3A-ACFA-B06A5AC3B9F7} = {18AE3ECB-AE33-40F9-A9D6-CEAE6A6CA1B2} |
| | | {5ADC35E4-8D20-48B8-830D-EDA02864015F} = {A12315CA-9D81-412C-A09B-B23D95CFFE16} |
| | | {FE53E6F8-3B2B-4260-941A-73763FA6B6EA} = {5ADC35E4-8D20-48B8-830D-EDA02864015F} |
| | | {47CDC721-B4A4-4860-ADBD-ECDFCD534232} = {5ADC35E4-8D20-48B8-830D-EDA02864015F} |
| | | {17E05677-EF38-458A-B93B-D03E50FCB362} = {4FF30CF7-DA79-4EDD-9A6E-0B0BEAD72A1A} |
| | | {28E53B78-C0EA-47F6-91F5-1DCE95B87783} = {A12315CA-9D81-412C-A09B-B23D95CFFE16} |
| | | {91B58846-6397-4AEF-AEA7-3FF7C10BF07E} = {17E05677-EF38-458A-B93B-D03E50FCB362} |
| | | {741FE3C3-5D5B-4A60-BB15-C0F4769FC4AC} = {17E05677-EF38-458A-B93B-D03E50FCB362} |
| | | {CDC177FA-580E-4AF9-8D2E-ED4C1B2AC09C} = {4FF30CF7-DA79-4EDD-9A6E-0B0BEAD72A1A} |
| | | {7191A47C-6340-4554-8992-B1DBED162E47} = {CDC177FA-580E-4AF9-8D2E-ED4C1B2AC09C} |
| | | {25304960-ED70-47B3-A91F-24DB3E57B0A1} = {CDC177FA-580E-4AF9-8D2E-ED4C1B2AC09C} |
| | | {DACC6D96-39FA-472A-92CF-58D78D647929} = {28E53B78-C0EA-47F6-91F5-1DCE95B87783} |
| | | {089B42C7-67C2-4448-9606-58E610BE16C3} = {28E53B78-C0EA-47F6-91F5-1DCE95B87783} |
| | | {4368400A-F8BE-4E15-98F0-3404F075CA4C} = {A12315CA-9D81-412C-A09B-B23D95CFFE16} |
| | | {2A617E6B-350B-4A5E-96DE-37AD1506A77B} = {4368400A-F8BE-4E15-98F0-3404F075CA4C} |
| | | {36B8B996-B738-4079-8301-E51A1010ADA4} = {4368400A-F8BE-4E15-98F0-3404F075CA4C} |
| | | EndGlobalSection |
| | | GlobalSection(ExtensibilityGlobals) = postSolution |
| | | SolutionGuid = {C9A356D5-D4FE-414B-B982-6C97792BE6C6} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Collections.Generic; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_DTO.Basic; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Basic |
| | | { |
| | | [Route("api/LocationInfo")] |
| | | [ApiController] |
| | | public class LocationInfoController : ApiBaseController<ILocationInfoService, Dt_LocationInfo> |
| | | { |
| | | private readonly ILocationInfoRepository _repository; |
| | | public LocationInfoController(ILocationInfoService service, ILocationInfoRepository repository) : base(service) |
| | | { |
| | | _repository = repository; |
| | | } |
| | | |
| | | [HttpPost, Route("InitializationLocation")] |
| | | public WebResponseContent InitializationLocation([FromBody] InitializationLocationDTO initializationLocationDTO) |
| | | { |
| | | return Service.InitializationLocation(initializationLocationDTO); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_IBasicService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Basic |
| | | { |
| | | [Route("api/MaterielInfo")] |
| | | [ApiController] |
| | | public class MaterielInfoController : ApiBaseController<IMaterielInfoService, Dt_MaterielInfo> |
| | | { |
| | | public MaterielInfoController(IMaterielInfoService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_IOutboundService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Outbound |
| | | { |
| | | [Route("api/OutStockLockInfo")] |
| | | [ApiController] |
| | | public class OutStockLockInfoController : ApiBaseController<IOutStockLockInfoService, Dt_OutStockLockInfo> |
| | | { |
| | | public OutStockLockInfoController(IOutStockLockInfoService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | [HttpPost, Route("GetByOrderDetailId")] |
| | | public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId) |
| | | { |
| | | return Service.GetByOrderDetailId(orderDetailId); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_IOutboundService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Outbound |
| | | { |
| | | [Route("api/OutboundOrder")] |
| | | [ApiController] |
| | | public class OutboundOrderController : ApiBaseController<IOutboundOrderService, Dt_OutboundOrder> |
| | | { |
| | | public OutboundOrderController(IOutboundOrderService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IOutboundService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Outbound |
| | | { |
| | | [Route("api/OutboundOrderDetail")] |
| | | [ApiController] |
| | | public class OutboundOrderDetailController : ApiBaseController<IOutboundOrderDetailService, Dt_OutboundOrderDetail> |
| | | { |
| | | public OutboundOrderDetailController(IOutboundOrderDetailService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Record |
| | | { |
| | | [Route("api/LocationStatusChangeRecord")] |
| | | [ApiController] |
| | | public class LocationStatusChangeRecordController : ApiBaseController<ILocationStatusChangeRecordSetvice, Dt_LocationStatusChangeRecord> |
| | | { |
| | | public LocationStatusChangeRecordController(ILocationStatusChangeRecordSetvice service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Record |
| | | { |
| | | [Route("api/StockQuantityChangeRecord")] |
| | | [ApiController] |
| | | public class StockQuantityChangeRecordController : ApiBaseController<IStockQuantityChangeRecordService, Dt_StockQuantityChangeRecord> |
| | | { |
| | | public StockQuantityChangeRecordController(IStockQuantityChangeRecordService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Stock |
| | | { |
| | | [Route("api/StockInfo")] |
| | | [ApiController] |
| | | public class StockInfoController : ApiBaseController<IStockInfoService, Dt_StockInfo> |
| | | { |
| | | public StockInfoController(IStockInfoService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | [HttpPost, Route("GetAllStockViews"), AllowAnonymous] |
| | | public List<StockViewDTO> GetAllStockViews() |
| | | { |
| | | return Service.Repository.GetAllStockViews(); |
| | | } |
| | | |
| | | //[HttpPost, Route("GetStockSelectViews"), AllowAnonymous] |
| | | //public List<StockSelectViewDTO> GetStockSelectViews(string materielCode) |
| | | //{ |
| | | // return Service.GetStockSelectViews(materielCode); |
| | | //} |
| | | |
| | | [HttpPost, Route("GetPalletStockInfo"), AllowAnonymous] |
| | | public Dt_StockInfo GetPalletStockInfo(string roadwayNo) |
| | | { |
| | | return Service.Repository.GetPalletStockInfo(roadwayNo); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Stock |
| | | { |
| | | [Route("api/StockInfoDetail")] |
| | | [ApiController] |
| | | public class StockInfoDetailController : ApiBaseController<IStockInfoDetailService, Dt_StockInfoDetail> |
| | | { |
| | | public StockInfoDetailController(IStockInfoDetailService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.Extensions.Options; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.Stock |
| | | { |
| | | [Route("api/StockView")] |
| | | [Authorize, ApiController] |
| | | public class StockViewController : Controller |
| | | { |
| | | private readonly IStockViewService _stockViewService; |
| | | public StockViewController(IStockViewService stockViewService) |
| | | { |
| | | _stockViewService = stockViewService; |
| | | } |
| | | |
| | | [HttpPost, Route("GetPageData")] |
| | | public PageGridData<StockViewDTO> GetPageData([FromBody] PageDataOptions options) |
| | | { |
| | | return _stockViewService.GetPageData(options); |
| | | } |
| | | |
| | | [HttpPost, Route("GetDetailPage")] |
| | | public object GetDetailPage([FromBody] PageDataOptions pageData) |
| | | { |
| | | return _stockViewService.GetDetailPage(pageData); |
| | | } |
| | | } |
| | | } |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_BasicService\WIDESEAWCS_BasicService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_OutboundService\WIDESEAWCS_OutboundService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_RecordService\WIDESEAWCS_RecordService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_StockService\WIDESEAWCS_StockService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_SystemServices\WIDESEAWCS_SystemServices.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCs_TaskInfoService\WIDESEAWCs_TaskInfoService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_Tasks\WIDESEAWCS_Tasks.csproj" /> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_StockRepository |
| | | { |
| | | public class StockInfoDetailRepository : RepositoryBase<Dt_StockInfoDetail>, IStockInfoDetailRepository |
| | | { |
| | | public StockInfoDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | using SqlSugar; |
| | | using SqlSugar.Extensions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | using WIDESEAWCS_Common.StockEnum; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEA_StockRepository |
| | | { |
| | | public class StockInfoRepository : RepositoryBase<Dt_StockInfo>, IStockInfoRepository |
| | | { |
| | | public StockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | |
| | | public List<StockViewDTO> GetAllStockViews() |
| | | { |
| | | ISugarQueryable<Dt_LocationInfo> sugarQueryable = Db.Queryable<Dt_LocationInfo>(); |
| | | ISugarQueryable<Dt_StockInfo> sugarQueryable1 = Db.Queryable<Dt_StockInfo>(); |
| | | |
| | | return sugarQueryable.InnerJoin(sugarQueryable1, (a, b) => a.LocationCode == b.LocationCode).Select((a, b) => new StockViewDTO |
| | | { |
| | | AreaId = a.AreaId, |
| | | LocationCode = b.LocationCode, |
| | | Column = a.Column, |
| | | CreateDate = b.CreateDate, |
| | | Creater = b.Creater, |
| | | Depth = a.Depth, |
| | | EnalbeStatus = a.EnableStatus, |
| | | IsFull = b.IsFull, |
| | | Layer = a.Layer, |
| | | LocationName = a.LocationName, |
| | | LocationStatus = a.LocationStatus, |
| | | LocationType = a.LocationType, |
| | | Modifier = b.Modifier, |
| | | ModifyDate = b.ModifyDate, |
| | | PalletCode = b.PalletCode, |
| | | StockRemark = b.Remark, |
| | | RoadwayNo = a.RoadwayNo, |
| | | Row = a.Row, |
| | | StockId = b.Id, |
| | | StockStatus = b.StockStatus, |
| | | Details = b.Details, |
| | | }).Includes(x => x.Details).ToList(); |
| | | } |
| | | |
| | | public Dt_StockInfo GetStockInfo(string palletCode) |
| | | { |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetStockInfos(string materielCode) |
| | | { |
| | | return Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode)).ToList(); |
| | | //ISugarQueryable<Dt_LocationInfo> sugarQueryable = Db.Queryable<Dt_LocationInfo>(); |
| | | //ISugarQueryable<Dt_StockInfo> sugarQueryable1 = Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode)); |
| | | //return sugarQueryable.InnerJoin(sugarQueryable1, (a, b) => a.LocationCode == b.LocationCode).Select((a, b) => b).Includes(x => x.Details).ToList(); |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetStockInfos(string materielCode, List<string> locationCodes) |
| | | { |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode)).Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode)).ToList(); |
| | | |
| | | |
| | | //ISugarQueryable<Dt_LocationInfo> sugarQueryable = Db.Queryable<Dt_LocationInfo>().Where(x => locationCodes.Contains(x.LocationCode)); |
| | | //ISugarQueryable<Dt_StockInfo> sugarQueryable1 = Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode)); |
| | | //return sugarQueryable.InnerJoin(sugarQueryable1, (a, b) => a.LocationCode == b.LocationCode).Select((a, b) => b).OrderBy(a => a.CreateDate).Includes(a => a.Details).ToList(); |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetStockInfosByIds(List<int> ids) |
| | | { |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => ids.Contains(x.Id)).Includes(x => x.Details).ToList(); |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetStockInfosByPalletCodes(List<string> palletCodes) |
| | | { |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => palletCodes.Contains(x.PalletCode)).Includes(x => x.Details).ToList(); |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetStockInfosExclude(string materielCode, List<string> palletCodes) |
| | | { |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => !palletCodes.Contains(x.PalletCode)).Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode)).ToList(); |
| | | } |
| | | |
| | | public bool UpdateDataWithDetail(Dt_StockInfo stockInfo) |
| | | { |
| | | return Db.UpdateNav(stockInfo).Include(x => x.Details).ExecuteCommand(); |
| | | } |
| | | |
| | | public Dt_StockInfo GetPalletStockInfo(string roadwayNo) |
| | | { |
| | | //ISugarQueryable<string> locationCodes = Db.Queryable<Dt_LocationInfo>().Where(x => x.RoadwayNo == roadwayNo && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || LocationEnalbeStatusEnum.Normal.ObjToInt() == x.EnalbeStatus)).Select(x => x.LocationCode); |
| | | |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == StockStatusEmun.å·²å
¥åº.ObjToInt() && SqlFunc.Subqueryable<Dt_LocationInfo>().Where(v => v.LocationCode == x.LocationCode && v.RoadwayNo == roadwayNo && v.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (v.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || EnableStatusEnum.Normal.ObjToInt() == v.EnableStatus)).Any()).OrderBy(x => x.ModifyDate).First(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IStockRepository; |
| | | |
| | | namespace WIDESEAWCS_StockRepository |
| | | { |
| | | public class StockRepository : IStockRepository |
| | | { |
| | | public IStockInfoDetailRepository StockInfoDetailRepository { get; } |
| | | |
| | | public IStockInfoRepository StockInfoRepository { get; } |
| | | |
| | | public StockRepository(IStockInfoDetailRepository stockInfoDetailRepository, IStockInfoRepository stockInfoRepository) |
| | | { |
| | | StockInfoDetailRepository = stockInfoDetailRepository; |
| | | StockInfoRepository = stockInfoRepository; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_IBasicRepository\WIDESEAWCS_IBasicRepository.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_IStockRepository\WIDESEAWCS_IStockRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_StockService |
| | | { |
| | | public partial class StockInfoDetailService : ServiceBase<Dt_StockInfoDetail, IStockInfoDetailRepository>, IStockInfoDetailService |
| | | { |
| | | public StockInfoDetailService(IStockInfoDetailRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IStockInfoDetailRepository Repository => BaseDal; |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_StockService |
| | | { |
| | | public partial class StockInfoService : ServiceBase<Dt_StockInfo, IStockInfoRepository>, IStockInfoService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockRepository _stockRepository; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IStockInfoRepository Repository => BaseDal; |
| | | |
| | | public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IStockRepository stockRepository,IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _basicRepository = basicRepository; |
| | | _stockRepository = stockRepository; |
| | | _recordService = recordService; |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | using Microsoft.AspNetCore.Http; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing.Printing; |
| | | using System.Dynamic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.Utilities; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_StockService |
| | | { |
| | | public partial class StockViewService : IStockViewService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly SqlSugarClient _dbBase; |
| | | |
| | | public StockViewService(IUnitOfWorkManage unitOfWorkManage) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _dbBase = unitOfWorkManage.GetDbClient(); |
| | | } |
| | | |
| | | public virtual PageGridData<StockViewDTO> GetPageData(PageDataOptions options) |
| | | { |
| | | //string where = ValidatePageOptions(typeof(StockViewDTO).GetProperties()); |
| | | ////è·åæåºå段 |
| | | ////Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(typeof(StockViewDTO).GetProperties()); |
| | | ////List<OrderByModel> orderByModels = new List<OrderByModel>(); |
| | | ////foreach (var item in orderbyDic) |
| | | ////{ |
| | | //// OrderByModel orderByModel = new OrderByModel() |
| | | //// { |
| | | //// FieldName = item.Key, |
| | | //// OrderByType = item.Value |
| | | //// }; |
| | | //// orderByModels.Add(orderByModel); |
| | | ////} |
| | | //int totalCount = 0; |
| | | |
| | | //ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>(); |
| | | //ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>(); |
| | | |
| | | //List<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).WhereIF(!string.IsNullOrEmpty(where), where).Select((b, a) => new StockViewDTO |
| | | //{ |
| | | // AreaId = a.AreaId, |
| | | // LocationCode = b.LocationCode, |
| | | // Column = a.Column, |
| | | // CreateDate = b.CreateDate, |
| | | // Creater = b.Creater, |
| | | // Depth = a.Depth, |
| | | // EnalbeStatus = a.EnableStatus, |
| | | // IsFull = b.IsFull, |
| | | // Layer = a.Layer, |
| | | // LocationName = a.LocationName, |
| | | // LocationStatus = a.LocationStatus, |
| | | // LocationType = a.LocationType, |
| | | // Modifier = b.Modifier, |
| | | // ModifyDate = b.ModifyDate, |
| | | // PalletCode = b.PalletCode, |
| | | // StockRemark = b.Remark, |
| | | // RoadwayNo = a.RoadwayNo, |
| | | // Row = a.Row, |
| | | // StockId = b.Id, |
| | | // StockStatus = b.StockStatus, |
| | | // Details = b.Details, |
| | | //}).ToPageList(options.Page, options.Rows, ref totalCount); |
| | | //return new PageGridData<StockViewDTO>(totalCount, list); |
| | | return new PageGridData<StockViewDTO>(); |
| | | } |
| | | |
| | | public virtual object GetDetailPage(PageDataOptions pageData) |
| | | { |
| | | Type t = typeof(StockViewDTO); |
| | | |
| | | if (pageData.Value == null) return new PageGridData<object>(total: 0, null); |
| | | string keyName = t.GetKeyName(); |
| | | ////çææ¥è¯¢æ¡ä»¶ |
| | | //Expression<Func<TEntity, bool>> whereExpression = keyName.CreateExpression<TEntity>(pageData.Value, LinqExpressionType.Equal); |
| | | int totalCount = 0; |
| | | PropertyInfo? propertyInfo = t.GetProperties().FirstOrDefault(x => x.GetCustomAttribute<Navigate>() != null); |
| | | if (propertyInfo != null) |
| | | { |
| | | Type detailType = propertyInfo.PropertyType.GetGenericArguments()[0]; |
| | | Navigate? navigate = propertyInfo.GetCustomAttribute<Navigate>(); |
| | | if (navigate != null) |
| | | { |
| | | List<ExpandoObject> list = _dbBase.Queryable(detailType.Name, "detail").Where(navigate.GetName(), "=", pageData.Value).ToPageList(pageData.Page, pageData.Rows, ref totalCount); |
| | | return new PageGridData<ExpandoObject>(totalCount, list); |
| | | } |
| | | } |
| | | return new PageGridData<object>(total: 0, null); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_StockService |
| | | { |
| | | public partial class StockInfoDetailService : ServiceBase<Dt_StockInfoDetail, IStockInfoDetailRepository>, IStockInfoDetailService |
| | | { |
| | | public bool ExistSerialNumber(string SerialNumber) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.SerialNumber == SerialNumber) != null; |
| | | } |
| | | |
| | | public bool ExistSerialNumbers(List<string> SerialNumbers) |
| | | { |
| | | return BaseDal.QueryFirst(x => SerialNumbers.Contains(x.SerialNumber)) != null; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.StockEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IBasicRepository; |
| | | using WIDESEAWCS_IRecordRepository; |
| | | using WIDESEAWCS_IRecordService; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_StockService |
| | | { |
| | | public partial class StockInfoService : ServiceBase<Dt_StockInfo, IStockInfoRepository>, IStockInfoService |
| | | { |
| | | /// <summary> |
| | | /// æ ¹æ®æçå·æ¥è¯¢åºå |
| | | /// </summary> |
| | | /// <param name="palletCode"></param> |
| | | /// <returns></returns> |
| | | public Dt_StockInfo? GetStockByPalletCode(string palletCode) |
| | | { |
| | | Dt_StockInfo stockInfo = BaseDal.QueryFirst(x => x.PalletCode == palletCode); |
| | | if (stockInfo != null) |
| | | { |
| | | stockInfo.Details = _stockRepository.StockInfoDetailRepository.QueryData(x => x.StockId == stockInfo.Id); |
| | | } |
| | | return stockInfo; |
| | | } |
| | | |
| | | public void AddMaterielGroup(Dt_StockInfo stockInfo) |
| | | { |
| | | decimal beforeQuantity = 0; |
| | | List<Dt_StockInfoDetail> details = new List<Dt_StockInfoDetail>(); |
| | | if (stockInfo.Id == 0) |
| | | { |
| | | BaseDal.Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand(); |
| | | details = stockInfo.Details; |
| | | } |
| | | else |
| | | { |
| | | beforeQuantity = stockInfo.Details.Where(x => x.Id != 0).Sum(x => x.StockQuantity); |
| | | |
| | | for (int i = 0; i < stockInfo.Details.Count; i++) |
| | | { |
| | | if (stockInfo.Details[i].Id == 0) |
| | | { |
| | | details.Add(_stockRepository.StockInfoDetailRepository.Db.Insertable(stockInfo.Details[i]).ExecuteReturnEntity()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | stockInfo.Details = details; |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, StockChangeType.MaterielGroup); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | using Microsoft.AspNetCore.Http; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing.Printing; |
| | | using System.Dynamic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.Utilities; |
| | | using WIDESEAWCS_DTO.Stock; |
| | | using WIDESEAWCS_IStockRepository; |
| | | using WIDESEAWCS_IStockService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_StockService |
| | | { |
| | | public partial class StockViewService : IStockViewService |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_IStockService; |
| | | |
| | | namespace WIDESEAWCS_StockService |
| | | { |
| | | public class StockSerivce:IStockService |
| | | { |
| | | public IStockInfoDetailService StockInfoDetailService { get; } |
| | | |
| | | public IStockInfoService StockInfoService { get; } |
| | | |
| | | public StockSerivce(IStockInfoDetailService stockInfoDetailService, IStockInfoService stockInfoService) |
| | | { |
| | | StockInfoDetailService = stockInfoDetailService; |
| | | StockInfoService = stockInfoService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>enable</Nullable> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_IRecordRepository\WIDESEAWCS_IRecordRepository.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_IRecordService\WIDESEAWCS_IRecordService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_IStockService\WIDESEAWCS_IStockService.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |