From 9a43e21c30a5d2db9c29f4ae23df9b39fc858a8a Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期二, 15 七月 2025 11:21:36 +0800 Subject: [PATCH] 111 --- server/services/src/main/java/com/doumee/core/constants/Constants.java | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 166 insertions(+), 13 deletions(-) diff --git a/server/services/src/main/java/com/doumee/core/constants/Constants.java b/server/services/src/main/java/com/doumee/core/constants/Constants.java index 46e31ec..20d9879 100644 --- a/server/services/src/main/java/com/doumee/core/constants/Constants.java +++ b/server/services/src/main/java/com/doumee/core/constants/Constants.java @@ -3,6 +3,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; +import java.math.BigDecimal; import java.util.*; /** @@ -12,18 +13,12 @@ */ public class Constants { - public static final String AZURE_BLOB ="AZURE_BLOB" ; - public static final String AZURE_BLOB_ACCESSNAME ="AZURE_BLOB_ACCESSNAME" ; - public static final String AZURE_BLOB_ACCESSKEY ="AZURE_BLOB_ACCESSKEY" ; - public static final String AZURE_BLOB_ENDPOINT ="AZURE_BLOB_ENDPOINT" ; - public static final String AZURE_BLOB_CONTAINER ="AZURE_BLOB_CONTAINER" ; - public static final String FTP ="FTP" ; - public static final String FTP_HOST ="FTP_HOST" ; - public static final String FTP_PORT ="FTP_PORT" ; - 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 FTP_LOCAL_RESOURCE_PATH ="FTP_LOCAL_RESOURCE_PATH" ; + public static final String HWY_OBS ="HWY_OBS" ; + public static final String HWY_OBS_ACCESSID ="HWY_OBS_ACCESSID" ; + public static final String HWY_OBS_ACCESSKEY ="HWY_OBS_ACCESSKEY" ; + public static final String HWY_OBS_ENDPOINT ="HWY_OBS_ENDPOINT" ; + public static final String HWY_OBS_BUCKET ="HWY_OBS_BUCKET" ; + public static final String RESOURCE_PATH ="RESOURCE_PATH" ; public static final String QYWX_CORPID = "QYWX_CORPID"; public static final String QYWX_SECRET = "QYWX_SECRET"; public static final String QYWX_TOKEN = "QYWX_TOKEN"; @@ -42,6 +37,21 @@ public static final String WISDOM_SYSTEM ="WISDOM_SYSTEM" ; public static final String FOOT_WORDS ="FOOT_WORDS" ; + public static final String WX_CONFIG ="WX_CONFIG" ; + public static final String APPID ="APPID" ; + public static final String SECRET ="SECRET" ; + public static final String ACCESS_TOKEN ="ACCESS_TOKEN" ; + public static final String SERVER_INTRODUCE ="SERVER_INTRODUCE" ; + public static final String FEE_STANDARDS ="FEE_STANDARDS" ; + public static final String ABOUT_US ="ABOUT_US" ; + + + public static final String RELEASE_CANCEL_TIMES ="RELEASE_CANCEL_TIMES" ; + public static final String RECEIVE_CANCEL_TIMES ="RECEIVE_CANCEL_TIMES" ; + public static final String RELEASE_CANCEL_TIME ="RELEASE_CANCEL_TIME" ; + public static final String RECEIVE_CANCEL_TIME ="RECEIVE_CANCEL_TIME" ; + public static final String AUTO_DISPATCH ="AUTO_DISPATCH" ; + public static final String AUTO_DISPATCH_DISTANCE ="AUTO_DISPATCH_DISTANCE" ; public static final String QYWX = "QYWX"; public static final Integer ONE = 1; @@ -51,6 +61,10 @@ public static final Integer FOUR = 4; public static final Integer SIX = 6; public static final Integer FIVE = 5; + public static final String INENTITY_FILES = "INENTITY_FILES"; + public static final String MEMBER_FILES = "MEMBER_FILES"; + public static final String CATEGORY_FILES = "CATEGORY_FILES"; + public static final String ORDERS_FILES = "ORDERS_FILES"; public static boolean WORKORDER_SHE_EMAIL_SENDING = false; public static boolean DEALING_COMPANY_SYNC = false ; public static boolean DEALING_MEMBER_SYNC = false ; @@ -69,7 +83,7 @@ interface CacheKey { } public interface RedisKeys { - public static final String IMPORTING_CATEGORY = "IMPORTING_CATEGORY"; + public static final String ORDER_CODE = "ORDER_CODE"; } /** * 鎿嶄綔绫诲瀷锛岀敤浜庡仛鎺ュ彛楠岃瘉鍒嗙粍 @@ -105,6 +119,12 @@ d = 0; } return d.intValue(); + } + public static double getFormatMoney(Long d) { + BigDecimal r = new BigDecimal(formatLongNum(d)); + r = r.divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP); + + return r.doubleValue(); } public static long formatLongNum(Long d) { @@ -327,4 +347,137 @@ this.noticeContent = noticeContent; } } + + /** + * 鐢ㄦ埛鏀舵敮涓氬姟绫诲瀷 + * 鍙樺姩绫诲瀷:0=鐢ㄥ伐鍗曟敹鍏ワ紱1=璐ц繍鍗曟敹鍏ワ紱2=渚涢鍗曟敹鍏ワ紱3=鎻愮幇鐢宠锛� + */ + @Getter + public enum RevenueType { + + YGD_INCOME( 0, "鐢ㄥ伐鍗曟敹鍏�","鐢ㄥ伐鍗曟敹鍏�" ,0), + HYD_INCOME( 1, "璐ц繍鍗曟敹鍏�","璐ц繍鍗曟敹鍏�" ,0), + GCD_INCOME(2, "渚涢鍗曟敹鍏�","渚涢鍗曟敹鍏�" ,0), + WITHDRAW_APPLY(3, "鎻愮幇鐢宠","鎻愮幇鐢宠" ,0), + REFUND( 4, "鎻愮幇鐢宠閫�鍥�","鎻愮幇鐢宠閫�鍥�" ,0) + ; + + private int key; + private String name; + private String info; + private int navIndex; + + RevenueType(int key, String name, String info,int navIndex) { + this.info = info; + this.key = key; + this.name = name; + this.navIndex = navIndex; + } + public static RevenueType getObj(int index) { + for (RevenueType c : RevenueType.values()) { + if (c.getKey() == index) { + return c; + } + } + return null; + } + public static String getObjName(int index) { + for (RevenueType c : RevenueType.values()) { + if (c.getKey() == index) { + return c.getName(); + } + } + return null; + } + + + } + + + + + public enum OrdersLog { + UPLOAD(0, "鍙戝崟鏂�-鍙戝竷璁㈠崟","{userName}鍙戝竷{param}",0), + RECEIVE(1, "鎺ュ崟鏂�-宸叉姠鍗�","{userName}宸叉姠鍗�",1), + UPD_ORDER(2, "鍙戝崟鏂�-淇敼璁㈠崟","{userName}淇敼浜嗙敤宸ユ椂闂�",0), + UPD_DISAGREE(3, "鎺ュ崟鏂�-涓嶅悓鎰忎慨鏀�,璁㈠崟鍙栨秷","{userName}涓嶅悓鎰忎慨鏀癸紝璁㈠崟鍙栨秷",1), + UPD_AGREE(4, "鎺ュ崟鏂�-鍚屾剰淇敼","{userName}鍚屾剰淇敼",1), + AUTO(5, "绯荤粺-鑷姩娲惧崟","鏃犱汉鎺ュ崟宸茶嚜鍔ㄦ淳鍗曠粰{userName}",1), + CANCEL(6, "鎺ュ崟鏂�-鍙栨秷鎺ュ崟","{userName}宸叉墜鍔ㄥ彇娑堟帴鍗�",1), + BEGIN(7, "鍙戝崟鏂�-寮�濮嬩綔涓�","{userName}宸插紑濮嬩綔涓�",0), + DONE(8, "鍙戝崟鏂�-瀹屾垚浣滀笟","{userName}宸茬‘璁ゅ畬鎴愪綔涓�",0), + PAY(9, "鍙戝崟鏂�-瀹屾垚鏀粯","{userName}宸叉敮浠樿垂鐢�",0), + COMMENT(10, "鍙戝崟鏂�-璇勪环瀹屾垚","{userName}瀹屾垚璇勪环",0), + SYSTEM_CANCEL(11, "绯荤粺-璁㈠崟鍙栨秷","绯荤粺鍙栨秷",2), + RELEASE_CANCEL(12, "鍙戝崟鏂�-璁㈠崟鍙栨秷","{userName}宸叉墜鍔ㄥ彇娑堣鍗�",0), + + ; + // 鎴愬憳鍙橀噺 + private String name; + private String info; + private int key; + private int userType; + + // 鏋勯�犳柟娉� + OrdersLog(int key, String name,String info,int userType) { + this.name = name; + this.info = info; + this.key = key; + this.userType = userType; + } + + // 鏅�氭柟娉� + public static String getName(int index) { + for (OrdersLog c : OrdersLog.values()) { + if (c.getKey() == index) { + return c.name; + } + } + return null; + } + public static String getInfo(int index) { + for (OrdersLog c : OrdersLog.values()) { + if (c.getKey() == index) { + return c.info; + } + } + 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 int getUserType() { + return userType; + } + + public void setUserType(int key) { + this.userType = userType; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + } + + + } -- Gitblit v1.9.3