From 5919f58b5b32b82e5b884c54f1dc48113468da10 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期五, 15 十一月 2024 14:27:09 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/TaskTimer.java |   33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 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 e6c0905..e175af0 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
@@ -38,13 +38,40 @@
 
     @Scheduled(cron = "0/1 * * * * ? ")
     @Transactional
+    public synchronized void clearCompletedTask2() {
+        ArrayList<Long> taskSts = new ArrayList<>();
+//        taskSts.add(TaskStsType.COMPLETE_INBOUND.sts);
+//        taskSts.add(TaskStsType.COMPLETE_OUTBOUND.sts);
+        taskSts.add(TaskStsType.COMPLETE_CHARGE.sts);
+        taskSts.add(TaskStsType.COMPLETE_MOVE.sts);
+        taskSts.add(TaskStsType.COMPLETE_MANUAL.sts);
+
+        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;
+//            }
+
+            //璁板綍搴撳瓨淇℃伅
+            updateRecordLoc(task);
+            //浠诲姟杞巻鍙叉。
+            saveTaskLog(task);
+        }
+    }
+
+    @Scheduled(cron = "0/1 * * * * ? ")
+    @Transactional
     public synchronized void clearCompletedTask() {
         ArrayList<Long> taskSts = new ArrayList<>();
         taskSts.add(TaskStsType.COMPLETE_INBOUND.sts);
         taskSts.add(TaskStsType.COMPLETE_OUTBOUND.sts);
-        taskSts.add(TaskStsType.COMPLETE_CHARGE.sts);
-        taskSts.add(TaskStsType.COMPLETE_MOVE.sts);
-        taskSts.add(TaskStsType.COMPLETE_MANUAL.sts);
+//        taskSts.add(TaskStsType.COMPLETE_CHARGE.sts);
+//        taskSts.add(TaskStsType.COMPLETE_MOVE.sts);
+//        taskSts.add(TaskStsType.COMPLETE_MANUAL.sts);
 
         Dict reportWms = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, "reportWms"));
 

--
Gitblit v1.9.1