From 60f86b0fba3ab82e245654cddfa5abc62fe1f9e8 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期二, 16 九月 2025 11:33:29 +0800
Subject: [PATCH] 1

---
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs |   68 ++++++++++++++++++++++++++++++++++
 1 files changed, 68 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs"
new file mode 100644
index 0000000..703abd3
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -0,0 +1,68 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Common.StockEnum;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.BaseServices;
+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 IUnitOfWorkManage _unitOfWorkManage;
+
+        public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal, IStockService stockService, IRecordService recordService, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+        {
+            _recordService = recordService;
+            _stockService = stockService;
+            _unitOfWorkManage = unitOfWorkManage;
+        }
+
+
+        public List<Dt_OutStockLockInfo> GetByOrderDetailId(string orderNo, int orderDetailId, OutLockStockStatusEnum? outStockStatus)
+        {
+            return BaseDal.QueryData(x =>x.OrderNo== orderNo && x.OrderDetailId == orderDetailId && outStockStatus == null ? true : x.Status == outStockStatus.ObjToInt());
+        }
+
+        /// <summary>
+        /// 鐢熸垚鍑哄簱璇︽儏
+        /// </summary>
+        public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutBSTOrder outBSTOrder, Dt_OutBSTOrderDetail outboundOrderDetail, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null)
+        {
+            Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo()
+            {
+                PalletCode = outStock.PalletCode,
+                AssignQuantity = assignQuantity,
+                MaterielCode = outboundOrderDetail.MaterialNo,
+                BatchNo = "",
+                LocationCode = outStock.LocationCode,
+                MaterielName = outStock.MaterielName,
+                OrderDetailId = outboundOrderDetail.Id,
+                OrderNo = outBSTOrder.OutBSTOrderNo,
+                MaterielId = outStock.MaterielId,
+                OriginalQuantity = outStock.StockLength,
+                Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
+                StockId = outStock.Id,
+                TaskNum = taskNum,
+                OrderQuantity = outboundOrderDetail.XqLen,
+                Unit = outStock.Unit
+            };
+
+            return outStockLockInfo;
+        }
+    }
+}

--
Gitblit v1.9.3