From 753361f589444455fe1b20476c658201ccd92c38 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期三, 30 七月 2025 09:53:19 +0800
Subject: [PATCH] 更新优化

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index c6482fb..0b2db53 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -754,7 +754,8 @@
                             WarehouseId = stockInfo.WarehouseId,
                             GroupId= groupId,
                             MaterielCode = stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).FirstOrDefault()?.ProductCode,
-                            Quantity = (float)stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).Sum(x=> x.StockPcsQty)
+                            Quantity = (float)stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).Sum(x=> x.StockPcsQty),
+                            BatchNo = stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).FirstOrDefault()?.LotNumber
                         };
                         tasks.Add(task);
                     }
@@ -800,6 +801,7 @@
                         {
                             task.MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                             task.Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
+                            task.BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo;
                         }
                         if (stockInfo.StockLength>0)
                         {
@@ -1015,14 +1017,16 @@
                         float OriginalQuantity = v.StockQuantity;
                         float assignQuantity = 0;//鍒嗛厤鏁伴噺
                         float assignAmount = OrderDetail.OrderQuantity - OrderDetail.OverOutQuantity;//寰呭嚭鏁伴噺
+                        decimal StockQuantity = Convert.ToDecimal(v.StockQuantity);
                         if (assignAmount > 0)
                         {
-                            if (v.StockQuantity >= assignAmount)
+                            if (StockQuantity >=(decimal) assignAmount)
                             {
                                 assignQuantity = assignAmount;
-                                v.StockQuantity -= assignAmount;
+                                StockQuantity -=(decimal)assignAmount;
                                 OrderDetail.OverOutQuantity += assignAmount;
                                 OrderDetail.LockQuantity += assignAmount;
+                                v.StockQuantity = (float)Math.Round(StockQuantity,3);
                                 upstockDetails.Add(v);
                             }
                             else

--
Gitblit v1.9.3