| | |
| | | .Where(it => it.Qtck == p_bill_no && it.Qt015 == true && it.Qt026 == true && it.Qt029 == true && it.Qt032 == true) |
| | | .First(); |
| | | |
| | | if (mesItemQt == null) |
| | | throw new Exception($"其他出库申请单 {p_bill_no} 不存在,请确认!"); |
| | | |
| | | // 检查仓库是否一致 |
| | | if (Convert.ToInt32(mesItemQt.Qt008) != stock.DepotId) |
| | | throw new Exception( |
| | | $"扫码出货仓库id{mesItemQt.Qt008}与其他出库申请仓库{stock.DepotId}不一致,请核对!"); |
| | | |
| | | // 获取出库单明细 |
| | | var qtDetail = Db.Queryable<MesItemQtDatall>() |
| | | .Where(it => |
| | |
| | | it.ItemId == stock.ItemId.ToString()) |
| | | .First(); |
| | | |
| | | if (mesItemQt == null) |
| | | throw new Exception($"其他出库申请单 {p_bill_no} 不存在,请确认!"); |
| | | |
| | | // 检查仓库是否一致 |
| | | if (Convert.ToInt32(qtDetail.DepotId) != stock.DepotId) |
| | | throw new Exception( |
| | | $"扫码出货仓库id{qtDetail.DepotId}与其他出库申请仓库{stock.DepotId}不一致,请核对!"); |
| | | |
| | | |
| | | |
| | | if (qtDetail == null) throw new Exception("扫码物料非本次出库申请物料,请核对!"); |
| | | |
| | | // 检查剩余数量 |