From a52f8c508d08014d1a153cfc02e12b5fc185a3a4 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期四, 11 七月 2024 15:28:59 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- server/service/src/main/java/com/doumee/core/utils/Constants.java | 112 ++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 81 insertions(+), 31 deletions(-) diff --git a/server/service/src/main/java/com/doumee/core/utils/Constants.java b/server/service/src/main/java/com/doumee/core/utils/Constants.java index 0e97e24..5fd3e3a 100644 --- a/server/service/src/main/java/com/doumee/core/utils/Constants.java +++ b/server/service/src/main/java/com/doumee/core/utils/Constants.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import java.io.IOException; @@ -78,11 +79,6 @@ public static final String FTP_USERNAME ="FTP_USERNAME" ; public static final String FTP_PWD ="FTP_PWD" ; public static final String FTP_RESOURCE_PATH ="FTP_RESOURCE_PATH" ; - public static final String ERP_ORGLIST_URL ="ERP_ORGLIST_URL" ; - public static final String ERP_USERLIST_URL ="ERP_USERLIST_URL" ; - public static final String ERP_APPROVE_URL ="ERP_APPROVE_URL" ; - public static final String ERP_USERSTATUS_RL ="ERP_USERSTATUS_RL" ; - public static final String ERP ="ERP" ; public static final Integer THREE =3 ; public static final Integer FOUR =4 ; public static final String ORG_USER_ORIGIN = "ORG_USER_ORIGIN"; @@ -92,34 +88,80 @@ public static final String ZBOM = "ZBOM" ; public static final String ZBOM_IAM_APPKEY = "ZBOM_IAM_APPKEY"; public static final String ZBOM_IAM_APPID = "ZBOM_IAM_APPID"; - public static boolean DEALING_HK_SYNCPRIVILEGE= false; - public static boolean DEALING_HK_SYNCDEVICE = false; - public static boolean DEALING_HK_SYNCDEVICE_STATUS = false; - public static boolean DEALING_HK_SYNCPARK = false; - public static boolean DEALING_HK_IMG = false; - public static boolean DEALING_HK_ORG = false; - public static boolean DEALING_HK_USER = false; - public static boolean DEALING_HK_DEL_USER = false; - public static boolean DEALING_HK_VISIT = false; - public static boolean DEALING_HK_VISIT_EXPIRE = false; - public static boolean DEALING_FROM_HK_VISIT = false; - public static boolean DEALING_HK_EMPOWER = false; - public static boolean DEALING_HK_EMPOWER_DETAIL = false; - public static boolean DEALING_HK_EMPOWER_RESULT = false; - public static boolean DEALING_HK_PARKBOOK = false; - // ERP鎺ュ彛閰嶇疆 - public static final String ERP_CONFIG = "ERP_CONFIG"; - // ERP ACCESS_KEY - public static final String ERP_ACCESS_KEY = "ERP_ACCESS_KEY"; - // ERP ACCESS_SECRET - public static final String ERP_ACCESS_SECRET = "ERP_ACCESS_SECRET"; - // 鍐呴儴浜哄憳鍐荤粨閰嶇疆鏃堕棿 - public static final String TIMEOUT_FREEZE = "TIMEOUT_FREEZE"; + public static Integer parseIntByStr(String idtOrgStatus) { + try { + return Integer.parseInt(idtOrgStatus); + }catch (Exception e){ + return null; + } + } - // 瓒呮椂棰勮閰嶇疆 - public static final String TIMEOUT_WARNING = "TIMEOUT_WARNING"; - // FTP鏂囦欢鏈嶅姟鍣ㄨ祫婧愯闂湴鍧� + /** + * 闄勪欢瀵硅薄绫诲瀷 0news澶氬浘 1news瑙嗛 + */ + public enum MultiFile{ + NEWS_FILE(0, "鎺ㄥ箍璧勮闄勪欢", "NEWS") + + ; + // 鎴愬憳鍙橀噺 + private String name; + private int key; + private String info;// 鎻忚堪 + + // 鏋勯�犳柟娉� + MultiFile(int key, String name, String info) { + this.name = name; + this.key = key; + this.info = info; + } + + // 鏅�氭柟娉� + public static String getName(int index) { + for (MultiFile c : MultiFile.values()) { + if (c.getKey() == index) { + return c.name; + } + } + return null; + } + + // 鏅�氭柟娉� + public static String getInfo(int index) { + for (MultiFile c : MultiFile.values()) { + if (c.getKey() == index) { + return c.info; + } + } + return null; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + // get set 鏂规硶 + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getKey() { + return key; + } + + public void setKey(int key) { + this.key = key; + } + + } public static Date getBirthdyByCardNo(String idCard){ if(idCard ==null || idCard.length()<14){ @@ -262,6 +304,8 @@ public static final String ACCESS_KEY = "ACCESS_KEY"; public static final String ENDPOINT = "ENDPOINT"; public static final String RESOURCE_PATH = "RESOURCE_PATH"; + public static final String USERS_FILE = "USERS_FILE"; + public static final String NEWS_FILE = "NEWS_FILE"; //鍙戦�佷細璁紑濮� 瀹氭椂鎻愬墠澶氬皯鍒嗛挓鍙戦�� public static final String SYSTEM ="SYSTEM"; @@ -338,6 +382,12 @@ } + public static boolean equalsLong(Long a, Long b) { + if (a == null || b==null) { + return false; + } + return a.equals(b); + } public static boolean equalsInteger(Integer a, Integer b) { if (formatIntegerNum(a) == formatIntegerNum(b)) { return true; -- Gitblit v1.9.3