From f46e6a76cee1e4f231fab74981a87947bf84677d Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期二, 15 十月 2024 11:02:47 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/TaskTimer.java | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/TaskTimer.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/TaskTimer.java index 914afbe..b8d5959 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/TaskTimer.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/TaskTimer.java @@ -8,6 +8,8 @@ import com.zy.asrs.wcs.core.model.enums.LocStsType; import com.zy.asrs.wcs.core.model.enums.TaskStsType; import com.zy.asrs.wcs.core.service.*; +import com.zy.asrs.wcs.system.entity.Dict; +import com.zy.asrs.wcs.system.service.DictService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; @@ -30,6 +32,8 @@ private MotionLogService motionLogService; @Autowired private LocService locService; + @Autowired + private DictService dictService; @Scheduled(cron = "0/1 * * * * ? ") @Transactional @@ -41,14 +45,19 @@ taskSts.add(TaskStsType.COMPLETE_MOVE.sts); taskSts.add(TaskStsType.COMPLETE_MANUAL.sts); + Dict reportWms = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, "reportWms")); + List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>() .eq(Task::getStatus, 1) .in(Task::getTaskSts, taskSts)); for (Task task : tasks) { - - boolean httpRequest = doHttpRequest(task, "127.0.0.1:8080", "/wms/open/asrs//wrkMast/finish/v1"); - if (!httpRequest) { - return; + if (reportWms != null && reportWms.getFlag().equals("true")) { + if(task.getTaskSts().equals(TaskStsType.COMPLETE_INBOUND.sts) || task.getTaskSts().equals(TaskStsType.COMPLETE_OUTBOUND.sts)){ + boolean httpRequest = doHttpRequest(task, "127.0.0.1:8080", "/wms/open/asrs//wrkMast/finish/v1"); + if (!httpRequest) { + return; + } + } } //璁板綍搴撳瓨淇℃伅 -- Gitblit v1.9.1