This commit is contained in:
alex
2023-10-08 13:48:48 +08:00
parent 4384fa35eb
commit fd511171f4
6 changed files with 119 additions and 104 deletions

View File

@@ -254,6 +254,11 @@ namespace Tnb.WarehouseMgr
{
await _elevatorControlService.SendOpenCloseCmd(elevatorQueueItem.elevator_code, 4); //向电梯发送前门关门指令
await _db.Deleteable(elevatorQueueItem).ExecuteCommandAsync();
elevatorQueueItem = await _db.Queryable<WmsElevatorUnexecute>().FirstAsync(it => disTasks.Select(x => x.id).Contains(it.distask_id) && it.task_status == "待执行");
if (!elevatorQueueItem?.elevator_code.IsNullOrEmpty() ?? false)
{
await (_wareHouseService.AddUnExecuteTask?.Invoke(elevatorQueueItem?.elevator_code!) ?? Task.CompletedTask);
}
}
}
}
@@ -284,8 +289,9 @@ namespace Tnb.WarehouseMgr
}
}
}
catch (Exception)
catch (Exception ex)
{
Log.Error("任务状态上报出现错误", ex);
return await ToApiResult(HttpStatusCode.InternalServerError, "请重试!");
throw;
}