出库申请,回更载具条码数量代码调整
This commit is contained in:
@@ -338,7 +338,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
await _db.Updateable<WmsOutstockH>().SetColumns(it => new WmsOutstockH { status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID }).Where(it => it.id == input.requireId).ExecuteCommandAsync();
|
await _db.Updateable<WmsOutstockH>().SetColumns(it => new WmsOutstockH { status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID }).Where(it => it.id == input.requireId).ExecuteCommandAsync();
|
||||||
//如果是自动单据,需要回更上层系统
|
//如果是自动单据,需要回更上层系统
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
//如果没有完成,修改为工作中
|
//如果没有完成,修改为工作中
|
||||||
await _db.Updateable<WmsOutstockH>().SetColumns(it => new WmsOutstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == input.requireId).ExecuteCommandAsync();
|
await _db.Updateable<WmsOutstockH>().SetColumns(it => new WmsOutstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == input.requireId).ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
@@ -411,11 +412,15 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
if (dicUpdate.Count > 0)
|
if (dicUpdate.Count > 0)
|
||||||
{
|
{
|
||||||
|
//var dicCarryCodes = carryCodes.FindAll(x => dicUpdate.Keys.Contains(x.barcode)).GroupBy(g => g.barcode).ToDictionary(x => x.Key, x => x.FirstOrDefault());
|
||||||
foreach (var pair in dicUpdate)
|
foreach (var pair in dicUpdate)
|
||||||
{
|
{
|
||||||
WmsCarryCode carryCode = new();
|
WmsCarryCode carryCode = carryCodes.Find(x => x.barcode == pair.Key);
|
||||||
carryCode.codeqty = pair.Value;
|
if (carryCode != null)
|
||||||
await _db.Updateable(carryCode).UpdateColumns(it => it.codeqty).Where(it => it.barcode == pair.Key).ExecuteCommandAsync();
|
{
|
||||||
|
carryCode.codeqty = pair.Value;
|
||||||
|
await _db.Updateable(carryCode).UpdateColumns(it => it.codeqty).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { out_status = ((int)EnumOutStatus.正常).ToString() }).Where(it => input.carryIds.Contains(it.id)).ExecuteCommandAsync();
|
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { out_status = ((int)EnumOutStatus.正常).ToString() }).Where(it => input.carryIds.Contains(it.id)).ExecuteCommandAsync();
|
||||||
await _db.Deleteable<WmsCarryMat>().Where(it => input.carryIds.Contains(it.carry_id)).ExecuteCommandAsync();
|
await _db.Deleteable<WmsCarryMat>().Where(it => input.carryIds.Contains(it.carry_id)).ExecuteCommandAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user