diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java index 83a2ea8..1098526 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java @@ -88,7 +88,7 @@ public class TaskDetHisServiceImpl extends BaseService implements TaskDetHisServ //如果是多步骤任务且不是第一步,移除对象 if (byId.getIsAuto()==1){ AutoExeTask autoExeTask = autoExeTaskServiceBiz.getById(byId.getAutoExeTaskId()); - if (!byId.getId().equals(autoExeTask.getFTaskId())){ + if (!byId.getTaskId().equals(autoExeTask.getFTaskId())){ iterator.remove(); } } diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java index cbf707a..78dbb55 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java @@ -134,7 +134,7 @@ public class ScheduledTask extends BaseService { /** * 正在加工的加工任务详情 */ - //Scheduled(fixedDelay = 1000*60) + @Scheduled(fixedDelay = 1000*60) public void screen() throws IOException { //查询出正在进炉加工的curr_task,查询对应炉号是否Working,查询计划时间,剩余时间,查询标识卡详情 List currTaskList = currTaskServiceBiz.list(new QueryWrapper() @@ -199,7 +199,7 @@ public class ScheduledTask extends BaseService { /** * 查询加工完成的工业炉 */ - //@Scheduled(fixedDelay = 1000*30) + @Scheduled(fixedDelay = 1000*30) public void taskForStockToKiln() throws IOException { //两辆车是否都空闲,只有两辆车都空闲才被允许做任务 List vehicleInfoList = vehicleInfoServiceBiz.list(new QueryWrapper().eq(VehicleInfo.STATUS, 0)); @@ -250,7 +250,7 @@ public class ScheduledTask extends BaseService { } //查询出正在加工的工业炉,遍历,根据采集频率的不同,采集高频数据能源消耗。暂定30秒 - //@Scheduled(fixedDelay = 1000*30) + @Scheduled(fixedDelay = 1000*30) public void getFastValue(){ //加工炉列表 List kilnInfoList = kilnInfoServiceBiz.list(new QueryWrapper().in(KilnInfo.TYPE,1,3)); @@ -366,7 +366,7 @@ public class ScheduledTask extends BaseService { } //查询出正在加工的工业炉,遍历,根据采集频率的不同,采集低频数据能源消耗。暂定3分钟一次 - //@Scheduled(fixedDelay = 1000*60*3) + @Scheduled(fixedDelay = 1000*60*3) public void getSlowValue(){ List kilnInfoList = kilnInfoServiceBiz.list(); for (KilnInfo kilnInfo:kilnInfoList @@ -538,7 +538,7 @@ public class ScheduledTask extends BaseService { //遍历工业炉,空工业炉查询缓存区是否有等待加工的任务, //待加工任务存在且没有状态为正在进炉的情况下,按照先进先出的规则选择待加工任务呼叫车辆进炉 - //@Scheduled(fixedDelay = 1000*60) + @Scheduled(fixedDelay = 1000*60) public void runTaskForEmptyKiln() throws IOException { List kilnInfoList = kilnInfoServiceBiz.list(new QueryWrapper() .eq(KilnInfo.VALID, 1).eq(KilnInfo.STATUS, 0).orderByAsc(KilnInfo.TYPE)); @@ -608,7 +608,7 @@ public class ScheduledTask extends BaseService { } //遍历正在工作炉子的报警变量,记录报警 - //@Scheduled(fixedDelay = 1000*60) + @Scheduled(fixedDelay = 1000*60) public void listenKilnAlarm(){ List kilnInfoList = kilnInfoServiceBiz.list(); for (KilnInfo kilnInfo:kilnInfoList @@ -680,8 +680,7 @@ public class ScheduledTask extends BaseService { } } - //监听车辆是否在线,定时恢复车辆状态会导致避让时等待时间过久,再次发起任务,造成重复发起 - //@Scheduled(fixedDelay = 1000*60) + //监听车辆是否在线,定时恢复车辆状态会导致避让时等待时间过久,再次发起任务,造成重复发起,废弃 public void listenVehicleOnline() throws IOException { List vehicleInfoList = vehicleInfoServiceBiz.list(new QueryWrapper().eq(VehicleInfo.STATUS,1)); for (VehicleInfo vehicleInfo:vehicleInfoList diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskVo.java index c61cd1c..f0e1b79 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskVo.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskVo.java @@ -138,4 +138,9 @@ public class CurrTaskVo extends BaseVo implements PageVo.ConvertVo { */ @TableField("auto_exe_task_id") private Long autoExeTaskId; + /** + * currid + */ + @TableField("auto_exe_task_id") + private Long taskId; }