同步料架的载具位置,bug处理,日志完善

This commit is contained in:
2024-06-26 14:27:32 +08:00
parent 4ff5b9b9d7
commit 1089bd7f5a
4 changed files with 33 additions and 12 deletions

View File

@@ -213,7 +213,7 @@ namespace Tnb.ProductionMgr
{
LoggerSSX.LogInformation($@"【定时任务CheckGet】 {key}->{strs[0]} {strs[2]}
采集结果:{$@"(wms_distask_h) (carry_code){coderesult}
(status)(26126853976101) (extras)
(status)(26126853976101) (extras) (WCS系统中存在载具{coderesult})
select extras,* from wms_distask_h
where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STATUS_YXD_ID}' "}");
@@ -510,7 +510,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
LoggerBGWCarrySupplement.LogInformation($"【BGWCarrySupplementtimer】锁定起点库位 开始生成 {startLocation.location_code} 到 {endLocation.location_code} 预任务 ");
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerBGWCarrySupplement);
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerBGWCarrySupplement, db_BGWCarrySupplementtimer);
if (!result_createPretask)
{
LoggerBGWCarrySupplement.LogWarning($"【BGWCarrySupplementtimer】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败 ");
@@ -599,7 +599,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
//锁定终点库位
await db_YCLGLDPJInstocktimer.Updateable<BasLocation>().SetColumns(r => new BasLocation { is_lock = 1 }).Where(r => r.id == endLocation.id).ExecuteCommandAsync();
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerYCLGLDPJInstock);
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerYCLGLDPJInstock, db_YCLGLDPJInstocktimer);
if (!result_createPretask)
{
LoggerYCLGLDPJInstock.LogWarning($"【YCLGLDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败");
@@ -684,7 +684,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
//锁定终点库位
await db_YCLWXDPJInstocktimer.Updateable<BasLocation>().SetColumns(r => new BasLocation { is_lock = 1 }).Where(r => r.id == endLocation.id).ExecuteCommandAsync();
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerYCLGLDPJInstock);
bool result_createPretask = await createPretask(startLocation.id, endLocation.id, "", "", LoggerYCLGLDPJInstock, db_YCLWXDPJInstocktimer);
if (!result_createPretask)
{
LoggerYCLGLDPJInstock.LogWarning($"【YCLWXDPJInstock】 {startLocation.location_code} 到 {endLocation.location_code} 预任务生成失败");
@@ -1089,7 +1089,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
LoggerFloor2RackDelivery.LogInformation($"【送空托到上升降区】 开始生成预任务 起点{startLocation.location_code} 终点{wmsMechanicalArmH.location_code} 料架 {targetCarry.carry_code}");
bool result = await createPretask(startLocation.id, wmsMechanicalArmH.location_id, targetCarry.id, targetCarry.carry_code, LoggerFloor2RackDelivery);
bool result = await createPretask(startLocation.id, wmsMechanicalArmH.location_id, targetCarry.id, targetCarry.carry_code, LoggerFloor2RackDelivery, db_Floor2timer送空托到上升降区);
if (!result)
{
LoggerFloor2RackDelivery.LogInformation($"【送空托到上升降区】 未成功生成预任务 起点{startLocation.location_code} 终点{wmsMechanicalArmH.location_code} 料架 {targetCarry.carry_code}");
@@ -1244,7 +1244,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
LoggerFloor2RackDelivery.LogInformation($"【送满托到下升降区】 开始生成预任务 起点{startLocation.location_code} 终点{wmsMechanicalArmH.location_code} 料架 {targetCarry.carry_code}");
bool result = await createPretask(startLocation.id, wmsMechanicalArmH.location_id, targetCarry.id, targetCarry.carry_code, LoggerFloor2RackDelivery);
bool result = await createPretask(startLocation.id, wmsMechanicalArmH.location_id, targetCarry.id, targetCarry.carry_code, LoggerFloor2RackDelivery, db_Floor2timer送满托到下升降区);
if (!result)
{
LoggerFloor2RackDelivery.LogInformation($"【送满托到下升降区】 未成功生成预任务 起点{startLocation.location_code} 终点{wmsMechanicalArmH.location_code} 料架 {targetCarry.carry_code}");
@@ -1345,7 +1345,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
LoggerFloor2RackDelivery.LogInformation($"【移走上升降区满托的料架】 开始执行预任务生成: 料架区为{wmsMechanicalArmH.name}{wmsMechanicalArmH.stackingposition} 料架为{wmsMechanicalArmH.rackcode}");
bool result = await createPretask(wmsMechanicalArmH.location_id, endLocation.id, wmsMechanicalArmH.rackid, wmsMechanicalArmH.rackcode, LoggerFloor2RackDelivery);
bool result = await createPretask(wmsMechanicalArmH.location_id, endLocation.id, wmsMechanicalArmH.rackid, wmsMechanicalArmH.rackcode, LoggerFloor2RackDelivery, db_Floor2timer移走上升降区未生成预任务且满托的料架);
if (!result)
{
LoggerFloor2RackDelivery.LogError($"【移走上升降区满托的料架】 未成功生成预任务 起点{wmsMechanicalArmH.location_code} 终点{endLocation.location_code} 料架 {wmsMechanicalArmH.rackcode}");
@@ -1454,7 +1454,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
LoggerFloor2RackDelivery.LogInformation($"【移走下升降区空托的料架】 开始执行预任务生成: 料架区为{wmsMechanicalArmH.name}{wmsMechanicalArmH.stackingposition} 料架为{wmsMechanicalArmH.rackcode}");
bool result = await createPretask(wmsMechanicalArmH.location_id, endLocation.id, wmsMechanicalArmH.rackid, wmsMechanicalArmH.rackcode, LoggerFloor2RackDelivery);
bool result = await createPretask(wmsMechanicalArmH.location_id, endLocation.id, wmsMechanicalArmH.rackid, wmsMechanicalArmH.rackcode, LoggerFloor2RackDelivery, db_Floor2timer移走下升降区未生成预任务且空托的料架);
if (!result)
{
LoggerFloor2RackDelivery.LogInformation($"【移走下升降区空托的料架】 未成功生成预任务 起点{wmsMechanicalArmH.location_code} 终点{endLocation.location_code} 料架 {wmsMechanicalArmH.rackcode}");
@@ -1481,7 +1481,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
}
// 上下升降机生成预任务(补充料架、上升降机取货到料架、上升降机满托运走,下升降机拿货到输送线、下升降机空托运走)
private async Task<bool> createPretask(string startlocation_id, string endlocation_id, string carry_id, string carry_code, ILogger logger)
private async Task<bool> createPretask(string startlocation_id, string endlocation_id, string carry_id, string carry_code, ILogger logger, ISqlSugarClient dbConn)
{
CommonCreatePretaskInput commonCreatePretaskInput = new CommonCreatePretaskInput();
commonCreatePretaskInput.startlocation_id = startlocation_id;
@@ -1494,7 +1494,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
commonCreatePretaskInput.isExcuteMission = false;
logger.LogInformation($"开始执行 GenPreTask {JsonConvert.SerializeObject(commonCreatePretaskInput)}");
var res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput);
var res = await _wareHouseService.CommonCreatePretask(commonCreatePretaskInput, dbConn);
if (res.code == JNPF.Common.Enums.HttpStatusCode.OK)
{
logger.LogInformation($"GenPreTask 结果 {JsonConvert.SerializeObject(res)}");