From aacbe0eccdb886c424aa42758d6d3f5d62550a75 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 24 十二月 2024 09:02:58 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_WarehouseDevice.cs | 62 ++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs | 7 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs | 4 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 6 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 57 +++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs | 48 +++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj | 1 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs | 5 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs | 20 ++ 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_Warehouse.cs | 11 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs | 74 +++++-- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs | 8 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fc937dfc-f65e-4bef-aaa4-717ebb3be43e.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs | 4 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/WareHouseEnum/WarehouseEnum.cs | 76 ++++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 44 ++++ 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0397a60b-c71f-4284-85ef-52044ecfbb47.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/StackerCraneJob_PP.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs | 8 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj | 2 项目资料/接口文档/MES业务流程图V1.0.xlsx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 24 ++ 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6ddb89a1-3fb5-42aa-a799-c08181483993.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs | 5 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 13 + 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d1c62139-7bae-4df6-b13e-daefe3114894.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs | 4 /dev/null | 0 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d02ec307-551b-4de2-b989-3f41b8cc227f.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/StackerCraneJob_ZH.cs | 2 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/671f6735-50dc-4160-a801-1403c5554dc0.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs | 6 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj | 4 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/WIDESEAWCS_BasicInfoService.csproj | 2 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b0fe0eb0-0200-46f6-a7cd-e7eceefa6c9f.vsidx | 0 38 files changed, 445 insertions(+), 60 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0397a60b-c71f-4284-85ef-52044ecfbb47.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0397a60b-c71f-4284-85ef-52044ecfbb47.vsidx" new file mode 100644 index 0000000..571b40b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0397a60b-c71f-4284-85ef-52044ecfbb47.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/182750cd-850d-4516-a67b-7253ac4fb232.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/182750cd-850d-4516-a67b-7253ac4fb232.vsidx" deleted file mode 100644 index 765066d..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/182750cd-850d-4516-a67b-7253ac4fb232.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/43baaa76-d5f1-4df1-9f57-25cfd3fe3186.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/43baaa76-d5f1-4df1-9f57-25cfd3fe3186.vsidx" deleted file mode 100644 index 77ad308..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/43baaa76-d5f1-4df1-9f57-25cfd3fe3186.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/55c55350-83b6-4489-98a3-f1f310d14b68.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/55c55350-83b6-4489-98a3-f1f310d14b68.vsidx" deleted file mode 100644 index 2248e2d..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/55c55350-83b6-4489-98a3-f1f310d14b68.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/63f25530-00aa-456a-969e-f1c0f63b3c3e.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/63f25530-00aa-456a-969e-f1c0f63b3c3e.vsidx" deleted file mode 100644 index ce29ea7..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/63f25530-00aa-456a-969e-f1c0f63b3c3e.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/671f6735-50dc-4160-a801-1403c5554dc0.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/671f6735-50dc-4160-a801-1403c5554dc0.vsidx" new file mode 100644 index 0000000..e5ce690 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/671f6735-50dc-4160-a801-1403c5554dc0.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6ddb89a1-3fb5-42aa-a799-c08181483993.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6ddb89a1-3fb5-42aa-a799-c08181483993.vsidx" new file mode 100644 index 0000000..3f7c8b6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6ddb89a1-3fb5-42aa-a799-c08181483993.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/beef5092-aeef-4199-ba40-4b3d6192ea2d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/beef5092-aeef-4199-ba40-4b3d6192ea2d.vsidx" deleted file mode 100644 index 4fe75eb..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/beef5092-aeef-4199-ba40-4b3d6192ea2d.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/cc3915a8-59aa-4f44-9ac1-1573b19314bd.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/cc3915a8-59aa-4f44-9ac1-1573b19314bd.vsidx" deleted file mode 100644 index 1d3af6d..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/cc3915a8-59aa-4f44-9ac1-1573b19314bd.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d02ec307-551b-4de2-b989-3f41b8cc227f.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d02ec307-551b-4de2-b989-3f41b8cc227f.vsidx" new file mode 100644 index 0000000..c6a1ef2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d02ec307-551b-4de2-b989-3f41b8cc227f.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/WIDESEAWCS_BasicInfoService.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/WIDESEAWCS_BasicInfoService.csproj" index 132b4ea..db72e58 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/WIDESEAWCS_BasicInfoService.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/WIDESEAWCS_BasicInfoService.csproj" @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="WIDESEAWCS_QuartzJob" Version="1.0.0" /> + <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.1" /> </ItemGroup> <ItemGroup> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" index 6401cc0..e8a052b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" @@ -52,6 +52,12 @@ InQuality = 540, /// <summary> + /// 鐢熶骇閫�鏂� + /// </summary> + [Description("鐢熶骇閫�鏂�")] + ProductionReturn = 550, + + /// <summary> /// 宸烽亾鍐呯Щ搴� /// </summary> [Description("宸烽亾鍐呯Щ搴�")] diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/WareHouseEnum/WarehouseEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/WareHouseEnum/WarehouseEnum.cs" new file mode 100644 index 0000000..c78a355 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/WareHouseEnum/WarehouseEnum.cs" @@ -0,0 +1,76 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEAWCS_Common.WareHouseEnum +{ + /// <summary> + /// 浠撳簱 + /// HA57 = 娣畨浜屽巶 - 鏉挎枡浠�<br/> + /// HA58 = 娣畨浜屽巶 - PP浠�<br/> + /// HA60 = 娣畨浜屽巶 - 杈呮枡浠�<br/> + /// HA64 = 娣畨浜屽巶 - 娴嬭瘯鏋朵粨<br/> + /// HA71 = 娣畨浜屽巶 - 鎴愬搧浠�<br/> + /// HA72 = 娣畨浜屽巶 - 灏炬暟浠�<br/> + /// HA73 = 娣畨浜屽巶 - 鐮斿彂浠�<br/> + /// HA101 = 娣畨浜屽巶 - 鎴愬搧浠撳钩搴�<br/> + /// HA152 = 娣畨浜屽巶 - 骞茶啘浠�<br/> + /// HA153 = 娣畨浜屽巶 - 娌瑰ⅷ浠�<br/> + /// </summary> + public enum WarehouseEnum + { + /// <summary> + /// 鏉挎枡浠� + /// </summary> + [Description("鏉挎枡浠�")] + HA57, + /// <summary> + /// PP浠� + /// </summary> + [Description("PP浠�")] + HA58, + /// <summary> + /// 杈呮枡浠� + /// </summary> + [Description("杈呮枡浠�")] + HA60, + /// <summary> + /// 娴嬭瘯鏋朵粨 + /// </summary> + [Description("娴嬭瘯鏋朵粨")] + HA64, + /// <summary> + /// 鎴愬搧浠� + /// </summary> + [Description("鎴愬搧浠�")] + HA71, + /// <summary> + /// 灏炬暟浠� + /// </summary> + [Description("灏炬暟浠�")] + HA72, + /// <summary> + /// 鐮斿彂浠� + /// </summary> + [Description("鐮斿彂浠�")] + HA73, + /// <summary> + /// 鎴愬搧浠撳钩搴� + /// </summary> + [Description("鎴愬搧浠撳钩搴�")] + HA101, + /// <summary> + /// 骞茶啘浠� + /// </summary> + [Description("骞茶啘浠�")] + HA152, + /// <summary> + /// 娌瑰ⅷ浠� + /// </summary> + [Description("娌瑰ⅷ浠�")] + HA153 + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs" index ff58ac3..5ce53ea 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs" @@ -52,5 +52,9 @@ /// 浼樺厛绾� /// </summary> public int Grade { get; set; } + + public int WarehouseId { get; set; } + + public string AGVArea { get; set; } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj" index 01765a3..677b3e7 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj" @@ -10,4 +10,8 @@ <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> </ItemGroup> + <ItemGroup> + <Folder Include="BasicInfo\" /> + </ItemGroup> + </Project> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/BasicInfo/WarehouseDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_Warehouse.cs" similarity index 83% rename from "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/BasicInfo/WarehouseDTO.cs" rename to "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_Warehouse.cs" index 17958d4..756eb53 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/BasicInfo/WarehouseDTO.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_Warehouse.cs" @@ -4,15 +4,20 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEAWCS_Core.DB.Models; -namespace WIDESEAWCS_DTO.BasicInfo +namespace WIDESEAWCS_Model.Models { - public class WarehouseDTO + /// <summary> + /// 浠撳簱淇℃伅 + /// </summary> + [SugarTable(nameof(Dt_Warehouse), "浠撳簱淇℃伅")] + public class Dt_Warehouse : BaseEntity { /// <summary> /// 涓婚敭 /// </summary> - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] + [SugarColumn(IsPrimaryKey = true, ColumnDescription = "涓婚敭")] public int WarehouseId { get; set; } /// <summary> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_WarehouseDevice.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_WarehouseDevice.cs" new file mode 100644 index 0000000..2cfe1b2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_WarehouseDevice.cs" @@ -0,0 +1,62 @@ +锘縰sing 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_WarehouseDevice))] + public class Dt_WarehouseDevice : BaseEntity + { + /// <summary> + /// 涓婚敭 + /// </summary> + [SugarColumn(IsIdentity = true, IsPrimaryKey = true)] + public int Id { get; set; } + + /// <summary> + /// 璁惧涓婚敭 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "")] + public int DeviceId { get; set; } + + /// <summary> + /// 璁惧缂栧彿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "")] + public string DeviceCode { get; set; } + + /// <summary> + /// 璁惧鍚嶇О + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "")] + public string DeviceName { get; set; } + + /// <summary> + /// 浠撳簱涓婚敭 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "")] + public int WarehouseId { get; set; } + + /// <summary> + /// 浠撳簱缂栧彿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "")] + public string WarehouseCode { get; set; } + + /// <summary> + /// 浠撳簱鍚嶇О + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "")] + public string WarehouseName { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "")] + public string Remark { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs" index 20b4120..390d476 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs" @@ -1,12 +1,24 @@ 锘� using SqlSugar; using WIDESEAWCS_Core.Helper; +using WIDESEAWCS_Core.Seed; using WIDESEAWCS_DTO.BasicInfo; +using WIDESEAWCS_Model.Models; +using ICacheService = WIDESEAWCS_Core.Caches.ICacheService; namespace WIDESEAWCS_Server.HostedService { public class WarehouseHostedService : IHostedService { + private readonly ICacheService _cacheService; + private readonly DBContext _dbContext; + + public WarehouseHostedService(ICacheService cacheService, DBContext dbContext) + { + _cacheService = cacheService; + _dbContext = dbContext; + } + public Task StartAsync(CancellationToken cancellationToken) { string connStr = AppSettings.GetValue("WMSConnectionStrings"); @@ -14,14 +26,18 @@ { throw new Exception("WMS杩炴帴瀛楃涓查敊璇�"); } - SqlSugarClient sugarClient = new SqlSugarClient(new ConnectionConfig() + SqlSugarClient sugarClient = new(new ConnectionConfig() { ConnectionString = connStr, IsAutoCloseConnection = true, DbType = DbType.SqlServer }); - List<WarehouseDTO> warehouses = sugarClient.Queryable<WarehouseDTO>().ToList(); + List<Dt_Warehouse> warehouses = sugarClient.Queryable<Dt_Warehouse>().ToList(); + + _dbContext.Db.Deleteable<Dt_Warehouse>().ExecuteCommand(); + + _dbContext.Db.Insertable(warehouses).ExecuteCommand(); return Task.CompletedTask; } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" index 8369112..17424c7 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" @@ -21,6 +21,7 @@ using Autofac.Core; using WIDESEAWCS_QuartzJob.QuartzExtensions; using Microsoft.AspNetCore.Builder; +using WIDESEAWCS_Server.HostedService; var builder = WebApplication.CreateBuilder(args); @@ -46,8 +47,9 @@ builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入 builder.Services.AddDbSetup();//Db 启动服务 -builder.Services.AddScoped<QuartzJobCreateDataTabel>(); -builder.Services.AddHostedService<QuartzJobDataTableHostedService>(); +//builder.Services.AddScoped<QuartzJobCreateDataTabel>(); +builder.Services.AddHostedService<WarehouseHostedService>(); +//builder.Services.AddHostedService<QuartzJobDataTableHostedService>(); builder.Services.AddAutoMapperSetup(); @@ -61,7 +63,7 @@ builder.Services.AddHttpContextSetup(); -builder.Services.AddHostedService<QuartzJobHostedService>(); +//builder.Services.AddHostedService<QuartzJobHostedService>(); builder.Services.AddMvc(options => { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index d1dc670..ed090e0 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -32,23 +32,28 @@ using WIDESEAWCS_Core.BaseServices; using WIDESEAWCS_Core.Enums; using WIDESEAWCS_Core.Helper; +using WIDESEAWCS_DTO.BasicInfo; using WIDESEAWCS_DTO.TaskInfo; using WIDESEAWCS_IBasicInfoRepository; using WIDESEAWCS_ITaskInfoRepository; using WIDESEAWCS_ITaskInfoService; using WIDESEAWCS_Model.Models; using WIDESEAWCS_QuartzJob.Models; +using WIDESEAWCS_QuartzJob.Repository; using WIDESEAWCS_QuartzJob.Service; +using ICacheService = WIDESEAWCS_Core.Caches.ICacheService; namespace WIDESEAWCS_TaskInfoService { public partial class TaskService : ServiceBase<Dt_Task, ITaskRepository>, ITaskService { + private readonly IMapper _mapper; + private readonly ICacheService _cacheService; private readonly IRouterService _routerService; private readonly ITaskExecuteDetailService _taskExecuteDetailService; private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository; - private readonly IMapper _mapper; private readonly IStationMangerRepository _stationMangerRepository; + private readonly IRouterRepository _routerRepository; private Dictionary<string, OrderByType> _taskOrderBy = new() { @@ -56,20 +61,33 @@ {nameof(Dt_Task.CreateDate),OrderByType.Asc}, }; + private List<Dt_Warehouse>? Warehouses = new List<Dt_Warehouse>(); + public Dictionary<string, OrderByType> TaskOrderBy { get { return _taskOrderBy; } set { _taskOrderBy = value; } } public List<int> TaskInboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 100 && x < 500).ToList(); public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 500 && x < 900).ToList(); - public TaskService(ITaskRepository BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IMapper mapper, IStationMangerRepository stationMangerRepository) : base(BaseDal) + public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository) : base(BaseDal) { + _mapper = mapper; + _cacheService = cacheService; _routerService = routerService; _taskExecuteDetailService = taskExecuteDetailService; _taskExecuteDetailRepository = taskExecuteDetailRepository; - _mapper = mapper; _stationMangerRepository = stationMangerRepository; + _routerRepository = routerRepository; + + string? cacheStr = _cacheService.Get(nameof(Dt_Warehouse)); + if (!string.IsNullOrEmpty(cacheStr)) + { + Warehouses = JsonConvert.DeserializeObject<List<Dt_Warehouse>>(cacheStr); + } + } + + /// <summary> /// 鎺ユ敹WMS浠诲姟淇℃伅 @@ -81,10 +99,11 @@ WebResponseContent content = new WebResponseContent(); try { + List<Dt_WarehouseDevice> warehouseDevices = Db.Queryable<Dt_WarehouseDevice>().ToList(); + List<Dt_Task> tasks = new List<Dt_Task>(); foreach (var item in taskDTOs) { - if (BaseDal.QueryFirst(x => x.TaskNum == item.TaskNum || x.PalletCode == item.PalletCode) != null) { continue; @@ -95,6 +114,23 @@ task.CurrentAddress = item.SourceAddress; task.NextAddress = item.TargetAddress; + List<Dt_WarehouseDevice> wades = warehouseDevices.Where(x => x.WarehouseId == item.WarehouseId).ToList(); + + if (string.IsNullOrEmpty(item.AGVArea)) + { + Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress || x.StackerCraneCode == item.RoadWay); + + //stationManger.AGVStationCode + //stationManger.StackerCraneCode + //stationManger.StationDeviceCode + + List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && (stationManger.StationDeviceCode == x.StartPosi || stationManger.StackerCraneCode == x.StartPosi)); + } + else + { + List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi); + } + tasks.Add(task); } BaseDal.AddData(tasks); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" index 3da3cfd..68b627e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" @@ -19,7 +19,7 @@ using WIDESEAWCS_QuartzJob.StackerCrane.Enum; using WIDESEAWCS_Tasks.HoisterJob; using WIDESEAWCS_Tasks.StackerCraneJob; -using WIDESEAWCS_Tasks.闃荤剨浠�; +using WIDESEAWCS_Tasks; namespace WIDESEAWCS_Tasks { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj" index 92c4c9d..e635b36 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj" @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.0" /> + <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.1" /> </ItemGroup> <ItemGroup> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs" index 7368d05..9f1fdb7 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs" @@ -19,7 +19,7 @@ using WIDESEAWCS_QuartzJob.StackerCrane.Enum; using WIDESEAWCS_Tasks.HoisterJob; using WIDESEAWCS_Tasks.StackerCraneJob; -using WIDESEAWCS_Tasks.闃荤剨浠�; +using WIDESEAWCS_Tasks; namespace WIDESEAWCS_Tasks { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" index 0ee91a9..4a8d339 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" @@ -19,7 +19,7 @@ using WIDESEAWCS_QuartzJob.StackerCrane.Enum; using WIDESEAWCS_Tasks.HoisterJob; using WIDESEAWCS_Tasks.StackerCraneJob; -using WIDESEAWCS_Tasks.闃荤剨浠�; +using WIDESEAWCS_Tasks; namespace WIDESEAWCS_Tasks { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b0fe0eb0-0200-46f6-a7cd-e7eceefa6c9f.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b0fe0eb0-0200-46f6-a7cd-e7eceefa6c9f.vsidx" new file mode 100644 index 0000000..ef77587 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b0fe0eb0-0200-46f6-a7cd-e7eceefa6c9f.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d1c62139-7bae-4df6-b13e-daefe3114894.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d1c62139-7bae-4df6-b13e-daefe3114894.vsidx" new file mode 100644 index 0000000..70aef67 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d1c62139-7bae-4df6-b13e-daefe3114894.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dba84b80-59a3-4d5b-9a50-dd830ce6c4f5.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dba84b80-59a3-4d5b-9a50-dd830ce6c4f5.vsidx" deleted file mode 100644 index 8ea9b79..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dba84b80-59a3-4d5b-9a50-dd830ce6c4f5.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e7c41db3-4bc3-4216-90e3-a4b2f38e7979.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e7c41db3-4bc3-4216-90e3-a4b2f38e7979.vsidx" deleted file mode 100644 index 056128b..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e7c41db3-4bc3-4216-90e3-a4b2f38e7979.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fc937dfc-f65e-4bef-aaa4-717ebb3be43e.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fc937dfc-f65e-4bef-aaa4-717ebb3be43e.vsidx" new file mode 100644 index 0000000..73a307b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fc937dfc-f65e-4bef-aaa4-717ebb3be43e.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" deleted file mode 100644 index e69de29..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" +++ /dev/null diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" index 037b1f9..ee2ecbe 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" @@ -41,6 +41,11 @@ /// ERP鐗╂枡鍑哄簱鎺ュ彛璋冪敤 /// </summary> [Description("ERP鐗╂枡鍑哄簱鎺ュ彛璋冪敤")] - InvokeOutboundOrderApi + InvokeOutboundOrderApi, + /// <summary> + /// MES鍚屾娴嬭瘯鏋跺彴璐︿俊鎭� + /// </summary> + [Description("MES鍚屾娴嬭瘯鏋跺彴璐︿俊鎭�")] + WMS_MES_TestToolSync, } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" index bed3f19..b0274d6 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" @@ -80,6 +80,11 @@ [Description("闃荤剨浠撳叆搴�")] SolderInbound = 2350, /// <summary> + /// 娴嬭瘯鏋堕��搴� + /// </summary> + [Description("娴嬭瘯鏋堕��搴�")] + TestBackbound=2400, + /// <summary> /// 鍑哄簱 /// </summary> [Description("鍑哄簱")] diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs" index 8c9863e..4a696e8 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs" @@ -14,8 +14,8 @@ namespace WIDESEA_Core { public sealed class SeedDataHostedService : IHostedService - { - private readonly DBContext _dbContext; + { + private readonly DBContext _dbContext; private readonly ILogger<SeedDataHostedService> _logger; private readonly string _webRootPath; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs" index 6708cc4..7c613da 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs" @@ -53,5 +53,9 @@ /// </summary> public int Grade { get; set; } + public int WarehouseId { get; set; } + + public string AGVArea { get; set; } + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" index e433fe7..b9bd600 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" @@ -33,6 +33,11 @@ /// <param name="inboundModel"></param> /// <returns></returns> string InvokeInboundOrderApi(ERPInboundModel inboundModel); + /// <summary> + /// ERP鐗╂枡鍑哄簱鎺ュ彛璋冪敤 + /// </summary> + /// <param name="outboundModel"></param> + /// <returns></returns> string InvokeOutboundOrderApi(ERPOutboundModel outboundModel); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" index c7c2cba..3898b49 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" @@ -18,6 +18,8 @@ List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null); + Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null); + List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum outStockStatus); List<Dt_OutStockLockInfo> GetStockOutboundOrder(SaveModel saveModel); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" index ee4eb7c..daedf38 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" @@ -100,7 +100,7 @@ /// <param name="taskNum">浠诲姟鍙�</param> /// <param name="locationCode">鍏ュ簱鎴栧嚭搴撶殑璐т綅鍙�</param> /// <returns></returns> - MesResponseContent TestReturnStock(TestToolBackModel backModel); + MesResponseContent TestToolBack(TestToolBackModel backModel); /// <summary> /// 娴嬭瘯鏋舵姤搴� /// </summary> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" index 7a3b2e4..a2c4d72 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" @@ -49,6 +49,30 @@ return outStockLockInfos; } + public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null) + { + + Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo() + { + PalletCode = outStock.PalletCode, + AssignQuantity = assignQuantity, + MaterielCode = outboundOrderDetail.MaterielCode, + BatchNo = outboundOrderDetail.BatchNo, + LocationCode = outStock.LocationCode, + MaterielName = outboundOrderDetail.MaterielName, + OrderDetailId = outboundOrderDetail.Id, + OrderNo = outboundOrder.OrderNo, + OrderType = outboundOrder.OrderType, + OriginalQuantity = outStock.Details.Where(x => x.MaterielCode == outboundOrderDetail.MaterielCode).Sum(x => x.StockQuantity), + Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(), + StockId = outStock.Id, + TaskNum = taskNum, + OrderQuantity = outboundOrderDetail.OrderQuantity + }; + + return outStockLockInfo; + } + public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum outStockStatus) { return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && x.Status == outStockStatus.ObjToInt()); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs" new file mode 100644 index 0000000..d682cdc --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs" @@ -0,0 +1,48 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Common.StockEnum; +using WIDESEA_Core; +using WIDESEA_Core.BaseServices; +using WIDESEA_Core.Enums; +using WIDESEA_Core.Helper; +using WIDESEA_IOutboundRepository; +using WIDESEA_IStockService; +using WIDESEA_Model.Models; + +namespace WIDESEA_IOutboundService +{ + public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService + { + IStockService _stockService; + + public WebResponseContent MaterialPick(string palletCode) + { + try + { + Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(palletCode); + if (stockInfo == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌鎵樼洏搴撳瓨淇℃伅"); + } + List<Dt_OutStockLockInfo> outStockLockInfos = Repository.QueryData(x => x.PalletCode == palletCode); + for (int i = 0; i < outStockLockInfos.Count; i++) + { + float assignQuantity = outStockLockInfos[i].AssignQuantity; + List<Dt_StockInfoDetail> stockInfoDetails = stockInfo.Details.Where(x => x.MaterielCode == outStockLockInfos[i].MaterielCode).ToList(); + for (int j = 0; j < stockInfoDetails.Count; j++) + { + // if(assignQuantity > stockInfoDetails[j]) + } + } + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs" index f44093e..1c3fe6f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs" @@ -234,38 +234,52 @@ float needQuantity = originalNeedQuantity; List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(item.MaterielCode, item.BatchNo, outboundOrder.WarehouseId); + if (!stockInfos.Any()) + { + throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨"); + } List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, item.MaterielCode, needQuantity, out float residueQuantity); item.LockQuantity += needQuantity - residueQuantity; outStocks.AddRange(autoAssignStocks); float assignQuantity = needQuantity - residueQuantity; - //for (int i = 0; i < outboundOrderDetails.Count; i++) - //{ - // for (int j = 0; j < outStocks.Count; j++) - // { - // if(assignQuantity > 0) - // { - // if (outboundOrderDetails[i].OrderQuantity - outboundOrderDetails[i].LockQuantity >= outStocks[j].) - // { - // } - // } - // } + List<Dt_OutboundOrderDetail> details = outboundOrderDetails.Where(x => !string.IsNullOrEmpty(x.BatchNo) ? x.BatchNo == item.BatchNo : true && x.MaterielCode == item.MaterielCode).ToList(); - // if (assignQuantity > 0 && outboundOrderDetails[i].LockQuantity < outboundOrderDetails[i].OrderQuantity) - // { - // outStockLockInfos.AddRange(_outStockLockInfoService.GetOutStockLockInfos(outboundOrder, outboundOrderDetails[i], outStocks)); - // if (outboundOrderDetails[i].OrderQuantity - outboundOrderDetails[i].LockQuantity >= assignQuantity) - // { - // outboundOrderDetails[i].LockQuantity += assignQuantity; - // break; - // } - // else - // { - // assignQuantity -= (outboundOrderDetails[i].OrderQuantity - outboundOrderDetails[i].LockQuantity); - // outboundOrderDetails[i].LockQuantity = outboundOrderDetails[i].OrderQuantity; - // } - // } - //} + for (int i = 0; i < details.Count; i++) + { + float orderQuantity = details[i].OrderQuantity; + for (int j = 0; j < autoAssignStocks.Count; j++) + { + float detailAssignQuantity = outStockLockInfos.Where(x => !string.IsNullOrEmpty(x.BatchNo) ? x.BatchNo == item.BatchNo : true && x.MaterielCode == item.MaterielCode && x.OrderDetailId == details[i].Id).Sum(x => x.AssignQuantity);//鍑哄簱璁㈠崟鏄庣粏宸插垎閰嶆暟閲� + + float palletAssignQuantity = outStockLockInfos.Where(x => x.BatchNo == item.BatchNo && x.MaterielCode == item.MaterielCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//鍑哄簱璇︽儏宸插垎閰嶆暟閲� + if (string.IsNullOrEmpty(item.BatchNo)) + { + palletAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == item.MaterielCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//鍑哄簱璇︽儏宸插垎閰嶆暟閲� + } + float palletOutboundQuantity = autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity); + if (palletAssignQuantity < palletOutboundQuantity)//濡傛灉鍑哄簱璇︽儏宸插垎閰嶆暟閲忓皬浜庢墭鐩樺凡鍒嗛厤鏁伴噺锛屽垯鍙互缁х画娣诲姞璇ユ墭鐩樺嚭搴撲俊鎭� + { + float orderDetailNeedQuantity = details[i].OrderQuantity - detailAssignQuantity; + if (orderDetailNeedQuantity > autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity) + { + details[i].LockQuantity += autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity; + Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(outboundOrder, details[i], autoAssignStocks[j], autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity); + outStockLockInfos.Add(outStockLockInfo); + } + else + { + Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(outboundOrder, details[i], autoAssignStocks[j], details[i].OrderQuantity - details[i].LockQuantity); + outStockLockInfos.Add(outStockLockInfo); + details[i].LockQuantity = details[i].OrderQuantity; + break; + } + + } + } + } + + locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList())); } @@ -385,6 +399,14 @@ List<Dt_OutStockLockInfo> addOutStockLockInfos = outStockLockInfos.Where(x => x.Id == 0).ToList(); if (addOutStockLockInfos != null && addOutStockLockInfos.Any()) { + if(tasks != null) + { + addOutStockLockInfos.ForEach(x => + { + x.TaskNum = tasks.FirstOrDefault(v => v.PalletCode == x.PalletCode)?.TaskNum; + }); + } + _outStockLockInfoService.Repository.AddData(addOutStockLockInfos); } List<Dt_OutStockLockInfo> updateOutStockLockInfos = outStockLockInfos.Where(x => x.Id > 0).ToList(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" index 0769450..c15e44e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" @@ -41,17 +41,19 @@ private readonly IStockInfoRepository _stockInfoRepository; public IOutboundOrderRepository Repository => BaseDal; private readonly IInvokeERPService _invokeERPService; + private readonly IOutStockLockInfoService _outStockLockInfoService; public OutboundOrderService(IOutboundOrderRepository BaseDal, IMapper mapper,IUnitOfWorkManage unitOfWorkManage, IBasicService basicService, IOutboundOrderDetailRepository outboundOrderDetailRepository, IStockInfoService stockInfoService, - IStockInfoRepository stockInfoRepository, IInvokeERPService invokeERPService) : base(BaseDal) + IStockInfoRepository stockInfoRepository, IInvokeERPService invokeERPService, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal) { _mapper = mapper; - _unitOfWorkManage=unitOfWorkManage; + _unitOfWorkManage = unitOfWorkManage; _basicService = basicService; _outboundOrderDetailRepository = outboundOrderDetailRepository; _stockInfoService = stockInfoService; _stockInfoRepository = stockInfoRepository; _invokeERPService = invokeERPService; + _outStockLockInfoService = outStockLockInfoService; } public WebResponseContent ReceiveOutOrder(ErpOutOrderDTO model) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" index 51ea1cd..d6a30ef 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" @@ -1,8 +1,10 @@ -锘縰sing System; +锘縰sing SqlSugar.Extensions; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_Common.APIEnum; using WIDESEA_Common.CommonEnum; using WIDESEA_Common.LocationEnum; using WIDESEA_Common.OtherEnum; @@ -11,6 +13,7 @@ using WIDESEA_Common.WareHouseEnum; using WIDESEA_Core; using WIDESEA_Core.BaseServices; +using WIDESEA_Core.Enums; using WIDESEA_DTO; using WIDESEA_DTO.ERP; using WIDESEA_DTO.MES; @@ -79,6 +82,8 @@ BaseDal.AddData(taskOut); //鍔犲叆璐т綅鍙樺姩璁板綍 _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, locationStatus, LocationChangeType.OutboundAssignLocation, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", taskOut.TaskNum); + //鍔犲叆搴撳瓨鍙樺姩璁板綍 + //_recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.MaterielGroup); _unitOfWorkManage.CommitTran(); //灏嗕换鍔℃帹閫佸埌WCS PushTasksToWCS(); @@ -95,7 +100,7 @@ /// 娴嬭瘯鏋堕��搴� /// </summary> /// <returns></returns> - public MesResponseContent TestReturnStock(TestToolBackModel backModel) + public MesResponseContent TestToolBack(TestToolBackModel backModel) { MesResponseContent responseContent = new MesResponseContent(); try @@ -107,9 +112,38 @@ x.WarehouseId == warehouse.WarehouseId && x.StockStatus == (int)StockStatusEmun.鍑哄簱瀹屾垚) .Includes(x => x.Details).Where(x => x.Details.Any(x => x.BatchNo == backModel.TestToolCode)).First(); + if (stockInfo==null) + { + return responseContent.Error($"{backModel.TestToolCode}搴撳瓨淇℃伅涓嶅瓨鍦�"); + } + //鐢熸垚閫�搴撲换鍔� + Dt_Task taskIn = new() + { + CurrentAddress = backModel.SourceAddressCode, + Grade = 0, + PalletCode = stockInfo.PalletCode, + NextAddress = "", + Roadway = "", + SourceAddress = backModel.SourceAddressCode, + TargetAddress = "", + TaskStatus = (int)TaskStatusEnum.New, + TaskType = (int)TaskTypeEnum.TestBackbound, + TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), + PalletType = stockInfo.PalletType, + WarehouseId = stockInfo.WarehouseId, + }; + //鏇存敼搴撳瓨鐘舵�� + stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(); + _unitOfWorkManage.BeginTran(); + _stockRepository.StockInfoRepository.UpdateData(stockInfo); + _unitOfWorkManage.CommitTran(); + //灏嗕换鍔℃帹閫佸埌WCS + PushTasksToWCS(); + responseContent.OK(); } catch (Exception ex) { + _unitOfWorkManage.RollbackTran(); responseContent.Error(ex.Message); } return responseContent; @@ -127,14 +161,23 @@ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA64.ToString()); //鑾峰彇搴撳瓨璁板綍 Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => - x.WarehouseId == warehouse.WarehouseId) + x.WarehouseId == warehouse.WarehouseId && x.StockStatus==StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt()) .Includes(x => x.Details).Where(x => x.Details.Any(x => x.BatchNo == toolScrap.ToolCode)).First(); + if (stockInfo == null) + { + return responseContent.Error($"{toolScrap.ToolCode}搴撳瓨淇℃伅涓嶅瓨鍦�"); + } //娓呴櫎搴撳瓨淇℃伅 _unitOfWorkManage.BeginTran(); - + _stockRepository.StockInfoRepository.DeleteData(stockInfo); + _stockRepository.StockInfoDetailRepository.DeleteData(stockInfo.Details); + _stockRepository.StockInfoRepository.DeleteAndMoveIntoHty(stockInfo,OperateTypeEnum.鑷姩鍒犻櫎); + _stockRepository.StockInfoDetailRepository.DeleteAndMoveIntoHty(stockInfo.Details, OperateTypeEnum.鑷姩鍒犻櫎); + _unitOfWorkManage.CommitTran(); } catch (Exception ex) { + _unitOfWorkManage.RollbackTran(); responseContent.Error(ex.Message); } return responseContent; @@ -149,10 +192,14 @@ WebResponseContent content= new WebResponseContent(); try { + Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x=>x.ApiCode==APIEnum.WMS_MES_TestToolSync.ToString()); Root<TestToolSynInfo> root = new Root<TestToolSynInfo>() { - + From = "WMS", + DateTime = DateTime.Now.ToString(), + Content=toolSynInfo }; + //璋冪敤鎺ュ彛 } catch (Exception ex) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" index 284909e..00206f2 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" @@ -33,6 +33,7 @@ using WIDESEA_DTO.Inbound; using WIDESEA_DTO.Stock; using WIDESEA_DTO.Task; +using WIDESEA_External.ERPService; using WIDESEA_IBasicRepository; using WIDESEA_IBasicService; using WIDESEA_IInboundService; @@ -58,6 +59,8 @@ private readonly IOutboundService _outboundService; private readonly IStockService _stockService; private readonly IBasicRepository _basicRepository; + private readonly IApiInfoRepository _apiInfoRepository; + private readonly IInvokeERPService _invokeERPService; public ITaskRepository Repository => BaseDal; @@ -71,7 +74,7 @@ public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList(); - public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository) : base(BaseDal) + public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService) : base(BaseDal) { _mapper = mapper; _unitOfWorkManage = unitOfWorkManage; @@ -81,6 +84,8 @@ _outboundService = outboundService; _stockService = stockService; _basicRepository = basicRepository; + _apiInfoRepository = apiInfoRepository; + _invokeERPService = invokeERPService; } /// <summary> @@ -158,6 +163,10 @@ if (task.TaskType == TaskTypeEnum.TestInbound.ObjToInt()) { stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚鏈缓鍑哄簱鍗�.ObjToInt(); + stockInfo.Details.ForEach(x => + { + x.Status = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(); + }); } else { @@ -171,7 +180,7 @@ _basicService.LocationInfoService.Repository.UpdateData(locationInfo); _stockRepository.StockInfoRepository.UpdateData(stockInfo); - + _stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details); _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationChangeType.InboundCompleted); _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, stockInfo.Details.Sum(x => x.StockQuantity), stockInfo.Details.Sum(x => x.StockQuantity), StockChangeTypeEnum.Inbound, taskNum); _unitOfWorkManage.CommitTran(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj" index 5272e9b..d93a798 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj" @@ -7,6 +7,7 @@ </PropertyGroup> <ItemGroup> + <ProjectReference Include="..\WIDESEA_External\WIDESEA_External.csproj" /> <ProjectReference Include="..\WIDESEA_IBasicService\WIDESEA_IBasicService.csproj" /> <ProjectReference Include="..\WIDESEA_IInboundService\WIDESEA_IInboundService.csproj" /> <ProjectReference Include="..\WIDESEA_IOutboundService\WIDESEA_IOutboundService.csproj" /> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" index 6381648..5af3526 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" @@ -49,17 +49,17 @@ /// </summary> /// <param name="model"></param> /// <returns></returns> - [HttpPost, Route("TestReturnStock"), AllowAnonymous, MethodParamsValidate] - public MesResponseContent TestReturnStock([FromBody] Root<TestToolBackModel> model) + [HttpPost, Route("TestToolBack"), AllowAnonymous, MethodParamsValidate] + public MesResponseContent TestToolBack([FromBody] Root<TestToolBackModel> model) { - return _taskService.TestReturnStock(model.Content); + return _taskService.TestToolBack(model.Content); } /// <summary> /// 娴嬭瘯鏋舵姤搴� /// </summary> /// <param name="model"></param> /// <returns></returns> - [HttpPost, Route("TestScrap"), AllowAnonymous, MethodParamsValidate] + [HttpPost, Route("TestToolScrap"), AllowAnonymous, MethodParamsValidate] public MesResponseContent TestScrap([FromBody] Root<TestToolScrap> model) { return _taskService.TestScrap(model.Content); diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/MES\344\270\232\345\212\241\346\265\201\347\250\213\345\233\276V1.0.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/MES\344\270\232\345\212\241\346\265\201\347\250\213\345\233\276V1.0.xlsx" index 82f0a1c..c6054ff 100644 --- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/MES\344\270\232\345\212\241\346\265\201\347\250\213\345\233\276V1.0.xlsx" +++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/MES\344\270\232\345\212\241\346\265\201\347\250\213\345\233\276V1.0.xlsx" Binary files differ -- Gitblit v1.9.3