From 554ebff8616f1ed2fc578cde80642791cfaff476 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期四, 02 一月 2025 09:29:04 +0800 Subject: [PATCH] 出库完成等代码更新 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" index 699e6ea..759f4e4 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" @@ -44,13 +44,17 @@ { return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�"); } - if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt()) + if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt()) { return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱"); } if (!string.IsNullOrEmpty(stockInfo.LocationCode)) { return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅"); + } + if(warehouseId != stockInfo.WarehouseId) + { + return WebResponseContent.Instance.Error($"浠撳簱涓嶆纭�"); } Dt_Task newTask = new Dt_Task() @@ -64,12 +68,19 @@ TargetAddress = "", TaskType = TaskTypeEnum.Inbound.ObjToInt(), TaskStatus = TaskStatusEnum.New.ObjToInt(), - WarehouseId = warehouseId + WarehouseId = stockInfo.WarehouseId, + PalletType = stockInfo.PalletType }; - stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(); - - _unitOfWorkManage.BeginTran(); + if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt()) + { + stockInfo.StockStatus = StockStatusEmun.鎵嬪姩缁勭洏鍏ュ簱纭.ObjToInt(); + } + else + { + stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(); + } + _unitOfWorkManage.BeginTran(); int taskId = BaseDal.AddData(newTask); newTask.TaskId = taskId; _stockRepository.StockInfoRepository.UpdateData(stockInfo); @@ -100,6 +111,11 @@ return WebResponseContent.Instance.Error($"鏈壘鍒拌鍏ュ簱浠诲姟"); } + if(_basicRepository.LocationInfoRepository.QueryFirst(x=>x.LocationCode == task.TargetAddress) != null) + { + return WebResponseContent.Instance.OK(data: task.TargetAddress); + } + Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayNo, (PalletTypeEnum)task.PalletType, task.WarehouseId); if (locationInfo == null) { -- Gitblit v1.9.3