From 89051aef8a2c1a85d457914cf6317fe70e0e321c Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期日, 29 十二月 2024 04:33:10 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 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..a872ab6 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"
@@ -52,6 +52,10 @@
                 {
                     return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅");
                 }
+                if(warehouseId != stockInfo.WarehouseId)
+                {
+                    return WebResponseContent.Instance.Error($"浠撳簱涓嶆纭�");
+                }
 
                 Dt_Task newTask = new Dt_Task()
                 {
@@ -64,7 +68,8 @@
                     TargetAddress = "",
                     TaskType = TaskTypeEnum.Inbound.ObjToInt(),
                     TaskStatus = TaskStatusEnum.New.ObjToInt(),
-                    WarehouseId = warehouseId
+                    WarehouseId = stockInfo.WarehouseId,
+                    PalletType = stockInfo.PalletType
                 };
 
                 stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
@@ -100,6 +105,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