电梯日志优化erp同步调整

This commit is contained in:
2024-08-23 16:04:58 +08:00
parent 39fac9920c
commit fd150f1804
11 changed files with 173 additions and 82 deletions

View File

@@ -473,7 +473,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
input.data.Add("material_id", WmsCarryCode.material_id);
input.data.Add("物料条码", WmsCarryCode.barcode);
input.data.Add("id", null);
_wmsPDAScanInStock.ScanInStockByRedis(input).Wait();
_wmsPDAScanInStock.ScanInStockByRedis(input, db_Scantimer).Wait();
}
else
{
@@ -484,10 +484,19 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
}
}
}
catch (ObjectDisposedException ex)
{
LoggerBGWCarrySupplement.LogError($"【ScanInStock】 数据库连接异常:{ex.Message}");
LoggerBGWCarrySupplement.LogError($"【ScanInStock】 数据库连接异常:{ex.StackTrace}");
if (ex.Source == "Npgsql")
db_Scantimer = _repository.AsSugarClient().CopyNew();
}
catch (Exception ex)
{
Console.WriteLine("【ScanInStock】" + ex.Message);
LoggerBGWCarrySupplement.LogError($"【ScanInStock】 八工位扫到码发送入库请求发生异常:{ex}");
// 数据库连接断开时会报错
try { await db_Scantimer.Ado.RollbackTranAsync(); } catch { };
}
finally
{
@@ -1949,8 +1958,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
wmsDistaskHs[0].device_id = e.device_id;
wmsDistaskHs[1].device_id = e.device_id;
}
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯");
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯 {e.elevator_code}");
await _wareHouseService.ExecuteTargetFloorTask(wmsDistaskHs);
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯 {e.elevator_code}执行完成");
}
// 一托货
else if (group.Count() == 1)
@@ -1964,8 +1974,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
{
wmsDistaskHs[0].device_id = e.device_id;
}
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯");
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯 {e.elevator_code}");
await _wareHouseService.ExecuteTargetFloorTask(wmsDistaskHs);
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯 {e.elevator_code}执行完成");
}
}
else
@@ -1980,8 +1991,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
{
wmsDistaskHs[0].device_id = e.device_id;
}
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯");
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯 {e.elevator_code}");
await _wareHouseService.ExecuteTargetFloorTask(wmsDistaskHs);
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯 {e.elevator_code}执行完成");
}
}