From 34922eb239109534679d35a75661d6e2a5603347 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期六, 27 十二月 2025 10:16:36 +0800
Subject: [PATCH] 成品库流程

---
 WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
index de58589..998c96d 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -1237,13 +1237,13 @@
         private void UpdateOutboundOrderDetails(Dt_StockInfo stockInfo, Dt_OutboundOrder inboundOrder, ref Dt_OutboundOrderDetail inboundOrderDetail)
         {
             int overCount = inboundOrder.Details.Count(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt());
-            inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == stockInfo.Details.FirstOrDefault()?.BatchNo);
+            //inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == stockInfo.Details.FirstOrDefault()?.BatchNo&&x.LPNNo==stockInfo.PalletCode);
 
             foreach (var item in stockInfo.Details)
             {
                 if (inboundOrderDetail == null) continue;
 
-                inboundOrderDetail.OverOutQuantity += item.OutboundQuantity;
+                inboundOrderDetail.OverOutQuantity += item.OutboundQuantity;    
 
                 if (inboundOrderDetail.OverOutQuantity == inboundOrderDetail.OrderQuantity)
                 {
@@ -1482,15 +1482,15 @@
                         OrderType = outboundOrder.InoutType,
                         DetailList = outStockLockInfos.Select(item =>
                         {
-                            var detail = _stockService.StockInfoDetailService.Repository.QueryFirst(x => x.StockId == item.Id);
+                            //var detail = _stockService.StockInfoDetailService.Repository.QueryFirst(x => x.StockId == item.StockId);
                             return new Allocate.data1.Inventory
                             {
                                 LinId = outDetail.LinId,
                                 LPN_No = item.PalletCode,
-                                MaterielCode = detail.MaterielCode,
-                                OrderQuantity = detail.OutboundQuantity,
-                                BatchNo = detail.BatchNo,
-                                FinishQty = detail.OutboundQuantity,
+                                MaterielCode = outDetail.MaterielCode,
+                                OrderQuantity = outDetail.OrderQuantity,
+                                BatchNo = outDetail.BatchNo,
+                                FinishQty = outDetail.OrderQuantity,
                                 LocationName = task.SourceAddress
                             };
                         }).ToList()

--
Gitblit v1.9.3