From 0023d3db5bd701864b73e57c0240c219c40c3a4e Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期一, 14 七月 2025 14:12:34 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" index 8f54ef4..d56e520 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" @@ -541,6 +541,7 @@ { return content.Error($"鎻愬簱浠诲姟鍗晎model.TaskNo}宸插瓨鍦�"); } + //鐢熸垚鎻愬簱鍗� Dt_MesRworkOutboundOrder mesRworkOutboundOrder = new Dt_MesRworkOutboundOrder() { WarehouseId = warehouse.WarehouseId, @@ -560,6 +561,7 @@ List<Dt_ProStockInfo>? proStockInfos = null; List<Dt_OutProStockInfo>? outProStockInfos = null; List<Dt_LocationInfo>? locationInfos = null; + List<Dt_ProStockInfoDetail> proStockInfoDetails = new List<Dt_ProStockInfoDetail>(); //鍒嗛厤搴撳瓨鐢熸垚鎻愬簱浠诲姟 (List<Dt_ProStockInfo>?, Dt_MesRworkOutboundOrder?, List<Dt_OutProStockInfo>?, List<Dt_LocationInfo>) result = _outboundService.RworkOutboundOrderService.AssignMesStocks(mesRworkOutboundOrder); if (result.Item1 != null && result.Item1.Count > 0) @@ -585,6 +587,10 @@ x.TargetAddress = "5236"; x.OrderNo = mesRworkOutboundOrder.TaskNo; }); + proStockInfos.ForEach(x => + { + proStockInfoDetails.AddRange(x.proStockInfoDetails); + }); _unitOfWorkManage.BeginTran(); int id = BaseDal.AddData(tasks); @@ -604,6 +610,12 @@ } } _outboundService.RworkOutboundOrderService.Repository.AddData(mesRworkOutboundOrder); + //MES鎴愬搧搴撳瓨鏉垮嚭搴撳悓姝� + WebResponseContent responseContent = _outboundService.RworkOutboundOrderService.ProductOutBoundSync(_outboundService.RworkOutboundOrderService.MesProOutBound(mesRworkOutboundOrder, proStockInfoDetails)); + if (!responseContent.Status) + { + throw new Exception("鍚屾MES搴撳瓨鏉垮嚭搴撳け璐�,閿欒:" + responseContent.Message); + } _unitOfWorkManage.CommitTran(); return content.OK("鎻愪緵杩斿簱鍗曟帴鏀舵垚鍔�"); } -- Gitblit v1.9.3