From b9616a179aa17f4c69ebbcc7f6cea59b239369d1 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期二, 24 十二月 2024 00:23:49 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/6fda0a96-bb99-45b9-93e3-b00b1e75fd10.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_WarehouseDevice.cs | 62 ++++++++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs | 4 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6ddb89a1-3fb5-42aa-a799-c08181483993.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs | 4 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs | 20 +++ /dev/null | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_Warehouse.cs | 11 + 代码管理/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 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs | 8 + 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs | 4 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/WareHouseEnum/WarehouseEnum.cs | 76 +++++++++++++++ 代码管理/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 23 files changed, 235 insertions(+), 20 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/6fda0a96-bb99-45b9-93e3-b00b1e75fd10.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/6fda0a96-bb99-45b9-93e3-b00b1e75fd10.vsidx" new file mode 100644 index 0000000..5dc038e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/6fda0a96-bb99-45b9-93e3-b00b1e75fd10.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_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_WMSServer/Program.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" index 2a23123..671db48 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" @@ -43,7 +43,7 @@ builder.Services.AddWebSocketSetup(); builder.Services.AddSqlsugarSetup();//SqlSugar 启动服务 builder.Services.AddDbSetup();//Db 启动服务 -//builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入 +builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入 builder.Services.AddHostedService<PermissionDataHostService>();//应用初始化服务注入 builder.Services.AddAutoMapperSetup(); -- Gitblit v1.9.3