|  |  |  | 
|---|
|  |  |  | import java.math.BigDecimal; | 
|---|
|  |  |  | import java.net.URLDecoder; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.Arrays; | 
|---|
|  |  |  | import  java.util.Date; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Random; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.regex.Matcher; | 
|---|
|  |  |  | 
|---|
|  |  |  | public class Constants { | 
|---|
|  |  |  | public static final String HEADER_USER_TOKEN = "dm_user_token"; | 
|---|
|  |  |  | public static final String REDIS_TOKEN_KEY = "token_"; | 
|---|
|  |  |  | public static final String REDIS_HK_TOKEN_KEY = "hk_token_"; | 
|---|
|  |  |  | public static final String[]  ALL_SPELL_LIST_FIRST = new String[]{"A", "B", "C", "D", "E", "F", "G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; | 
|---|
|  |  |  | public static final int ZERO = 0 ; | 
|---|
|  |  |  | public static final int ONE = 1 ; | 
|---|
|  |  |  | 
|---|
|  |  |  | //答题主题 | 
|---|
|  |  |  | public static final String LW_THEME = "LW_THEME"; | 
|---|
|  |  |  | public static final String THEME = "THEME"; | 
|---|
|  |  |  | //上下班 间隔时间 | 
|---|
|  |  |  | public static final String WORK_START = "WORK_START"; | 
|---|
|  |  |  | public static final String WORK_END = "WORK_END"; | 
|---|
|  |  |  | public static final String INTERVAL = "INTERVAL"; | 
|---|
|  |  |  | public static final String USE_CAR_TAKE_CARE = "USE_CAR_TAKE_CARE"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 劳务来访配置 | 
|---|
|  |  |  | public static final String LABOR_CONFIG = "LABOR_CONFIG"; | 
|---|
|  |  |  | 
|---|
|  |  |  | public static final String HIDDEN_DANGER_FILE = "HIDDEN_DANGER_FILE"; | 
|---|
|  |  |  | public static final String LOG_DEL_DAYS_LIMIT ="LOG_DEL_DAYS_LIMIT" ; | 
|---|
|  |  |  | public static final String HK_LOG_DEL_DAYS_LIMIT ="HK_LOG_DEL_DAYS_LIMIT" ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static final String HK_NGINX_URL = "HK_NGINX_URL"; | 
|---|
|  |  |  | 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_EMPOWER_DETAIL = false; | 
|---|
|  |  |  | public static  boolean DEALING_HK_EMPOWER_RESULT = false; | 
|---|
|  |  |  | public static  boolean DEALING_HK_PARKBOOK = false; | 
|---|
|  |  |  | public static final String SMS ="SMS" ; | 
|---|
|  |  |  | public static final String SMS_COMNAME = "SMS_COMNAME"; | 
|---|
|  |  |  | public static final String SMS_IP ="SMS_IP" ; | 
|---|
|  |  |  | public static final String SMS_PORT ="SMS_PORT" ; | 
|---|
|  |  |  | public static final String SMS_APPKEY="SMS_APPKEY"; | 
|---|
|  |  |  | public static final String SMS_APPSECRET ="SMS_APPSERECT" ; | 
|---|
|  |  |  | // ERP接口配置 | 
|---|
|  |  |  | public static final String ERP_CONFIG = "ERP_CONFIG"; | 
|---|
|  |  |  | // ERP ACCESS_KEY | 
|---|
|  |  |  | 
|---|
|  |  |  | // 超时预警配置 | 
|---|
|  |  |  | public static final String TIMEOUT_WARNING = "TIMEOUT_WARNING"; | 
|---|
|  |  |  | // FTP文件服务器资源访问地址 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static String getRandom6Num( ) { | 
|---|
|  |  |  | Random random = new Random(); | 
|---|
|  |  |  | StringBuilder sb = new StringBuilder(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (int i = 0; i < 6; i++) { | 
|---|
|  |  |  | int digit = random.nextInt(10); | 
|---|
|  |  |  | sb.append(digit); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return sb.toString(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface DATAPERMISSION_TYPE{ | 
|---|
|  |  |  | public static final  int all = 0; | 
|---|
|  |  |  | public static final  int departAndChild = 1; | 
|---|
|  |  |  | 
|---|
|  |  |  | int signout =  8; | 
|---|
|  |  |  | int invalid =9; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface EmpowerStatus{ | 
|---|
|  |  |  | //一卡通授权下发状态 0待下发 1已下发 2下发成功   3已取消 4下发失败 5任务下载已结束 | 
|---|
|  |  |  | int wait = 0; | 
|---|
|  |  |  | 
|---|
|  |  |  | return  d; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static boolean equalsObject(Object a, Object b) { | 
|---|
|  |  |  | if (a == null && b == null) { | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (a != null){ | 
|---|
|  |  |  | return a.equals(b); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static boolean equalsInteger(Integer a, Integer b) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface  approveObjectType{ | 
|---|
|  |  |  | int unConstructionVisit = 0;//非施工人员访客申请 | 
|---|
|  |  |  | int constructionVisit = 1;//工人员访客申请 | 
|---|
|  |  |  | int visitReporting = 2;//访客报备 | 
|---|
|  |  |  | int cityUseCar = 3;//市内用车 | 
|---|
|  |  |  | int unCityUseCar = 4;//市外用车 | 
|---|
|  |  |  | int logisticsCarUse = 5;//物流车预约 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static Integer  approveTypeToNoticeType(Integer approveType){ | 
|---|
|  |  |  | if(Constants.equalsInteger(approveType,Constants.approveObjectType.unConstructionVisit) | 
|---|
|  |  |  | ||Constants.equalsInteger(approveType,Constants.approveObjectType.constructionVisit)){ | 
|---|
|  |  |  | return Constants.noticesObjectType.visit; | 
|---|
|  |  |  | }else if(Constants.equalsInteger(approveType,Constants.approveObjectType.visitReporting)){ | 
|---|
|  |  |  | return Constants.noticesObjectType.visitReporting; | 
|---|
|  |  |  | }else if(Constants.equalsInteger(approveType,Constants.approveObjectType.cityUseCar) | 
|---|
|  |  |  | ||Constants.equalsInteger(approveType,Constants.approveObjectType.unCityUseCar)){ | 
|---|
|  |  |  | return Constants.noticesObjectType.useCar; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | return Constants.noticesObjectType.system; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface  noticesObjectType{ | 
|---|
|  |  |  | int visit = 0;//访客申请 | 
|---|
|  |  |  | int visitReporting = 1;//访客报备 | 
|---|
|  |  |  | int useCar = 2;//用车申请 | 
|---|
|  |  |  | int dangerDeal = 3;//隐患处理 | 
|---|
|  |  |  | int logisticsCarUse = 4;//物流车审批 | 
|---|
|  |  |  | int system = 5;//系统消息 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface  approveStatus{ | 
|---|
|  |  |  | int wait = 0;//待审批 | 
|---|
|  |  |  | int auditIng = 1;//审批中 | 
|---|
|  |  |  | int pass = 2;//审批通过 | 
|---|
|  |  |  | int unPass = 3;//审批未通过 | 
|---|
|  |  |  | int otherDeal = 4;//他人已处理 | 
|---|
|  |  |  | int cancel = 4;//已取消 | 
|---|
|  |  |  | int otherDeal = 5;//他人已处理 | 
|---|
|  |  |  | int otherUnPass = 6;//他人拒绝 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | return reqJson; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public  enum NoticeType { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ZERO(0, "待审核","","","待审核","待处理","处理中"), | 
|---|