From 1dd9f4bf540a74a7de2daeeebf38491f86befa08 Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期三, 27 十一月 2024 09:31:07 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

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 fe7d87e..87b1314 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"
@@ -129,6 +129,11 @@
             Dt_StockInfoDetail dt_StockInfodetail = _stockService.StockInfoDetailService.Repository.QueryFirst(x => x.OrderNo == task.PalletCode);
             CheckCompleted(stockInfo, locationInfo);
 
+            if (stockInfo.MaterialType == (int)InventoryMaterialType.绌烘墭)
+            {
+                string currentTime = DateTime.Now.ToString("HHmmss");
+                stockInfo.PalletCode = "KTP" + currentTime;
+            }
             stockInfo.LocationCode = task.TargetAddress;
             stockInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt();
              _stockService.StockInfoService.Repository.UpdateData(stockInfo);
@@ -141,7 +146,14 @@
             beforeQuantity = stockInfo.Details.Where(x => x.Id != 0).Sum(x => x.StockQuantity);
 
             int beforeStatus = locationInfo.LocationStatus;
-            locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
+            if (stockInfo.MaterialType == (int)InventoryMaterialType.绌烘墭)
+            {
+                locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
+            }
+            else
+            {
+                locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
+            }
             _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false);
 
             _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
@@ -207,10 +219,10 @@
                 return (false, "鏈壘鍒拌揣浣嶄俊鎭�");
             }
 
-            if (isCheckStockDetail && (stockInfo.Details == null || stockInfo.Details.Count == 0))
+            /*if (isCheckStockDetail && (stockInfo.Details == null || stockInfo.Details.Count == 0))
             {
                 return (false, "鏈壘鍒扮粍鐩樻槑缁嗕俊鎭�");
-            }
+            }*/
 
             return (true, "鎴愬姛");
         }

--
Gitblit v1.9.3