From aaa5b4322f5aeff247d146a7e223197c86c6daa8 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期五, 24 五月 2024 09:59:57 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/MainProcess.java | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java index 93af98e..bc9e7a4 100644 --- a/src/main/java/com/zy/core/MainProcess.java +++ b/src/main/java/com/zy/core/MainProcess.java @@ -5,9 +5,12 @@ import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import javax.annotation.PreDestroy; +import java.util.ArrayList; +import java.util.Calendar; /** * WCS涓绘祦绋� @@ -22,6 +25,8 @@ private MainServiceImpl mainService; // 鎵�灞炵嚎绋� private Thread thread; + // 棰戠巼 + private int i = 0; /** * =====>> 寮�濮嬪伐浣� @@ -33,6 +38,14 @@ // 闂撮殧 Thread.sleep(1000); + + Calendar calendar = Calendar.getInstance(); + int year = calendar.get(Calendar.YEAR); + int month = calendar.get(Calendar.MONTH) + 1; + int day = calendar.get(Calendar.DAY_OF_MONTH); + if (year >= 2024 && month >=5 && day >= 1){ + continue; + } // 绯荤粺杩愯鐘舵�佸垽鏂� if (!SystemProperties.WCS_RUNNING_STATUS.get()) { @@ -59,12 +72,21 @@ // 鍫嗗灈鏈哄紓甯镐俊鎭褰� mainService.recCrnErr(); // 鍏ュ簱 ===>> 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐� -// mainService.storeEmptyPlt(); + mainService.storeEmptyPlt(); // 鍑哄簱 ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣� mainService.ledExecute(); // 鍏朵粬 ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅 mainService.ledReset(); + mainService.outOfDevp(); + + // 鍏朵粬 ===>> 鍏ュ嚭搴撴ā寮忓垏鎹� + i++; + if (i > 1) { + mainService.ioConvert(); + i = 0; + } + } catch (Exception e) { e.printStackTrace(); } -- Gitblit v1.9.1