This commit is contained in:
alex
2023-07-13 14:25:34 +08:00
parent a33adef0c5
commit 99c27ad34d

View File

@@ -257,6 +257,9 @@ namespace Tnb.WarehouseMgr
var isOk = await _wareHouseService.GenPreTask(preTasks, pretaskCodes);
if (isOk)
{
await _db.Updateable(outStockDList).SetColumns(it => it.line_status == WmsWareHouseConst.BILLSTATUS_ON_ID).ExecuteCommandAsync();
await _db.Updateable<WmsOutstockH>().SetColumns(it => it.status == WmsWareHouseConst.BILLSTATUS_ON_ID).Where(it => it.id == input.data["ReturnIdentity"].ToString()).ExecuteCommandAsync();
GenPreTaskUpInput genPreTaskAfterUpInput = new();
genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList();
genPreTaskAfterUpInput.LocationIds = new HashSet<string>(locIds).ToList();
@@ -496,16 +499,16 @@ namespace Tnb.WarehouseMgr
pretaskCodes.AddRange(curPreTaskCodes);
}
var isOk = await _wareHouseService.GenPreTask(preTasks, pretaskCodes);
if(isOk)
if (isOk)
{
await _db.Updateable(outstockDs).SetColumns(it => new WmsOutstockD{line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).ExecuteCommandAsync();
await _db.Updateable(outstockDs).SetColumns(it => new WmsOutstockD { line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).ExecuteCommandAsync();
await _db.Updateable(outstock).SetColumns(it => new WmsOutstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).ExecuteCommandAsync();
GenPreTaskUpInput genPreTaskAfterUpInput = new();
genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList();
genPreTaskAfterUpInput.LocationIds = new HashSet<string>(locIds).ToList();
await _wareHouseService.GenInStockTaskHandleAfter(genPreTaskAfterUpInput, it => new WmsCarryH { is_lock = 1 }, it => new BasLocation { is_lock = 1 });
}
}
else throw new AppFriendlyException("库存不足", 500);
}