From 42429ae61571ff9563c9e987cd52be2132e77775 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期四, 06 十一月 2025 17:13:29 +0800
Subject: [PATCH] 提交出库
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 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 96bdd97..a48a488 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"
@@ -4,6 +4,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.StockEnum;
+using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
@@ -12,6 +13,7 @@
using WIDESEA_IRecordService;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
+using WIDESEA_Model.Models.Basic;
namespace WIDESEA_IOutboundService
{
@@ -20,10 +22,41 @@
public IRepository<Dt_OutStockLockInfo> Repository => BaseDal;
public IUnitOfWorkManage _unitOfWorkManage;
- public OutStockLockInfoService(IRepository<Dt_OutStockLockInfo> BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+ private readonly IStockService _stockService;
+ private readonly IRecordService _recordService;
+
+ public OutStockLockInfoService(IRepository<Dt_OutStockLockInfo> BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockService stockService, IRecordService recordService) : base(BaseDal)
{
_unitOfWorkManage = unitOfWorkManage;
+ _stockService = stockService;
+ _recordService = recordService;
}
+ public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null)
+ {
+
+ Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo()
+ {
+ PalletCode = outStock.PalletCode,
+ AssignQuantity = assignQuantity,
+ MaterielCode = outboundOrderDetail.MaterielCode,
+ BatchNo = outboundOrderDetail.BatchNo ?? outStock.Details.FirstOrDefault()?.BatchNo,
+ LocationCode = outStock.LocationCode,
+ MaterielName = outboundOrderDetail.MaterielName,
+ OrderDetailId = outboundOrderDetail.Id,
+ OrderNo = outboundOrder.OrderNo,
+ OrderType = outboundOrder.OrderType,
+ OriginalQuantity = outStock.Details.Where(x => x.MaterielCode == outboundOrderDetail.MaterielCode).Sum(x => x.StockQuantity),
+ Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
+ StockId = outStock.Id,
+ TaskNum = taskNum,
+ OrderQuantity = outboundOrderDetail.OrderQuantity,
+ Unit = outboundOrderDetail.Unit,
+ //ProductionDate = outStock.Details.Where(x => x.MaterielCode == outboundOrderDetail.MaterielCode).FirstOrDefault()?.ProductionDate,
+ //EffectiveDate = outStock.Details.Where(x => x.MaterielCode == outboundOrderDetail.MaterielCode).FirstOrDefault()?.EffectiveDate
+ };
+
+ return outStockLockInfo;
+ }
}
}
--
Gitblit v1.9.3