| | |
| | | return WebResponseContent.Instance.Error($"未找到入库单明细信息"); |
| | | } |
| | | List<MatSerNumAnalysisModel> models = CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.MatSerNumAnalysis, serialNumbers); |
| | | |
| | | models.FirstOrDefault().DeliveryNote = models.FirstOrDefault()?.DeliveryNote.Replace("BS:", ""); |
| | | models.FirstOrDefault().LotNo = models.FirstOrDefault()?.LotNo.Replace("DN:", ""); |
| | | |
| | | //验证判断时间格式 |
| | | WebResponseContent IsValidContent = IsValidMCDates(models); |
| | | if (!IsValidContent.Status) |
| | |
| | | ///找数量匹配的 |
| | | if (warehouse.WarehouseCode.Contains("BC")) |
| | | { |
| | | inboundOrderDetails = inboundOrder.Details.Where(x => x.MaterielCode == materielCode && x.SupplierBatch == (models.FirstOrDefault()?.LotNo ?? "") && x.OrderQuantity > x.ReceiptQuantity && x.OrderQuantity == (quantitys.FirstOrDefault())).ToList(); |
| | | } |
| | | else |
| | | { |
| | | inboundOrderDetails = inboundOrder.Details.Where(x => x.MaterielCode == materielCode && x.BatchNo == (models.FirstOrDefault()?.LotNo ?? "")).ToList(); |
| | | inboundOrderDetails = inboundOrder.Details.Where(x => x.MaterielCode == materielCode && x.SupplierBatch == (models.FirstOrDefault()?.DeliveryNote ?? "") && x.OrderQuantity > x.ReceiptQuantity && x.OrderQuantity == (quantitys.FirstOrDefault())).ToList(); |
| | | } |
| | | |
| | | |
| | |
| | | ///找数量匹配的 |
| | | if (warehouse.WarehouseCode.Contains("BC")) |
| | | { |
| | | notGroupDetail = inboundOrderDetails.Where(x => x.OrderDetailStatus <= OrderDetailStatusEnum.Inbounding.ObjToInt() && x.MaterielCode == model.MaterielCode && x.SupplierBatch == model.LotNo && x.OrderQuantity > x.ReceiptQuantity).FirstOrDefault(); |
| | | notGroupDetail = inboundOrderDetails.Where(x => x.OrderDetailStatus <= OrderDetailStatusEnum.Inbounding.ObjToInt() && x.MaterielCode == model.MaterielCode && x.SupplierBatch == model.DeliveryNote && x.OrderQuantity > x.ReceiptQuantity).FirstOrDefault(); |
| | | } |
| | | else |
| | | { |
| | | notGroupDetail = inboundOrderDetails.Where(x => x.OrderDetailStatus <= OrderDetailStatusEnum.Inbounding.ObjToInt() && x.MaterielCode == model.MaterielCode && x.BatchNo == model.LotNo && x.OrderQuantity > x.ReceiptQuantity).FirstOrDefault(); |
| | | } |
| | | |
| | | |
| | | if (notGroupDetail == null) |
| | | { |