From 6b6c66cd99a4e73eea9bc68c8d7c63fd08180fb9 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期二, 18 十一月 2025 16:12:46 +0800
Subject: [PATCH] 提交

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs |   48 ++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 42 insertions(+), 6 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index d407809..ba2016e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -1,4 +1,5 @@
-锘縰sing System;
+锘縰sing Microsoft.AspNetCore.Http;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -10,6 +11,7 @@
 using WIDESEA_Core.BaseServices;
 using WIDESEA_Core.Enums;
 using WIDESEA_Core.Helper;
+using WIDESEA_DTO.Outbound;
 using WIDESEA_IRecordService;
 using WIDESEA_IStockService;
 using WIDESEA_Model.Models;
@@ -32,9 +34,9 @@
             _recordService = recordService;
         }
 
-      
+
         /// <summary>
-        /// 鍒涘缓鍑哄簱閿佸畾淇℃伅 - 淇鐗堟湰
+        /// 鍒涘缓鍑哄簱閿佸畾
         /// </summary>
         public Dt_OutStockLockInfo GetOutStockLockInfo(
             Dt_OutboundOrder outboundOrder,
@@ -70,7 +72,7 @@
                 // 浣跨敤绗竴涓彲鐢ㄦ潯鐮�
                 var firstAvailableDetail = stockDetails
                     .Where(x => x.StockQuantity > x.OutboundQuantity)
-                    .OrderBy(x => x.ProductionDate)
+                    .OrderBy(x => x.CreateDate)
                     .FirstOrDefault();
 
                 if (firstAvailableDetail == null)
@@ -82,6 +84,8 @@
 
             return new Dt_OutStockLockInfo()
             {
+                lineNo= outboundOrderDetail.lineNo,
+               
                 PalletCode = outStock.PalletCode,
                 AssignQuantity = assignQuantity,
                 MaterielCode = outboundOrderDetail.MaterielCode,
@@ -97,8 +101,9 @@
                 Status = (int)OutLockStockStatusEnum.宸插垎閰�,
                 StockId = outStock.Id,
                 Unit = outboundOrderDetail.Unit,
-                 
-                SupplyCode     = outboundOrderDetail.SupplyCode,
+                FactoryArea = outboundOrder.FactoryArea,
+                OrderType=outboundOrder.OrderType,
+                SupplyCode = outboundOrderDetail.SupplyCode,
                 WarehouseCode = outboundOrderDetail.WarehouseCode,
                 // 鏂板瀛楁
                 CurrentBarcode = targetBarcode,
@@ -117,6 +122,37 @@
                 .ToListAsync();
         }
 
+        public async Task<LockInfoDetailDto> GetLockInfoDetail(int lockInfoId)
+        {
+            var lockInfo = await Db.Queryable<Dt_OutStockLockInfo>()
+                .LeftJoin<Dt_OutboundOrderDetail>((lockInfo, detail) => lockInfo.OrderDetailId == detail.Id)
+                .Where((lockInfo, detail) => lockInfo.Id == lockInfoId)
+                .Select((lockInfo, detail) => new LockInfoDetailDto
+                {
+                    Id = lockInfo.Id,
+                    OrderNo = lockInfo.OrderNo,
+                    OrderDetailId = lockInfo.OrderDetailId,
+                    BatchNo = lockInfo.BatchNo,
+                    MaterielCode = lockInfo.MaterielCode,
+                    StockId = lockInfo.StockId,
+                    OrderQuantity = lockInfo.OrderQuantity,
+                    OriginalQuantity = lockInfo.OriginalQuantity,
+                    AssignQuantity = lockInfo.AssignQuantity,
+                    PickedQty = lockInfo.PickedQty,
+                    LocationCode = lockInfo.LocationCode,
+                    PalletCode = lockInfo.PalletCode,
+                    Status = lockInfo.Status,
+                    IsSplitted = lockInfo.IsSplitted,
+                    ParentLockId = lockInfo.ParentLockId,
+
+                    MaterielName = detail.MaterielName,
+                    Unit = detail.Unit
+                })
+                .FirstAsync();
+
+            return lockInfo;
+        }
+
         /// <summary>
         /// 鏍规嵁鎵樼洏缂栧彿鑾峰彇鍑哄簱閿佸畾淇℃伅
         /// </summary>

--
Gitblit v1.9.3