From 441b6f8d257a01b2998253ef0515a201777d7e68 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 04 七月 2025 14:06:49 +0800
Subject: [PATCH] 修改入库、移库、出库逻辑

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index bc247f5..0a47352 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -453,7 +453,10 @@
                             overCount = outboundOrder.Details.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).Count();
                             if (outboundOrderDetail.OverOutQuantity == outboundOrderDetail.OrderQuantity)
                             {
+                                var outboundOrderdetail = outboundOrder.Details.First(x => x.Id == outboundOrderDetail.Id);
                                 outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt();
+                                outboundOrderdetail.OverOutQuantity = outboundOrderDetail.OverOutQuantity;
+                                outboundOrderdetail.OrderDetailStatus = outboundOrderDetail.OrderDetailStatus;
                                 overCount++;
                             }
                         }
@@ -496,9 +499,9 @@
                 Dt_LocationInfo Targetlocation = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);//鐩爣璐т綅
                 Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);//鎵樼洏搴撳瓨
                 Sourcelocation.CurrentQty--;
-                Targetlocation.CurrentQty++;
+                //Targetlocation.CurrentQty++;
                 stockInfo.LocationCode = Targetlocation.LocationCode;
-                stockInfo.SerialNumber = Targetlocation.CurrentQty;
+                //stockInfo.SerialNumber = Targetlocation.CurrentQty;
                 stockInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt();
                 if (Sourcelocation.CurrentQty == 0) Sourcelocation.LocationStatus = LocationStatusEnum.Free.ObjToInt();
                 Dt_Task _Task = BaseDal.QueryFirst(x => x.TaskNum != task.TaskNum && x.TaskType == task.TaskType && x.SourceAddress == Sourcelocation.LocationCode && x.TargetAddress == Targetlocation.LocationCode);
@@ -549,7 +552,7 @@
                 List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.Repository.LocationCodesGetStockInfos(new List<string> { stockInfo.LocationCode }).Where(x => x.StockStatus == StockStatusEmun.宸插叆搴�.ObjToInt()).ToList();
                 if (task.TaskType == TaskTypeEnum.PalletInbound.ObjToInt())
                 {
-                    stockInfo.SerialNumber = stockInfos.Count + 1;
+                    //stockInfo.SerialNumber = stockInfos.Count + 1;
                     stockInfo.InDate = DateTime.Now;
                     stockInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt();
                     stockInfoDetail.Status = StockStatusEmun.宸插叆搴�.ObjToInt();
@@ -598,7 +601,7 @@
                 }
 
                 #endregion
-                stockInfo.SerialNumber = stockInfos.Count + 1;
+                //stockInfo.SerialNumber = stockInfos.Count + 1;
                 stockInfo.InDate = DateTime.Now;
                 stockInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt();
                 stockInfoDetail.Status = StockStatusEmun.宸插叆搴�.ObjToInt();

--
Gitblit v1.9.3