|  |  | 
 |  |  | 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; | 
 |  |  | 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; | 
 |  |  | import java.util.regex.Pattern; | 
 |  |  |  | 
 |  |  | 
 |  |  |     //答题主题 | 
 |  |  |     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 VIRTUAL_CARD_INDEX = "02098469790"; | 
 |  |  |     public static final String RETRY_CONNECT_NUM ="RETRY_CONNECT_NUM" ; | 
 |  |  |     public static final String CLOUD_SERVICE_URL_INDEX = "/cloudService"; | 
 |  |  |     public static final String VISIT_TIPS = "VISIT_TIPS"; | 
 |  |  |     public static final String VISIT_GUIDEMAP = "VISIT_GUIDEMAP"; | 
 |  |  |     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  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; | 
 |  |  |         public static final  int departAndLeaf = 2; | 
 |  |  |         public static final  int depart = 3; | 
 |  |  |         public static final  int custom = 4; | 
 |  |  |         public static final  int self = -1; | 
 |  |  |     } | 
 |  |  |     public static  Date  getBirthdyByCardNo(String idCard){ | 
 |  |  |     if(idCard ==null || idCard.length()<14){ | 
 |  |  |         return null; | 
 |  |  | 
 |  |  |         return s.substring(0,5)+"*******"+s.substring(l-6,l); | 
 |  |  | } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 切分逗号拼接的整形集合 | 
 |  |  |      * @param memberIds | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |  | 
 |  |  |     public static List<Integer> getIntegerListByStrs(String memberIds) { | 
 |  |  |         List<Integer> idsList = null; | 
 |  |  |         try { | 
 |  |  |             String[] strs = memberIds.split(","); | 
 |  |  |             for(String id :strs){ | 
 |  |  |                 if(idsList == null){ | 
 |  |  |                     idsList = new ArrayList<>(); | 
 |  |  |                 } | 
 |  |  |                 idsList.add(Integer.parseInt(id)); | 
 |  |  |             } | 
 |  |  |         }catch (Exception e){ | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return idsList; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * mq tag | 
 |  |  | 
 |  |  |          int signout =  8; | 
 |  |  |          int invalid =9; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public interface multifileObjType{ | 
 |  |  |         //0隐患现场情况 1隐患处理前情况 2隐患处理后情况 3隐患退回说明 | 
 |  |  |         int zero = 0; | 
 |  |  |         int one = 1; | 
 |  |  |         int two = 2; | 
 |  |  |         int three = 3; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     public interface EmpowerStatus{ | 
 |  |  |         //一卡通授权下发状态 0待下发 1已下发 2下发成功   3已取消 4下发失败 5任务下载已结束 | 
 |  |  |          int wait = 0; | 
 |  |  | 
 |  |  |  | 
 |  |  |     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 RESOURCE_PATH = "FTP_RESOURCE_PATH"; | 
 |  |  |     //发送会议开始  定时提前多少分钟发送 | 
 |  |  |  | 
 |  |  |     public static final String SYSTEM ="SYSTEM"; | 
 |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     public interface RedisKeys { | 
 |  |  |         public static final String IMPORTING_MEMBER ="IMPORTING_MEMBER"; | 
 |  |  |         public static final String ERP_TOKEN ="ERP_TOKEN"; | 
 |  |  |         public static final long EXPIRE_TIME = 7200; | 
 |  |  |  | 
 |  |  | 
 |  |  |         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 interface  approveStatus{ | 
 |  |  |     int wait = 0;//待审批 | 
 |  |  |     int auditIng = 1;//审批中 | 
 |  |  |     int pass = 2;//审批通过 | 
 |  |  |     int unPass = 3;//审批未通过 | 
 |  |  |     int otherDeal = 4;//他人已处理 | 
 |  |  |     int cancel = 5;//已取消 | 
 |  |  |     int otherUnPass = 6;//他人拒绝 | 
 |  |  | } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 员工信息维护操作历史类型 0解冻 1冻结 2拉黑 3恢复 4设为拜访人 5取消拜访人 6设为高级审批人 7取消高级审批人 8手动离场 9删除 10更新 11授权门禁权限 12离职 13恢复在职 | 
 |  |  |      */ | 
 |  |  |     public  enum UserActionType { | 
 |  |  |         CANCEL_FREEZE(0, "解冻","由【${param1}】于【${param2}】,进行【解冻】" ), | 
 |  |  |         FREEZE(1, "冻结","由【${param1}】于【${param2}】,进行【冻结】" ), | 
 |  |  |         BLACKLIST(2, "拉黑","由【${param1}】于【${param2}】,进行【拉黑】"), | 
 |  |  |         CANCEL_BLACKLIST(3, "恢复","由【${param1}】于【${param2}】,进行【移出黑名单】" ), | 
 |  |  |         CANVISIT(4, "设为拜访人","由【${param1}】于【${param2}】,进行【设为拜访人】" ), | 
 |  |  |         CANCEL_VISIT(5, "取消拜访人","由【${param1}】于【${param2}】,进行【取消拜访人】" ), | 
 |  |  |         //续保通知 | 
 |  |  |         HIGHCHECKOR(6, "设为高级审批人","由【${param1}】于【${param2}】,进行【设为高级审批人】" ), | 
 |  |  |         CANCEL_HIGHCHECKOR(7, "取消高级审批人","由【${param1}】于【${param2}】,进行【取消高级审批人】" ), | 
 |  |  |         LEVEL(8, "手动离场","由【${param1}】于【${param2}】,进行【手动离场】" ), | 
 |  |  |         DELETE(9, "删除","由【${param1}】于【${param2}】,进行【删除】" ), | 
 |  |  |         EDIT(10, "更新","由【${param1}】于【${param2}】,进行【更新】" ), | 
 |  |  |         AUTH_ROLE(11, "授权门禁权限","由【${param1}】于【${param2}】,进行【授权门禁权限】" ), | 
 |  |  |         WORK_OFF(12, "离职","由【${param1}】于【${param2}】,进行【离职】操作" ), | 
 |  |  |         WORK_ON(13, "在职","由【${param1}】于【${param2}】,进行【在职】操作" ), | 
 |  |  |         IMPORT_TRAIMETIME(14, "导入培训有效","由【${param1}】于【${param2}】,进行【导入培训有效】操作" ), | 
 |  |  |         BE_HEAD(15, "设为主管","由【${param1}】于【${param2}】,进行【设为主管】操作" ), | 
 |  |  |         NOT_HEAD(16, "取消主管","由【${param1}】于【${param2}】,进行【取消主管】操作" ), | 
 |  |  |         ; | 
 |  |  |  | 
 |  |  |         // 成员变量 | 
 |  |  |         private int key; | 
 |  |  |         private String name; | 
 |  |  |         private String info; | 
 |  |  |  | 
 |  |  |         // 构造方法 | 
 |  |  |         UserActionType(int key, String name,String info ) { | 
 |  |  |             this.key = key; | 
 |  |  |             this.info = info; | 
 |  |  |             this.name = name; | 
 |  |  |         } | 
 |  |  |         public static String getName(int index) { | 
 |  |  |             for (UserActionType c : UserActionType.values()) { | 
 |  |  |                 if (c.getKey() == index) { | 
 |  |  |                     return c.name; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             return null; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public int getKey() { | 
 |  |  |             return key; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public void setKey(int key) { | 
 |  |  |             this.key = key; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public String getName() { | 
 |  |  |             return name; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public void setName(String name) { | 
 |  |  |             this.name = name; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public String getInfo() { | 
 |  |  |             return info; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public void setInfo(String info) { | 
 |  |  |             this.info = info; | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |     /** | 
 |  |  |      * 关联对象类型 | 
 |  |  |      关联对象类型 0企业营业执照 1理赔报案事故视频或图片 2理赔员工关系证明材料 3理赔门诊资料 4理赔住院资料 5理赔伤残资料 6理赔赔付结案材料 7企业身份证号 8保单申请表PDF 9签署后保单申请表PDF 10企业签章 11最终报单 | 
 |  |  |      */ | 
 |  |  |     public  enum MultiFile{ | 
 |  |  |         HIDDEN_DANGER_SUBMIT(0, "隐患随手拍提报", "隐患随手拍提报"), | 
 |  |  |         HIDDEN_DANGER_DEAL_BEFORE(1, "隐患随手拍处理前", "隐患随手拍处理前"), | 
 |  |  |         HIDDEN_DANGER_DEAL_AFTER(2, "隐患随手拍处理后 ", "隐患随手拍处理后 "), | 
 |  |  |         ; | 
 |  |  |         // 成员变量 | 
 |  |  |         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; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |     /** | 
 |  |  |      * 审批模拟类型 0非施工人员访客申请 1非施工人员访客申请 2访客报备 3公车市内用车 4公车室外用车 5市公司物流车预约 | 
 |  |  |      */ | 
 |  |  |     public  enum ApproveTmplType{ | 
 |  |  |         NOT_SG_VISIT(0, "非施工人员访客申请", "非施工人员访客申请"), | 
 |  |  |         SG_VISIT(1, "施工人员访客申请", "施工人员访客申请"), | 
 |  |  |         CAR_VISIT(2, "访客报备 ", "访客报备 "), | 
 |  |  |         IN_CITY_CAR_USE(3, "公车市内用车 ", "公车市内用车 "), | 
 |  |  |         OUT_CITY_CAR_USE(4, "公车室外用车 ", "公车室外用车 "), | 
 |  |  |         CITY_WLC_BOOK(5, "市公司物流车预约 ", "5市公司物流车预约 "), | 
 |  |  |         ; | 
 |  |  |         // 成员变量 | 
 |  |  |         private String name; | 
 |  |  |         private int key; | 
 |  |  |         private String noteinfo;// 描述 | 
 |  |  |  | 
 |  |  |         // 构造方法 | 
 |  |  |         ApproveTmplType(int key, String name, String noteinfo) { | 
 |  |  |             this.name = name; | 
 |  |  |             this.key = key; | 
 |  |  |             this.noteinfo = noteinfo; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         // 普通方法 | 
 |  |  |         public static String getName(int index) { | 
 |  |  |             for (ApproveTmplType c : ApproveTmplType.values()) { | 
 |  |  |                 if (c.getKey() == index) { | 
 |  |  |                     return c.name; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             return null; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         // 普通方法 | 
 |  |  |         public static String getInfo(int index) { | 
 |  |  |             for (ApproveTmplType c : ApproveTmplType.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 NoticeObjectType { | 
 |  |  |         MEETING_BOOK_SUCCESS(0, "会与预定成功","会与预定成功"), | 
 |  |  |         MEETING_CACEL(1, "会议取消","会议取消"), |