车辆上任务清除后库位状态改变

This commit is contained in:
李广豪 2022-07-17 10:22:45 +08:00
vanhempi f0992ed9ce
commit 1a6940eb70

Näytä tiedosto

@ -81,6 +81,8 @@ public class AsynRunTaskService extends BaseService {
private AutoExeTaskServiceBiz autoExeTaskServiceBiz;
@Resource
private CurrTaskDetServiceBiz currTaskDetServiceBiz;
@Resource
private TaskHisServiceBiz taskHisServiceBiz;
//工业炉可用未满的情况下调用车辆起点为提升台终点为工业炉
@Async("asyncServiceExecutor")
@ -249,6 +251,9 @@ public class AsynRunTaskService extends BaseService {
// 记录开始加工时的消耗值
asynStartRecordConsume(currTaskId, currTask.getKilnId());
} else {
//修改缓存区存储情况表状态
inStockInfo.setStatus(0);
inStockInfoServiceBiz.updateById(inStockInfo);
runTask.setStatus(3);
runTask.setUpdateTime(LocalDateTime.now());
runTaskServiceBiz.updateById(runTask);
@ -334,6 +339,8 @@ public class AsynRunTaskService extends BaseService {
}
}
} else {
//任务失败清除缓存库位信息
inStockInfoServiceBiz.removeById(inStockInfo);
runTask.setStatus(3);
runTask.setUpdateTime(LocalDateTime.now());
runTaskServiceBiz.updateById(runTask);
@ -397,6 +404,10 @@ public class AsynRunTaskService extends BaseService {
currTask.setUpdateTime(LocalDateTime.now());
logger.info("修改currTask任务状态");
currTaskServiceBiz.updateById(currTask);
//新增历史任务表
TaskHis taskHis=new TaskHis();
BeanUtils.copyProperties(currTask,taskHis);
taskHisServiceBiz.save(taskHis);
//更新in_stock_info表
inStockInfo.setStatus(2);
inStockInfo.setInTime(LocalDateTime.now());