| | |
| | | { |
| | | return content.Error($"æåºä»»å¡å{model.TaskNo}å·²åå¨"); |
| | | } |
| | | //çææåºå |
| | | Dt_MesRworkOutboundOrder mesRworkOutboundOrder = new Dt_MesRworkOutboundOrder() |
| | | { |
| | | WarehouseId = warehouse.WarehouseId, |
| | |
| | | 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) |
| | |
| | | x.TargetAddress = "5236"; |
| | | x.OrderNo = mesRworkOutboundOrder.TaskNo; |
| | | }); |
| | | proStockInfos.ForEach(x => |
| | | { |
| | | proStockInfoDetails.AddRange(x.proStockInfoDetails); |
| | | }); |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | int id = BaseDal.AddData(tasks); |
| | |
| | | } |
| | | } |
| | | _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("æä¾è¿åºåæ¥æ¶æå"); |
| | | } |