From 22eb1991a9363473fe9051a7ed3293b7a6ddd671 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 01 三月 2024 15:03:37 +0800
Subject: [PATCH] 整理
---
server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java | 1221 +++++++++++++++------------------------------------------
1 files changed, 332 insertions(+), 889 deletions(-)
diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java b/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java
index fbd8b5f..1c8ff4e 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -1,10 +1,19 @@
package com.doumee.core.utils;
-import org.apache.commons.collections4.CollectionUtils;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.PropertyNamingStrategy;
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.IOException;
import java.math.BigDecimal;
import java.net.URLDecoder;
-import java.util.*;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -19,6 +28,162 @@
public static final String HK_APPKEY ="HK_APPKEY" ;
public static final String HK_APPSECRET ="HK_APPSECRET" ;
public static final String HK_HTTPS ="HK_HTTPS" ;
+ public static final String HK_PUSH_URL = "HK_PUSH_URL";
+ public static final String HK_ROOTORG_CODE ="HK_ROOTORG_CODE" ;
+ public static final String HK_ROOTORG_NAME ="HK_ROOTORG_NAME" ;
+
+ //琚嫓璁夸汉淇℃伅鏍¢獙鏂瑰紡锛�0鎵嬫満鍙峰崟鐙牎楠� 1鎵嬫満鍙峰拰濮撳悕缁勫悎鏍¢獙锛�
+ public static final String BEVISITED_USER_VALID = "BEVISITED_USER_VALID";
+ public static final String LW_BEVISITED_USER_VALID = "LW_BEVISITED_USER_VALID";
+ public static final String SELECT_DOORS_VISIT_REQUIRED = "SELECT_DOORS_VISIT_REQUIRED";
+ public static final String SELECT_DOORS_LW_REQUIRED = "SELECT_DOORS_LW_REQUIRED";
+ public static final String PROBLEM_LW_REQUIRED = "PROBLEM_LW_REQUIRED";
+ public static final String PROBLEM_VISIT_REQUIRED = "PROBLEM_VISIT_REQUIRED";
+ public static final String MDJ_LW_REQUIRED = "MDJ_LW_REQUIRED";
+ public static final String MDJ_VISIT_REQUIRED = "MDJ_VISIT_REQUIRED";
+ public static final String EDS_PWD ="!@#$%^&QWERTY" ;
+ public static final String ROOT_PATH = "";
+ public static final String FILE_DIR = "";
+ public static final String INITIAL_PASSWORD = "INITIAL_PASSWORD";
+
+ // 璁垮鏉ヨ閰嶇疆
+ public static final String VISIT_CONFIG = "VISIT_CONFIG";
+ public static final String MEMBER_IMG = "MEMBER_IMG";
+ public static final String VISIT_NOTICE = "VISIT_NOTICE";
+ //鍋ュ悍璇侀厤缃�
+ public static final String LW_HEALTH_CARD = "LW_HEALTH_CARD";
+ public static final String HEALTH_CARD = "HEALTH_CARD";
+ //绛旈璇存槑
+ public static final String LW_DESCRIPTION = "LW_DESCRIPTION";
+ public static final String DESCRIPTION = "DESCRIPTION";
+ //绛旈涓婚
+ public static final String LW_THEME = "LW_THEME";
+ public static final String THEME = "THEME";
+
+ // 鍔冲姟鏉ヨ閰嶇疆
+ public static final String LABOR_CONFIG = "LABOR_CONFIG";
+ public static final String VISIT_EVENT_IMG = "VISIT_EVENT_IMG";
+ public static final String CAR_EVENT_IMG = "CAR_EVENT_IMG";
+ public static final String DEVICE_EVENT_IMG = "DEVICE_EVENT_IMG";
+ 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 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";
+ public static final String VIRTUAL_CARD_INDEX = "02098469790";
+ public static boolean DEALING_HK_SYNCPRIVILEGE= false;
+ public static boolean DEALING_HK_SYNCDEVICE = 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_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 final String TIMEOUT_WARNING = "TIMEOUT_WARNING";
+ // FTP鏂囦欢鏈嶅姟鍣ㄨ祫婧愯闂湴鍧�
+
+ public static Date getBirthdyByCardNo(String idCard){
+ if(idCard ==null || idCard.length()<14){
+ return null;
+ }
+ Date birthday = null; // 瑙f瀽涓烘棩鏈熷璞�
+ String birthdayString = idCard.substring(6, 14); // 鎴彇韬唤璇佸彿鐨勫墠鍏綅鏁板瓧浣滀负鍑虹敓鏃ユ湡
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
+ try {
+ birthday = dateFormat.parse(birthdayString);
+ } catch (Exception e) {
+// throw new RuntimeException(e);
+ }
+ return birthday;
+}
+ public static Integer getSexByCardNo(String idCard){
+ if(idCard ==null || idCard.length()<17){
+ return null;
+ }
+ String str = idCard.substring(16, 17); // 鎴彇韬唤璇佸彿鐨勫墠鍏綅鏁板瓧浣滀负鍑虹敓鏃ユ湡
+ try {
+ Integer num = Integer.parseInt(str);
+ return (num % 2 !=0) ? 1:2 ;
+ } catch (Exception e) {
+ }
+ return null;
+ }
+
+ /**
+ * 鍒ゆ柇鏄惁涓烘湁鏁堣溅鐗屽彿
+ */
+ public static boolean checkCarNo(String str) {
+// String patt="^[浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹宸濋潚钘忕惣瀹佺Е宸漖\\\\d{5}[A-Z]$";
+// Pattern r = Pattern.compile(patt);
+// Matcher matcher = r.matcher(str);
+// String regex = "^[\u4e00-\u9fa5]{1}[A-Z]{1}[A-HJ-NP-Z]{1}[A-HJ-NP-Z0-9]{4}[D0-9X]$";
+// Pattern pattern = Pattern.compile(regex);
+// Matcher matcher = pattern.matcher(str);
+// boolean isMatcher = matcher.matches();
+// return isMatcher;
+
+
+ if (str.length() >= 7 && str.length() <= 8){
+ Pattern pattern = Pattern.compile("^([浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块A-Z]{1}[a-zA-Z](([ABCDF]((?![IO])[a-zA-Z0-9](?![IO]))[0-9]{4})|([0-9]{5}[ABCDF]))|[浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9鎸傚璀︽腐婢砞{1})$");
+ Matcher m = pattern.matcher(str);
+ if (!m.matches()){
+ return false;
+ }
+ return true;
+ }else {
+ return false;
+ }
+
+ }
+
+ public static String getTuominStr(String s){
+ if(StringUtils.isEmpty(s)){
+ return "";
+ }
+ int l = s.length();
+ if(l <= 2){
+ return s.substring(0,1)+"****";
+ }
+ if(l <= 5){
+ return s.substring(0,2)+"***";
+ }
+ if(l <= 10){
+ return s.substring(0,3)+"***"+s.substring(l-3,l);
+ }
+ if(l <= 11){
+ return s.substring(0,3)+"****"+s.substring(l-4,l);
+ }
+ if(l <= 15){
+ return s.substring(0,3)+"****"+s.substring(l-4,l);
+ }
+ return s.substring(0,5)+"*******"+s.substring(l-6,l);
+}
+
/**
* mq tag
@@ -27,9 +192,46 @@
String order = "order";
String activity = "activity";
}
+
+ /**
+ * 鍗$墖鐘舵�� 0绂佺敤 1鍚敤 2閫�鍗� 3鎸傚け
+ */
+ public interface MemberCard{
+ int forbidden = 0;
+ int normal = 1;
+ int returned = 2;
+ int loss = 3;
+ }
public interface MQ_KEY{
String activity_looknum = "looknum";
String activity_signup = "signup";
+ }
+ public interface DeviceRoleType{
+ int lw = 0;//鍔冲姟璁垮
+ int fk = 1;//鏅�氳瀹�
+ int nb = 2;//鍐呴儴璁垮
+ }
+ public interface VisitStatus{
+ //瀹℃牳鐘舵�� 0寰呭鏍� 1宸叉彁浜RP瀹℃壒 2瀹℃牳閫氳繃 3瀹℃牳涓嶉�氳繃 4鍙栨秷 5涓嬪彂鎴愬姛 6涓嬪彂澶辫触 7宸茬櫥璁� 8宸茬绂� 9宸插け鏁�
+ int waitCheck = 0;
+ int submitCheck = 1;
+ int pass = 2;
+ int noPass = 3;
+ int cancel = 4;
+ int xfSuccess = 5;
+ int xfFail = 6;
+ int signin= 7;
+ int signout = 8;
+ int invalid =9;
+ }
+ public interface EmpowerStatus{
+ //涓�鍗¢�氭巿鏉冧笅鍙戠姸鎬� 0寰呬笅鍙� 1宸蹭笅鍙� 2涓嬪彂鎴愬姛 3宸插彇娑� 4涓嬪彂澶辫触 5浠诲姟涓嬭浇宸茬粨鏉�
+ int wait = 0;
+ int ing = 1;
+ int pass = 2;
+ int cancel = 3;
+ int fail = 4;
+ int downloaded = 5;
}
public interface DOOR_ROLE_TYPE{
int lw = 0;
@@ -39,77 +241,48 @@
public static final String SUCCESS_STR = "SUCCESS" ;
//寮�闂ㄦ椂闂存湁鏁堟湡锛堝垎閽燂級
- public static final String QR_OPENBOOK_VALIDTIME="QR_OPENBOOK_VALIDTIME";
- public static final String QR_OPENROOM_VALIDTIME="QR_OPENROOM_VALIDTIME";
- public static final String ADVANCE_IN="ADVANCE_IN";
public static final String ACCESS_ID="ACCESS_ID";
public static final String BUCKETNAME = "BUCKETNAME";
public static final String OSS = "OSS";
- public static final String COFFEE_ARTICLE = "COFFEE_ARTICLE";
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 NOTICE_TIME = "NOTICE_TIME";
-
- public static final String INITIAL_PASSWORD = "INITIAL_PASSWORD";
- public static final String ACCESS_TOKEN = "ACCESS_TOKEN";
-
- public static final String INITIAL_ROLE = "INITIAL_ROLE";
-
- public static final String PLAT_ADDR="PLAT_ADDR";
- public static final String ADDR_PHONE="ADDR_PHONE";
- public static final String ADDR_NAME="ADDR_NAME";
- public static final String ADDR_INFO="ADDR_INFO";
public static final String SYSTEM ="SYSTEM";
- public static final String DEFAULT_PASSWORD = "DEFAULT_PASSWORD" ;
- public static final String CREATION_ROLE = "CREATION_ROLE";
- public static final String ORG_ROLE = "ORG_ROLE";
-
- public static final String USER_AGREEMENT = "USER_AGREEMENT";
-
- public static final String ABOUT_USER = "ABOUT_USER";
-
- public static final String RECHARGE_MONEY = "RECHARGE_MONEY";
-
- public static final String PLATFORM_ADDRESS = "PLATFORM_ADDRESS";
-
- public static final String PROJECT_HEAD_IMG = "PROJECT_HEAD_IMG";
public static final String COFFEE_BEAN_TASK ="COFFEE_BEAN_TASK";
- public static final String SIGN_BOARD="SIGN_BOARD";//姣忔棩绛惧埌
- public static final String SHARE_INFO="SHARE_INFO";//鍒嗕韩璧勮
- public static final String SHARE_INVITE_BILL="SHARE_INVITE_BILL";//鍒嗕韩閭�璇锋捣鎶�
- public static final String INVITE_USER_LOGIN="INVITE_USER_LOGIN";///閭�璇锋柊鐢ㄦ埛娉ㄥ唽
- public static final String POST_COMMENTS="POST_COMMENTS";//鍙戝竷璇勮
- public static final String COFFEE_MAP_CONSUME="COFFEE_MAP_CONSUME";//鍜栧暋鍦板浘娑堣垂
- // 鏈嶅姟椤圭洰
- public static final String PROJECTS = "PROJECTS";
- //鐢ㄦ埛澶村儚
- public static final String SYSUSER = "SYSUSER";
+ public static final String HOME_IMAGE ="HOME_IMAGE";
- public static final String ROOT_PATH="ROOT_PATH";//鏈湴鏂囦欢涓婁紶鍦板潃閰嶇疆
- public static final String FILE_DIR="FILE_DIR";//鏈湴鏂囦欢璁块棶鍦板潃閰嶇疆
+
+
+
+ public static final String WX_PLATFORM = "WX_PLATFORM";
+ public static final String WX_PLATFORM_ACCESS_TOKEN = "WX_PLATFORM_ACCESS_TOKEN";
+ public static final String WX_PLATFORM_APPID = "WX_PLATFORM_APPID";
+ public static final String WX_PLATFORM_SECRET = "WX_PLATFORM_SECRET";
+ public static final String WX_PLATFORM_AUDIT_VISIT = "WX_PLATFORM_AUDIT_VISIT";
+ public static final String WX_PLATFORM_PREFIX = "WX_PLATFORM_PREFIX";
+
+
public interface RedisKeys {
+ public static final String ERP_TOKEN ="ERP_TOKEN";
+ public static final long EXPIRE_TIME = 7200;
+
+ public static final String INTERNAL_TOKEN ="INTERNAL_TOKEN";
+
public static final String GOODSORDER_KEY = "ordercode_";
public static final String ACTIVITY_SIGN_KEY = "actcode_";
public static final String AFTERSALE_KEY = "salecode_";
}
- /**
- * 浼佷笟鏁版嵁鏉ユ簮 0骞冲彴娉ㄥ唽 1鍚庡彴瀵煎叆
- */
- public interface ORIGIN{
- public static final int platformRegister = 0;
- public static final int backstageImport = 1;
- }
+
public static BigDecimal formatBigdecimal(BigDecimal d) {
if (d == null) {
@@ -160,97 +333,97 @@
return d.longValue();
}
-public interface UserRelObjType{
- int objTypeRoom = 0;
- int objTypeBook = 1;
+
+public interface memberType{
+ int lw_visitor = 0;//鍔冲姟璁垮
+ int visitor = 1;//鏅�氳瀹�
+ int internal = 2;//鍐呴儴浜哄憳
}
-public interface RoomRecordObjType{
- int objTypeRoom = 0;//绠$悊鍛樺紑闂�
- int objTypeBook_in = 1;//鍙備細浜哄憳寮�闂�
- int objTypeBook_out = 2;//璁垮寮�闂�
+
+
+public interface approveStatus{
+ int wait = 0;//寰呭鎵�
+ int auditIng = 1;//瀹℃壒涓�
+ int pass = 2;//瀹℃壒閫氳繃
+ int unPass = 3;//瀹℃壒鏈�氳繃
+ int otherDeal = 4;//浠栦汉宸插鐞�
}
- public static void main(String[] args) {
- String t = URLDecoder.decode("https://lsqw.gtja.com/qwcos/v-index.html#/loginforProperty?corpId=ww4b7aefafeb430e4b&corpId=ww4b7aefafeb430e4b&agentId=1000005&agentId=1000005&fromRoute=&userCode=013561&userCode=&userId=zz&userId=&encryptUserCode=&custQwId=wmIUuSDgAAR8MhtVY8w90EyKltvoK5fA&custCode=&openId=op1wZwD1dKuBQywmWWS5957zUOJI&name=%E8%B9%84%E8%B9%84&headUrl=http%3A%2F%2Fwx.qlogo.cn%2Fmmhead%2FQ3auHgzwzM4QlibSOAvYcvRMdsoyF3Ua7duLOYSJfB3dsGsYxIYonBw%2F0&dbHeadUrl=https%3A%2F%2Ftgf.gtja.com%2Ff%2F%2Fqwoms%2F2022512%2Fqwoms_1652332606613_8.jpg");
- System.out.println(t);
- }
+
/**
- * 鐢ㄦ埛绫诲瀷
+ * 鑾峰彇杞︾墝绫诲瀷淇℃伅
+ *
+ * @param plateNo
+ * @return 杩斿洖null锛岃〃绀鸿溅鐗屼笉鍖归厤
*/
- public enum UserType {
-
- SYSTEM(0, "绯荤粺鐢ㄦ埛", "绠$悊鍛�",Arrays.asList(0)),
- ORG(1, "鏈烘瀯", "鏈烘瀯",Arrays.asList(1)),
- CREATION(2, "鍒涗綔涓績", "鍒涗綔涓績",Arrays.asList(2))
-
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private List<Integer> historyStatus;
- private String noteinfo;// 鎻忚堪
-
- // 鏋勯�犳柟娉�
- UserType(int key, String name, String noteinfo,List<Integer> historyStatus) {
- this.name = name;
- this.key = key;
- this.noteinfo = noteinfo;
- this.historyStatus=historyStatus;
- }
-
- // 鏅�氭柟娉�
- public static String getName(int index) {
- for (UserType c : UserType.values()) {
- if (c.getKey() == index) {
- return c.name;
- }
+ public static VehiclePlateNoEnum getVehiclePlateNo(String plateNo) {
+ for (VehiclePlateNoEnum vehiclePlateNoEnum : VehiclePlateNoEnum.values()) {
+ Matcher matcher = vehiclePlateNoEnum.pattern.matcher(plateNo);
+ if (matcher.find()) {
+ return vehiclePlateNoEnum;
}
- return null;
}
-
- // 鏅�氭柟娉�
- public static String getInfo(int index) {
- for (UserType c : UserType.values()) {
- if (c.getKey() == index) {
- return c.noteinfo;
- }
- }
- return null;
- }
- // 鏅�氭柟娉�
- public static List<Integer> getHistoryStatus(int index) {
- for (UserType c : UserType.values()) {
- if (c.getKey() == index) {
- return c.historyStatus;
- }
- }
- return null;
- }
-
- // get set 鏂规硶
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public int getKey() {
- return key;
- }
- public List<Integer> getHistoryStatus() {
- return historyStatus;
- }
-
- public void setKey(int key) {
- this.key = key;
- }
-
- public String getNoteinfo() {
- return noteinfo;
- }
-
+ return null;
}
+
+
+ public enum VehiclePlateNoEnum {
+ /**
+ * 鍖归厤姘戠敤杞︾墝鍜屼娇棣嗚溅鐗�
+ * 1銆佺涓�浣嶄负姹夊瓙鐪佷唤缂╁啓
+ * 2銆佺浜屼綅涓哄ぇ鍐欏瓧姣嶅煄甯傜紪鐮�
+ * 3銆佸悗闈㈡槸5浣嶄粎鍚瓧姣嶅拰鏁板瓧鐨勭粍鍚�
+ */
+ CIVIL_LICENSE_PLATE_AND_EMBASSY_LICENSE_PLATE(1, "姘戠敤杞︾墝鍜屼娇棣嗚溅鐗�", Pattern.compile("^[浜触鍐�鏅嬭挋杈藉悏榛戞勃鑻忔禉鐨栭椊璧i瞾璞剛婀樼菠妗傜惣宸濊吹浜戞笣钘忛檿鐢橀潚瀹佹柊]{1}[A-Z]{1}[0-9a-zA-Z]{5}$")),
+ /**
+ * 鍖归厤鐗圭杞︾墝(鎸�,璀�,瀛�,棰�,娓�,婢�)
+ */
+ SPECIAL_LICENSE_PLATES(2, "鐗圭杞︾墝", Pattern.compile("^[浜触鍐�鏅嬭挋杈藉悏榛戞勃鑻忔禉鐨栭椊璧i瞾璞剛婀樼菠妗傜惣宸濊吹浜戞笣钘忛檿鐢橀潚瀹佹柊]{1}[A-Z]{1}[0-9a-zA-Z]{4}[鎸傝瀛﹂娓境]{1}$")),
+ /**
+ * 鍖归厤
+ */
+ ARMED_POLICE_CAR(3, "姝﹁杞︾墝", Pattern.compile("^WJ[浜触鍐�鏅嬭挋杈藉悏榛戞勃鑻忔禉鐨栭椊璧i瞾璞剛婀樼菠妗傜惣宸濊吹浜戞笣钘忛檿鐢橀潚瀹佹柊]?[0-9a-zA-Z]{5}$")),
+ /**
+ * 鍖归厤鍐涚墝
+ */
+ MILITARY_CAR(4, "鍐涚敤杞︾墝", Pattern.compile("^[A-Z]{2}[0-9]{5}$")),
+ /**
+ * 灏忓瀷鏂拌兘婧愯溅
+ * 1銆佸尮閰嶆柊鑳芥簮杞﹁締6浣嶈溅鐗�
+ */
+ SMALL_NEW_ENERGY_VEHICLE(5, "灏忓瀷鏂拌兘婧愯溅鐗�", Pattern.compile("^[浜触鍐�鏅嬭挋杈藉悏榛戞勃鑻忔禉鐨栭椊璧i瞾璞剛婀樼菠妗傜惣宸濊吹浜戞笣钘忛檿鐢橀潚瀹佹柊]{1}[A-Z]{1}[A-Z]{1}[0-9a-zA-Z]{5}$")),
+ /**
+ * 澶у瀷鏂拌兘婧愯溅
+ */
+ LARGE_NEW_ENERGY_VEHICLE(6, "澶у瀷鏂拌兘婧愯溅鐗�", Pattern.compile("^[浜触鍐�鏅嬭挋杈藉悏榛戞勃鑻忔禉鐨栭椊璧i瞾璞剛婀樼菠妗傜惣宸濊吹浜戞笣钘忛檿鐢橀潚瀹佹柊]{1}[A-Z]{1}[0-9a-zA-Z]{5}[DF]{1}$"));
+ private int code;
+
+ private String description;
+
+ private Pattern pattern;
+
+ VehiclePlateNoEnum(int code, String description, Pattern pattern) {
+ this.code = code;
+ this.description = description;
+ this.pattern = pattern;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+ }
+
+ public static void main(String[] args) {
+ System.out.println(Constants.getVehiclePlateNo("鐨朅A10991").getDescription());
+
+// System.out.println(Constants.getVehiclePlateNo("婀楤140D17").getDescription());
+// System.out.println(Constants.getVehiclePlateNo("瀹緼P0637").getDescription());
+ }
+
+
/**
* 鏁版嵁鐘舵�佹灇涓�
@@ -260,7 +433,17 @@
/** 鐢ㄦ埛鍚敤绂佺敤鏋氫妇鍊�*/
ENABLE(0,"姝e父"),
- DISABLE(1,"绂佺敤");
+ DISABLE(1,"绂佺敤"),
+ FREEZE(2,"鎷夐粦/鍐荤粨"),
+
+ /** 鐢ㄦ埛绫诲瀷 **/
+ LW_FK(0,"鍔冲姟璁垮"),
+ PT_FK(1,"鏅�氳瀹�"),
+ NB_FK(2,"鍐呴儴浜哄憳"),
+
+ /** 杩涘満绫诲瀷 **/
+ OUT(0,"鍑�"),
+ IN(1,"杩�");
private Integer value;
private String des;
@@ -288,766 +471,26 @@
}
}
-
/**
- * 鍏宠仈瀵硅薄绫诲瀷 0娲诲姩杞挱鍥� 1娲诲姩璇︽儏鍥� 2闂ㄥ簵璇勪环3璁㈠崟璇勪环 4骞冲彴鍟嗗搧杞挱 5鎺㈠簵澶氬浘 6搴楅摵鏂伴矞浜嬪鍥� 7鍟嗗鍥剧墖澶氬浘
+ * 瀵硅薄椹煎嘲灞炴�ц浆涓嬪垝绾�
+ * @param object
+ * @return
+ * @throws JsonProcessingException
*/
- public enum MultiFile{
- ACTIVITY_ROTATION(0, "娲诲姩杞挱鍥�", "娲诲姩杞挱鍥�"),
- ACTIVITY_DETAIL(1, "娲诲姩璇︽儏鍥�", "娲诲姩璇︽儏鍥�"),
- SHOP_APPRAISE(2, "闂ㄥ簵璇勪环", "闂ㄥ簵璇勪环"),
- ORDER_APPRAISE(3, "璁㈠崟璇勪环", "璁㈠崟璇勪环"),
- PLATFORM_GOOD_ROTATION(4, "骞冲彴鍟嗗搧杞挱", "骞冲彴鍟嗗搧杞挱"),
- TANDIAN_PICTURE(5, "鎺㈠簵澶氬浘", "鎺㈠簵澶氬浘"),
- SHOP_HOT_PICTURE(6, "搴楅摵鏂伴矞浜嬪鍥�", "搴楅摵鏂伴矞浜嬪鍥�"),
- SHOP_PICTURE(7, "鍟嗗鍥剧墖澶氬浘", "鍟嗗鍥剧墖澶氬浘"),
- AFTERSALE_APPLY(8, "鐢宠鍞悗琛ュ厖璇存槑闄勪欢", "鐢宠鍞悗琛ュ厖璇存槑闄勪欢"),
- AFTERSALE_KD(9, "鐢宠鍞悗閭瘎璇存槑闄勪欢", "鐢宠鍞悗閭瘎璇存槑闄勪欢"),
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private String noteinfo;// 鎻忚堪
-
- // 鏋勯�犳柟娉�
- MultiFile(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 (MultiFile c : MultiFile.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 String toUnderlineJSONString(Object object) throws JsonProcessingException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ String reqJson = mapper.writeValueAsString(object);
+ return reqJson;
}
-
- /**
- * 璁㈠崟绠$悊
- * 鐘舵�� 0鐢宠涓� 1宸叉敮浠� 2宸插彇娑�
- */
- public enum ActivitySignupStatus{
- APPLY_ING(0, "鐢宠涓�", "鐢宠涓�"),
- PAY_DONE(1, "宸叉敮浠�", "宸叉敮浠�"),
- CANCEL(2, "宸插彇娑�", "宸插彇娑�"),
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private String noteinfo;// 鎻忚堪
-
- // 鏋勯�犳柟娉�
- ActivitySignupStatus(int key, String name, String noteinfo) {
- this.name = name;
- this.key = key;
- this.noteinfo = noteinfo;
- }
-
- // 鏅�氭柟娉�
- public static String getName(int index) {
- for (ActivitySignupStatus c : ActivitySignupStatus.values()) {
- if (c.getKey() == index) {
- return c.name;
- }
- }
- return null;
- }
-
- // 鏅�氭柟娉�
- public static String getInfo(int index) {
- for (ActivitySignupStatus c : ActivitySignupStatus.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 <T> T toSnakeObject(String json, Class<T> clazz) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
+ T reqJson = mapper.readValue(json, clazz);
+ return reqJson;
}
- /**
- * 鍞悗鐘舵��
- * 鐘舵�� 0寰呭鐞� 1寰呴偖瀵� 2宸插瘎鍑� 3鍟嗗宸查��娆� 4鍟嗗宸插彂璐�5鍞悗宸插畬鎴�6鍟嗗鎷掔粷 7宸插彇娑�
- */
- public enum AftersaleStatus{
- APPLY_ING(0, "寰呭鐞�", "寰呭鐞�"),
- WAIT_SEND(1, "寰呴偖瀵�", "寰呴偖瀵�"),
- SENDED(2, "瀹㈡埛宸插瘎鍑�", "瀹㈡埛宸插瘎鍑�"),
- REFUND(3, "宸查��娆�", "宸查��娆�"),
- SHOP_SENDED(4, "骞冲彴宸插彂璐�", "骞冲彴宸插彂璐�"),
- DONE(5, "鍞悗宸插畬鎴�", "鍞悗宸插畬鎴�"),
- SHOP_REFUSE(6, "宸叉嫆缁�", "骞冲彴鎷掔粷"),
- CANCEL(7, "宸插彇娑�", "瀹㈡埛鍙栨秷鍞悗"),
-
-
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private String noteinfo;// 鎻忚堪
-
- // 鏋勯�犳柟娉�
- AftersaleStatus(int key, String name, String noteinfo) {
- this.name = name;
- this.key = key;
- this.noteinfo = noteinfo;
- }
-
- // 鏅�氭柟娉�
- public static String getName(int index) {
- for (AftersaleStatus c : AftersaleStatus.values()) {
- if (c.getKey() == index) {
- return c.name;
- }
- }
- return null;
- }
-
- // 鏅�氭柟娉�
- public static String getInfo(int index) {
- for (AftersaleStatus c : AftersaleStatus.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;
- }
-
- }
- /**
- * 鍞悗绫诲瀷
- * 鍞悗绫诲瀷 0閫�娆� 1閫�璐ч��娆� 2鎹㈣揣
- */
- public enum AftersaleType{
- TK(0, "閫�娆�", "閫�娆�"),
- THTK(1, "閫�璐ч��娆�", "閫�璐ч��娆�"),
- HH(2, "鎹㈣揣", "鎹㈣揣"),
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private String noteinfo;// 鎻忚堪
-
- // 鏋勯�犳柟娉�
- AftersaleType(int key, String name, String noteinfo) {
- this.name = name;
- this.key = key;
- this.noteinfo = noteinfo;
- }
-
- // 鏅�氭柟娉�
- public static String getName(int index) {
- for (AftersaleType c : AftersaleType.values()) {
- if (c.getKey() == index) {
- return c.name;
- }
- }
- return null;
- }
-
- // 鏅�氭柟娉�
- public static String getInfo(int index) {
- for (AftersaleType c : AftersaleType.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;
- }
-
- }
- /**
- * 璁㈠崟绠$悊
- * 鐘舵�� 0寰呮敮浠� 1寰呭彂璐� 2寰呮敹璐� 3浜ゆ槗瀹屾垚 4宸插叧闂� 5閮ㄥ垎鍙戣揣
- */
- public enum OrderStatus{
- WAIT_PAY(0, "寰呮敮浠�", "寰呮敮浠�"),
- PAY_DONE(1, "寰呭彂璐�", "宸叉敮浠樹唬鍙戣揣"),
- WAIT_RECEIVE(2, "寰呮敹璐�", "宸插彂璐у緟鏀惰揣"),
- DONE(3, "浜ゆ槗瀹屾垚", "浜ゆ槗瀹屾垚"),
- CLOSE(4, "宸插叧闂�", "宸插叧闂�"),
- PART_DONE(5, "閮ㄥ垎鍙戣揣", "閮ㄥ垎鍙戣揣"),
-
-
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private String noteinfo;// 鎻忚堪
-
- // 鏋勯�犳柟娉�
- OrderStatus(int key, String name, String noteinfo) {
- this.name = name;
- this.key = key;
- this.noteinfo = noteinfo;
- }
-
- // 鏅�氭柟娉�
- public static String getName(int index) {
- for (OrderStatus c : OrderStatus.values()) {
- if (c.getKey() == index) {
- return c.name;
- }
- }
- return null;
- }
-
- // 鏅�氭柟娉�
- public static String getInfo(int index) {
- for (OrderStatus c : OrderStatus.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;
- }
-
- }
-
-
- /**
- * 璁㈠崟绫诲瀷
- * 璁㈠崟绫诲瀷 0骞冲彴鍟嗗煄 1鍜栬眴鍟嗗煄 2鍜栧暋璁″垝缂栫爜
- */
- public enum OrderType{
- ADMINPLAT(0, "骞冲彴鍟嗗煄 ", "骞冲彴鍟嗗煄 "),
- KADOUPLAT(1, "鍜栬眴鍟嗗煄", "鍜栬眴鍟嗗煄"),
- COFFERPLAN(2, "2鍜栧暋璁″垝缂栫爜", "2鍜栧暋璁″垝缂栫爜")
-
-
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private String noteinfo;// 鎻忚堪
-
- // 鏋勯�犳柟娉�
- OrderType(int key, String name, String noteinfo) {
- this.name = name;
- this.key = key;
- this.noteinfo = noteinfo;
- }
-
- // 鏅�氭柟娉�
- public static String getName(int index) {
- for (OrderType c : OrderType.values()) {
- if (c.getKey() == index) {
- return c.name;
- }
- }
- return null;
- }
-
- // 鏅�氭柟娉�
- public static String getInfo(int index) {
- for (OrderType c : OrderType.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 enum ShareType{
-// 0娲诲姩1鎺㈠簵2鍜ㄨ3搴楅摵 4鍟嗗搧5鍒嗕韩閭�璇锋捣鎶�
- SHARE_ACTIVITY_ACTIVITY(0,"娲诲姩","娲诲姩"),
- SHARE_ACTIVITY_VISITSHOP(1,"鎺㈠簵","鍜ㄨ"),
- SHARE_ACTIVITY_NEW(2,"鍜ㄨ","鍜ㄨ"),
- SHARE_SHOP(3,"搴楅摵","搴楅摵" ),
- SHARE_GOODS(4,"鍟嗗搧","鍟嗗搧"),
- SHARE_POSTER(5,"鍒嗕韩閭�璇锋捣鎶�","鍒嗕韩閭�璇锋捣鎶�")
-
- ;
- private Integer key;
-
- private String name;
-
- private String des;
-
- ShareType(Integer key, String name, String des) {
- this.key = key;
- this.name = name;
- this.des = des;
- }
-
- public Integer getKey() {
- return key;
- }
-
- public void setKey(Integer key) {
- this.key = key;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDes() {
- return des;
- }
-
- public void setDes(String des) {
- this.des = des;
- }
- }
-
- /**
- * 鍜栬眴浠诲姟
- */
- public enum CoffeeBeanTask{
-
- SIGN_BOARD(1,"SIGN_BOARD","姣忔棩绛惧埌"),
- SHARE_INFO(6,"SHARE_INFO","鍒嗕韩璧勮"),
- SHARE_INVITE_BILL(2,"SHARE_INVITE_BILL","鍒嗕韩閭�璇锋捣鎶�"),
- INVITE_USER_LOGIN(3,"INVITE_USER_LOGIN","閭�璇锋柊鐢ㄦ埛娉ㄥ唽"),
- EXCHANGE_GOODS(4,"INVITE_USER_LOGIN","鍏戞崲鍟嗗搧"),
- EXCHANGE_COUPON(5,"INVITE_USER_LOGIN","鍏戞崲浼樻儬鍒�"),
- POST_COMMENTS(7,"POST_COMMENTS","鍙戝竷璇勮"),
- COFFEE_MAP_CONSUME(8,"COFFEE_MAP_CONSUME","鍜栧暋鍦板浘娑堣垂"),
- ;
-
- // 0骞冲彴娉ㄥ唽 1绛惧埌 2鍒嗕韩閭�璇� 3閭�璇锋柊鐢ㄦ埛 4鍏戞崲鍟嗗搧 5鍏戞崲浼樻儬鍒�
- // 鎴愬憳鍙橀噺
- private Integer key;
-
- private String name;
-
- private String des;// 鎻忚堪
-
- CoffeeBeanTask(Integer key, String name, String des) {
- this.key = key;
- this.name = name;
- this.des = des;
- }
-
- public Integer getKey() {
- return key;
- }
-
- public void setKey(Integer key) {
- this.key = key;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDes() {
- return des;
- }
-
- public void setDes(String des) {
- this.des = des;
- }
- }
-
-
-
- public enum NoticeType{
-
-// 0璁㈠崟閫氱煡 1绯荤粺娑堟伅 2浜掑姩娑堟伅 3浼樻儬鍒告彁閱� 4瀹樻柟瀹㈡湇 5娲诲姩鎺ㄨ崘 6鎴戠殑鍏虫敞
-
- NOTICE_ORDER(0,"0璁㈠崟閫氱煡","0璁㈠崟閫氱煡"),
- NOTICE_SYSTEM(1,"1绯荤粺娑堟伅","1绯荤粺娑堟伅"),
- NOTICE_INTERACTION(2,"浜掑姩娑堟伅","浜掑姩娑堟伅"),
- NOTICE_MEMBER_COUPON(3,"浼樻儬鍒告彁閱�","浼樻儬鍒告彁閱�"),
- NOTICE_ACTIVITY(5,"娲诲姩鎺ㄨ崘","娲诲姩鎺ㄨ崘"),
- NOTICE_MEMBER_FOLLOW(6,"鎴戠殑鍏虫敞","鎴戠殑鍏虫敞")
- ;
-
- private Integer key;
-
- private String type;
-
- private String content;
-
- NoticeType(Integer key, String type, String content) {
- this.key = key;
- this.type = type;
- this.content = content;
- }
- }
-
- /**
- * 绉垎绫诲瀷
- */
- public enum IntegralObjType {
- REGISTER(0, "骞冲彴娉ㄥ唽", "骞冲彴娉ㄥ唽",0),
- SIGNIN(1, "绛惧埌", "绛惧埌",0),
- SHARE(2, "鍒嗕韩閭�璇�", "鍒嗕韩閭�璇�",0),
- INVITENEWUSER(3, "閭�璇锋柊鐢ㄦ埛", "閭�璇锋柊鐢ㄦ埛",0),
- EXCHANGEGOODS(4, "鍏戞崲鍟嗗搧", "鍏戞崲鍟嗗搧",1),
- EXCHANGECOUPON(5, "鍏戞崲浼樻儬鍒�", "鍏戞崲浼樻儬鍒�",1),
- SHARE_INFO(6,"鍒嗕韩璧勮","鍒嗕韩璧勮",0),
- POST_COMMENTS(7,"鍙戝竷璇勮","鍙戝竷璇勮",0),
- COFFEE_MAP_CONSUME(8,"鍜栧暋鍦板浘娑堣垂","鍜栧暋鍦板浘娑堣垂",0),
- SHOP_ORDER(9,"浣欓鎶垫墸鍟嗗搧","浣欓鎶垫墸鍟嗗搧",1),
- AFTERSALE_BACK(10,"鍞悗閫�娆�","鍞悗閫�娆�",1),
- EXCHANGE_CARD(11,"鍗″厖鍊�","鍗″厖鍊�",0),
- SYSTEM_RECHARGE(12,"骞冲彴鍏呭��","骞冲彴鍏呭��",0),
- SYSTEM_DEDUCT(13,"骞冲彴鎵f","骞冲彴鎵f",0),
- SHOP_ORDER_CANCEL(14,"浣欓鎶垫墸鍟嗗搧閫�杩�","浣欓鎶垫墸鍟嗗搧閫�杩�",0)
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private String noteinfo;// 鎻忚堪
- private Integer addTitle; // 0 = 鏂板锛�1 = 涓嶆柊澧�
-
- // 鏋勯�犳柟娉�
- IntegralObjType(int key, String name, String noteinfo ,Integer addTitle) {
- this.name = name;
- this.key = key;
- this.noteinfo = noteinfo;
- this.addTitle = addTitle;
- }
-
- // 鏅�氭柟娉�
- public static String getName(int index) {
- for (IntegralObjType c : IntegralObjType.values()) {
- if (c.getKey() == index) {
- return c.name;
- }
- }
- return null;
- }
-
- // 鏅�氭柟娉�
- public static String getInfo(int index) {
- for (IntegralObjType c : IntegralObjType.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 int getAddTitle() {
- return this.addTitle;
- }
-
- public void setAddTitle(Integer addTitle) {
- this.addTitle = addTitle;
- }
-
-
- }
-
-
- /**
- * 鏍囩绫诲瀷
- */
- public enum LabelsType {
- GOODSTYPE(0, "鍟嗗搧鍒嗙被", "鍟嗗搧鍒嗙被"),
- GOODSBRAND(1, "鍟嗗搧鍝佺墝", "鍟嗗搧鍝佺墝"),
- BUSNESSLABEL(2, "鍟嗗鏍囩", "鍟嗗鏍囩"),
- EXPRESSDELIVERY(3, "蹇��", "蹇��"),
- RETURNOPTIONS(4, "閫�璐ч�夐」", "閫�璐ч�夐」"),
- EXCHANGEOPTIONS(5, "鎹㈣揣閫夐」", "鎹㈣揣閫夐」"),
- REFUNDOPTIONS(6, "閫�娆鹃�夐」", "閫�娆鹃�夐」"),
- CANCELORDEROPTIONS(7, "鍙栨秷璁㈠崟閫夐」", "鍙栨秷璁㈠崟閫夐」"),
- COFFERBEANTYPE(8, "鍜栧暋鐧剧鍒嗙被", "鍜栧暋鐧剧鍒嗙被"),
- INFOTYPE(9, "鍜ㄨ鍒嗙被", "鍜ㄨ鍒嗙被"),
- ACTIVITYMATCHTYPE(10, "娲诲姩璧涗簨鍒嗙被", "娲诲姩璧涗簨鍒嗙被"),
- DARENTANDIANTYPE(11, "杈句汉鎺㈠簵鍒嗙被", "杈句汉鎺㈠簵鍒嗙被"),
- HOMEZHUANQU(12, "棣栭〉涓撳尯", "棣栭〉涓撳尯"),
-
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private String noteinfo;// 鎻忚堪
-
- // 鏋勯�犳柟娉�
- LabelsType(int key, String name, String noteinfo) {
- this.name = name;
- this.key = key;
- this.noteinfo = noteinfo;
- }
-
- // 鏅�氭柟娉�
- public static String getName(int index) {
- for (LabelsType c : LabelsType.values()) {
- if (c.getKey() == index) {
- return c.name;
- }
- }
- return null;
- }
-
- // 鏅�氭柟娉�
- public static String getInfo(int index) {
- for (LabelsType c : LabelsType.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 enum ActivityType {
-
- SHOPACTIVITY(0, "鍟嗗娲诲姩", "鍟嗗娲诲姩"),
- PLATACTIVITY(1, "骞冲彴娲诲姩", "骞冲彴娲诲姩"),
- TANDIAN(2, "鎺㈠簵", "鎺㈠簵"),
- CONSULT(3, "璧勮", "璧勮"),
-
- ;
- // 鎴愬憳鍙橀噺
- private String name;
- private int key;
- private String noteinfo;// 鎻忚堪
-
- // 鏋勯�犳柟娉�
- ActivityType(int key, String name, String noteinfo) {
- this.name = name;
- this.key = key;
- this.noteinfo = noteinfo;
- }
-
- // 鏅�氭柟娉�
- public static String getName(int index) {
- for (ActivityType c : ActivityType.values()) {
- if (c.getKey() == index) {
- return c.name;
- }
- }
- return null;
- }
-
- // 鏅�氭柟娉�
- public static String getInfo(int index) {
- for (ActivityType c : ActivityType.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;
- }
-
- }
}
--
Gitblit v1.9.3