From 4696a0be1e0235e4a9e5077c3f42e038da8c6809 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 14 八月 2025 16:30:37 +0800
Subject: [PATCH] 1

---
 zy-acs-manager/src/main/java/com/zy/acs/manager/core/third/ReportThirdScheduler.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/third/ReportThirdScheduler.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/third/ReportThirdScheduler.java
index c394e79..78a8c8b 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/third/ReportThirdScheduler.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/third/ReportThirdScheduler.java
@@ -2,6 +2,7 @@
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.zy.acs.framework.common.Cools;
 import com.zy.acs.manager.core.utils.HttpHandler;
 import com.zy.acs.manager.manager.entity.TaskReport;
 import com.zy.acs.manager.manager.entity.TaskReportLog;
@@ -34,23 +35,24 @@
     private ConfigService configService;
 
 
-    @Scheduled(fixedDelay = 1000)
+    @Scheduled(fixedDelay = 3000)
     public void execute() {
         Boolean report = configService.getVal("REPORT", Boolean.class, false);
         if (report) {
             String wmsUrl = configService.getVal("WMS_URL", String.class);
             String wmsPath = configService.getVal("WMS_PATH", String.class);
             Integer times = configService.getVal("REPORT_TIMES", Integer.class, 3);
+            String codes = configService.getVal("CODES", String.class, "1457;1612");
             List<TaskReport> list = taskReportService.list();
             for (TaskReport taskReport : list) {
-                if (taskReport.getReportTimes() > times) {
+                if ((Cools.isEmpty(taskReport.getReportTimes()) ? 0 : taskReport.getReportTimes()) > times) {
                     toLog(taskReport);
                     continue;
                 }
                 if (report(taskReport, wmsUrl, wmsPath)) {
                     toLog(taskReport);
                 } else {
-                    taskReport.setReportTimes(taskReport.getReportTimes() + 1);
+                    taskReport.setReportTimes((Cools.isEmpty(taskReport.getReportTimes()) ? 0 : taskReport.getReportTimes()) + 1);
                     taskReport.setUpdateTime(new Date());
                     taskReportService.updateById(taskReport);
                 }
@@ -68,6 +70,7 @@
                     .setJson(JSON.toJSONString(taskReport))
                     .build()
                     .doPost();
+            log.info("杩斿洖鍙傛暟锛歿}", response);
             JSONObject jsonObject = JSON.parseObject(response);
             if (jsonObject.getInteger("code").equals(200)) {
                 return true;

--
Gitblit v1.9.1