From 4c731348d451fa22d7fec29e14a4e45aed9fec38 Mon Sep 17 00:00:00 2001 From: LGH <1746689524@qq.com> Date: Thu, 4 Aug 2022 13:56:32 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=B5=8B=E8=AF=95rgv=E9=81=BF?= =?UTF-8?q?=E8=AE=A9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mt/wms/empty/task/AsynRunTaskService.java | 8 ++++---- .../main/java/com/mt/wms/empty/task/ScheduledTask.java | 9 ++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java index e91f6c9..706e305 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java @@ -1352,9 +1352,9 @@ public class AsynRunTaskService extends BaseService { if (status!=1){ logger.info("===执行任务:"+currTask.getTaskCode()+" 时车辆位置冲突,执行车辆位移任务,车辆"+anotherVehicleId+"移动到点位2,执行失败==="); webSocketServer.sendtoAll(LocalDateTime.now()+"执行任务:"+currTask.getTaskCode()+" 时车辆位置冲突,执行车辆位移任务,车辆"+anotherVehicleId+"移动到点位2,执行失败"); - return; + }else { + logger.info("===执行任务:"+currTaskId+" 时车辆位置冲突,执行车辆位移任务,车辆"+anotherVehicleId+"移动到点位2,执行成功==="); } - logger.info("===执行任务:"+currTaskId+" 时车辆位置冲突,执行车辆位移任务,车辆"+anotherVehicleId+"移动到点位2,执行成功==="); } }else { logger.info("RGV2不在线,跳过检测是否避让。"); @@ -1375,9 +1375,9 @@ public class AsynRunTaskService extends BaseService { if (status!=1){ logger.info("===执行任务:"+currTaskId+" 时车辆位置冲突,执行车辆位移任务,车辆"+anotherVehicleId+"移动到点位12,执行失败==="); webSocketServer.sendtoAll(LocalDateTime.now()+"执行任务:"+currTask.getTaskCode()+" 时车辆位置冲突,执行车辆位移任务,车辆"+anotherVehicleId+"移动到点位12,执行失败"); - return; + }else { + logger.info("===执行任务:"+currTaskId+" 时车辆位置冲突,执行车辆位移任务,车辆"+anotherVehicleId+"移动到点位12,执行成功==="); } - logger.info("===执行任务:"+currTaskId+" 时车辆位置冲突,执行车辆位移任务,车辆"+anotherVehicleId+"移动到点位12,执行成功==="); } }else { logger.info("RGV1不在线,跳过检测是否避让。"); 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 513ab24..6d2495b 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 @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.mt.wms.core.base.BaseService; import com.mt.wms.core.dal.entity.*; import com.mt.wms.core.dal.service.*; +import com.mt.wms.core.dal.service.impl.CurrTaskServiceBizImpl; import com.mt.wms.core.utils.BeanUtils; import com.mt.wms.core.utils.CodeGeneratorHelper; import com.mt.wms.core.utils.HttpClient; @@ -81,16 +82,10 @@ public class ScheduledTask extends BaseService { @Resource private TaskDetHisServiceBiz taskDetHisServiceBiz; + //@Scheduled(fixedDelay = 1000*20) @Test public void test() throws IOException { - CurrTask currTask = currTaskServiceBiz.getById(342); - if (currTask.getIsOut()==1){ - int count = autoExeTaskServiceBiz.count(new QueryWrapper().eq(AutoExeTask.F_TASK_ID, currTask.getId())); - System.out.println(count>0);; - }else { - System.out.println(true); - } } //@Scheduled(fixedDelay = 1000*60)