erp转库单的同步,签收逻辑修改

This commit is contained in:
2024-07-04 16:34:04 +08:00
parent 7d9abfd6c8
commit 9ea9b4378d
11 changed files with 285 additions and 80 deletions

View File

@@ -574,7 +574,7 @@ namespace Tnb.WarehouseMgr
ptc.code_batch = instockCode.code_batch;
pretaskCodes.Add(ptc);
}
bool isOk = await _wareHouseService.GenPreTask(preTasks, pretaskCodes);
bool isOk = await _wareHouseService.GenPreTask(preTasks, pretaskCodes, _dbScanInStockByRedis);
if (isOk)
{
@@ -616,7 +616,7 @@ namespace Tnb.WarehouseMgr
//回更状态
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
it => new WmsCarryH { carry_code = instock!.carry_code!, is_lock = 1, carry_status = ((int)EnumCarryStatus.).ToString(), location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode },
it => new BasLocation { is_lock = 1 });
it => new BasLocation { is_lock = 1 }, _dbScanInStockByRedis);
_ = await _dbScanInStockByRedis.Updateable<WmsInstockD>().SetColumns(it => new WmsInstockD { line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => instockCode.bill_d_id == it.id).ExecuteCommandAsync();
_ = await _dbScanInStockByRedis.Updateable<WmsInstockH>().SetColumns(it => new WmsInstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == instock!.id).ExecuteCommandAsync();
@@ -625,6 +625,7 @@ namespace Tnb.WarehouseMgr
}
await _dbScanInStockByRedis.Ado.CommitTranAsync();
}
// 测试代码 后期删
catch (AggregateException ex)
{
Console.WriteLine("【ScanInStockByRedis】 AggregateException" + ex.Message);
@@ -637,7 +638,7 @@ namespace Tnb.WarehouseMgr
{
Logger.LogInformation($"【ScanInStockByRedis】 八工位扫到码发送入库请求发生异常:{ex.Message}");
// 测试代码
// 测试代码 后期删
if (ex.Message.Contains("Connection is busy"))
_dbScanInStockByRedis = _dbScanInStockByRedis.CopyNew();