From d7dca690cedd12e271f0ee0b9050679d73796f5c Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期一, 06 一月 2025 09:28:10 +0800 Subject: [PATCH] 1 --- server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 127 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 126 insertions(+), 1 deletions(-) diff --git a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java index b509d97..50b0d9d 100644 --- a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java +++ b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java @@ -118,6 +118,7 @@ public static final String ERP ="ERP" ; public static final Integer THREE =3 ; public static final Integer FOUR =4 ; + public static final Integer SEVEN =7 ; public static final Integer FIVE =5 ; public static final String ORG_USER_ORIGIN = "ORG_USER_ORIGIN"; public static final String VIRTUAL_CARD_INDEX = "02098469790"; @@ -183,6 +184,48 @@ public static final String TIMEOUT_WARNING = "TIMEOUT_WARNING"; // FTP鏂囦欢鏈嶅姟鍣ㄨ祫婧愯闂湴鍧� + /** + * 浠樻鍛ㄦ湡绫诲瀷 0=鍏冩瘡骞崇背澶╋紱1=鍏冩瘡骞崇背鏈堬紱2=鍏冩瘡骞崇背骞达紱3=鍏冩瘡澶╋紱4=鍏冩瘡鏈堬紱5=鍏冩瘡骞达紱6=鍏冩瘡鍦猴紱 + * @param circleType + * @return + */ + public static String getUnitTypeByNum(Integer circleType) { + + int zlPayType = Constants.formatIntegerNum(circleType); + if(zlPayType == 1){ + return "鍏�/銕÷锋湀"; + }else if(zlPayType == 2){ + return "鍏�/銕÷峰ぉ"; + }else if(zlPayType == 3){ + return "鍏�/澶�"; + }else if(zlPayType == 4){ + return "鍏�/鏈�"; + }else if(zlPayType == 5){ + return "鍏�/骞�"; + }else if(zlPayType == 6){ + return "鍏�/鍦�"; + } + return "鍏�/銕÷峰ぉ"; + } + + /** + * 鍛ㄦ湡鏀粯鏂瑰紡 0=涓�娆℃�т粯娆撅紱1=姣忎笁涓湀涓�浠橈紱2=鍏釜鏈堜竴浠橈紱3=涓�骞翠竴浠� + * @param zlPayType + * @return + */ + public static String getPayTypeByNum(Integer zlPayType) { + if(zlPayType == null){ + return ""; + } + if(zlPayType == 1){ + return "3涓湀涓�浠�"; + }else if(zlPayType == 2){ + return "6涓湀涓�浠�"; + }else if(zlPayType == 3){ + return "1骞翠竴浠�"; + } + return "涓�娆℃�т粯娆�"; + } public static String getRandom6Num( ) { Random random = new Random(); @@ -1251,7 +1294,9 @@ FN_DEVICE_RECORD_FILE(6, "闃滃畞鏈嶅姟骞冲彴杩愮淮璁板綍鍥剧墖 ", "闃滃畞鏈嶅姟骞冲彴杩愮淮璁板綍鍥剧墖 "), FN_PATROL_POINT_FILE(7, "宸℃鐐归檮浠� ", "宸℃鐐归檮浠� "), FN_CONTRACT_BILL_FILE(8, "鍚堝悓璐﹀崟闄勪欢 ", "鍚堝悓璐﹀崟闄勪欢 "), - YW_CONTRACT_FILE(9, "鍚堝悓闄勪欢 ", "鍚堝悓闄勪欢 ") + YW_CONTRACT_FILE(9, "鍚堝悓闄勪欢 ", "鍚堝悓闄勪欢 "), + FN_CONTRACT_REVENUE_FILE(10, "鏀舵敮娴佹按闄勪欢 ", "鍚堝悓璐﹀崟闄勪欢 "), + FN_PATROL_TASK_RECORD_FILE(11, "宸℃浠诲姟鐐瑰鐞嗛檮浠� ", "宸℃浠诲姟鐐瑰鐞嗛檮浠� "), ; // 鎴愬憳鍙橀噺 @@ -1307,7 +1352,87 @@ return noteinfo; } + } + + /** + * 杩愮淮鍚堝悓銆佸伐鍗曚俊鎭褰曠被鍨� + * 鎿嶄綔绫诲瀷 0宸ュ崟鍒涘缓 1鎸囨淳 2澶勭悊 3鍚堝悓鍒涘缓 4鍚堝悓鍙樻洿 5鍚堝悓閫�绉� + */ + public enum YwLogType{ + WORKORDER_CREATE(0, "鍒涘缓宸ュ崟", "鍒涘缓宸ュ崟"), + WORKORDER_DISPATCH(1, "鍒嗘淳宸ュ崟", "鍒嗘淳宸ュ崟"), + WORKORDER_DEAL(2, "澶勭悊宸ュ崟", "澶勭悊宸ュ崟"), + CONTRACT_CREATE(3, "鍚堝悓鏂板缓", "鏂板缓"), + CONTRACT_UPDATE(4, "鍚堝悓鍙樻洿", "鍙樻洿"), + CONTRACT_BACK(5, "鍚堝悓閫�绉�", "閫�绉�"), + + ; + // 鎴愬憳鍙橀噺 + private String name; + private int key; + private String noteinfo;// 鎻忚堪 + + // 鏋勯�犳柟娉� + YwLogType(int key, String name, String noteinfo) { + this.name = name; + this.key = key; + this.noteinfo = noteinfo; + } + + // 鏅�氭柟娉� + 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 (YwLogType c : YwLogType.values()) { + if (c.getKey() == index) { + return c.noteinfo; + } + } + return null; + } + + // 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 String getNoteinfo() { + return noteinfo; + } + } + + //閭鏍煎紡鐨勯獙璇� + public static boolean validEmail(String email) { + Pattern p = Pattern.compile("[a-zA-Z0-9]+@[A-Za-z0-9]+\\.[a-z0-9]"); + Matcher m = p.matcher(email); + if(m.find()){ + return true; + } else { + return false; + } + } + } -- Gitblit v1.9.3