2024-01-29 14:34:38 +08:00
|
|
|
|
package com.xinelu.common.constant;
|
|
|
|
|
|
|
|
|
|
|
|
import io.jsonwebtoken.Claims;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通用常量信息
|
|
|
|
|
|
*
|
|
|
|
|
|
* @author xinelu
|
|
|
|
|
|
*/
|
|
|
|
|
|
public class Constants {
|
|
|
|
|
|
/**
|
|
|
|
|
|
* UTF-8 字符集
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String UTF8 = "UTF-8";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* GBK 字符集
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String GBK = "GBK";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* http请求
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String HTTP = "http://";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* https请求
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String HTTPS = "https://";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通用成功标识
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String SUCCESS = "0";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通用失败标识
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String FAIL = "1";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 登录成功
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String LOGIN_SUCCESS = "Success";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 注销
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String LOGOUT = "Logout";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 注册
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String REGISTER = "Register";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 登录失败
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String LOGIN_FAIL = "Error";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 验证码有效期(分钟)
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final Integer CAPTCHA_EXPIRATION = 2;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 令牌
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TOKEN = "token";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 令牌前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TOKEN_PREFIX = "Bearer ";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 令牌前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String LOGIN_USER_KEY = "login_user_key";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 用户ID
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String JWT_USERID = "userid";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 用户名称
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String JWT_USERNAME = Claims.SUBJECT;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 用户头像
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String JWT_AVATAR = "avatar";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 创建时间
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String JWT_CREATED = "created";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 用户权限
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String JWT_AUTHORITIES = "authorities";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 资源映射路径 前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String RESOURCE_PREFIX = "/profile";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* RMI 远程方法调用
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String LOOKUP_RMI = "rmi:";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* LDAP 远程方法调用
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String LOOKUP_LDAP = "ldap:";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* LDAPS 远程方法调用
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String LOOKUP_LDAPS = "ldaps:";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String[] JOB_WHITELIST_STR = {"com.xinelu"};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 定时任务违规的字符
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
|
|
|
|
|
"org.springframework", "org.apache", "com.xinelu.common.utils.file"};
|
2024-02-26 15:30:45 +08:00
|
|
|
|
|
2024-03-11 17:50:27 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 图片上传文件带.的
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String FILE_NAME_SPOT = ".";
|
2024-02-29 11:40:18 +08:00
|
|
|
|
|
2024-03-11 17:50:27 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 字符串空格标识
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String EMPTY = " ";
|
2024-02-29 11:43:46 +08:00
|
|
|
|
|
2024-02-27 15:13:42 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Excel文件格式后缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String XLSX = "xlsx";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Excel文件格式后缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String XLS = "xls";
|
|
|
|
|
|
|
2024-02-26 15:30:45 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 机构类别编码前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String CATEGORY_CODE = "CC";
|
2024-02-27 15:13:42 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 机构信息导入标识
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String AGENCY = "agency";
|
2024-02-28 15:10:58 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 科室信息导入标识
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String DEPARTMENT = "department";
|
2024-03-11 17:50:27 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 手术编号
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String SURGERY_ENCODING = "SE";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 服务方式编码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String SERVICE_MODE_ENCODING = "SME";
|
|
|
|
|
|
|
2024-03-12 11:46:06 +08:00
|
|
|
|
/**
|
2024-03-20 16:11:51 +08:00
|
|
|
|
* 任务类型编码
|
2024-03-12 11:46:06 +08:00
|
|
|
|
*/
|
|
|
|
|
|
public static final String TASK_TYPE_CODE = "TTC";
|
2024-03-11 17:50:27 +08:00
|
|
|
|
|
2024-03-12 11:46:06 +08:00
|
|
|
|
/**
|
2024-03-20 16:11:51 +08:00
|
|
|
|
* 任务细分编码
|
2024-03-12 11:46:06 +08:00
|
|
|
|
*/
|
|
|
|
|
|
public static final String TASK_PARTITION_CODE = "TPC";
|
2024-03-13 17:25:20 +08:00
|
|
|
|
|
2024-03-20 16:11:51 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 任务状态编码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TASK_STATUS_CODE = "TSC";
|
|
|
|
|
|
|
2024-04-19 17:17:55 +08:00
|
|
|
|
/**
|
2024-05-07 09:06:45 +08:00
|
|
|
|
* 机构代码编码
|
2024-04-19 17:17:55 +08:00
|
|
|
|
*/
|
|
|
|
|
|
public static final String AGENCY_CODE = "AYC";
|
|
|
|
|
|
|
2024-05-09 14:31:21 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 科室病种编码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String DISEASE_TYPE_CODE = "DTC";
|
|
|
|
|
|
|
2024-04-19 17:17:55 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 任务状态编码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String DEPARTMENT_CODE = "DTC";
|
|
|
|
|
|
|
2024-07-10 18:09:00 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 宣教编码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String PROPAGANDA_INFO_CODE = "PIC";
|
|
|
|
|
|
|
2024-04-01 10:26:15 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 门诊患者
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String OUTPATIENT = "outpatient";
|
|
|
|
|
|
|
2024-11-29 15:42:26 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 门诊患者
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String PATIENT_INFO_IMPORT = "patientInfoImport";
|
|
|
|
|
|
|
2024-04-01 10:26:15 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 预住院
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String PRE_HOSPITALIZED = "prehospitalized";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 在院
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String IN_HOSPITAL = "inhospital";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 出院
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String DISCHARGED = "discharged";
|
2024-03-19 10:29:15 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字段信息编码前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String FIELD_ENCODING = "FE";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字段内容编码前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String CONTENT_ENCODING = "CE";
|
2024-04-07 13:27:01 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 路径编码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String ROUTE_CODE = "RC";
|
2024-04-08 11:20:41 +08:00
|
|
|
|
|
2024-06-07 14:32:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 常用术语编码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TERM_CODE = "TC";
|
|
|
|
|
|
|
2024-03-21 14:36:06 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 院后微信小程序accessToken的redis的键前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String WE_CHAT_APPLET_ACCESS_TOKEN = "WE_CHAT_APPLET_ACCESS_TOKEN_";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 院后微信公众号accessToken的redis的键前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String WE_CHAT_OFFICIAL_ACCOUNT_ACCESS_TOKEN = "WE_CHAT_OFFICIAL_ACCOUNT_ACCESS_TOKEN_";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取微信小程序和微信公众号accessToken的url地址
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String WE_CHAT_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
|
2024-03-25 17:46:41 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 微信公众号模板消息推送发送接口地址
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String OFFICIAL_ACCOUNT_TEMPLATE_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=";
|
|
|
|
|
|
|
2024-05-28 10:41:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 微信小程序模板消息推送发送接口地址
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String OFFICIAL_ACCOUNT_SUBSCRIBE_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=";
|
|
|
|
|
|
|
2024-03-25 17:46:41 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 获取 access_token 时 AppSecret 错误,或者 access_token 无效。请开发者认真比对 AppSecret 的正确性,或查看是否正在为恰当的公众号调用接口
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int INVALID_CREDENTIAL_ACCESS_TOKEN_ISINVALID_OR_NOT_LATEST = 40001;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 不合法的 OpenID ,请开发者确认 OpenID (该用户)是否已关注公众号,或是否是其他公众号的 OpenID
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int INVALID_OPENID = 40003;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 不合法的 access_token ,请开发者认真比对 access_token 的有效性(如是否过期),或查看是否正在为恰当的公众号调用接口
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int INVALID_ACCESS_TOKEN = 40014;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 不合法的 template_id
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int INVALID_TEMPLATE_ID = 40037;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 用户拒接订阅
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int DENY_SUBSCRIPTION = 43101;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 参数无效
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int ARGUMENT_INVALID = 47003;
|
|
|
|
|
|
|
2024-05-28 10:41:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* api功能未授权
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int API_UNAUTHORIZED = 48001;
|
|
|
|
|
|
|
2024-03-25 17:46:41 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 成功
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int SUCCESS_ERROR_CODE = 0;
|
2024-04-16 15:37:05 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 院后微信小程序登录接口地址
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String APPLET_LOGIN_URL = "https://api.weixin.qq.com/sns/jscode2session";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 微信小程序ACCESS_TOKEN前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String POST_DISCHARGE_APPLET_ACCESS_TOKEN = "POST_Discharge_APPLET_ACCESS_TOKEN_";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 返回成功状态码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int SUCCESS_CODE = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 院后微信小程序获取用户手机号接口地址
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String PHONE_NUMBER_URL = "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取微信小程序access_token错误码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final int ERROR_ACCESS_CODE = 40001;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 返回成功状态码
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String OK = "ok";
|
2024-04-16 15:43:18 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 资讯分类编码前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String INFO_CATEGORY_CODE = "ICC";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 资讯编码前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String INFO_CODE = "IC";
|
2024-05-30 10:47:47 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 泉医微信小程序ACCESS_TOKEN前缀(测试使用)
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String NURSE_STATION_APPLET_ACCESS_TOKEN = "NURSE_STATION_APPLET_ACCESS_TOKEN";
|
2024-06-07 17:29:27 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 常用术语最大层数
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final Long TERM_MAX_LEVEL = 3L;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2024-06-12 10:16:56 +08:00
|
|
|
|
* 常用术语最小层数
|
2024-06-07 17:29:27 +08:00
|
|
|
|
*/
|
|
|
|
|
|
public static final Long TERM_MIN_LEVEL = 1L;
|
2024-07-03 17:59:38 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 登录发送短信验证冷却键前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String SMS_COOL_DOWN ="SMS_COOL_DOWN_";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 登录发送短信验证冷却键对应的值
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String SMS_COOL_DOWN_VALUE ="COOL_DOWN";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 登录发送短信验证前缀
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String SMS_CODE ="SMS_CODE_";
|
|
|
|
|
|
|
2025-04-17 14:24:56 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 医院时间配置
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String DIAL_TIME ="dial_time";
|
2024-01-29 14:34:38 +08:00
|
|
|
|
}
|