Browse Source

登录控制

Signed-off-by: zhangxiaomu <zhangxiaomu@dongkesoft.com>
zhangxiaomu 2 years ago
parent
commit
4f924ddde5
1 changed files with 56 additions and 3 deletions
  1. 56 3
      src/main/java/com/dk/common/infrastructure/constant/Constant.java

+ 56 - 3
src/main/java/com/dk/common/infrastructure/constant/Constant.java

@@ -1,6 +1,8 @@
 package com.dk.common.infrastructure.constant;
 
+import java.util.ArrayList;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -462,6 +464,8 @@ public class Constant {
         /**
          * 系统参数
          */
+        SYS_CODE_000("PWD_000"),
+
         SYS_CODE_001("PWD_001"),
 
         SYS_CODE_002("PWD_002"),
@@ -492,8 +496,6 @@ public class Constant {
 
         SYS_PDM_006("PDM_006"),
 
-
-
         /**
          * 【系统字典】未出库、出库中、出库完成
          */
@@ -623,6 +625,7 @@ public class Constant {
          */
         WEB_MAIN("WEB-MAIN"),  // WEB主系统
         PDA_PROD("PDA-PROD"),  // PDA生产端
+        WEB_TOUCH("WEB-TOUCH"),  // 触屏工控机
 
         /**
          * api id
@@ -644,6 +647,17 @@ public class Constant {
         AppConstant(String name) {
             this.name = name;
         }
+
+        //获取全部枚举值
+        public static List<String> getAllApp(){
+            List allApp=new ArrayList();
+            for (AppConstant app : values()) {
+                allApp.add(app.getName());
+            }
+            return allApp;
+
+        }
+
     }
 
     /**
@@ -655,7 +669,7 @@ public class Constant {
         /**
          * redis key 前缀
          */
-        REDIS_LOGIN("Login-"),
+        REDIS_LOGIN("DK-MES-LOGIN-"),
         REDIS_USER("USER-"),
         REDIS_REQUEST("Request-"),
         REDIS_HG_HAP_TOKEN("HG-HAP-TOKEN"),
@@ -1329,6 +1343,45 @@ public class Constant {
 
 
     /**
+     * @desc :  系统参数 - 登录控制
+     * @author : 张潇木
+     * @date : 2024-04-02 14:09
+     */
+    public enum LoginControl {
+
+        SINGLE_CLIENT("1"),//单点
+        MULTIPLE_CLIENT("2"),//多端
+        NO_LIMIT("3");//不限
+
+        private String value;
+
+        public String getValue() {
+            return value;
+        }
+
+        public void setCode(String value) {
+            this.value = value;
+        }
+
+        LoginControl(String value) {
+            this.value = value;
+        }
+
+        //获取指定的枚举
+        public static LoginControl getLoginControl(String value) {
+            for (LoginControl lc : values()) {
+                if (lc.getValue().equals(value) ) {
+                    return lc;
+                }
+            }
+            return null;
+        }
+    }
+
+
+
+
+    /**
      * @desc   : 固定工序节点
      * @author : 洪旭东
      * @date   : 2023-03-21 16:32