From 18d1f45193e34e00fc1b6f65b8596ddb29c5267d Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 24 十二月 2024 15:32:43 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs | 22 - 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs | 6 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 9 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs | 51 ++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs | 9 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/83e3b476-d887-46bd-be7e-12e5279adff6.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs | 75 +++++- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs | 38 +++ 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1e920e33-148d-49c7-8f92-7c522736eb31.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/cf601b15-8665-4e91-bf55-55e9b66ed6a7.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs | 12 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 29 ++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs | 38 +++ 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/52d14652-9578-4d37-be69-82ece695e359.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 7 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs | 152 +++++++++++-- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 11 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs | 134 ++--------- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 14 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 18 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6dfb708c-1dce-481d-8fd0-9391b26c11ff.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs | 2 /dev/null | 0 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3391ef1a-b377-4e97-8ef2-e56d3ee99c44.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs | 6 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs | 15 + 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9a102d22-50b2-4a33-9ca7-fb3c6c8dea03.vsidx | 0 34 files changed, 453 insertions(+), 207 deletions(-) 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" deleted file mode 100644 index e5ce690..0000000 --- "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" +++ /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/6dfb708c-1dce-481d-8fd0-9391b26c11ff.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6dfb708c-1dce-481d-8fd0-9391b26c11ff.vsidx" new file mode 100644 index 0000000..5481cd1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6dfb708c-1dce-481d-8fd0-9391b26c11ff.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs" index 589a379..102375d 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs" @@ -12,6 +12,10 @@ [Description("AGV鍙戦�佷换鍔℃帴鍙�")] AgvSendTask, [Description("AGV瀹夊叏淇″彿鍥炲")] - AgvSecureReply + AgvSecureReply, + + FeedBackWMSTaskCompleted, + + UploadWMSTaskStatus } } 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 ed090e0..7021a70 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" @@ -87,8 +87,6 @@ } - - /// <summary> /// 鎺ユ敹WMS浠诲姟淇℃伅 /// </summary> @@ -112,23 +110,40 @@ task.Creater = "WMS"; task.TaskState = (int)TaskStatusEnum.New; task.CurrentAddress = item.SourceAddress; - task.NextAddress = item.TargetAddress; List<Dt_WarehouseDevice> wades = warehouseDevices.Where(x => x.WarehouseId == item.WarehouseId).ToList(); + + Dt_Router? router = new Dt_Router(); 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 + if (stationManger == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒扮珯鍙伴厤缃俊鎭�"); + } List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && (stationManger.StationDeviceCode == x.StartPosi || stationManger.StackerCraneCode == x.StartPosi)); + if (routers.FirstOrDefault() == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�"); + } + router = routers.FirstOrDefault(); + if (routers.Count == 1) + { + task.NextAddress = router?.NextPosi ?? ""; + } } else { List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi); + if (routers.FirstOrDefault() == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�"); + } + router = routers.FirstOrDefault(); + + task.NextAddress = router?.NextPosi ?? ""; } tasks.Add(task); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1e920e33-148d-49c7-8f92-7c522736eb31.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1e920e33-148d-49c7-8f92-7c522736eb31.vsidx" new file mode 100644 index 0000000..25979e6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1e920e33-148d-49c7-8f92-7c522736eb31.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/3391ef1a-b377-4e97-8ef2-e56d3ee99c44.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3391ef1a-b377-4e97-8ef2-e56d3ee99c44.vsidx" new file mode 100644 index 0000000..0517ea6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3391ef1a-b377-4e97-8ef2-e56d3ee99c44.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/52d14652-9578-4d37-be69-82ece695e359.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/52d14652-9578-4d37-be69-82ece695e359.vsidx" new file mode 100644 index 0000000..b9fd08a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/52d14652-9578-4d37-be69-82ece695e359.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/83e3b476-d887-46bd-be7e-12e5279adff6.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/83e3b476-d887-46bd-be7e-12e5279adff6.vsidx" new file mode 100644 index 0000000..21f3698 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/83e3b476-d887-46bd-be7e-12e5279adff6.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/9a102d22-50b2-4a33-9ca7-fb3c6c8dea03.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9a102d22-50b2-4a33-9ca7-fb3c6c8dea03.vsidx" new file mode 100644 index 0000000..ffeaaa1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9a102d22-50b2-4a33-9ca7-fb3c6c8dea03.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/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" deleted file mode 100644 index ef77587..0000000 --- "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" +++ /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/cf601b15-8665-4e91-bf55-55e9b66ed6a7.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/cf601b15-8665-4e91-bf55-55e9b66ed6a7.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/cf601b15-8665-4e91-bf55-55e9b66ed6a7.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/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" deleted file mode 100644 index 73a307b..0000000 --- "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" +++ /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/read.lock" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" new file mode 100644 index 0000000..e69de29 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs" index 9a147d6..9c037f2 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs" @@ -87,7 +87,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_BC(locationInfos, undefinedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_BC.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } @@ -101,7 +100,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_BC(locationInfos, definedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_BC.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" index 3533316..ac15f3f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" @@ -24,21 +24,21 @@ /// <summary> /// 娴嬭瘯鏋朵粨璐т綅鍒嗛厤 <br/> /// 鎵樼洏绫诲瀷锛� <br/> - /// 1锛氭渶闀� <br/> - /// 2锛氶暱 <br/> - /// 3锛氫腑绛� <br/> - /// 4锛氱煭 <br/> - /// 3鍜�4閮芥槸3娣憋紝涓斿彲浠ユ贩鏀俱�� <br/> - /// 1鍜�2閮芥槸2娣憋紝涓斿彲浠ユ贩鏀俱�� <br/> + /// 1锛氱煭 <br/> + /// 2锛氫腑绛� <br/> + /// 3锛氶暱 <br/> + /// 4锛氱壒闀� <br/> + /// 1鍜�2閮芥槸3娣憋紝涓斿彲浠ユ贩鏀俱�� <br/> + /// 3鍜�4閮芥槸2娣憋紝涓斿彲浠ユ贩鏀俱�� <br/> /// 绉诲簱鏃跺彧鑳芥槸鍚屼晶璐т綅銆� /// </summary> /// <param name="roadwayNo">宸烽亾鍙�</param> /// <param name="palletType"> /// 鎵樼洏绫诲瀷 <br/> - /// 1锛氭渶闀� <br/> - /// 2锛氶暱 <br/> - /// 3锛氫腑绛� <br/> - /// 4锛氱煭 + /// 1锛氱煭 <br/> + /// 2锛氫腑绛� <br/> + /// 3锛氶暱 <br/> + /// 4锛氱壒闀� /// </param> /// <returns></returns> public Dt_LocationInfo? AssignLocation_CSJ(string roadwayNo, PalletTypeEnum palletType, string beRelocationCode = "") @@ -99,7 +99,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_CSJ(locationInfos, undefinedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_CSJ.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } @@ -113,7 +112,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_CSJ(locationInfos, definedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_CSJ.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs" index 6e1254e..3fedb80 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs" @@ -87,7 +87,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_GM(locationInfos, undefinedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_GM.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } @@ -101,7 +100,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_GM(locationInfos, definedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_GM.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs" index 99d093f..0eac5f3 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs" @@ -87,7 +87,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_PP(locationInfos, undefinedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_PP.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } @@ -101,7 +100,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_PP(locationInfos, definedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_PP.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs" index 9715b79..e0e812b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs" @@ -87,7 +87,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_ZH(locationInfos, undefinedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_ZH.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } @@ -101,7 +100,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_ZH(locationInfos, definedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_ZH.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" index 146b0b7..3cd8b9c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" @@ -45,27 +45,27 @@ }; } - public bool LittleDepthLocationIsEmpty(Dt_LocationInfo locationInfo, PalletTypeEnum palletType) - { - Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == locationInfo.WarehouseId); - if (warehouse == null) - { - throw new Exception($"鏈壘鍒颁粨搴撲俊鎭�"); - } + //public bool LittleDepthLocationIsEmpty(Dt_LocationInfo locationInfo, PalletTypeEnum palletType) + //{ + // Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == locationInfo.WarehouseId); + // if (warehouse == null) + // { + // throw new Exception($"鏈壘鍒颁粨搴撲俊鎭�"); + // } - return warehouse.WarehouseName switch - { - "鏉挎潗浠�" => false, - "PP浠�" => false, - "骞茶啘浠�" => false, - "娴嬭瘯鏋朵粨" => LittleDepthLocationIsEmpty_CSJ(locationInfo, palletType), - "闃荤剨浠�" => false, - "娌瑰ⅷ浠�" => true, - "鎴愬搧浠�" => true, - "杈呮枡浠�" => true, - _ => throw new Exception($"鏈壘鍒颁粨搴撹揣浣嶅垎閰嶆柟娉�") - }; - } + // return warehouse.WarehouseName switch + // { + // "鏉挎潗浠�" => false, + // "PP浠�" => false, + // "骞茶啘浠�" => false, + // "娴嬭瘯鏋朵粨" => LittleDepthLocationIsEmpty_CSJ(locationInfo, palletType), + // "闃荤剨浠�" => false, + // "娌瑰ⅷ浠�" => true, + // "鎴愬搧浠�" => true, + // "杈呮枡浠�" => true, + // _ => throw new Exception($"鏈壘鍒颁粨搴撹揣浣嶅垎閰嶆柟娉�") + // }; + //} private readonly static object _locker = new object(); private static List<LocationCache> locationCaches = new List<LocationCache>(); @@ -132,8 +132,40 @@ { for (int i = 0; i < locations.Count; i++) { - locations[i].LocationStatus = locationStatus.ObjToInt(); - locations[i].LocationType = palletType.ObjToInt(); + if (locations[i].LocationType != palletType.ObjToInt()) + { + locations[i].LocationType = palletType.ObjToInt(); + } + + if (locations[i].LocationCode == location.LocationCode) + { + locations[i].LocationStatus = locationStatus.ObjToInt(); + } + else + { + if (locationStatus == LocationStatusEnum.Lock) + { + if (locations[i].LocationStatus == LocationStatusEnum.InStock.ObjToInt()) + { + locations[i].LocationStatus = LocationStatusEnum.InStockLock.ObjToInt(); + } + else if (locations[i].LocationStatus == LocationStatusEnum.Free.ObjToInt()) + { + locations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt(); + } + } + else if (locationStatus == LocationStatusEnum.Free || locationStatus == LocationStatusEnum.InStock) + { + if (locations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt()) + { + locations[i].LocationStatus = LocationStatusEnum.InStock.ObjToInt(); + } + else if (locations[i].LocationStatus == LocationStatusEnum.FreeLock.ObjToInt()) + { + locations[i].LocationStatus = LocationStatusEnum.Free.ObjToInt(); + } + } + } } Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column + 1); @@ -142,11 +174,44 @@ List<Dt_LocationInfo> nearLocations = GetGroupLocations(locationInfos, nearLocation); for (int i = 0; i < nearLocations.Count; i++) { - nearLocations[i].LocationType = palletType.ObjToInt(); - if (palletType == PalletTypeEnum.LargePallet) + if (nearLocations[i].LocationType != palletType.ObjToInt()) { - nearLocations[i].LocationStatus = locationStatus.ObjToInt(); + nearLocations[i].LocationType = palletType.ObjToInt(); } + + if (palletType.ObjToInt() >= PalletTypeEnum.LargePallet.ObjToInt()) + { + if (nearLocations[i].LocationCode == nearLocation.LocationCode) + { + nearLocations[i].LocationStatus = locationStatus.ObjToInt(); + } + else + { + if (locationStatus == LocationStatusEnum.Lock) + { + if (nearLocations[i].LocationStatus == LocationStatusEnum.InStock.ObjToInt()) + { + nearLocations[i].LocationStatus = LocationStatusEnum.InStockLock.ObjToInt(); + } + else if (nearLocations[i].LocationStatus == LocationStatusEnum.Free.ObjToInt()) + { + nearLocations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt(); + } + } + else if (locationStatus == LocationStatusEnum.Free || locationStatus == LocationStatusEnum.InStock) + { + if (nearLocations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt()) + { + nearLocations[i].LocationStatus = LocationStatusEnum.InStock.ObjToInt(); + } + else if (nearLocations[i].LocationStatus == LocationStatusEnum.FreeLock.ObjToInt()) + { + nearLocations[i].LocationStatus = LocationStatusEnum.Free.ObjToInt(); + } + } + } + } + } locations.AddRange(nearLocations); } @@ -155,13 +220,46 @@ { for (int i = 0; i < locations.Count; i++) { - locations[i].LocationStatus = locationStatus.ObjToInt(); - locations[i].LocationType = palletType.ObjToInt(); + if (locations[i].LocationCode == location.LocationCode) + { + locations[i].LocationStatus = locationStatus.ObjToInt(); + } + else + { + if (locationStatus == LocationStatusEnum.Lock) + { + if (locations[i].LocationStatus == LocationStatusEnum.InStock.ObjToInt()) + { + locations[i].LocationStatus = LocationStatusEnum.InStockLock.ObjToInt(); + } + else if (locations[i].LocationStatus == LocationStatusEnum.Free.ObjToInt()) + { + locations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt(); + } + } + else if (locationStatus == LocationStatusEnum.Free || locationStatus == LocationStatusEnum.InStock) + { + if (locations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt()) + { + locations[i].LocationStatus = LocationStatusEnum.InStock.ObjToInt(); + } + else if (locations[i].LocationStatus == LocationStatusEnum.FreeLock.ObjToInt()) + { + locations[i].LocationStatus = LocationStatusEnum.Free.ObjToInt(); + } + } + } + if (locations[i].LocationType != palletType.ObjToInt()) + { + locations[i].LocationType = palletType.ObjToInt(); + } } } Repository.UpdateData(locations); } + + /// <summary> /// 鑾峰彇涓嶅悓娣卞害鐨勫悓缁勮揣浣嶄俊鎭� /// </summary> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs" index aee9c69..acd2a2b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs" @@ -8,15 +8,17 @@ { public enum PalletTypeEnum { + None = 0, + /// <summary> /// 灏忔墭鐩� /// </summary> - SmallPallet = 1, + SmallPallet = 1, /// <summary> /// 涓墭鐩� /// </summary> - MediumPallet = 2, + MediumPallet = 2, /// <summary> /// 澶ф墭鐩� diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs" index 123091b..dd54520 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs" @@ -24,6 +24,18 @@ Lock = 1, /// <summary> + /// 鏈夎揣閿佸畾 + /// </summary> + [Description("鏈夎揣閿佸畾")] + InStockLock = 10, + + /// <summary> + /// + /// </summary> + [Description("绌洪棽閿佸畾")] + FreeLock = 20, + + /// <summary> /// 鏈夎揣 /// </summary> [Description("鏈夎揣")] 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 b0274d6..e2a252e 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" @@ -10,139 +10,55 @@ public enum TaskTypeEnum { /// <summary> - /// 搴撳唴绉诲簱 + /// 棰嗘枡鍑哄簱 /// </summary> - [Description("搴撳唴绉诲簱")] - Relocation = 300, - /// <summary> - /// 搴撳绉诲簱 - /// </summary> - [Description("搴撳绉诲簱")] - RelocationIn = 301, - /// <summary> - /// 鍏ュ簱 - /// </summary> - [Description("鍏ュ簱")] - Inbound = 1050, - /// <summary> - /// 鐩樼偣鍏ュ簱 - /// </summary> - [Description("鐩樼偣鍏ュ簱")] - InInventory = 1100, - /// <summary> - /// 鍒嗘嫞鍏ュ簱 - /// </summary> - [Description("鍒嗘嫞鍏ュ簱")] - InPick = 1150, - /// <summary> - /// 璐ㄦ鍏ュ簱 - /// </summary> - [Description("璐ㄦ鍏ュ簱")] - InQuality = 1200, - /// <summary> - /// 娴嬭瘯鏋跺叆搴� - /// </summary> - [Description("娴嬭瘯鏋跺叆搴�")] - TestInbound = 2000, - /// <summary> - /// 娌瑰ⅷ浠撳叆搴� - /// </summary> - [Description("娌瑰ⅷ浠撳叆搴�")] - PrintingInbound = 2050, - /// <summary> - /// 杈呮枡浠撳叆搴� - /// </summary> - [Description("杈呮枡浠撳叆搴�")] - AccessoryInbound = 2100, - /// <summary> - /// 鏉挎枡浠撳叆搴� - /// </summary> - [Description("鏉挎枡浠撳叆搴�")] - SheetInbound = 2150, - /// <summary> - /// 骞茶啘浠撳叆搴� - /// </summary> - [Description("骞茶啘浠撳叆搴�")] - DryfilmInbound = 2200, - /// <summary> - /// PP浠撳叆搴� - /// </summary> - [Description("PP浠撳叆搴�")] - PPInbound = 2250, - /// <summary> - /// 鎴愬搧浠撳叆搴� - /// </summary> - [Description("鎴愬搧浠撳叆搴�")] - ProductInbound = 2300, - /// <summary> - /// 闃荤剨浠撳叆搴� - /// </summary> - [Description("闃荤剨浠撳叆搴�")] - SolderInbound = 2350, - /// <summary> - /// 娴嬭瘯鏋堕��搴� - /// </summary> - [Description("娴嬭瘯鏋堕��搴�")] - TestBackbound=2400, - /// <summary> - /// 鍑哄簱 - /// </summary> - [Description("鍑哄簱")] - Outbound = 3000, + [Description("棰嗘枡鍑哄簱")] + Outbound = 100, /// <summary> /// 鐩樼偣鍑哄簱 /// </summary> [Description("鐩樼偣鍑哄簱")] - OutInventory = 3050, + OutInventory = 110, /// <summary> /// 鍒嗘嫞鍑哄簱 /// </summary> [Description("鍒嗘嫞鍑哄簱")] - OutPick = 3100, + OutPick = 120, /// <summary> /// 璐ㄦ鍑哄簱 /// </summary> [Description("璐ㄦ鍑哄簱")] - OutQuality = 3150, + OutQuality = 130, /// <summary> - /// 娴嬭瘯鏋跺嚭搴� + /// 閲囪喘鍏ュ簱 /// </summary> - [Description("娴嬭瘯鏋跺嚭搴�")] - TestOutbound = 4000, + [Description("閲囪喘鍏ュ簱")] + Inbound = 510, /// <summary> - /// 娌瑰ⅷ浠撳嚭搴� + /// 鐩樼偣鍏ュ簱 /// </summary> - [Description("娌瑰ⅷ浠撳嚭搴�")] - PrintingOutbound = 4050, + [Description("鐩樼偣鍏ュ簱")] + InInventory = 520, /// <summary> - /// 杈呮枡浠撳嚭搴� + /// 鍒嗘嫞鍏ュ簱 /// </summary> - [Description("杈呮枡浠撳嚭搴�")] - AccessoryOutbound = 4100, + [Description("鍒嗘嫞鍏ュ簱")] + InPick = 530, /// <summary> - /// 鏉挎枡浠撳嚭搴� + /// 璐ㄦ鍏ュ簱 /// </summary> - [Description("鏉挎枡浠撳嚭搴�")] - SheetOutbound = 4150, + [Description("璐ㄦ鍏ュ簱")] + InQuality = 540, /// <summary> - /// 骞茶啘浠撳嚭搴� + /// 鐢熶骇閫�鏂� /// </summary> - [Description("骞茶啘浠撳嚭搴�")] - DryfilmOutbound = 4200, + [Description("鐢熶骇閫�鏂�")] + ProductionReturn = 550, /// <summary> - /// PP浠撳嚭搴� + /// 宸烽亾鍐呯Щ搴� /// </summary> - [Description("PP浠撳嚭搴�")] - PPOutbound = 4250, - /// <summary> - /// 鎴愬搧浠撳嚭搴� - /// </summary> - [Description("鎴愬搧浠撳嚭搴�")] - ProductOutbound = 4300, - /// <summary> - /// 闃荤剨浠撳嚭搴� - /// </summary> - [Description("闃荤剨浠撳嚭搴�")] - SolderOutbound = 4350, + [Description("宸烽亾鍐呯Щ搴�")] + Relocation = 900 + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" index 1e79cc9..a03995e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" @@ -89,6 +89,6 @@ /// <param name="locationInfo">璐т綅淇℃伅</param> /// <param name="palletType">鎵樼洏绫诲瀷</param> /// <returns></returns> - bool LittleDepthLocationIsEmpty(Dt_LocationInfo locationInfo, PalletTypeEnum palletType); + //bool LittleDepthLocationIsEmpty(Dt_LocationInfo locationInfo, PalletTypeEnum palletType); } } 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 3898b49..58c2951 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" @@ -22,5 +22,12 @@ List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum outStockStatus); List<Dt_OutStockLockInfo> GetStockOutboundOrder(SaveModel saveModel); + + /// <summary> + /// 鍒嗘嫞 + /// </summary> + /// <param name="palletCode">鎵樼洏鍙�</param> + /// <returns></returns> + WebResponseContent MaterialPick(string palletCode); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs" index 8550885..2630049 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs" @@ -16,5 +16,7 @@ IStockQuantityChangeRecordRepository Repository { get; } void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> stockInfoDetails, float beforeQuantity, float totalQuantity, StockChangeTypeEnum changeType, int? taskNum = null); + + void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> updateDetails, List<Dt_StockInfoDetail> deleteDetails, StockChangeTypeEnum changeType, int? taskNum = null); } } 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 daedf38..263037e 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" @@ -39,7 +39,7 @@ { ITaskRepository Repository { get; } - WebResponseContent PushTasksToWCS(); + WebResponseContent PushTasksToWCS(List<Dt_Task> tasks, string agvDescription = ""); /// <summary> /// 鐢宠鍏ュ簱浠诲姟(PDA浣跨敤锛屼粎鎵樼洏缁戝畾鍏ュ簱绔欏彴锛屼笉鍒嗛厤璐т綅) 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 20ae206..5f7d14d 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" @@ -9,16 +9,25 @@ using WIDESEA_Core.Enums; using WIDESEA_Core.Helper; using WIDESEA_IOutboundRepository; +using WIDESEA_IRecordService; +using WIDESEA_IStockService; using WIDESEA_Model.Models; namespace WIDESEA_IOutboundService { public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService { + + private readonly IStockService _stockService; + private readonly IRecordService _recordService; + public IOutStockLockInfoRepository Repository => BaseDal; - public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal) : base(BaseDal) + + public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal, IStockService stockService, IRecordService recordService) : base(BaseDal) { + _recordService = recordService; + _stockService = stockService; } public List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null) 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" index d682cdc..e5e22ed 100644 --- "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" @@ -9,15 +9,20 @@ using WIDESEA_Core.Enums; using WIDESEA_Core.Helper; using WIDESEA_IOutboundRepository; +using WIDESEA_IRecordService; using WIDESEA_IStockService; using WIDESEA_Model.Models; namespace WIDESEA_IOutboundService { - public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService + public partial class OutStockLockInfoService { - IStockService _stockService; + /// <summary> + /// 鍒嗘嫞 + /// </summary> + /// <param name="palletCode">鎵樼洏鍙�</param> + /// <returns></returns> public WebResponseContent MaterialPick(string palletCode) { try @@ -27,16 +32,50 @@ { return WebResponseContent.Instance.Error($"鏈壘鍒拌鎵樼洏搴撳瓨淇℃伅"); } + if (stockInfo.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt()) + { + 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++) + outStockLockInfos[i].Status = OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt(); + } + List<Dt_StockInfoDetail> beforeDetaile = stockInfo.Details.GroupBy(x => x.MaterielCode).Select(x => new Dt_StockInfoDetail { MaterielCode = x.Key, StockQuantity = x.Sum(v => v.StockQuantity) }).ToList(); + + List<Dt_StockInfoDetail> updateDetailList = new List<Dt_StockInfoDetail>(); + List<Dt_StockInfoDetail> deleteDetailList = new List<Dt_StockInfoDetail>(); + for (int i = 0; i < stockInfo.Details.Count; i++) + { + if (stockInfo.Details[i].OutboundQuantity > 0) { - // if(assignQuantity > stockInfoDetails[j]) + if (stockInfo.Details[i].StockQuantity > stockInfo.Details[i].OutboundQuantity) + { + stockInfo.Details[i].StockQuantity -= stockInfo.Details[i].OutboundQuantity; + updateDetailList.Add(stockInfo.Details[i]); + } + else + { + deleteDetailList.Add(stockInfo.Details[i]); + } } } + + List<string> mCodes = stockInfo.Details.GroupBy(x => x.MaterielCode).Select(x => x.Key).ToList(); + foreach (string code in mCodes) + { + _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, updateDetailList, deleteDetailList, StockChangeTypeEnum.Outbound); + } + + updateDetailList.ForEach(x => + { + x.OutboundQuantity = 0; + }); + + //_stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(deleteDetailList, OperateTypeEnum.鑷姩瀹屾垚); + _stockService.StockInfoDetailService.Repository.UpdateData(updateDetailList); + BaseDal.UpdateData(outStockLockInfos); + return WebResponseContent.Instance.OK(); } catch (Exception ex) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs" index be97eb1..fd0185e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs" @@ -44,6 +44,7 @@ x.ChangeType = changeType.ObjToInt(); beforeQuantity += x.ChangeQuantity; x.TaskNum = taskNum; + index++; }); BaseDal.AddData(stockQuantityChangeRecords); } @@ -52,5 +53,42 @@ throw new Exception(ex.Message); } } + + public void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> updateDetails, List<Dt_StockInfoDetail> deleteDetails, StockChangeTypeEnum changeType, int? taskNum = null) + { + try + { + List<Dt_StockQuantityChangeRecord> stockQuantityChangeRecords = new List<Dt_StockQuantityChangeRecord>(); + + int index1 = 0; + List<Dt_StockQuantityChangeRecord> records1 = _mapper.Map<List<Dt_StockQuantityChangeRecord>>(updateDetails); + records1.ForEach(x => + { + x.PalleCode = stockInfo.PalletCode; + x.BeforeQuantity = deleteDetails[index1].StockQuantity + deleteDetails[index1].OutboundQuantity; + x.ChangeQuantity = -deleteDetails[index1].OutboundQuantity; + x.AfterQuantity = deleteDetails[index1].StockQuantity; + index1++; + }); + stockQuantityChangeRecords.AddRange(records1); + int index2 = 0; + List<Dt_StockQuantityChangeRecord> records2 = _mapper.Map<List<Dt_StockQuantityChangeRecord>>(deleteDetails); + records2.ForEach(x => + { + x.PalleCode = stockInfo.PalletCode; + x.BeforeQuantity = deleteDetails[index2].StockQuantity; + x.ChangeQuantity = -deleteDetails[index2].StockQuantity; + x.AfterQuantity = 0; + index2++; + }); + stockQuantityChangeRecords.AddRange(records2); + + BaseDal.AddData(stockQuantityChangeRecords); + } + catch (Exception ex) + { + throw new Exception(ex.Message); + } + } } } 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 d6a30ef..fa1ada2 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" @@ -64,7 +64,7 @@ SourceAddress = stockInfo.LocationCode, TargetAddress = "", TaskStatus = (int)TaskStatusEnum.New, - TaskType = (int)TaskTypeEnum.TestOutbound, + TaskType = (int)TaskTypeEnum.Outbound, TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), PalletType = stockInfo.PalletType, WarehouseId = stockInfo.WarehouseId, @@ -86,7 +86,7 @@ //_recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.MaterielGroup); _unitOfWorkManage.CommitTran(); //灏嗕换鍔℃帹閫佸埌WCS - PushTasksToWCS(); + PushTasksToWCS(new List<Dt_Task>() { taskOut },"AGV"); responseContent.OK(); } catch (Exception ex) @@ -127,7 +127,7 @@ SourceAddress = backModel.SourceAddressCode, TargetAddress = "", TaskStatus = (int)TaskStatusEnum.New, - TaskType = (int)TaskTypeEnum.TestBackbound, + TaskType = (int)TaskTypeEnum.Outbound, TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), PalletType = stockInfo.PalletType, WarehouseId = stockInfo.WarehouseId, @@ -137,8 +137,7 @@ _unitOfWorkManage.BeginTran(); _stockRepository.StockInfoRepository.UpdateData(stockInfo); _unitOfWorkManage.CommitTran(); - //灏嗕换鍔℃帹閫佸埌WCS - PushTasksToWCS(); + responseContent.OK(); } 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 00206f2..bc617ce 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" @@ -92,13 +92,15 @@ /// 浠诲姟淇℃伅鎺ㄩ�佽嚦WCS /// </summary> /// <returns></returns> - public WebResponseContent PushTasksToWCS() + public WebResponseContent PushTasksToWCS(List<Dt_Task> tasks, string agvDescription = "") { try { - List<Dt_Task> tasks = BaseDal.QueryData(x => (TaskTypes.Contains(x.TaskType) && x.TaskStatus == (int)TaskStatusEnum.New)); List<WMSTaskDTO> taskDTOs = _mapper.Map<List<WMSTaskDTO>>(tasks); - + taskDTOs.ForEach(x => + { + x.AGVArea = agvDescription; + }); string response = HttpHelper.Post("http://127.0.0.1:9291/api/Task/ReceiveTask", taskDTOs.Serialize()); return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒"); @@ -160,7 +162,7 @@ locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); //娴嬭瘯鏋跺叆搴撳簱瀛樼姸鎬� - if (task.TaskType == TaskTypeEnum.TestInbound.ObjToInt()) + if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt()) { stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚鏈缓鍑哄簱鍗�.ObjToInt(); stockInfo.Details.ForEach(x => @@ -177,7 +179,7 @@ _unitOfWorkManage.BeginTran(); BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚); - _basicService.LocationInfoService.Repository.UpdateData(locationInfo); + _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId); _stockRepository.StockInfoRepository.UpdateData(stockInfo); _stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details); @@ -250,7 +252,7 @@ int beforeStatus = locationInfo.LocationStatus; locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); - _basicService.LocationInfoService.Repository.UpdateData(locationInfo); + _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId); BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚); _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, (LocationStatusEnum)beforeStatus, LocationChangeType.OutboundCompleted, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs" new file mode 100644 index 0000000..5d4650e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs" @@ -0,0 +1,38 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Common.CommonEnum; +using WIDESEA_Common.LocationEnum; +using WIDESEA_Common.OtherEnum; +using WIDESEA_Common.StockEnum; +using WIDESEA_Common.TaskEnum; +using WIDESEA_Core; +using WIDESEA_Core.Helper; +using WIDESEA_DTO.Task; +using WIDESEA_Model.Models; + +namespace WIDESEA_TaskInfoService +{ + public partial class TaskService + { + //public WebResponseContent TaskCompleted(int taskNum) + //{ + // try + // { + // Dt_Task task = Repository.QueryFirst(x => x.TaskNum == taskNum); + // if (task == null) + // { + // return WebResponseContent.Instance.Error($"鏈壘鍒颁换鍔′俊鎭�"); + // } + // if(task.TaskType.get) + + // } + // 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_TaskInfoService/TaskService_Reloaction.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" index e0ae17a..bcc8769 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" @@ -17,6 +17,12 @@ { public partial class TaskService { + /// <summary> + /// 鍒ゆ柇鏄惁闇�瑕佺Щ搴� + /// </summary> + /// <param name="taskNum"></param> + /// <param name="locationCode"></param> + /// <returns></returns> public WebResponseContent IsRelocation(int taskNum, string locationCode) { try @@ -32,19 +38,29 @@ return WebResponseContent.Instance.Error($"鏈壘鍒颁换鍔′俊鎭�"); } - if (!_basicService.LocationInfoService.LittleDepthLocationIsEmpty(locationInfo, (PalletTypeEnum)task.PalletType)) + List<Dt_LocationInfo> littleDepthLocations = _basicService.LocationInfoService.GetGroupLocations(locationInfo); + + Dt_LocationInfo? needRelocationItem = littleDepthLocations.Where(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt() && x.LocationStatus != LocationStatusEnum.FreeLock.ObjToInt() && x.Depth < locationInfo.Depth).OrderBy(x => x.Depth).FirstOrDefault(); + + if (needRelocationItem == null) { return WebResponseContent.Instance.OK(data: _mapper.Map<WMSTaskDTO>(task)); } else { - Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == locationCode); + Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == needRelocationItem.LocationCode); if (stockInfo == null) { return WebResponseContent.Instance.Error($"鏈壘鍒板搴旇揣浣嶇殑搴撳瓨淇℃伅"); } - Dt_LocationInfo? newLocation = _basicService.LocationInfoService.AssignLocation(task.Roadway, (PalletTypeEnum)task.PalletType, task.WarehouseId); + Dt_Task taskTemp = Repository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode); + if (taskTemp != null) + { + return WebResponseContent.Instance.OK(data: taskTemp); + } + + Dt_LocationInfo? newLocation = _basicService.LocationInfoService.AssignLocation(needRelocationItem.RoadwayNo, (PalletTypeEnum)task.PalletType, task.WarehouseId); if (newLocation != null) { Dt_Task newTask = new Dt_Task() @@ -57,7 +73,7 @@ OrderNo = "", PalletCode = stockInfo.PalletCode, PalletType = stockInfo.PalletType, - SourceAddress = locationCode, + SourceAddress = needRelocationItem.LocationCode, TargetAddress = newLocation.LocationCode, TaskNum = Repository.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), TaskStatus = 0, @@ -68,20 +84,18 @@ Repository.AddData(newTask); { LocationStatusEnum lastStatus = (LocationStatusEnum)newLocation.LocationStatus; - newLocation.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); _basicService.LocationInfoService.UpdateLocationStatus(newLocation, (PalletTypeEnum)task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId); - _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum); + _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(newLocation, lastStatus, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum); } { - LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus; - locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); - _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId); - _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum); + LocationStatusEnum lastStatus = (LocationStatusEnum)needRelocationItem.LocationStatus; + _basicService.LocationInfoService.UpdateLocationStatus(needRelocationItem, (PalletTypeEnum)task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId); + _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(needRelocationItem, lastStatus, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum); } stockInfo.StockStatus = StockStatusEmun.绉诲簱閿佸畾.ObjToInt(); _stockRepository.StockInfoRepository.UpdateData(stockInfo); - _unitOfWorkManage.RollbackTran(); + _unitOfWorkManage.CommitTran(); return WebResponseContent.Instance.OK(data: _mapper.Map<WMSTaskDTO>(newTask)); } @@ -93,6 +107,45 @@ } catch (Exception ex) { + _unitOfWorkManage.RollbackTran(); + return WebResponseContent.Instance.Error(ex.Message); + } + } + + public WebResponseContent RelocationTaskCompleted(Dt_Task task) + { + try + { + Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress); + if (stockInfo == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒板搴旇揣浣嶇殑搴撳瓨淇℃伅"); + } + + Dt_LocationInfo locationInfoStart = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress); + if (locationInfoStart == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑璧风偣璐т綅淇℃伅"); + } + + Dt_LocationInfo locationInfoEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); + if (locationInfoEnd == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅"); + } + + _unitOfWorkManage.BeginTran(); + stockInfo.LocationCode = locationInfoEnd.LocationCode; + _stockService.StockInfoService.Repository.UpdateData(stockInfo); + _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId); + _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId); + BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚); + _unitOfWorkManage.CommitTran(); + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + _unitOfWorkManage.RollbackTran(); 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_WMSServer/Controllers/Basic/LocationInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" index f98e93f..97aa6e5 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; using WIDESEA_Common.CommonEnum; +using WIDESEA_Common.LocationEnum; using WIDESEA_Core; using WIDESEA_Core.BaseController; using WIDESEA_Core.Enums; @@ -68,5 +69,19 @@ { return Service.LocationDisableStatus(keys); ; } + + [HttpPost, Route("UpdateLocationStatus"), AllowAnonymous] + public WebResponseContent UpdateLocationStatus(string locationCode, PalletTypeEnum palletType, LocationStatusEnum locationStatus, int warehousId) + { + try + { + Service.UpdateLocationStatus(locationCode, palletType, locationStatus, warehousId); + return WebResponseContent.Instance.OK(); + } + catch (Exception e) + { + return WebResponseContent.Instance.Error(e.Message); + } + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" index 22a25d5..29dec73 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" @@ -1,4 +1,5 @@ -锘縰sing Microsoft.AspNetCore.Http; +锘縰sing Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WIDESEA_Core; using WIDESEA_Core.BaseController; @@ -25,5 +26,11 @@ { return Service.GetStockOutboundOrder(saveModel); } + + [HttpPost, HttpGet, Route("MaterialPick"), AllowAnonymous] + public WebResponseContent MaterialPick(string palletCode) + { + return Service.MaterialPick(palletCode); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" index 67ca56d..e53c4fa 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" @@ -18,15 +18,15 @@ { } - /// <summary> - /// 灏哤MS浠诲姟鎺ㄩ�佽嚦WCS - /// </summary> - /// <returns></returns> - [HttpPost, HttpGet, Route("PushTasksToWCS"), AllowAnonymous] - public WebResponseContent PushTasksToWCS() - { - return Service.PushTasksToWCS(); - } + ///// <summary> + ///// 灏哤MS浠诲姟鎺ㄩ�佽嚦WCS + ///// </summary> + ///// <returns></returns> + //[HttpPost, HttpGet, Route("PushTasksToWCS"), AllowAnonymous] + //public WebResponseContent PushTasksToWCS() + //{ + // return Service.PushTasksToWCS(); + //} /// <summary> /// 鐢宠鍏ュ簱浠诲姟 -- Gitblit v1.9.3