From 5ee4d66f4fef38f9d7ba38d8c3cfae7f7fc082d3 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期五, 10 一月 2025 17:51:22 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" index b69b804..205d199 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" @@ -43,9 +43,11 @@ public IOutboundOrderRepository Repository => BaseDal; private readonly IInvokeERPService _invokeERPService; private readonly IOutStockLockInfoService _outStockLockInfoService; + private readonly IOutboundOrderRepository _outboundOrderRepository; public OutboundOrderService(IOutboundOrderRepository BaseDal, IMapper mapper,IUnitOfWorkManage unitOfWorkManage, IBasicService basicService, IOutboundOrderDetailRepository outboundOrderDetailRepository, IStockInfoService stockInfoService, - IStockInfoRepository stockInfoRepository, IInvokeERPService invokeERPService, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal) + IStockInfoRepository stockInfoRepository, IInvokeERPService invokeERPService, IOutStockLockInfoService outStockLockInfoService, + IOutboundOrderRepository outboundOrderRepository) : base(BaseDal) { _mapper = mapper; _unitOfWorkManage = unitOfWorkManage; @@ -55,6 +57,7 @@ _stockInfoRepository = stockInfoRepository; _invokeERPService = invokeERPService; _outStockLockInfoService = outStockLockInfoService; + _outboundOrderRepository = outboundOrderRepository; } public override WebResponseContent AddData(SaveModel saveModel) { @@ -194,6 +197,12 @@ ERPIssueModel issueModel = new ERPIssueModel(); List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>(); List<Dt_OutStockLockInfo> _OutStockLockInfos=new List<Dt_OutStockLockInfo>(); + int overCount = outboundOrder.Details.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).Count(); + if (outboundOrder.Details.Count == overCount) + { + outboundOrder.OrderStatus = OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt(); + _outboundOrderRepository.UpdateData(outboundOrder); + } if (outboundOrder==null) { return WebResponseContent.Instance.Error("鍑哄簱鍗曚笉瀛樺湪"); @@ -255,7 +264,7 @@ { Lotno = item.BatchNo, Qty = item.AssignQuantity.ObjToInt().ToString(), - Location = item.LocationCode + Location = warehouse.WarehouseCode }; //鑾峰彇鍑哄簱鍗曟槑缁� Dt_OutboundOrderDetail outboundOrderDetail = outboundOrder.Details.FirstOrDefault(x => x.Id == item.OrderDetailId); @@ -266,7 +275,10 @@ Qty = pickItemModel.Qty, Dataitem = new List<ERPPickItemModel> { pickItemModel } }; - item.Status= OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt(); + if (item.OrderQuantity==item.AssignQuantity) + { + item.Status = OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt(); + } eRPPickModels.Add(pickModel); _OutStockLockInfos.Add(item); } -- Gitblit v1.9.3