bug修改

This commit is contained in:
李广豪 2022-07-19 14:09:51 +08:00
parent 1f7332fdbb
commit f2de6a3a04
2 changed files with 4 additions and 1 deletions

View File

@ -86,7 +86,7 @@ public class AsynRunTaskService extends BaseService {
//工业炉可用未满的情况下调用车辆起点为提升台终点为工业炉 //工业炉可用未满的情况下调用车辆起点为提升台终点为工业炉
@Async("asyncServiceExecutor") @Async("asyncServiceExecutor")
public void asynRunTask(Long currTaskId, Long vehicleId) throws IOException { public void asynRunTask(Long currTaskId, Long vehicleId) throws IOException, InterruptedException {
CurrTask currTask = currTaskServiceBiz.getById(currTaskId); CurrTask currTask = currTaskServiceBiz.getById(currTaskId);
VehicleInfo vehicle = vehicleInfoServiceBiz.getById(vehicleId); VehicleInfo vehicle = vehicleInfoServiceBiz.getById(vehicleId);
List<CurrTaskDet> currTaskDetList = currTaskDetServiceBiz.list(new QueryWrapper<CurrTaskDet>().eq(CurrTaskDet.CURR_TASK_ID, currTask)); List<CurrTaskDet> currTaskDetList = currTaskDetServiceBiz.list(new QueryWrapper<CurrTaskDet>().eq(CurrTaskDet.CURR_TASK_ID, currTask));
@ -123,6 +123,8 @@ public class AsynRunTaskService extends BaseService {
currTask.setUpdateTime(LocalDateTime.now()); currTask.setUpdateTime(LocalDateTime.now());
currTask.setBeginTime(LocalDateTime.now()); currTask.setBeginTime(LocalDateTime.now());
currTaskServiceBiz.updateById(currTask); currTaskServiceBiz.updateById(currTask);
//程序休眠10秒.防止进炉后允许入炉信号还没消失,就又发了下一个入炉任务.
Thread.sleep(10000);
//更新小车状态 //更新小车状态
vehicle.setStatus(0); vehicle.setStatus(0);
vehicleInfoServiceBiz.updateById(vehicle); vehicleInfoServiceBiz.updateById(vehicle);

View File

@ -559,6 +559,7 @@ public class ScheduledTask extends BaseService {
vehicleInfoServiceBiz.updateById(vehicleInfo); vehicleInfoServiceBiz.updateById(vehicleInfo);
asynRunTaskService.asynRunTaskForStockToKiln(inStockInfo.getId(), vehicleId); asynRunTaskService.asynRunTaskForStockToKiln(inStockInfo.getId(), vehicleId);
} }
logger.info("当前两辆车都不在线.无法发起任务!");
} }
} }
} }