From 43a19a4424f67c379934ed0d70e0d1b3512cd769 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 27 三月 2025 09:31:44 +0800
Subject: [PATCH] 灌溉计划表中增加项目ID字段,计划列表返回值中增加项目名称,项目状态改为整数表示
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/core/CoreUnit.java | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/core/CoreUnit.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/core/CoreUnit.java
index 6fd31f7..6b3ce51 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/core/CoreUnit.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/core/CoreUnit.java
@@ -6,7 +6,8 @@
import com.dy.common.queue.Queue;
import com.dy.common.mw.UnitAdapterInterface;
import com.dy.common.mw.UnitInterface;
-import com.dy.common.mw.UnitStartedCallbackInterface;
+import com.dy.common.mw.UnitCallbackInterface;
+
public class CoreUnit implements UnitInterface {
@@ -36,17 +37,14 @@
if(vo == null){
throw new Exception("鏍稿績妯″潡閰嶇疆瀵硅薄涓嶈兘涓虹┖锛�") ;
}
- if(vo.sleepBigBusy == null || vo.sleepSmallBusy == null){
+ if(vo.coreInterval == null){
throw new Exception("鏍稿績妯″潡閰嶇疆瀵硅薄闂撮殧灞炴�у�间笉鑳戒负绌猴紒") ;
}
- if(vo.sleepBigBusy <= 0){
- throw new Exception("鏍稿績妯″潡閰嶇疆瀵硅薄灞炴�leepBigBusy鍊间笉鑳藉皬浜�0锛�") ;
+ if(vo.coreInterval <= 0){
+ throw new Exception("鏍稿績妯″潡閰嶇疆瀵硅薄灞炴�oreInterval鍊间笉鑳藉皬浜�0锛�") ;
}
- if(vo.sleepBigBusy > 1000){
- throw new Exception("鏍稿績妯″潡閰嶇疆瀵硅薄灞炴�leepBigBusy鍊间笉鑳藉ぇ浜�1000锛�") ;
- }
- if(vo.sleepSmallBusy > 1000){
- throw new Exception("鏍稿績妯″潡閰嶇疆瀵硅薄灞炴�leepSmallBusy鍊间笉鑳藉ぇ浜�1000锛�") ;
+ if(vo.coreInterval > 1000){
+ throw new Exception("鏍稿績妯″潡閰嶇疆瀵硅薄灞炴�oreInterval鍊间笉鑳藉ぇ浜�1000锛�") ;
}
if(vo.queueWarnSize == null || vo.queueMaxSize == null){
throw new Exception("鏍稿績妯″潡閰嶇疆瀵硅薄闃熷垪鑺傜偣闄愬埗鏁伴噺灞炴�у�间笉鑳戒负绌猴紒") ;
@@ -64,28 +62,32 @@
}
@Override
- public void start(UnitStartedCallbackInterface callback) throws Exception {
+ public void start(UnitCallbackInterface callback) throws Exception {
if(!started){
started = true ;
+ /*
CoreThread ct = CoreThread.getInstance() ;
ct.setSleep(this.adapter.getConfig().sleepBigBusy, this.adapter.getConfig().sleepSmallBusy);
- ct.start();
-
+ ct.start();
+ */
+ CoreTimer ct = CoreTimer.getInstance() ;
+ ct.setSleep(this.adapter.getConfig().coreInterval);
+ ct.start();
+
CoreConstantManage ccm = CoreConstantManage.getInstance() ;
- ccm.setSleep(this.adapter.getConfig().sleepBigBusy, this.adapter.getConfig().sleepSmallBusy);
+ ccm.setSleep(this.adapter.getConfig().coreInterval);
ccm.start();
if(adapter.getConfig().showStartInfo){
System.out.println("鏍稿績妯″潡鎴愬姛鍚姩锛�"
- + "涓荤嚎绋嬬箒蹇欓棿闅旓細" + adapter.getConfig().sleepBigBusy + "姣锛�"
- + "杞婚棽闂撮殧锛�" + adapter.getConfig().sleepSmallBusy + "姣" );
+ + "涓荤嚎绋嬫墽琛岄棿闅旓細" + adapter.getConfig().coreInterval + "姣");
}
callback.call(null);
}
}
@Override
- public void stop(UnitStartedCallbackInterface callback) {
+ public void stop(UnitCallbackInterface callback) {
}
--
Gitblit v1.8.0