| | |
| | | { |
| | | throw new Exception($"{palletNo}托盘上存在箱码信息,无法在数量拣货进行操作!"); |
| | | } |
| | | //出库单明细 |
| | | var noticeDetail = Db.Queryable<BllExportNoticeDetail>().First(a => a.Id == int.Parse(soDetailId) && a.IsDel == "0"); |
| | | if (noticeDetail == null) |
| | | |
| | | BllExportAllot allot = null; |
| | | if (!string.IsNullOrWhiteSpace(soDetailId)) |
| | | { |
| | | throw new Exception($"未查询到对应出库单明细信息,请核实!"); |
| | | //出库单明细 |
| | | var noticeDetail = Db.Queryable<BllExportNoticeDetail>().First(a => a.Id == int.Parse(soDetailId) && a.IsDel == "0"); |
| | | if (noticeDetail == null) |
| | | { |
| | | throw new Exception($"未查询到对应出库单明细信息,请核实!"); |
| | | } |
| | | //出库单总单 |
| | | var notice = Db.Queryable<BllExportNotice>().First(a => a.IsDel == "0" && a.SONo == noticeDetail.SONo); |
| | | if (notice == null) |
| | | { |
| | | throw new Exception($"未查询到对应出库单总单信息,请核实!"); |
| | | } |
| | | //分配信息 |
| | | allot = Db.Queryable<BllExportAllot>().First(a => a.IsDel == "0" && a.SONo == notice.SONo && a.SODetailNo == noticeDetail.Id && a.PalletNo == palletNo && (a.Status == "2" || a.Status == "3")); |
| | | if (allot == null) |
| | | { |
| | | throw new Exception($"未查询到对应分配信息,请核实!"); |
| | | } |
| | | } |
| | | //出库单总单 |
| | | var notice = Db.Queryable<BllExportNotice>().First(a => a.IsDel == "0" && a.SONo == noticeDetail.SONo); |
| | | if (notice == null) |
| | | { |
| | | throw new Exception($"未查询到对应出库单总单信息,请核实!"); |
| | | } |
| | | //分配信息 |
| | | var allot = Db.Queryable<BllExportAllot>().First(a => a.IsDel == "0" && a.SONo == notice.SONo && a.SODetailNo == noticeDetail.Id && a.PalletNo == palletNo && (a.Status == "2" || a.Status == "3")); |
| | | if (allot == null) |
| | | { |
| | | throw new Exception($"未查询到对应分配信息,请核实!"); |
| | | } |
| | | |
| | | //库存明细 |
| | | var detail = Db.Queryable<DataStockDetail>().First(a => a.IsDel == "0" && a.PalletNo == palletNo); |
| | | if (detail == null) |
| | |
| | | { |
| | | SkuNo = detail.SkuNo, |
| | | BoxNo = detail.SkuNo, |
| | | Qty = (int)allot.Qty, |
| | | PickedQty = (int)allot.CompleteQty, |
| | | Qty = allot == null ? (int)(detail.Qty-detail.LockQty) : (int)allot.Qty, |
| | | PickedQty = allot == null ? 0 : (int)allot.CompleteQty, |
| | | }; |
| | | |
| | | pdaInfo.Add(info); |