From 733c975cd8647f6d006736f1863bad731e32e6fb Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期日, 26 十月 2025 17:15:52 +0800
Subject: [PATCH] 上传最新代码,ERP接口,MES接口优化,WMS业务优化等
---
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs | 122 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 122 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..5b2858a
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -0,0 +1,122 @@
+锘縰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;
+ }
+ /// <summary>
+ /// 鐢熸垚鍑哄簱璇︽儏
+ /// </summary>
+ public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutMESOrder ouMESOrder, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null)
+ {
+ Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo()
+ {
+ PalletCode = outStock.PalletCode,
+ AssignQuantity = assignQuantity,
+ MaterielCode = ouMESOrder.MaterialCode,
+ BatchNo = ouMESOrder.MaterialLot,
+ LocationCode = outStock.LocationCode,
+ MaterielName = outStock.MaterielName,
+ OrderDetailId = ouMESOrder.Id,
+ OrderNo = ouMESOrder.OutMESOrderNo,
+ MakeCode = ouMESOrder.MakeCode,
+ MaterielId = outStock.MaterielId,
+ OriginalQuantity = outStock.StockLength,
+ Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
+ StockId = outStock.Id,
+ TaskNum = taskNum,
+ OrderQuantity = ouMESOrder.ReqQuantity,
+ Unit = outStock.Unit
+ };
+
+ return outStockLockInfo;
+ }
+ /// <summary>
+ /// 鐢熸垚鍑哄簱璇︽儏
+ /// </summary>
+ public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutSGOrder outSGOrder, Dt_OutSGOrderDetail outSGOrderDetail, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null)
+ {
+ Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo()
+ {
+ PalletCode = outStock.PalletCode,
+ AssignQuantity = assignQuantity,
+ MaterielCode = outSGOrderDetail.MaterialNo,
+ BatchNo = "",
+ LocationCode = outStock.LocationCode,
+ MaterielName = outStock.MaterielName,
+ OrderDetailId = outSGOrderDetail.Id,
+ OrderNo = outSGOrder.OutSGOrderNo,
+ MaterielId = outStock.MaterielId,
+ OriginalQuantity = outStock.StockLength,
+ Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
+ StockId = outStock.Id,
+ TaskNum = taskNum,
+ OrderQuantity = outSGOrderDetail.XqLen,
+ Unit = outStock.Unit,
+ MachineName=outSGOrderDetail.MachineName
+ };
+
+ return outStockLockInfo;
+ }
+ }
+}
--
Gitblit v1.9.3