From 9e579eda4601ed7b492b9d19a24e8146f6ebdf8d Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期六, 19 四月 2025 19:50:43 +0800 Subject: [PATCH] 优化空托出入库逻辑 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ConveyorLine.cs | 33 ++++++++++++++++++--------------- 1 files changed, 18 insertions(+), 15 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ConveyorLine.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ConveyorLine.cs" index 9673adf..38a0c82 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ConveyorLine.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ConveyorLine.cs" @@ -26,15 +26,7 @@ { string ConveyorLineID = AppSettings.Configuration[nameof(ConveyorLineID)]; if (!ConveyorLineID.Split(",").Contains(lineDTO.stationCode)) throw new Exception($"鏈壘鍒拌緭閫佺嚎缂栧彿[{lineDTO.stationCode}]鐨勪俊鎭�"); - switch (lineDTO.stationCode) - { - case "102": - content = TransmissionlineRequest(lineDTO); - break; - case "1001": - content = ProductionlineRequest(lineDTO); - break; - } + content = TransmissionlineRequest(lineDTO); } catch (Exception ex) { @@ -105,8 +97,18 @@ //{ // throw new Exception($"褰撳墠鍏ュ簱绔欏彴[{lineDTO.stationCode}]宸叉湁涓�鏉′换鍔�"); //} - var task = BaseDal.QueryFirst(x => x.PalletCode == lineDTO.Barcode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt()); + var task = BaseDal.QueryFirst(x => x.PalletCode == lineDTO.Barcode); if (task == null) throw new Exception($"鏈壘鍒版墭鐩樺彿[{lineDTO.Barcode}]鐨勫叆搴撲换鍔�"); + if (task.TaskType == TaskTypeEnum.PalletInbound.ObjToInt()) + { + task.NextAddress = "1004"; + task.CurrentAddress = lineDTO.stationCode; + task.TaskState = (int)InTaskStatusEnum.Line_InExecuting; + BaseDal.UpdateData(task); + return content; + } + if (task.TaskType != TaskTypeEnum.Inbound.ObjToInt()) throw new Exception($"鏈壘鍒版墭鐩樺彿[{lineDTO.Barcode}]鐨勫叆搴撲换鍔�"); + //if (task.TaskState != (int)InTaskStatusEnum.AGV_InFinish) throw new Exception($"鎵樼洏鍙穂{lineDTO.Barcode}]鐨勫叆搴撲换鍔$姸鎬佷笉鍖归厤"); Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(lineDTO.Barcode); @@ -115,18 +117,19 @@ Dt_StockInfoDetail stockInfoDetail = stockInfo.Details.FirstOrDefault(); - if (lineDTO.Spec != 1 || lineDTO.Weight != 500)//妫�娴嬫潯浠堕渶鏇存敼锛侊紒锛侊紒锛侊紒锛侊紒锛侊紒 + if (/*lineDTO.Spec != 1 ||*/ lineDTO.Weight > 1500)//妫�娴嬫潯浠堕渶鏇存敼锛侊紒锛侊紒锛侊紒锛侊紒锛侊紒 { - task.NextAddress = "101"; + //task.NextAddress = "101"; task.TaskState = (int)InTaskStatusEnum.InException; - task.Remark = $"鎵樼洏[{lineDTO.Barcode}]淇℃伅涓嶅悎鏍�"; + task.Remark = $"鎵樼洏[{lineDTO.Barcode}]瓒呴噸"; + //task.Remark = $"鎵樼洏[{lineDTO.Barcode}]淇℃伅涓嶅悎鏍�"; //stockInfo.StockStatus = StockStatusEmun.鍏ュ簱鎾ら攢.ObjToInt(); } else { - task.NextAddress = "104"; + task.NextAddress = "1004"; task.CurrentAddress = lineDTO.stationCode; - task.Remark=string.Empty; + task.Remark = string.Empty; task.TaskState = (int)InTaskStatusEnum.Line_InExecuting; stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(); stockInfoDetail.Status = StockStatusEmun.鍏ュ簱纭.ObjToInt(); -- Gitblit v1.9.3