From 6299fb7b7732947e9f997c92599b1772b8884962 Mon Sep 17 00:00:00 2001
From: zzgtfwq <zzgtfwq>
Date: 星期日, 14 十二月 2025 19:37:02 +0800
Subject: [PATCH] #26-03-10-00

---
 src/main/java/com/zy/asrs/controller/ConsoleController.java |   19 ++++++++++++++++++-
 src/main/resources/publicCerts.keystore                     |    0 
 src/main/java/com/zy/core/MainProcess.java                  |    2 +-
 src/main/resources/license.lic                              |    0 
 4 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/ConsoleController.java b/src/main/java/com/zy/asrs/controller/ConsoleController.java
index f2d16d8..9eb20b9 100644
--- a/src/main/java/com/zy/asrs/controller/ConsoleController.java
+++ b/src/main/java/com/zy/asrs/controller/ConsoleController.java
@@ -37,6 +37,7 @@
 import com.zy.core.properties.SlaveProperties;
 import com.zy.core.properties.SystemProperties;
 import com.zy.core.thread.*;
+import com.zy.system.entity.license.LicenseVerify;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -88,7 +89,23 @@
             }
         }
         Thread.sleep(200L);
-        SystemProperties.WCS_RUNNING_STATUS.set(param.getOperatorType()==1?Boolean.TRUE:Boolean.FALSE);
+
+        //楠岃瘉璁稿彲璇佹槸鍚︽湁鏁�
+        try{
+            boolean systemSign = SystemProperties.WCS_RUNNING_STATUS.get();
+            if (!systemSign){
+                if (new LicenseVerify().verify()){
+                    SystemProperties.WCS_RUNNING_STATUS.set(Boolean.TRUE);
+//                    SystemProperties.WCS_RUNNING_STATUS.set(param.getOperatorType()==1?Boolean.TRUE:Boolean.FALSE);
+                    return R.ok();
+                }
+                return R.error("璁稿彲璇侀獙璇佸け璐ワ紒").add("璁稿彲璇侀獙璇佸け璐ワ紒");
+            }
+        } catch (Exception e){
+            log.error("璁稿彲璇侀獙璇佸け璐ワ紒锛佸紓甯革細{}",e.getMessage());
+            return R.error();
+        }
+        SystemProperties.WCS_RUNNING_STATUS.set(Boolean.FALSE);
         return R.ok().add(Cools.add("status", SystemProperties.WCS_RUNNING_STATUS.get()));
     }
 
diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index 2db4ac7..4f93e13 100644
--- a/src/main/java/com/zy/core/MainProcess.java
+++ b/src/main/java/com/zy/core/MainProcess.java
@@ -109,7 +109,7 @@
         int i = 0;
         while (true) {
             try{
-                Thread.sleep(60*60*1000L);
+                Thread.sleep(10*60*1000L);
 
                 // 绯荤粺杩愯鐘舵�佸垽鏂�
                 if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
diff --git a/src/main/resources/license.lic b/src/main/resources/license.lic
new file mode 100644
index 0000000..9d26a95
--- /dev/null
+++ b/src/main/resources/license.lic
Binary files differ
diff --git a/src/main/resources/publicCerts.keystore b/src/main/resources/publicCerts.keystore
new file mode 100644
index 0000000..382a874
--- /dev/null
+++ b/src/main/resources/publicCerts.keystore
Binary files differ

--
Gitblit v1.9.1