From a23f4d86c588a3fa0bc23e5252bc1ddd1f5a1787 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 08 一月 2025 23:19:36 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index a2c4d72..4738508 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -9,16 +9,25 @@
 using WIDESEA_Core.Enums;
 using WIDESEA_Core.Helper;
 using WIDESEA_IOutboundRepository;
+using WIDESEA_IRecordService;
+using WIDESEA_IStockService;
 using WIDESEA_Model.Models;
 
 namespace WIDESEA_IOutboundService
 {
     public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService
     {
+
+        private readonly IStockService _stockService;
+        private readonly IRecordService _recordService;
+
         public IOutStockLockInfoRepository Repository => BaseDal;
 
-        public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal) : base(BaseDal)
+
+        public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal, IStockService stockService, IRecordService recordService) : base(BaseDal)
         {
+            _recordService = recordService;
+            _stockService = stockService;
         }
 
         public List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null)
@@ -57,7 +66,7 @@
                 PalletCode = outStock.PalletCode,
                 AssignQuantity = assignQuantity,
                 MaterielCode = outboundOrderDetail.MaterielCode,
-                BatchNo = outboundOrderDetail.BatchNo,
+                BatchNo = outboundOrderDetail.BatchNo ?? outStock.Details.FirstOrDefault()?.BatchNo,
                 LocationCode = outStock.LocationCode,
                 MaterielName = outboundOrderDetail.MaterielName,
                 OrderDetailId = outboundOrderDetail.Id,
@@ -67,7 +76,8 @@
                 Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
                 StockId = outStock.Id,
                 TaskNum = taskNum,
-                OrderQuantity = outboundOrderDetail.OrderQuantity
+                OrderQuantity = outboundOrderDetail.OrderQuantity,
+                Unit=outboundOrderDetail.Unit,
             };
 
             return outStockLockInfo;
@@ -94,7 +104,7 @@
                 {
                     throw new Exception($"鏈壘鍒板簱瀛樿鎯�");
                 }
-                List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id);
+                List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id&&x.Status< OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt());
                 return stockLockInfos;
             }
             catch (Exception ex)

--
Gitblit v1.9.3