|
@@ -176,7 +176,7 @@ public class SystemConstant {
|
|
public static final String ATTACHMENT_LENGTH = "attachment.length";
|
|
public static final String ATTACHMENT_LENGTH = "attachment.length";
|
|
public static final String ATTACHMENT_SIZE = "attachment.size";
|
|
public static final String ATTACHMENT_SIZE = "attachment.size";
|
|
public static final String CREATE_PDF_JOB_DB_LIMIT = "create.pdf.job.db.limit";
|
|
public static final String CREATE_PDF_JOB_DB_LIMIT = "create.pdf.job.db.limit";
|
|
-// public static final String AUTO_CREATE_PDF_RESET_MAX_COUNT = "auto.create.pdf.reset.max.count";
|
|
|
|
|
|
+ // public static final String AUTO_CREATE_PDF_RESET_MAX_COUNT = "auto.create.pdf.reset.max.count";
|
|
public static final String THREAD_POOL_CORE_SIZE = "thread.pool.core.size";
|
|
public static final String THREAD_POOL_CORE_SIZE = "thread.pool.core.size";
|
|
public static final String CUSTOM_THREAD_POOL_CORE_SIZE = "custom.thread.pool.core.size";
|
|
public static final String CUSTOM_THREAD_POOL_CORE_SIZE = "custom.thread.pool.core.size";
|
|
public static final String SESSION_ACTIVE = "session.active";
|
|
public static final String SESSION_ACTIVE = "session.active";
|
|
@@ -300,7 +300,7 @@ public class SystemConstant {
|
|
public static final int IN_SIZE_MAX = 1000;
|
|
public static final int IN_SIZE_MAX = 1000;
|
|
public static final int ALL_CARD = -1;
|
|
public static final int ALL_CARD = -1;
|
|
public static final String MANUAL = "manual";
|
|
public static final String MANUAL = "manual";
|
|
-// public static final String CREATE_PDF_TYPE = "createPdfType";
|
|
|
|
|
|
+ // public static final String CREATE_PDF_TYPE = "createPdfType";
|
|
public static final String DELIMITER = ":";
|
|
public static final String DELIMITER = ":";
|
|
public static final String COMMA = ",";
|
|
public static final String COMMA = ",";
|
|
public static final int FINAL_SCALE = 1;
|
|
public static final int FINAL_SCALE = 1;
|
|
@@ -317,7 +317,7 @@ public class SystemConstant {
|
|
// public static final int MAX_RETRY_CREATE_PDF_COUNT = 5;
|
|
// public static final int MAX_RETRY_CREATE_PDF_COUNT = 5;
|
|
//英文字母、数字、中文括号、英文括号、下划线(_)、减号(-)、中文横线(—)
|
|
//英文字母、数字、中文括号、英文括号、下划线(_)、减号(-)、中文横线(—)
|
|
public static final String REGULAR_EXPRESSION_OF_CODE = "[a-zA-Z0-9](\\w+)?-?(\\w+)?—?(\\w+)?(\\((\\w+)?-?(\\w+)?—?(\\w+)?\\))?(\\((\\w+)?-?(\\w+)?—?(\\w+)?\\))?(\\w+)?";
|
|
public static final String REGULAR_EXPRESSION_OF_CODE = "[a-zA-Z0-9](\\w+)?-?(\\w+)?—?(\\w+)?(\\((\\w+)?-?(\\w+)?—?(\\w+)?\\))?(\\((\\w+)?-?(\\w+)?—?(\\w+)?\\))?(\\w+)?";
|
|
-// public static final String REGULAR_EXPRESSION_OF_CODE1 = "^[a-zA-Z0-9]+$";
|
|
|
|
|
|
+ // public static final String REGULAR_EXPRESSION_OF_CODE1 = "^[a-zA-Z0-9]+$";
|
|
public static final String REGULAR_EXPRESSION_OF_PHONE = "((\\d{3,4})|(\\(\\d{3,4}\\)-))?\\d{7,8}";
|
|
public static final String REGULAR_EXPRESSION_OF_PHONE = "((\\d{3,4})|(\\(\\d{3,4}\\)-))?\\d{7,8}";
|
|
public static final String REGULAR_EXPRESSION_OF_CODE_PRIMARY_DIMENSION = "[A-Z]";
|
|
public static final String REGULAR_EXPRESSION_OF_CODE_PRIMARY_DIMENSION = "[A-Z]";
|
|
public static final String REGULAR_EXPRESSION_OF_CODE_SECOND_DIMENSION = "[A-Z][1-9][0-9]*";
|
|
public static final String REGULAR_EXPRESSION_OF_CODE_SECOND_DIMENSION = "[A-Z][1-9][0-9]*";
|
|
@@ -351,7 +351,7 @@ public class SystemConstant {
|
|
public static final String GET_EQUAL = "=";
|
|
public static final String GET_EQUAL = "=";
|
|
public static final String PATH_MATCH = "*";
|
|
public static final String PATH_MATCH = "*";
|
|
public static final String CATALOG_LINK = "->";
|
|
public static final String CATALOG_LINK = "->";
|
|
-// public static final String OPERATE_LINK = "--";
|
|
|
|
|
|
+ // public static final String OPERATE_LINK = "--";
|
|
public static final String LIMIT1 = "limit 1";
|
|
public static final String LIMIT1 = "limit 1";
|
|
|
|
|
|
public static final Integer DEFAULT_BACKUP_COUNT = 1;
|
|
public static final Integer DEFAULT_BACKUP_COUNT = 1;
|
|
@@ -527,13 +527,13 @@ public class SystemConstant {
|
|
public static final String OBJECT_DATA = "objectData";
|
|
public static final String OBJECT_DATA = "objectData";
|
|
public static final String APPROVE_TF_FLOW_LOG = "TFFlowLog";//流程院长自动审批
|
|
public static final String APPROVE_TF_FLOW_LOG = "TFFlowLog";//流程院长自动审批
|
|
public static final String APPROVE_TF_FLOW_APPROVE = "TFFlowAppove";//流程流转记录
|
|
public static final String APPROVE_TF_FLOW_APPROVE = "TFFlowAppove";//流程流转记录
|
|
-// public static final String FLOW_WORK_MESSAGE = "workMsg";
|
|
|
|
|
|
+ // public static final String FLOW_WORK_MESSAGE = "workMsg";
|
|
// public static final String FLOW_VIEW_MESSAGE = "viewMsg";
|
|
// public static final String FLOW_VIEW_MESSAGE = "viewMsg";
|
|
public static final String PAPAER_ATTACHMENT_IDS = "paperAttachmentIds";//命题附件ids
|
|
public static final String PAPAER_ATTACHMENT_IDS = "paperAttachmentIds";//命题附件ids
|
|
public static final String REDIS_LOCK_FLOW_TASK_PREFIX = "redis:lock:flow:task:";//流程节点锁
|
|
public static final String REDIS_LOCK_FLOW_TASK_PREFIX = "redis:lock:flow:task:";//流程节点锁
|
|
public static final String REDIS_LOCK_EXAM_TASK_FLOW_PREFIX = "redis:lock:exam:task:flow:";//考试任务流程节点锁
|
|
public static final String REDIS_LOCK_EXAM_TASK_FLOW_PREFIX = "redis:lock:exam:task:flow:";//考试任务流程节点锁
|
|
public static final String REDIS_LOCK_PAPER_NUMBER_PREFIX = "redis:lock:paper:number:";//试卷编号锁
|
|
public static final String REDIS_LOCK_PAPER_NUMBER_PREFIX = "redis:lock:paper:number:";//试卷编号锁
|
|
-// public static final String REDIS_LOCK_COURSE_CODE_SEQUENCE_PREFIX = "redis:lock:courseCode:sequence:";//课程序号锁
|
|
|
|
|
|
+ // public static final String REDIS_LOCK_COURSE_CODE_SEQUENCE_PREFIX = "redis:lock:courseCode:sequence:";//课程序号锁
|
|
public static final long REDIS_LOCK_FLOW_TASK_TIME_OUT = 60L * 2;
|
|
public static final long REDIS_LOCK_FLOW_TASK_TIME_OUT = 60L * 2;
|
|
public static final long REDIS_LOCK_EXAM_TASK_FLOW_TIME_OUT = 60L * 2;
|
|
public static final long REDIS_LOCK_EXAM_TASK_FLOW_TIME_OUT = 60L * 2;
|
|
public static final String REDIS_LOCK_FLOW_PREFIX = "redis:lock:flow:";//流程锁
|
|
public static final String REDIS_LOCK_FLOW_PREFIX = "redis:lock:flow:";//流程锁
|
|
@@ -1318,6 +1318,24 @@ public class SystemConstant {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static byte[] cloneInputStream(InputStream input) {
|
|
|
|
+ try {
|
|
|
|
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
|
|
|
+ byte[] buffer = new byte[1024];
|
|
|
|
+ int len;
|
|
|
|
+ while ((len = input.read(buffer)) > -1) {
|
|
|
|
+ baos.write(buffer, 0, len);
|
|
|
|
+ }
|
|
|
|
+ baos.flush();
|
|
|
|
+ baos.close();
|
|
|
|
+ input.close();
|
|
|
|
+ return baos.toByteArray();
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 路径拼接
|
|
* 路径拼接
|
|
*
|
|
*
|