现场问题处理,电梯逻辑处理
This commit is contained in:
@@ -200,7 +200,10 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
decimal? sum = input.details.Where(r => group.Select(r => r.barcode).Contains(r.barcode)).Select(r => r.codeqty).Sum();
|
||||
WmsPurchaseD wmsPurchaseD = await _db.Queryable<WmsPurchaseD>().Where(r => r.id == group.Key.require_id).FirstAsync();
|
||||
|
||||
if (wmsPurchaseD == null)
|
||||
{
|
||||
throw new Exception($"条码{string.Join(',', input.details.Select(r => r.barcode))}来源采购收货明细不存在!");
|
||||
}
|
||||
// 收货质检之后不能绑定
|
||||
if (!string.IsNullOrEmpty(wmsPurchaseD.qc_res))
|
||||
{
|
||||
@@ -221,6 +224,10 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
decimal? sum = input.details.Where(r => group.Select(r => r.barcode).Contains(r.barcode)).Select(r => r.codeqty).Sum();
|
||||
WmsOutsourceD wmsOutsourceD = await _db.Queryable<WmsOutsourceD>().Where(r => r.id == group.Key.require_id).FirstAsync();
|
||||
if (wmsOutsourceD == null)
|
||||
{
|
||||
throw new Exception($"条码{string.Join(',', input.details.Select(r => r.barcode))}来源委外收货明细不存在!");
|
||||
}
|
||||
decimal? bind_qty = wmsOutsourceD.bind_qty ?? 0;
|
||||
if (sum + bind_qty > wmsOutsourceD.outsource_quantity)
|
||||
{
|
||||
@@ -234,6 +241,10 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
decimal? sum = input.details.Where(r => group.Select(r => r.barcode).Contains(r.barcode)).Select(r => r.codeqty).Sum();
|
||||
WmsRawmatTransferinstockD wmsRawmatTransferinstockD = await _db.Queryable<WmsRawmatTransferinstockD>().Where(r => r.id == group.Key.require_id).FirstAsync();
|
||||
if (wmsRawmatTransferinstockD == null)
|
||||
{
|
||||
throw new Exception($"条码{string.Join(',', input.details.Select(r => r.barcode))}来源原材料调拨入库明细不存在!");
|
||||
}
|
||||
decimal? bind_qty = wmsRawmatTransferinstockD.bind_qty ?? 0;
|
||||
|
||||
if (sum + bind_qty > wmsRawmatTransferinstockD.qty)
|
||||
@@ -339,7 +350,6 @@ namespace Tnb.WarehouseMgr
|
||||
throw new Exception($"以下条码已被绑定:{string.Join(',', repeat_wmsCarryCodes.Select(r => r.barcode))}");
|
||||
}
|
||||
|
||||
|
||||
List<WmsCarryCode> WmsCarryCodes = new List<WmsCarryCode>();
|
||||
|
||||
WmsCarrybindH wmsCarrybindH = new WmsCarrybindH();
|
||||
|
||||
Reference in New Issue
Block a user