From dbe87fddc43db7e5486489c3a011cc6474c4701c Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期四, 09 十月 2025 16:46:42 +0800
Subject: [PATCH] #和得服务器
---
src/main/java/com/zy/asrs/task/WorkLogScheduler.java | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/zy/asrs/task/WorkLogScheduler.java b/src/main/java/com/zy/asrs/task/WorkLogScheduler.java
index fa2274c..01f6c09 100644
--- a/src/main/java/com/zy/asrs/task/WorkLogScheduler.java
+++ b/src/main/java/com/zy/asrs/task/WorkLogScheduler.java
@@ -1,21 +1,23 @@
package com.zy.asrs.task;
+import com.core.common.Cools;
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.WrkMastService;
+import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.WorkLogHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
+import java.util.List;
+
/**
* Created by vincent on 2020/7/7
*/
+@Slf4j
@Component
public class WorkLogScheduler {
-
- private static final Logger log = LoggerFactory.getLogger(WorkLogScheduler.class);
@Autowired
private WorkLogHandler workLogHandler;
@@ -24,13 +26,20 @@
@Scheduled(cron = "0/3 * * * * ? ")
private void execute(){
- WrkMast wrkMast = wrkMastService.selectToBeHistoryData();
- if (null == wrkMast) {
+ List<WrkMast> wrkMasts = wrkMastService.selectToBeHistoryData();
+ if (wrkMasts.isEmpty()) {
return;
}
- ReturnT<String> result = workLogHandler.start(wrkMast);
- if (!result.isSuccess()) {
- log.error("宸ヤ綔妗workNo={}]鍘嗗彶妗e鐞嗗け璐�", wrkMast.getWrkNo());
+ for (WrkMast wrkMast : wrkMasts) {
+ if(wrkMast.getIoType() != 11){
+ if(Cools.isEmpty(wrkMast.getSheetNo()) || !wrkMast.getSheetNo().equals("2")){
+ continue;
+ }
+ }
+ ReturnT<String> result = workLogHandler.start(wrkMast);
+ if (!result.isSuccess()) {
+ log.error("宸ヤ綔妗workNo={}]鍘嗗彶妗e鐞嗗け璐�", wrkMast.getWrkNo());
+ }
}
}
--
Gitblit v1.9.1