From 4dfe6a8238e9036a10198f72ce811f5902f27bea Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期三, 22 十月 2025 16:52:44 +0800
Subject: [PATCH] *
---
src/main/java/com/zy/asrs/controller/ConsoleController.java | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/ConsoleController.java b/src/main/java/com/zy/asrs/controller/ConsoleController.java
index f4e6b38..c3f9caa 100644
--- a/src/main/java/com/zy/asrs/controller/ConsoleController.java
+++ b/src/main/java/com/zy/asrs/controller/ConsoleController.java
@@ -58,29 +58,33 @@
@PostMapping("/system/switch")
// @ManagerAuth(memo = "绯荤粺杩愯寮�鍏虫搷浣�")
public R systemSwitch(SystemSwitchParam param) throws InterruptedException {
- if (Cools.isEmpty(param.getOperatorType())){
- return R.error();
- }
- if (param.getOperatorType() == 0) {
- if (Cools.isEmpty(param.getPassword())){
- return R.error("璇疯緭鍏ュ彛浠�");
- }
- if (!param.getPassword().equals(SystemProperties.WCS_PASSWORD)){
- return R.error("鍙d护閿欒");
- }
- }
- Thread.sleep(200L);
+// if (Cools.isEmpty(param.getOperatorType())){
+// return R.error();
+// }
+// if (param.getOperatorType() == 0) {
+// if (Cools.isEmpty(param.getPassword())){
+// return R.error("璇疯緭鍏ュ彛浠�");
+// }
+// if (!param.getPassword().equals(SystemProperties.WCS_PASSWORD)){
+// return R.error("鍙d护閿欒");
+// }
+// }
+// Thread.sleep(200L);
//楠岃瘉璁稿彲璇佹槸鍚︽湁鏁�
try{
- if (new LicenseVerify().verify()){
- SystemProperties.WCS_RUNNING_STATUS.set(param.getOperatorType()==1?Boolean.TRUE:Boolean.FALSE);
- return R.ok().add(Cools.add("status", SystemProperties.WCS_RUNNING_STATUS.get()));
+ boolean systemSign = SystemProperties.WCS_RUNNING_STATUS.get();
+ if (!systemSign){
+ if (new LicenseVerify().verify()){
+ SystemProperties.WCS_RUNNING_STATUS.set(Boolean.TRUE);
+ return R.ok();
+ }
}
} 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()));
+ return R.ok();
}
/****************************************************************/
--
Gitblit v1.9.1