1
dengjunjie
2025-05-08 092971a8ba7848f024427694c642959d0fbc8599
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_ProductionLine.cs
@@ -30,11 +30,11 @@
                stockInfo = new Dt_StockInfo();
                stockInfo.Details = new List<Dt_StockInfoDetail>();
                #region MyRegion
                string OrderNo = productionlineDTO.batchNo.Substring(0, 6);// DateTime.Now.ToString("yyMMdd");
                string OrderNo = productionlineDTO.batchNo.Substring(0, 8);// DateTime.Now.ToString("yyMMdd");
                Dt_InboundOrder? inboundOrder = _inboundService.InbounOrderService.GetInboundOrder(OrderNo);
                if (inboundOrder == null) throw new Exception($"未找到批号为【{OrderNo}】的入库单");
                //var BatchNo = string.Join("", productionlineDTO.batchNo.Except(OrderNo));
                var BatchNo = productionlineDTO.batchNo.Substring(6);
                var BatchNo = productionlineDTO.batchNo.Substring(8);
                Dt_InboundOrderDetail? inboundOrderDetail = inboundOrder.Details.Where(x => x.BatchNo == BatchNo).FirstOrDefault();
                if (inboundOrderDetail == null) throw new Exception($"批号【{OrderNo}】的入库单未找到柜号【{BatchNo}】");
                if (inboundOrderDetail.OrderQuantity - inboundOrderDetail.ReceiptQuantity < 1) throw new Exception($"批号【{OrderNo}】的柜号【{BatchNo}】可组盘数量不足");