Procházet zdrojové kódy

全局代码优化

wangliang před 2 roky
rodič
revize
46d8463b11
49 změnil soubory, kde provedl 194 přidání a 320 odebrání
  1. 2 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/custom/service/DefaultInstanceConvertToMultiInstance.java
  2. 4 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicMessageServiceImpl.java
  3. 3 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DataSyncServiceImpl.java
  4. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DownloadServiceImpl.java
  5. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamCardServiceImpl.java
  6. 4 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java
  7. 3 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperStructureServiceImpl.java
  8. 5 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java
  9. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradeBatchPaperServiceImpl.java
  10. 11 11
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceImpl.java
  11. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/SsoServiceImpl.java
  12. 7 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TSyncExamStudentScoreServiceImpl.java
  13. 23 23
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java
  14. 9 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/CreatePdfUtil.java
  15. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/FreemarkerUtil.java
  16. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/HtmlToJpgUtil.java
  17. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/PdfUtil.java
  18. 1 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/SysController.java
  19. 1 1
      distributed-print/src/test/java/com/qmth/distributed/print/BasicDataImportTest.java
  20. 1 1
      distributed-print/src/test/java/com/qmth/distributed/print/BasicUserImportTest.java
  21. 2 2
      distributed-print/src/test/java/com/qmth/distributed/print/FssTest.java
  22. 2 3
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/SignatureEntityTest.java
  23. 6 134
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java
  24. 2 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/FssPrivateDomain.java
  25. 2 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/FssPublicDomain.java
  26. 2 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicAttachmentServiceImpl.java
  27. 5 6
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicStudentServiceImpl.java
  28. 1 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysOrgServiceImpl.java
  29. 1 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysRoleGroupMemberServiceImpl.java
  30. 5 5
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java
  31. 12 12
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/sync/TeachCloudReportTaskUtils.java
  32. 4 4
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ConvertUtil.java
  33. 6 5
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/FileStoreUtil.java
  34. 1 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/FileUtil.java
  35. 3 3
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/HttpKit.java
  36. 1 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/HttpUtil.java
  37. 2 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/SessionUtil.java
  38. 2 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/excel/ExcelExport.java
  39. 9 9
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/AnalyzeForReportServiceImpl.java
  40. 10 10
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/CallPrintOpenApiServiceImpl.java
  41. 4 4
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/ChangNamesServiceImpl.java
  42. 7 8
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/InsteadOrgServiceImpl.java
  43. 3 3
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/ReportCommonServiceImpl.java
  44. 1 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamCourseDeleteServiceImpl.java
  45. 2 2
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/templete/strategy/CalculateTaskTemplate.java
  46. 2 2
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/BasicDatasourceController.java
  47. 4 4
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/SsoApiController.java
  48. 1 1
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/SysController.java
  49. 8 8
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/WudaOpenApiController.java

+ 2 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/custom/service/DefaultInstanceConvertToMultiInstance.java

@@ -1,5 +1,6 @@
 package com.qmth.distributed.print.business.activiti.custom.service;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.enums.FlowApproveOperationEnum;
 import org.activiti.bpmn.model.MultiInstanceLoopCharacteristics;
 import org.activiti.bpmn.model.UserTask;
@@ -33,7 +34,7 @@ public interface DefaultInstanceConvertToMultiInstance extends MultiWorkFlow {
     public static final String SEQUENCE_NAME = "sequence";
     public static final String NR_OF_COMPLETED_INSTANCES = "nrOfCompletedInstances";
     public static final String NR_OF_INSTANCES = "nrOfInstances";
-    public static final String REJECT_EXP = EXP_PREFIX + NR_OF_COMPLETED_INSTANCES + "/" + NR_OF_INSTANCES + EXP_EQUAL + 1 + " || " + FlowApproveOperationEnum.REJECT.getId();
+    public static final String REJECT_EXP = EXP_PREFIX + NR_OF_COMPLETED_INSTANCES + SystemConstant.ORG_SPLIT + NR_OF_INSTANCES + EXP_EQUAL + 1 + " || " + FlowApproveOperationEnum.REJECT.getId();
     public static final String REJECT_EXP_SUFFIX = EXP_EQUAL + 1 + EXP_SUFFIX;
 
     /**

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicMessageServiceImpl.java

@@ -281,7 +281,7 @@ public class BasicMessageServiceImpl extends ServiceImpl<BasicMessageMapper, Bas
 
             Map<String, Object> jsonMap = new HashMap<>();
             jsonMap.put("userName", userName);
-            StringJoiner sj = new StringJoiner("、").add(courseName).add(paperNumber);
+            StringJoiner sj = new StringJoiner(SystemConstant.PAUSE_SIGN).add(courseName).add(paperNumber);
             jsonMap.put("courseName", sj.toString());
             String variableParams = JSON.toJSONString(jsonMap);
             String remark = String.format("命题任务ID:%s", examTask.getId().toString());
@@ -341,7 +341,7 @@ public class BasicMessageServiceImpl extends ServiceImpl<BasicMessageMapper, Bas
             String courseName = examTask.getCourseName();
             Map<String, Object> jsonMap = new HashMap<>();
             jsonMap.put("userName", userName);
-            StringJoiner sj = new StringJoiner("、").add(courseName).add(paperNumber);
+            StringJoiner sj = new StringJoiner(SystemConstant.PAUSE_SIGN).add(courseName).add(paperNumber);
             jsonMap.put("courseName", sj.toString());
             String variableParams = JSON.toJSONString(jsonMap);
             String remark = String.format("命题任务ID:%s", examTask.getId().toString());
@@ -369,7 +369,7 @@ public class BasicMessageServiceImpl extends ServiceImpl<BasicMessageMapper, Bas
             String courseName = examTask.getCourseName();
             Map<String, Object> jsonMap = new HashMap<>();
             jsonMap.put("userName", userName);
-            StringJoiner sj = new StringJoiner("、").add(courseName).add(paperNumber);
+            StringJoiner sj = new StringJoiner(SystemConstant.PAUSE_SIGN).add(courseName).add(paperNumber);
             jsonMap.put("courseName", sj.toString());
             jsonMap.put("auditUserNames", auditUserNames);
             String variableParams = JSON.toJSONString(jsonMap);
@@ -393,7 +393,7 @@ public class BasicMessageServiceImpl extends ServiceImpl<BasicMessageMapper, Bas
 
             Map<String, Object> jsonMap = new HashMap<>();
             jsonMap.put("userName", userName);
-            StringJoiner sj = new StringJoiner("、").add(courseName).add(paperNumber);
+            StringJoiner sj = new StringJoiner(SystemConstant.PAUSE_SIGN).add(courseName).add(paperNumber);
             jsonMap.put("courseName", sj.toString());
             String variableParams = JSON.toJSONString(jsonMap);
             this.saveMessageSendLog(sysUser.getSchoolId(), userId, userName, mobileNumber, paperNumber, courseCode, variableParams, messageType, sysUser.getId(), null);

+ 3 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DataSyncServiceImpl.java

@@ -17,6 +17,7 @@ import com.qmth.teachcloud.common.bean.dto.stmms.QuestionBaseDTO;
 import com.qmth.teachcloud.common.bean.dto.stmms.QuestionDTO;
 import com.qmth.teachcloud.common.config.DictionaryConfig;
 import com.qmth.teachcloud.common.contant.SpringContextHolder;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.BasicAttachment;
 import com.qmth.teachcloud.common.entity.BasicCollege;
 import com.qmth.teachcloud.common.entity.SysUser;
@@ -127,7 +128,7 @@ public class DataSyncServiceImpl implements DataSyncService {
                     cardUpload(schoolId, thirdRelateId, examDetailCourseDto.getExamTaskId(), examDetailCourseDto.getPaperType());
                     syncStatus = ExamPrintPlanSyncStatusEnum.FINISH;
                 } catch (Exception e) {
-                    throw new RuntimeException("推送考生信息、题卡信息失败,试卷编号:" + examDetailCourseDto.getPaperNumber() + "," + e.getMessage());
+                    throw new RuntimeException("推送考生信息、题卡信息失败,试卷编号:" + examDetailCourseDto.getPaperNumber() + SystemConstant.COMMA_OF_CHINESE + e.getMessage());
                 } finally {
                     UpdateWrapper<ExamDetailCourse> examDetailCourseUpdateWrapper = new UpdateWrapper<>();
                     examDetailCourseUpdateWrapper.lambda().set(ExamDetailCourse::getThirdRelateId, thirdRelateId)
@@ -629,7 +630,7 @@ public class DataSyncServiceImpl implements DataSyncService {
                 if (attachment == null) {
                     throw ExceptionResultEnum.ERROR.exception("附件数据异常");
                 }
-                String fileName = attachment.getName() + "-" + name + attachment.getType();
+                String fileName = attachment.getName() + SystemConstant.HYPHEN + name + attachment.getType();
                 return teachcloudCommonService.copyFile(getTempDir(type), fileName, attachment);
             }
         } catch (Exception e) {

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DownloadServiceImpl.java

@@ -141,7 +141,7 @@ public class DownloadServiceImpl implements DownloadService {
             if (attachment == null) {
                 throw ExceptionResultEnum.ERROR.exception("附件数据异常");
             }
-            String paperPath = rootPath + File.separator + examTask.getCourseName() + "-" + examTask.getCourseCode() + File.separator + examTask.getPaperNumber();
+            String paperPath = rootPath + File.separator + examTask.getCourseName() + SystemConstant.HYPHEN + examTask.getCourseCode() + File.separator + examTask.getPaperNumber();
             String fileName = "试卷" + "_" + attachment.getName() + "_" + paperType + attachment.getType();
             fileList.add(attachmentCommonService.downloadFile(paperPath, fileName, attachment));
 
@@ -149,7 +149,7 @@ public class DownloadServiceImpl implements DownloadService {
             if (cardId != null) {
                 ExamCard examCard = examCardMapper.selectById(cardId);
 
-                String cardPath = rootPath + File.separator + examTask.getCourseName() + "-" + examTask.getCourseCode() + File.separator + examTask.getPaperNumber();
+                String cardPath = rootPath + File.separator + examTask.getCourseName() + SystemConstant.HYPHEN + examTask.getCourseCode() + File.separator + examTask.getPaperNumber();
                 String cardHtmlPath = cardPath + File.separator + "题卡" + "_" + examTask.getCourseName() + "_" + paperType + SystemConstant.HTML_PREFIX;
                 String cardPdfPath = cardPath + File.separator + "题卡" + "_" + examTask.getCourseName() + "_" + paperType + SystemConstant.PDF_PREFIX;
 

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamCardServiceImpl.java

@@ -301,7 +301,7 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
             }
             ExamTask examTask = examTasks.get(0);
             StringJoiner sj = new StringJoiner(File.separator);
-            sj.add(rootPath).add(examTask.getSchoolId().toString()).add(examTask.getCourseCode() + "-" + examTask.getCourseName()).add(examTask.getPaperNumber());
+            sj.add(rootPath).add(examTask.getSchoolId().toString()).add(examTask.getCourseCode() + SystemConstant.HYPHEN + examTask.getCourseName()).add(examTask.getPaperNumber());
 
             // 附件ID
             ExamCardDetail examCardDetail = examCardDetailService.getByCardId(cardId);

+ 4 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java

@@ -274,7 +274,6 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
             // 处理课程和科目
             String[] arr = examDetailCourseIds.split(",");
 
-            final String separator = "、";
             String courseNameCodeStr = "";
             String paperNumberStr = "";
             for (String examDetailCourseId : arr) {
@@ -282,11 +281,11 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
                 String code = examDetailCourse.getCourseCode();
                 String name = examDetailCourse.getCourseName();
                 String number = examDetailCourse.getPaperNumber();
-                courseNameCodeStr = courseNameCodeStr + name + "(" + code + ")" + separator;
-                paperNumberStr = paperNumberStr + number + separator;
+                courseNameCodeStr = courseNameCodeStr + name + "(" + code + ")" + SystemConstant.PAUSE_SIGN;
+                paperNumberStr = paperNumberStr + number + SystemConstant.PAUSE_SIGN;
             }
-            courseNameCodeStr = courseNameCodeStr.substring(0, courseNameCodeStr.length() - separator.length());
-            paperNumberStr = paperNumberStr.substring(0, paperNumberStr.length() - separator.length());
+            courseNameCodeStr = courseNameCodeStr.substring(0, courseNameCodeStr.length() - SystemConstant.PAUSE_SIGN.length());
+            paperNumberStr = paperNumberStr.substring(0, paperNumberStr.length() - SystemConstant.PAUSE_SIGN.length());
             examinationResult.setCourseNameCode(courseNameCodeStr);
             examinationResult.setPaperNumber(paperNumberStr);
 

+ 3 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperStructureServiceImpl.java

@@ -642,13 +642,13 @@ public class ExamPaperStructureServiceImpl extends ServiceImpl<ExamPaperStructur
         for (String pType : paperTypesAttr) {
             ExamPaperStructureDto examPaperStructureDto = new ExamPaperStructureDto();
             examPaperStructureDto.setPaperType(pType);
-            int oi = Arrays.asList(keysAttr).indexOf(pType + "-" + fileTypeAttr[0]);
+            int oi = Arrays.asList(keysAttr).indexOf(pType + SystemConstant.HYPHEN + fileTypeAttr[0]);
             examPaperStructureDto.setObjectiveQuestionFile(oi < 0 ? null : files[oi]);
             examPaperStructureDto.setObjectiveQuestionMd5(oi < 0 ? null : md5sAttr[oi]);
-            int si = Arrays.asList(keysAttr).indexOf(pType + "-" + fileTypeAttr[1]);
+            int si = Arrays.asList(keysAttr).indexOf(pType + SystemConstant.HYPHEN + fileTypeAttr[1]);
             examPaperStructureDto.setSubjectiveQuestionFile(si < 0 ? null : files[si]);
             examPaperStructureDto.setSubjectiveQuestionMd5(si < 0 ? null : md5sAttr[si]);
-            int ai = Arrays.asList(keysAttr).indexOf(pType + "-" + fileTypeAttr[2]);
+            int ai = Arrays.asList(keysAttr).indexOf(pType + SystemConstant.HYPHEN + fileTypeAttr[2]);
             examPaperStructureDto.setStandardAnswerFile(ai < 0 ? null : files[ai]);
             examPaperStructureDto.setStandardAnswerMd5(ai < 0 ? null : md5sAttr[ai]);
             list.add(examPaperStructureDto);

+ 5 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -1008,8 +1008,8 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                 .add(examTaskDetailPdfDownloadDto.getExamName()).add(File.separator)
                 .add(examTaskDetailPdfDownloadDto.getCourseNameCode()).add(File.separator)
                 .add(examTaskDetailPdfDownloadDto.getPaperNumber()).add(File.separator)
-                .add(examTaskDetailPdfDownloadDto.getCourseNameCode()).add("-")
-                .add(examTaskDetailPdfDownloadDto.getPaperNumber()).add("-");
+                .add(examTaskDetailPdfDownloadDto.getCourseNameCode()).add(SystemConstant.HYPHEN)
+                .add(examTaskDetailPdfDownloadDto.getPaperNumber()).add(SystemConstant.HYPHEN);
         List<File> fileList = new ArrayList<>();
         // 试卷
         for (JSONObject jsonObject : jsonObjectList) {
@@ -1031,7 +1031,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                         .add(examTaskDetailPdfDownloadDto.getExamName()).add(File.separator)
                         .add(examTaskDetailPdfDownloadDto.getCourseNameCode()).add(File.separator)
                         .add(examTaskDetailPdfDownloadDto.getPaperNumber()).add(File.separator);
-                String fileName = examTaskDetailPdfDownloadDto.getCourseNameCode() + "-" + examTaskDetailPdfDownloadDto.getPaperNumber() + "-" + "试卷" + "-" + name + attachment.getType();
+                String fileName = examTaskDetailPdfDownloadDto.getCourseNameCode() + SystemConstant.HYPHEN + examTaskDetailPdfDownloadDto.getPaperNumber() + SystemConstant.HYPHEN + "试卷" + SystemConstant.HYPHEN + name + attachment.getType();
                 File file = teachcloudCommonService.copyFile(paperPath.toString(), fileName, attachment);
                 if (Objects.nonNull(file)) {
                     fileList.add(file);
@@ -1043,8 +1043,8 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
             if (cardId != null) {
                 ExamCard examCard = examCardService.getById(cardId);
 
-                String cardHtmlPath = dirPath.toString() + "题卡" + "-" + name + SystemConstant.HTML_PREFIX;
-                String cardPdfPath = dirPath.toString() + "题卡" + "-" + name + SystemConstant.PDF_PREFIX;
+                String cardHtmlPath = dirPath.toString() + "题卡" + SystemConstant.HYPHEN + name + SystemConstant.HTML_PREFIX;
+                String cardPdfPath = dirPath.toString() + "题卡" + SystemConstant.HYPHEN + name + SystemConstant.PDF_PREFIX;
 
                 ExamCardDetail examCardDetail = examCardDetailService.getByCardId(examCard.getId());
                 String htmlContent;

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradeBatchPaperServiceImpl.java

@@ -99,7 +99,7 @@ public class GradeBatchPaperServiceImpl extends ServiceImpl<GradeBatchPaperMappe
                 GradeBatchPaperResult needAdd = new GradeBatchPaperResult();
                 BeanUtils.copyProperties(gradeBatchPaperResult, needAdd);
                 needAdd.setPaperType(paperTypeCell);
-                needAdd.setPaperName(needAdd.getCourseName() + "-" + paperTypeCell);
+                needAdd.setPaperName(needAdd.getCourseName() + SystemConstant.HYPHEN + paperTypeCell);
                 needAddList.add(needAdd);
             }
         }

+ 11 - 11
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceImpl.java

@@ -184,7 +184,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
                     ossStr = SystemConstant.OSS;
                     File htmlFileTemp = SystemConstant.getFileTempVar(SystemConstant.HTML_PREFIX);
                     fileTempList.add(htmlFileTemp);
-                    htmlFile = fileStoreUtil.ossDownload(filePath, htmlFileTemp.getPath(), uploadType.getFssType());
+                    htmlFile = fileStoreUtil.ossDownload(filePath, htmlFileTemp, uploadType.getFssType());
                 } else {
                     ossStr = SystemConstant.LOCAL;
                     if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getConfig()) && filePath.contains(dictionaryConfig.fssLocalFileDomain().getConfig())) {
@@ -278,7 +278,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
             fileTempList.add(pdfFileTemp);
             createPrintPdfUtil.createSignPdf(pdfFillDto, pdfFileTemp.getPath());
 
-            String pdfDirName = pdfStringJoiner.toString().replaceAll("\\\\", "/");
+            String pdfDirName = pdfStringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
             //pdf生成和上传
             String pdfFileMd5 = DigestUtils.md5Hex(new FileInputStream(pdfFileTemp));
             if (oss) {
@@ -361,8 +361,8 @@ public class PrintCommonServiceImpl implements PrintCommonService {
             pdfStringJoiner.add(SystemConstant.getNanoId()).add(SystemConstant.PDF_PREFIX);
 
             JSONObject jsonObject = new JSONObject();
-            String htmlDirName = stringJoiner.toString().replaceAll("\\\\", "/");
-            String pdfDirName = pdfStringJoiner.toString().replaceAll("\\\\", "/");
+            String htmlDirName = stringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
+            String pdfDirName = pdfStringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
 
             //html生成和上传
             String htmlFileMd5 = DigestUtils.md5Hex(new FileInputStream(htmlFileTemp));
@@ -443,7 +443,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
             JSONObject jsonObject = new JSONObject();
             String fileMd5 = null;
             if (oss) {//上传至oss
-                String dirName = stringJoiner.toString().replaceAll("\\\\", "/");
+                String dirName = stringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
                 fileStoreUtil.ossUpload(dirName, htmlContent, fileStoreUtil.getUploadEnumByPath(dirName).getFssType());
                 jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
                 jsonObject.put(SystemConstant.PATH, dirName);
@@ -464,7 +464,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
                 } else {
                     destUrl = pdfDirName;
                 }
-//                destUrl = destUrl.replaceAll("\\\\","/");
+//                destUrl = destUrl.replaceAll("\\\\",SystemConstant.ORG_SPLIT);
 
                 HtmlToPdfUtil.convert(localHtmlFile.getPath(), destUrl, PageSizeEnum.A4);
 //                File pdfFile = asposePdfUtil.documentToPdf(localHtmlFile.getPath(), destUrl, PaperSize.A3);
@@ -475,7 +475,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
                 }
                 fileMd5 = DigestUtils.md5Hex(new FileInputStream(pdfFile));
 //                ossUtil.ossUpload(pdfDirName, pdfFile, BinaryUtil.toBase64String(HexUtils.decodeHex(fileMd5)));
-                pdfDirName = pdfDirName.replaceAll("\\\\", "/");
+                pdfDirName = pdfDirName.replaceAll("\\\\", SystemConstant.ORG_SPLIT);
                 fileStoreUtil.ossUpload(pdfDirName, pdfFile, BinaryUtil.toBase64String(HexUtils.decodeHex(fileMd5)), fileStoreUtil.getUploadEnumByPath(pdfDirName).getFssType());
 //                localHtmlFile.delete();
                 jsonObject.put(SystemConstant.PDF_PATH, pdfDirName);
@@ -590,7 +590,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
             stringJoiner.add(SystemConstant.getNanoId()).add(format);
 
             JSONObject jsonObject = new JSONObject();
-            String dirName = stringJoiner.toString().replaceAll("\\\\", "/");
+            String dirName = stringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
             if (oss) {//上传至oss
                 fileStoreUtil.ossUpload(dirName, file.getInputStream(), md5, type.getFssType());
                 jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
@@ -1038,7 +1038,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
      */
     @Override
     public String createPaperNumber(Long schoolId) {
-        String date = DateUtil.today().replace("-", "");
+        String date = DateUtil.today().replace(SystemConstant.HYPHEN, "");
         String paperNumber = convertUtil.getIncre(date, "paperNumber" + schoolId, 5);
         QueryWrapper<ExamTask> queryWrapper = new QueryWrapper<>();
         queryWrapper.lambda().eq(ExamTask::getSchoolId, schoolId).eq(ExamTask::getPaperNumber, paperNumber);
@@ -1247,7 +1247,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
             stringJoiner.add(SystemConstant.getNanoId()).add(".").add(SystemConstant.XLSX);
 
             jsonObject = new JSONObject();
-            String dirName = stringJoiner.toString().replaceAll("\\\\", "/");
+            String dirName = stringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
             if (oss) {//上传至oss
                 fileStoreUtil.ossUpload(dirName, inputStream, DigestUtils.md5Hex(new ByteArrayInputStream(fos.toByteArray())), UploadFileEnum.FILE.getFssType());
                 jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
@@ -1330,7 +1330,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
             pdfStringJoiner = SystemConstant.getDirName(pdfStringJoiner, UploadFileEnum.PDF, true);
             pdfStringJoiner.add(SystemConstant.getNanoId()).add(SystemConstant.PDF_PREFIX);
 
-            String pdfDirName = pdfStringJoiner.toString().replaceAll("\\\\", "/");
+            String pdfDirName = pdfStringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
             File pdfFileTemp = SystemConstant.getFileTempVar(SystemConstant.PDF_PREFIX);
             fileTempList.add(pdfFileTemp);
             createPrintPdfUtil.createPackagePdf(pdfPackageDto, pdfFileTemp.getPath());

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/SsoServiceImpl.java

@@ -206,8 +206,8 @@ public class SsoServiceImpl implements SsoService {
         SysConfig sysConfig = commonCacheService.addSysConfigCache(basicSchool.getId(), SystemConstant.QUESTION_HOST_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置题库地址"));
         String questionLoginUrl = sysConfig.getConfigValue();
-        if (questionLoginUrl.contains("*")) {
-            questionLoginUrl = questionLoginUrl.replace("*", basicSchool.getCode());
+        if (questionLoginUrl.contains(SystemConstant.PATH_MATCH)) {
+            questionLoginUrl = questionLoginUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         questionLoginUrl = questionLoginUrl + SystemConstant.QUESTION_CAS_ADMIN_LOGIN_OPEN_API;
         String path = SystemConstant.QUESTION_CAS_ADMIN_LOGIN_OPEN_API;

+ 7 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TSyncExamStudentScoreServiceImpl.java

@@ -153,7 +153,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
                     JSONArray jsonImageTrajectoryPathArray = new JSONArray();
                     for (int i = 0; i < jsonArray.size(); i++) {
                         String url = (String) jsonArray.get(i);
-                        String sheetName = url.substring(url.lastIndexOf("/") + 1);
+                        String sheetName = url.substring(url.lastIndexOf(SystemConstant.ORG_SPLIT) + 1);
                         StringJoiner dirJpgName = SystemConstant.getDirName(UploadFileEnum.FILE, true);
                         dirJpgName.add(tSyncExamStudentScore.getExamNumber()).add(File.separator).add("sheet").add(File.separator).add(sheetName);
                         File fileSource = new File(stringJoiner.toString() + dirJpgName.toString());
@@ -165,7 +165,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
                         fileSourceList.add(fileSource);
                         JSONObject sheetObject = new JSONObject();
                         if (oss) {
-                            String dirName = dirJpgName.toString().replaceAll("\\\\", "/");
+                            String dirName = dirJpgName.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
                             fileStoreUtil.ossUpload(dirName, fileSource, DigestUtils.md5Hex(new FileInputStream(fileSource)), UploadFileEnum.FILE.getFssType());
                             if (imageTrajectoryEnum == ImageTrajectoryEnum.PREVIEW) {
                                 fileStoreUtil.getPrivateUrl(dirName, UploadFileEnum.FILE.getFssType());
@@ -178,7 +178,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
                                 fileSource.getPath();
                             }
                             sheetObject.put(SystemConstant.TYPE, SystemConstant.LOCAL);
-                            sheetObject.put(SystemConstant.PATH, (stringJoiner.toString() + dirJpgName.toString()).replaceAll("\\\\", "/"));
+                            sheetObject.put(SystemConstant.PATH, (stringJoiner.toString() + dirJpgName.toString()).replaceAll("\\\\", SystemConstant.ORG_SPLIT));
                         }
                         jsonImageSourcePathArray.add(sheetObject);
 
@@ -198,7 +198,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
 
                         ImageTrajectoryUtil.createImage(fileSource, fileTarget, markTagJsonArray);
                         fileTargetList.add(fileTarget);
-                        String dirTargetName = dirTargetJpgName.toString().replaceAll("\\\\", "/");
+                        String dirTargetName = dirTargetJpgName.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
                         if (oss) {
                             fileStoreUtil.ossUpload(dirTargetName, fileTarget, DigestUtils.md5Hex(new FileInputStream(fileTarget)), UploadFileEnum.FILE.getFssType());
                             if (imageTrajectoryEnum == ImageTrajectoryEnum.PREVIEW) {
@@ -210,7 +210,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
                                 if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getServer())) {
                                     String filePath = fileTarget.getPath();
                                     String trailUrl;
-                                    if (filePath.startsWith("/")) {
+                                    if (filePath.startsWith(SystemConstant.ORG_SPLIT)) {
                                         trailUrl = hostUrl + filePath;
                                     } else {
                                         trailUrl = hostUrl + File.separator + filePath;
@@ -220,7 +220,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
                                     trailUrlsList.add(fileStoreUtil.getPrivateUrl(dirTargetName, UploadFileEnum.FILE.getFssType()));
                                 }
                             }
-                            jsonImageTrajectoryPathArray.add((stringJoiner.toString() + dirTargetJpgName.toString()).replaceAll("\\\\", "/"));
+                            jsonImageTrajectoryPathArray.add((stringJoiner.toString() + dirTargetJpgName.toString()).replaceAll("\\\\", SystemConstant.ORG_SPLIT));
                         }
                     }
                     if (!jsonImageSourcePathArray.isEmpty()) {
@@ -253,7 +253,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
                         } else {
                             if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getServer())) {
                                 String trailUrl = null;
-                                if (url.startsWith("/")) {
+                                if (url.startsWith(SystemConstant.ORG_SPLIT)) {
                                     trailUrl = hostUrl + url;
                                 } else {
                                     trailUrl = hostUrl + File.separator + url;

+ 23 - 23
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -581,7 +581,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             Set<Long> attachmentIds = new HashSet<>();
 //            Set<File> ftlList = new HashSet<>();
             for (ExamDetail examDetail : examDetailList) {
-                tbTask.setObjName(examDetail.getExamRoom() + "-" + examDetail.getExamPlace());
+                tbTask.setObjName(examDetail.getExamRoom() + SystemConstant.HYPHEN + examDetail.getExamPlace());
                 //查询examDetailCourse
                 QueryWrapper<ExamDetailCourse> examDetailCourseQueryWrapper = new QueryWrapper<>();
                 if (Objects.nonNull(examDetailCourseIds) && examDetailCourseIds.size() > 0) {
@@ -679,7 +679,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         stringJoiner.add(SystemConstant.getNanoId()).add(".").add(SystemConstant.XLSX);
 
         JSONObject jsonObject = new JSONObject();
-        String dirName = stringJoiner.toString().replaceAll("\\\\", "/");
+        String dirName = stringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
         boolean oss = dictionaryConfig.sysDomain().isOss();
         if (oss) {//上传至oss
             fileStoreUtil.ossUpload(dirName, in, DigestUtils.md5Hex(new ByteArrayInputStream(outputStream.toByteArray())), fileStoreUtil.getUploadEnumByPath(dirName).getFssType());
@@ -687,7 +687,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             jsonObject.put(SystemConstant.PATH, dirName);
         } else {
             if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getConfig())) {
-                dirName = (dictionaryConfig.fssLocalFileDomain().getConfig() + File.separator + dirName).replaceAll("\\\\", "/");
+                dirName = (dictionaryConfig.fssLocalFileDomain().getConfig() + File.separator + dirName).replaceAll("\\\\", SystemConstant.ORG_SPLIT);
                 fileStoreUtil.copyInputStreamToFile(in, new File(stringJoiner.toString()), DigestUtils.md5Hex(new ByteArrayInputStream(outputStream.toByteArray())), LocalCatalogEnum.LOCAL_FILE);
             } else {
                 fileStoreUtil.ossUpload(dirName, in, DigestUtils.md5Hex(new ByteArrayInputStream(outputStream.toByteArray())), UploadFileEnum.FILE.getFssType());
@@ -952,8 +952,8 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                             .add(e.getExamName()).add(File.separator)
                             .add(e.getCourseNameCode()).add(File.separator)
                             .add(e.getPackageCode()).add(File.separator)
-                            .add(e.getCourseNameCode()).add("-")
-                            .add(e.getPaperNumber()).add("-");
+                            .add(e.getCourseNameCode()).add(SystemConstant.HYPHEN)
+                            .add(e.getPaperNumber()).add(SystemConstant.HYPHEN);
                     //试卷合并文件
                     if (Objects.nonNull(e.getAttachmentId())) {
                         BasicAttachment attachment = basicAttachmentService.getById(e.getAttachmentId());
@@ -996,7 +996,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                 }
                 if (!CollectionUtils.isEmpty(sourceFileList)) {
                     Zip4jUtil.zipEncryptFile(zipFile.getPath(), zipLocalRootPath, SystemConstant.ZIP_ENCRYPT_PWD);
-                    String ossDirName = dirName.toString().replaceAll("\\\\", "/");
+                    String ossDirName = dirName.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
                     JSONObject jsonObject = new JSONObject();
                     boolean oss = dictionaryConfig.sysDomain().isOss();
                     if (oss) {//上传至oss
@@ -1112,7 +1112,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         }
         StringJoiner stringJoine = SystemConstant.getDirName(UploadFileEnum.FILE, true);
         stringJoine.add(SystemConstant.getNanoId()).add(SystemConstant.ZIP_PREFIX);
-        String dirNameTmp = stringJoine.toString().replaceAll("\\\\", "/");
+        String dirNameTmp = stringJoine.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
         File zipFile = new File(zipJoiner + dirNameTmp);
         if (!zipFile.getParentFile().exists()) {
             zipFile.getParentFile().mkdirs();
@@ -1128,7 +1128,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             if (Objects.isNull(examTask)) {
                 throw ExceptionResultEnum.ERROR.exception("未找到命题任务");
             }
-            String examTaskSign = examTask.getCourseName() + "-" + examTask.getPaperNumber();
+            String examTaskSign = examTask.getCourseName() + SystemConstant.HYPHEN + examTask.getPaperNumber();
             String firstPath = zipLocalRootPath + File.separator + examTaskSign;
             ReviewSampleDto reviewSampleDto = examTaskService.findReviewSampleInfoByExamTaskId(id);
 
@@ -1249,7 +1249,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             }
             count++;
         }
-        zipLocalRootPath = zipLocalRootPath.replaceAll("\\\\", "/");
+        zipLocalRootPath = zipLocalRootPath.replaceAll("\\\\", SystemConstant.ORG_SPLIT);
         Zip4jUtil.zipEncryptFile(zipFile.getPath(), zipLocalRootPath, SystemConstant.ZIP_ENCRYPT_PWD);
         JSONObject jsonObject = new JSONObject();
         if (oss) {//上传至oss
@@ -1260,7 +1260,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             zipFile.delete();
         } else {
             jsonObject.put(SystemConstant.TYPE, SystemConstant.LOCAL);
-            jsonObject.put(SystemConstant.PATH, (zipJoiner + dirNameTmp).replaceAll("\\\\", "/"));
+            jsonObject.put(SystemConstant.PATH, (zipJoiner + dirNameTmp).replaceAll("\\\\", SystemConstant.ORG_SPLIT));
         }
         jsonObject.put(SystemConstant.UPLOAD_TYPE, UploadFileEnum.FILE);
         tbTask.setResultFilePath(jsonObject.toJSONString());
@@ -1287,7 +1287,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             }
             StringJoiner dirName = SystemConstant.getDirName(UploadFileEnum.FILE, true);
             dirName.add(yyyyMMddHH24mmss).add("_").add(basicSchool.getName()).add("_").add("试卷导出文件").add(SystemConstant.ZIP_PREFIX);
-            String dirNameTmp = dirName.toString().replaceAll("\\\\", "/");
+            String dirNameTmp = dirName.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
 
             // 根文件路径
             boolean oss = dictionaryConfig.sysDomain().isOss();
@@ -1307,8 +1307,8 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                         .add(examTaskDetailPdfDownloadDto.getExamName()).add(File.separator)
                         .add(examTaskDetailPdfDownloadDto.getCourseNameCode()).add(File.separator)
                         .add(examTaskDetailPdfDownloadDto.getPaperNumber()).add(File.separator)
-                        .add(examTaskDetailPdfDownloadDto.getCourseNameCode()).add("-")
-                        .add(examTaskDetailPdfDownloadDto.getPaperNumber()).add("-");
+                        .add(examTaskDetailPdfDownloadDto.getCourseNameCode()).add(SystemConstant.HYPHEN)
+                        .add(examTaskDetailPdfDownloadDto.getPaperNumber()).add(SystemConstant.HYPHEN);
                 // 试卷
                 String paperAttachmentIds = examTaskDetailPdfDownloadDto.getPaperAttachmentIds();
                 if (StringUtils.isNotBlank(paperAttachmentIds)) {
@@ -1323,7 +1323,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                             BasicAttachment attachment = basicAttachmentService.getById(attachmentId);
                             if (Objects.nonNull(attachment)) {
                                 JSONObject jsonObject = JSONObject.parseObject(attachment.getPath());
-                                String paperPath = dirPath.toString() + "试卷" + "-" + name + attachment.getType();
+                                String paperPath = dirPath.toString() + "试卷" + SystemConstant.HYPHEN + name + attachment.getType();
                                 UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
                                 File file = null;
                                 file = new File(paperPath);
@@ -1344,8 +1344,8 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                         }
                         MakeMethodEnum makeMethodEnum = examCard.getMakeMethod();
 
-                        String cardHtmlPath = dirPath.toString() + "题卡" + "-" + paperMap.get("name") + SystemConstant.HTML_PREFIX;
-                        String cardPdfPath = dirPath.toString() + "题卡" + "-" + paperMap.get("name") + SystemConstant.PDF_PREFIX;
+                        String cardHtmlPath = dirPath.toString() + "题卡" + SystemConstant.HYPHEN + paperMap.get("name") + SystemConstant.HTML_PREFIX;
+                        String cardPdfPath = dirPath.toString() + "题卡" + SystemConstant.HYPHEN + paperMap.get("name") + SystemConstant.PDF_PREFIX;
                         // 通用题卡
                         ExamCardDetail examCardDetail = examCardDetailService.getByCardId(examCard.getId());
                         String htmlContent;
@@ -1945,7 +1945,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         }
         StringJoiner stringJoiner = SystemConstant.getDirName(UploadFileEnum.FILE, true);
         stringJoiner.add(SystemConstant.getNanoId()).add(SystemConstant.ZIP_PREFIX);
-        String dirNameTmp = stringJoiner.toString().replaceAll("\\\\", "/");
+        String dirNameTmp = stringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
         File zipFile = new File(zipJoiner + dirNameTmp);
         if (!zipFile.getParentFile().exists()) {
             zipFile.getParentFile().mkdirs();
@@ -1973,7 +1973,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             throw ExceptionResultEnum.ERROR.exception("没有找到任何试卷信息");
         }
         // 二级路径 课程
-        Set<String> courseSet = examTaskPaperFileDtoList.stream().map(e -> e.getCourseName() + "-" + e.getCourseCode()).collect(Collectors.toSet());
+        Set<String> courseSet = examTaskPaperFileDtoList.stream().map(e -> e.getCourseName() + SystemConstant.HYPHEN + e.getCourseCode()).collect(Collectors.toSet());
         // 文件数以一级目录文件为准(初始1是excel)
         int count = 1;
         for (String course : courseSet) {
@@ -1981,7 +1981,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             int courseCount = 0;
             Set<String> paperNumberSet = examTaskPaperFileDtoList
                     .stream()
-                    .filter(e -> course.equals(e.getCourseName() + "-" + e.getCourseCode()))
+                    .filter(e -> course.equals(e.getCourseName() + SystemConstant.HYPHEN + e.getCourseCode()))
                     .map(ExamTaskPaperFileDto::getPaperNumber)
                     .collect(Collectors.toSet());
             for (String paperNumber : paperNumberSet) {
@@ -2047,7 +2047,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                             if (namedByOriginalFile) {
                                 cardName = cardName + examCardService.getById(examCardId).getTitle();
                             }
-                            cardName = cardName + "-" + examTaskPaperFileDto.getPaperType();
+                            cardName = cardName + SystemConstant.HYPHEN + examTaskPaperFileDto.getPaperType();
                             String cardLocalHtmlPath = filePath + cardName + SystemConstant.HTML_PREFIX;
                             String cardLocalPdfPath = filePath + cardName + SystemConstant.PDF_PREFIX;
 
@@ -2078,7 +2078,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                             if (namedByOriginalFile) {
                                 paperName = paperName + examTaskPaperFileDto.getPaperName();
                             }
-                            paperName = paperName + "-" + examTaskPaperFileDto.getPaperType();
+                            paperName = paperName + SystemConstant.HYPHEN + examTaskPaperFileDto.getPaperType();
                             String paperLocalPath = filePath + paperName + examTaskPaperFileDto.getPaperSuffix();
                             String paperPath = examTaskPaperFileDto.getPaperPath();
                             if (oss) {
@@ -2115,7 +2115,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                             if (namedByOriginalFile) {
                                 cardName = cardName + examCardService.getById(examCardId).getTitle();
                             }
-                            cardName = cardName + "-" + examTaskPaperFileDto.getPaperType();
+                            cardName = cardName + SystemConstant.HYPHEN + examTaskPaperFileDto.getPaperType();
                             String cardLocalHtmlPath = filePath + cardName + SystemConstant.HTML_PREFIX;
                             String cardLocalPdfPath = filePath + cardName + SystemConstant.PDF_PREFIX;
                             File localCardFile = new File(cardLocalHtmlPath);
@@ -2141,7 +2141,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                             if (namedByOriginalFile) {
                                 paperName = paperName + examTaskPaperFileDto.getPaperName();
                             }
-                            paperName = paperName + "-" + examTaskPaperFileDto.getPaperType();
+                            paperName = paperName + SystemConstant.HYPHEN + examTaskPaperFileDto.getPaperType();
                             String paperLocalPath = filePath + paperName + examTaskPaperFileDto.getPaperSuffix();
                             String paperPath = examTaskPaperFileDto.getPaperPath();
 

+ 9 - 9
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/CreatePdfUtil.java

@@ -360,9 +360,9 @@ public class CreatePdfUtil {
                     String endTime = DateUtil.format(new Date(examDetail.getExamEndTime()), SystemConstant.TIME_PATTERN);
                     String examTime;
                     if (startDate.equals(endDate)) {
-                        examTime = startDate + " " + startTime + "-" + endTime;
+                        examTime = startDate + " " + startTime + SystemConstant.HYPHEN + endTime;
                     } else {
-                        examTime = startDate + " " + startTime + "-" + endDate + " " + endTime;
+                        examTime = startDate + " " + startTime + SystemConstant.HYPHEN + endDate + " " + endTime;
                     }
                     basicMap.put("value", examTime);
                 } else if ("courseCode".equals(code)) {
@@ -413,7 +413,7 @@ public class CreatePdfUtil {
                             bollegeSet.addAll(stringSet);
                         }
                     }
-                    basicMap.put("value", String.join(",", bollegeSet));
+                    basicMap.put("value", String.join(SystemConstant.COMMA_OF_CHINESE, bollegeSet));
                 }
                 //派监考学院
                 else if ("STICollege".equals(code)) {
@@ -425,7 +425,7 @@ public class CreatePdfUtil {
                             stiCollegeSet.addAll(stringSet);
                         }
                     }
-                    basicMap.put("value", String.join(",", stiCollegeSet));
+                    basicMap.put("value", String.join(SystemConstant.COMMA_OF_CHINESE, stiCollegeSet));
                 }
                 //上课教师
                 else if ("CTeacher".equals(code)) {
@@ -437,7 +437,7 @@ public class CreatePdfUtil {
                             cTeacherSet.addAll(stringSet);
                         }
                     }
-                    basicMap.put("value", String.join(",", cTeacherSet));
+                    basicMap.put("value", String.join(SystemConstant.COMMA_OF_CHINESE, cTeacherSet));
                 }
                 basicPlate.add(basicMap);
 
@@ -693,9 +693,9 @@ public class CreatePdfUtil {
                 String endTime = DateUtil.format(new Date(examDetail.getExamEndTime()), SystemConstant.TIME_PATTERN);
                 String examTime;
                 if (startDate.equals(endDate)) {
-                    examTime = startDate + " " + startTime + "-" + endTime;
+                    examTime = startDate + " " + startTime + SystemConstant.HYPHEN + endTime;
                 } else {
-                    examTime = startDate + " " + startTime + "-" + endDate + " " + endTime;
+                    examTime = startDate + " " + startTime + SystemConstant.HYPHEN + endDate + " " + endTime;
                 }
                 Map<String, String> basicMap = new HashMap<>();
                 basicMap.put("code", code);
@@ -1105,7 +1105,7 @@ public class CreatePdfUtil {
         BasicAttachment basicAttachment = null;
         // 试卷+题卡
         if (Objects.nonNull(dirNamePaper)) {
-            dirNamePaper = dirNamePaper.replaceAll("\\\\", "/");
+            dirNamePaper = dirNamePaper.replaceAll("\\\\", SystemConstant.ORG_SPLIT);
             localPaperPdfFile = new File(dirNamePaper);
             basicAttachment = basicAttachmentService.saveAttachmentPdf(dirNamePaper, userId);
             if (StringUtils.isBlank(tbTask.getImportFileName())) {
@@ -1118,7 +1118,7 @@ public class CreatePdfUtil {
         }
         // 题卡
         if (Objects.nonNull(dirNameCardA3)) {
-            dirNameCardA3 = dirNameCardA3.replaceAll("\\\\", "/");
+            dirNameCardA3 = dirNameCardA3.replaceAll("\\\\", SystemConstant.ORG_SPLIT);
             localA3PdfCardFile = new File(dirNameCardA3);
             basicAttachment = basicAttachmentService.saveAttachmentPdf(dirNameCardA3, userId);
             if (StringUtils.isBlank(tbTask.getImportFileName())) {

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/FreemarkerUtil.java

@@ -92,7 +92,7 @@
 //            ClassifyEnum classifyEnum = (ClassifyEnum) dataMap.get("printType");
 //            JSONObject jsonObject = JSONObject.parseObject(basicAttachment.getPath());
 //            String path = (String) jsonObject.get(SystemConstant.PATH);
-//            int last = path.lastIndexOf("/") == -1 ? path.lastIndexOf("\\") : path.lastIndexOf("/");
+//            int last = path.lastIndexOf(SystemConstant.ORG_SPLIT) == -1 ? path.lastIndexOf("\\") : path.lastIndexOf(SystemConstant.ORG_SPLIT);
 //            String ftlPath = path.substring(0, last);
 //            String ftlName = path.substring(last + 1, path.lastIndexOf("."));
 //
@@ -128,7 +128,7 @@
 //            out.flush();
 //
 //            if (oss) {
-//                String htmlStringJoinerStr = htmlStringJoiner.toString().replace("\\", "/");
+//                String htmlStringJoinerStr = htmlStringJoiner.toString().replace("\\", SystemConstant.ORG_SPLIT);
 //                jsonObject.put(SystemConstant.HTML_PATH, htmlStringJoinerStr);
 //                fileStoreUtil.ossUpload(htmlStringJoinerStr, htmlFile, DigestUtils.md5Hex(new FileInputStream(htmlFile)), fileStoreUtil.getUploadEnumByPath(htmlStringJoinerStr).getFssType());
 //            } else {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/HtmlToJpgUtil.java

@@ -117,7 +117,7 @@ public class HtmlToJpgUtil {
             convertJpgStorageList = this.convertHtmlToJpg(cardTitle, htmlContent, pageSizeEnum).stream().flatMap(e -> {
                 ConvertJpgStorage tmp = new ConvertJpgStorage();
                 String name = e.getName();
-                String index = name.substring(name.lastIndexOf("-") + 1);
+                String index = name.substring(name.lastIndexOf(SystemConstant.HYPHEN) + 1);
                 tmp.setAttachmentId(e.getId());
                 tmp.setIndex(Integer.valueOf(index));
                 return Stream.of(tmp);

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/PdfUtil.java

@@ -253,7 +253,7 @@ public class PdfUtil {
                 if (paginate) {
                     contentByte.beginText();
                     contentByte.setFontAndSize(baseFont, 13);
-                    contentByte.showTextAligned(PdfContentByte.ALIGN_CENTER, "" + currentPageNumber + "/" + (totalPages / 2 + (totalPages % 2 == 0 ? 0 : 1)), newRec.getWidth() / 2, 17, 0);
+                    contentByte.showTextAligned(PdfContentByte.ALIGN_CENTER, "" + currentPageNumber + SystemConstant.ORG_SPLIT + (totalPages / 2 + (totalPages % 2 == 0 ? 0 : 1)), newRec.getWidth() / 2, 17, 0);
                     contentByte.endText();
                 }
             }

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/SysController.java

@@ -438,7 +438,7 @@ public class SysController {
                 if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getServer())) {
                     String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.fssLocalFileDomain().getServer());
                     String filePath = SystemConstant.getLocalFilePath(hostUrl, basicSchool.getLogo());
-                    if (filePath.startsWith("/")) {
+                    if (filePath.startsWith(SystemConstant.ORG_SPLIT)) {
                         url = hostUrl + filePath;
                     } else {
                         url = hostUrl + File.separator + filePath;

+ 1 - 1
distributed-print/src/test/java/com/qmth/distributed/print/BasicDataImportTest.java

@@ -155,7 +155,7 @@ public class BasicDataImportTest {
 //                List<BasicUserCourse> userCourses = new ArrayList<>();
 //                String[] courseCodes = courseCodeses.split(",");
 //                for (String courseCode : courseCodes) {
-//                    String[] coursees = courseCode.split("/");
+//                    String[] coursees = courseCode.split(SystemConstant.ORG_SPLIT);
 //                    QueryWrapper<BasicCourse> basicCourseQueryWrapper = new QueryWrapper<>();
 //                    basicCourseQueryWrapper.lambda().eq(BasicCourse::getSchoolId, schoolId).eq(BasicCourse::getCode, coursees[0]);
 //                    BasicCourse basicCourse = basicCourseService.getOne(basicCourseQueryWrapper);

+ 1 - 1
distributed-print/src/test/java/com/qmth/distributed/print/BasicUserImportTest.java

@@ -166,7 +166,7 @@ public class BasicUserImportTest {
 //                List<BasicUserCourse> userCourses = new ArrayList<>();
 //                String[] courseCodes = courseCodeses.split(",");
 //                for (String courseCode : courseCodes) {
-//                    String[] coursees = courseCode.split("/");
+//                    String[] coursees = courseCode.split(SystemConstant.ORG_SPLIT);
 //                    QueryWrapper<BasicCourse> basicCourseQueryWrapper = new QueryWrapper<>();
 //                    basicCourseQueryWrapper.lambda().eq(BasicCourse::getSchoolId, schoolId).eq(BasicCourse::getCode, coursees[0]);
 //                    BasicCourse basicCourse = basicCourseService.getOne(basicCourseQueryWrapper);

+ 2 - 2
distributed-print/src/test/java/com/qmth/distributed/print/FssTest.java

@@ -54,7 +54,7 @@ public class FssTest {
         UploadFileEnum type = UploadFileEnum.FILE;
         File file = new File("C:\\Users\\ASUS\\Desktop\\excel导入临时\\课程导入模板.xlsx");
 //        File file = new File("C:\\Users\\ASUS\\Desktop\\分布式印刷.txt");
-        String date = DateUtil.today().replace("-", "/");
+        String date = DateUtil.today().replace(SystemConstant.HYPHEN, SystemConstant.ORG_SPLIT);
         System.out.println(file.getName());
         System.out.println(date);
         String path = FssUtils.buildPath(type.getTitle(), date, SystemConstant.getNanoId() + SystemConstant.XLSX);
@@ -83,7 +83,7 @@ public class FssTest {
             throw ExceptionResultEnum.ERROR.exception("文件存储store类型不存在");
         }
 
-        String dirPath = server + "/" + filePath;
+        String dirPath = server + SystemConstant.ORG_SPLIT + filePath;
         System.out.println(config);
         System.out.println(server);
         System.out.println(dirPath);

+ 2 - 3
teachcloud-common/src/main/java/com/qmth/teachcloud/common/SignatureEntityTest.java

@@ -1,6 +1,7 @@
 package com.qmth.teachcloud.common;
 
 import com.qmth.boot.tools.signature.SignatureType;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.util.Base64Util;
 import com.qmth.teachcloud.common.util.ShaUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -15,8 +16,6 @@ public class SignatureEntityTest {
 
     public static final String FIELD_JOINER = ":";
 
-    public static final String PARAM_JOINER = "&";
-
     private static Map<String, SignatureType> typeMap = new HashMap<>();
 
     static {
@@ -99,7 +98,7 @@ public class SignatureEntityTest {
     }
 
     public static String encrypt(String... values) {
-        return Base64Util.encode(ShaUtils.sha1(StringUtils.join(values, PARAM_JOINER)));
+        return Base64Util.encode(ShaUtils.sha1(StringUtils.join(values, SystemConstant.GET_SYMBOL)));
     }
 
 //    /**

+ 6 - 134
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -21,7 +21,6 @@ import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.springframework.cglib.beans.BeanMap;
 
 import java.io.*;
 import java.lang.reflect.Field;
@@ -262,7 +261,6 @@ public class SystemConstant {
     public static final String GET_SYMBOL = "&";
     public static final String GET_EQUAL = "=";
     public static final String PATH_MATCH = "*";
-    public static final String PATH_SUBSTR = "/#";
     public static final String CATALOG_LINK = "->";
     public static final String OPERATE_LINK = "--";
 
@@ -469,22 +467,13 @@ public class SystemConstant {
         return Objects.nonNull(id) && id.length() > 0 ? Long.parseLong(id) : null;
     }
 
-    /**
-     * id转换为Integer
-     *
-     * @return
-     */
-    public static Integer convertIdToInteger(String id) {
-        return Objects.nonNull(id) && id.length() > 0 ? Integer.parseInt(id) : null;
-    }
-
 //    /**
 //     * 获取全局uuid
 //     *
 //     * @return
 //     */
 //    public static String getUuid() {
-//        return String.valueOf(UUID.randomUUID()).replaceAll("-", "");
+//        return String.valueOf(UUID.randomUUID()).replaceAll(SystemConstant.HYPHEN, "");
 //    }
 
     /**
@@ -515,15 +504,6 @@ public class SystemConstant {
         return uidservice.getId();
     }
 
-    /**
-     * enable转换
-     *
-     * @return
-     */
-    public static Boolean convertEnable(Boolean enable) {
-        return Objects.nonNull(enable) ? enable : true;
-    }
-
     /**
      * 试卷类型转换
      *
@@ -630,18 +610,6 @@ public class SystemConstant {
         return new DBVerifyResult(true, "成功");
     }
 
-//    /**
-//     * 获取流程学校code
-//     *
-//     * @return
-//     */
-//    public static Map<String, List<String>> getFlowSchoolCodeMap() {
-//        DictionaryConfig dictionaryConfig = SpringContextHolder.getBean(DictionaryConfig.class);
-//        Map<String, List<String>> flowSchoolCodeMap = dictionaryConfig.sysDomain().getFlowSchoolCodeMap();
-//        Optional.ofNullable(flowSchoolCodeMap).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置学校流程code"));
-//        return flowSchoolCodeMap;
-//    }
-
     /**
      * 验证参数任意一个为空
      *
@@ -696,24 +664,6 @@ public class SystemConstant {
         return map;
     }
 
-    /**
-     * 跨步数组(将list集合按照数量拆分成多个集合)
-     *
-     * @param datasource 数据源(初始大数据集合)
-     * @param step       跨步(多少个元素一个集合)
-     * @param <T>        泛型
-     * @return 拆分好地集合的集合
-     */
-    public static <T> List<List<T>> getStepList(List<T> datasource, int step) {
-        List<List<T>> result = new ArrayList<>();
-        int size = datasource.size();
-        for (int i = 0; i < size; i = i + step) {
-            List<T> cell = datasource.stream().skip(i).limit(step).collect(Collectors.toList());
-            result.add(cell);
-        }
-        return result;
-    }
-
     /**
      * 跨步数组(将list集合按照cpu核心数量拆分成多个集合)
      *
@@ -767,36 +717,6 @@ public class SystemConstant {
         }
     }
 
-    /**
-     * 将对象装换为map
-     *
-     * @param bean
-     * @return
-     */
-    public static Map<String, Object> beanToMap(Object bean) {
-        Map map = new HashMap<>();
-        if (bean != null) {
-            BeanMap beanMap = BeanMap.create(bean);
-            for (Object key : beanMap.keySet()) {
-                map.put(String.valueOf(key), beanMap.get(key));
-            }
-        }
-        return map;
-    }
-
-    /**
-     * 将map装换为javabean对象
-     *
-     * @param map
-     * @param bean
-     * @return
-     */
-    public static Object mapToBean(Map<String, Object> map, Object bean) {
-        BeanMap beanMap = BeanMap.create(bean);
-        beanMap.putAll(map);
-        return bean;
-    }
-
     /**
      * 获取本地文件host
      *
@@ -805,10 +725,10 @@ public class SystemConstant {
      */
     public static String getLocalFileHost(String hostUrl) {
         CommonCacheService commonCacheService = SpringContextHolder.getBean(CommonCacheService.class);
-        if (hostUrl.contains("*")) {
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
             SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
             BasicSchool basicSchool = commonCacheService.schoolCache(sysUser.getSchoolId());
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         return hostUrl;
     }
@@ -822,10 +742,10 @@ public class SystemConstant {
      */
     public static String getLocalFileHostByUserId(String hostUrl, Long userId) {
         CommonCacheService commonCacheService = SpringContextHolder.getBean(CommonCacheService.class);
-        if (hostUrl.contains("*")) {
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
             SysUser sysUser = commonCacheService.userCache(userId);
             BasicSchool basicSchool = commonCacheService.schoolCache(sysUser.getSchoolId());
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         return hostUrl;
     }
@@ -868,26 +788,10 @@ public class SystemConstant {
      */
     public static File getFileTempVar(String suffix) throws IOException {
         File file = File.createTempFile(SystemConstant.TEMP, suffix);
-        System.out.println("getFileTempVar_absolutePath:" + file.getAbsolutePath());
+        System.out.println("getFileTempVar_absolutePath1:" + file.getAbsolutePath());
         return file;
     }
 
-    /**
-     * 获取临时文件
-     *
-     * @param suffix
-     * @param fileTemp
-     * @return
-     * @throws IOException
-     */
-    public static List<File> getFileTempVar(String suffix, List<File> fileTemp) throws IOException {
-        File file = File.createTempFile(SystemConstant.TEMP, suffix);
-        System.out.println("getFileTempVar_absolutePath:" + file.getAbsolutePath());
-        fileTemp.add(file);
-        return fileTemp;
-    }
-
-
     /**
      * 获取dirname
      *
@@ -960,38 +864,6 @@ public class SystemConstant {
         }
     }
 
-    /**
-     * 获取普通文件路径
-     *
-     * @param fileDirName
-     * @param file
-     * @return
-     * @throws Exception
-     */
-    public static String getFilePath(String fileDirName, File file) throws Exception {
-        DictionaryConfig dictionaryConfig = SpringContextHolder.getBean(DictionaryConfig.class);
-        FileStoreUtil fileStoreUtil = SpringContextHolder.getBean(FileStoreUtil.class);
-        boolean oss = dictionaryConfig.sysDomain().isOss();
-        if (oss) {
-            fileStoreUtil.ossUpload(fileDirName, file, DigestUtils.md5Hex(new FileInputStream(file)), fileStoreUtil.getUploadEnumByPath(fileDirName).getFssType());
-            return fileDirName;
-        } else {
-            if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getConfig())) {
-                String destUrl = dictionaryConfig.fssLocalFileDomain().getConfig() + File.separator + fileDirName;
-                File newFile = new File(destUrl);
-                if (!newFile.exists()) {
-                    newFile.getParentFile().mkdirs();
-                    newFile.createNewFile();
-                }
-                FileUtils.copyFile(file, newFile);
-                return destUrl;
-            } else {
-                fileStoreUtil.ossUpload(fileDirName, file, DigestUtils.md5Hex(new FileInputStream(file)), fileStoreUtil.getUploadEnumByPath(fileDirName).getFssType());
-                return fileDirName;
-            }
-        }
-    }
-
     /**
      * 创建txt文件
      *

+ 2 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/FssPrivateDomain.java

@@ -1,5 +1,6 @@
 package com.qmth.teachcloud.common.domain;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import org.apache.commons.lang3.StringUtils;
 
 /**
@@ -27,7 +28,7 @@ public class FssPrivateDomain {
     }
 
     public String getServer() {
-        if (!StringUtils.isBlank(this.server) && this.server.endsWith("/")) {
+        if (!StringUtils.isBlank(this.server) && this.server.endsWith(SystemConstant.ORG_SPLIT)) {
             this.server = this.server.substring(0, this.server.length() - 1);
             return this.server;
         } else {

+ 2 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/FssPublicDomain.java

@@ -1,5 +1,6 @@
 package com.qmth.teachcloud.common.domain;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import org.apache.commons.lang3.StringUtils;
 
 /**
@@ -27,7 +28,7 @@ public class FssPublicDomain {
     }
 
     public String getServer() {
-        if (!StringUtils.isBlank(this.server) && this.server.endsWith("/")) {
+        if (!StringUtils.isBlank(this.server) && this.server.endsWith(SystemConstant.ORG_SPLIT)) {
             this.server = this.server.substring(0, this.server.length() - 1);
             return this.server;
         } else {

+ 2 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicAttachmentServiceImpl.java

@@ -78,7 +78,7 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
             String pdfName = SystemConstant.getNanoId() + SystemConstant.PDF_PREFIX;
             pdfStringJoiner.add(pdfName);
 
-            String pdfDirName = pdfStringJoiner.toString().replaceAll("\\\\", "/");
+            String pdfDirName = pdfStringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
             String pdfFileMd5 = DigestUtils.md5Hex(new FileInputStream(pdfFile));
 
             JSONObject jsonPdf = new JSONObject();
@@ -192,7 +192,7 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
             stringJoiner.add(SystemConstant.getNanoId()).add(format);
 
             JSONObject jsonObject = new JSONObject();
-            String dirName = stringJoiner.toString().replaceAll("\\\\", "/");
+            String dirName = stringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
             if (oss) {//上传至oss
                 fileStoreUtil.ossUpload(dirName, file.getInputStream(), DigestUtils.md5Hex(file.getInputStream()), type.getFssType());
                 jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);

+ 5 - 6
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicStudentServiceImpl.java

@@ -109,7 +109,6 @@ public class BasicStudentServiceImpl extends ServiceImpl<BasicStudentMapper, Bas
     @Override
     public void saveBasicStudentWithExtrasList(List<BasicStudentExtrasParam> basicStudentExtrasParamList, SysUser requestUser) throws IllegalAccessException {
         Long schoolId = requestUser.getSchoolId();
-        final String link = "-";
         // key = collegeName
         Map<String, Long> collegeMap = new HashMap<>();
         // key = schoolId + "-" + majorName
@@ -155,7 +154,7 @@ public class BasicStudentServiceImpl extends ServiceImpl<BasicStudentMapper, Bas
                 if (!SystemConstant.longNotNull(collegeId)) {
                     throw ExceptionResultEnum.ERROR.exception("学生专业信息缺失学院信息异常");
                 }
-                String majorKey = schoolId + link + majorName;
+                String majorKey = schoolId + SystemConstant.HYPHEN + majorName;
                 if (majorMap.containsKey(majorKey)) {
                     majorId = majorMap.get(majorKey);
                 } else {
@@ -185,7 +184,7 @@ public class BasicStudentServiceImpl extends ServiceImpl<BasicStudentMapper, Bas
                     throw ExceptionResultEnum.ERROR.exception("学生班级信息缺失专业信息异常");
                 }
 
-                String clazzKey = schoolId + link + clazzName;
+                String clazzKey = schoolId + SystemConstant.HYPHEN + clazzName;
                 if (clazzMap.containsKey(clazzKey)) {
                     clazzId = clazzMap.get(clazzKey);
                 } else {
@@ -337,7 +336,7 @@ public class BasicStudentServiceImpl extends ServiceImpl<BasicStudentMapper, Bas
                 }
                 if (SystemConstant.longNotNull(majorId)) {
                     if (!majorId.equals(basicClazz.getMajorId())) {
-                        String exception = "学生信息【" + studentName + "(" + studentCode + ")" + "-" + basicMajorService.getById(majorId).getName() + "】中的专业和学生所属班级信息【" + basicClazz.getClazzName() + "-" + basicMajorService.getById(basicClazz.getMajorId()).getName() + "】中的专业不对应";
+                        String exception = "学生信息【" + studentName + "(" + studentCode + ")" + SystemConstant.HYPHEN + basicMajorService.getById(majorId).getName() + "】中的专业和学生所属班级信息【" + basicClazz.getClazzName() + "-" + basicMajorService.getById(basicClazz.getMajorId()).getName() + "】中的专业不对应";
                         throw ExceptionResultEnum.ERROR.exception(exception);
                     }
                 }
@@ -352,9 +351,9 @@ public class BasicStudentServiceImpl extends ServiceImpl<BasicStudentMapper, Bas
                 }
                 if (SystemConstant.longNotNull(collegeId)) {
                     if (!collegeId.equals(basicMajor.getBelongOrgId())) {
-                        String exception = "学生信息【" + studentName + "(" + studentCode + ")" + "-" + basicCollegeService.getById(collegeId).getCollegeName() +
+                        String exception = "学生信息【" + studentName + "(" + studentCode + ")" + SystemConstant.HYPHEN + basicCollegeService.getById(collegeId).getCollegeName() +
                                 "】中的学院和学生所属专业信息【" +
-                                basicMajor.getName() + "-" + basicCollegeService.getById(basicMajor.getBelongOrgId()).getCollegeName() + "】中的学院不对应";
+                                basicMajor.getName() + SystemConstant.HYPHEN + basicCollegeService.getById(basicMajor.getBelongOrgId()).getCollegeName() + "】中的学院不对应";
                         throw ExceptionResultEnum.ERROR.exception(exception);
                     }
                 }

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysOrgServiceImpl.java

@@ -509,7 +509,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
                 throw ExceptionResultEnum.ERROR.exception("未找到父机构");
             }
             throw ExceptionResultEnum.ERROR.exception("机构创建失败:机构【" + orgName + "】存在多个不同的上级机构 " +
-                    "-> 已存在机构关系【..." + p1.getName() + "/" + orgName + "...】,却又创建机构关系【..." + p2.getName() + "/" + orgName + "...】");
+                    "-> 已存在机构关系【..." + p1.getName() + SystemConstant.ORG_SPLIT + orgName + "...】,却又创建机构关系【..." + p2.getName() + SystemConstant.ORG_SPLIT + orgName + "...】");
         }
 
         SysOrg sysOrg = new SysOrg();

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysRoleGroupMemberServiceImpl.java

@@ -90,7 +90,7 @@ public class SysRoleGroupMemberServiceImpl extends ServiceImpl<SysRoleGroupMembe
                 String errorColumn = e.getCause().toString();
                 String repeatColumn = errorColumn.substring(errorColumn.lastIndexOf("entry") + 6, errorColumn.length());
                 repeatColumn = repeatColumn.substring(0, repeatColumn.lastIndexOf("for") - 2);
-                String[] strs = repeatColumn.split("-");
+                String[] strs = repeatColumn.split(SystemConstant.HYPHEN);
                 SysUser sysuser = null;
                 if (Objects.nonNull(strs) && strs.length >= 2) {
                     sysuser = sysUserService.getById(SystemConstant.convertIdToLong(strs[1]));

+ 5 - 5
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java

@@ -449,7 +449,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
             if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getServer())) {
                 String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.fssLocalFileDomain().getServer());
                 filePath = SystemConstant.getLocalFilePath(hostUrl, filePath);
-                if (filePath.startsWith("/")) {
+                if (filePath.startsWith(SystemConstant.ORG_SPLIT)) {
                     url = hostUrl + filePath;
                 } else {
                     url = hostUrl + File.separator + filePath;
@@ -462,7 +462,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
             UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
             url = fileStoreUtil.getPrivateUrl(filePath, uploadFileEnum.getFssType());
         }
-        url = url.replaceAll("\\\\", "/");
+        url = url.replaceAll("\\\\", SystemConstant.ORG_SPLIT);
         return url;
     }
 
@@ -484,7 +484,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
             if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getServer())) {
                 String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.fssLocalFileDomain().getServer());
                 path = SystemConstant.getLocalFilePath(hostUrl, path);
-                if (path.startsWith("/")) {
+                if (path.startsWith(SystemConstant.ORG_SPLIT)) {
                     pathUrl = hostUrl + path;
                 } else {
                     pathUrl = hostUrl + File.separator + path;
@@ -528,7 +528,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
             if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getServer())) {
                 String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.fssLocalFileDomain().getServer());
                 filePath = SystemConstant.getLocalFilePath(hostUrl, filePath);
-                if (filePath.startsWith("/")) {
+                if (filePath.startsWith(SystemConstant.ORG_SPLIT)) {
                     pathUrl = hostUrl + filePath;
                 } else {
                     pathUrl = hostUrl + File.separator + filePath;
@@ -833,7 +833,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
     @Override
     public String getSysIncrCode(SystemCodeEnum type, SysUser requestUser) {
         Long schoolId = requestUser.getSchoolId();
-        String date = DateUtil.today().replace("-", "");
+        String date = DateUtil.today().replace(SystemConstant.HYPHEN, "");
         String paperNumber = "";
         int count = 0;
         do {

+ 12 - 12
teachcloud-common/src/main/java/com/qmth/teachcloud/common/sync/TeachCloudReportTaskUtils.java

@@ -51,8 +51,8 @@ public class TeachCloudReportTaskUtils {
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析地址"));
         String hostUrl = sysConfig.getConfigValue();
         BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String saveUrl = SystemConstant.TEACHCLOUD_REPORT_OPEN_SEMESTER_EDIT_API;
         validUrl(hostUrl, saveUrl);
@@ -100,8 +100,8 @@ public class TeachCloudReportTaskUtils {
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析地址"));
         String hostUrl = sysConfig.getConfigValue();
         BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String saveUrl = SystemConstant.TEACHCLOUD_REPORT_OPEN_EXAM_EDIT_API;
         validUrl(hostUrl, saveUrl);
@@ -146,8 +146,8 @@ public class TeachCloudReportTaskUtils {
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析地址"));
         String hostUrl = sysConfig.getConfigValue();
         BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String saveUrl = SystemConstant.TEACHCLOUD_REPORT_OPEN_EXAM_DELETE_API;
         validUrl(hostUrl, saveUrl);
@@ -191,8 +191,8 @@ public class TeachCloudReportTaskUtils {
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析地址"));
         String hostUrl = sysConfig.getConfigValue();
         BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String saveUrl = SystemConstant.TEACHCLOUD_REPORT_OPEN_COURSE_EDIT_API;
         validUrl(hostUrl, saveUrl);
@@ -237,8 +237,8 @@ public class TeachCloudReportTaskUtils {
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析地址"));
         String hostUrl = sysConfig.getConfigValue();
         BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String saveUrl = SystemConstant.TEACHCLOUD_REPORT_OPEN_CALCULATE_API;
         validUrl(hostUrl, saveUrl);
@@ -283,8 +283,8 @@ public class TeachCloudReportTaskUtils {
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析地址"));
         String hostUrl = sysConfig.getConfigValue();
         BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String saveUrl = SystemConstant.TEACHCLOUD_REPORT_OPEN_PUBLISH_API;
         validUrl(hostUrl, saveUrl);

+ 4 - 4
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ConvertUtil.java

@@ -79,7 +79,7 @@ public class ConvertUtil {
      */
     public static Map<String, Object> analyzeStartAndEndTime(String date, String time) {
         time = time.replaceAll(" ", ""); // 去掉所有空格
-        String[] arr = time.split("-");
+        String[] arr = time.split(SystemConstant.HYPHEN);
         if (arr.length != 2) {
             // 不能使用'-'拆分成两个时间的报错
             throw ExceptionResultEnum.ERROR.exception("提供的时间格式异常 【考试时间】:" + time + " 应该使用如下的格式【考试时间】:18:00-20:00");
@@ -286,8 +286,8 @@ public class ConvertUtil {
                 temp.delete();
             }
             if (temp.isDirectory()) {
-                delAllFile(path + "/" + tempList[i]);//先删除文件夹里面的文件
-                delFolder(path + "/" + tempList[i]);//再删除空文件夹
+                delAllFile(path + SystemConstant.ORG_SPLIT + tempList[i]);//先删除文件夹里面的文件
+                delFolder(path + SystemConstant.ORG_SPLIT + tempList[i]);//再删除空文件夹
                 flag = true;
             }
         }
@@ -398,7 +398,7 @@ public class ConvertUtil {
                 ImageIO.write(bim, "jpg", os);
                 byte[] dataList = os.toByteArray();
                 // jpg文件转出路径
-                File file = new File(targetPath + "-" + (i + 1) + SystemConstant.JPG_PREFIX);
+                File file = new File(targetPath + SystemConstant.HYPHEN + (i + 1) + SystemConstant.JPG_PREFIX);
                 if (!file.getParentFile().exists()) {
                     // 不存在则创建父目录及子文件
                     file.getParentFile().mkdirs();

+ 6 - 5
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/FileStoreUtil.java

@@ -2,6 +2,7 @@ package com.qmth.teachcloud.common.util;
 
 import com.qmth.boot.core.fss.service.FileService;
 import com.qmth.teachcloud.common.config.DictionaryConfig;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.LocalCatalogEnum;
 import com.qmth.teachcloud.common.enums.UploadFileEnum;
@@ -39,7 +40,7 @@ public class FileStoreUtil {
      * @throws Exception 异常
      */
     public void copyInputStreamToFile(InputStream inputStream, File finalFile, String md5, LocalCatalogEnum catalogType) throws Exception {
-        String dirName = finalFile.getPath().replaceAll("\\\\", "/");
+        String dirName = finalFile.getPath().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
         this.localUpload(dirName, inputStream, md5, catalogType);
     }
 
@@ -115,7 +116,7 @@ public class FileStoreUtil {
 //     * @throws Exception 异常
 //     */
 //    public void copyInputStreamToFile(InputStream inputStream, File finalFile, String md5, LocalCatalogEnum catalogType) throws Exception {
-//        String dirName = finalFile.getPath().replaceAll("\\\\", "/");
+//        String dirName = finalFile.getPath().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
 //        this.localUpload(dirName, inputStream, md5, catalogType);
 //    }
 
@@ -208,9 +209,9 @@ public class FileStoreUtil {
     public String getPrivateUrl(String objectPath, String type) {
         String server = null;
         if ("public".equals(type)) {
-            return dictionaryConfig.fssPublicDomain().getServer() + "/" + objectPath;
+            return dictionaryConfig.fssPublicDomain().getServer() + SystemConstant.ORG_SPLIT + objectPath;
         } else if ("private".equals(type)) {
-            return dictionaryConfig.fssPrivateDomain().getServer() + "/" + objectPath;
+            return dictionaryConfig.fssPrivateDomain().getServer() + SystemConstant.ORG_SPLIT + objectPath;
         } else {
             throw ExceptionResultEnum.ERROR.exception("文件存储store类型不存在");
         }
@@ -223,7 +224,7 @@ public class FileStoreUtil {
      * @return 类型
      */
     public UploadFileEnum getUploadEnumByPath(String path) {
-        path = path.replaceAll("\\\\", "/");
+        path = path.replaceAll("\\\\", SystemConstant.ORG_SPLIT);
         String target = path.substring(0, path.indexOf('/'));
         return UploadFileEnum.valueOf(target.toUpperCase());
     }

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/FileUtil.java

@@ -222,7 +222,7 @@ public class FileUtil {
                 ZipEntry entry = (ZipEntry) entries.nextElement();
 
                 // Linux中需要替换掉路径的反斜杠
-                String entryName = (File.separator + entry.getName()).replaceAll("\\\\", "/");
+                String entryName = (File.separator + entry.getName()).replaceAll("\\\\", SystemConstant.ORG_SPLIT);
 
                 String filePath = targetDir.getAbsolutePath() + entryName;
                 File target = new File(filePath);

+ 3 - 3
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/HttpKit.java

@@ -55,10 +55,10 @@ public class HttpKit {
                 StringBuilder param = new StringBuilder();
                 for (Map.Entry<String, String> entry : params.entrySet()) {
                     if (param.length() > 0) {
-                        param.append("&");
+                        param.append(SystemConstant.GET_SYMBOL);
                     }
                     param.append(entry.getKey());
-                    param.append("=");
+                    param.append(SystemConstant.GET_EQUAL);
                     param.append(entry.getValue());
                 }
                 out.write(param.toString());
@@ -227,7 +227,7 @@ public class HttpKit {
                 if (formTexts != null && formTexts.size() > 0) {
                     String formData = "";
                     for (Map.Entry<String, Object> entry : formTexts.entrySet()) {
-                        formData += entry.getKey() + "=" + entry.getValue() + "&";
+                        formData += entry.getKey() + SystemConstant.GET_EQUAL + entry.getValue() + SystemConstant.GET_SYMBOL;
                     }
                     formData = formData.substring(0, formData.length() - 1);
                     out.write(formData.getBytes(requestEncoding));

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/HttpUtil.java

@@ -121,7 +121,7 @@ public class HttpUtil {
             }
         }
         String str = EntityUtils.toString(new UrlEncodedFormEntity(pairs, Consts.UTF_8));//转换为键值对
-        HttpGet get = new HttpGet(url + "?" + str);
+        HttpGet get = new HttpGet(url + SystemConstant.GET_UNKNOWN + str);
         if (Objects.nonNull(secret)) {
             get.setHeader(SystemConstant.HEADER_AUTHORIZATION, secret);
         }

+ 2 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/SessionUtil.java

@@ -1,6 +1,6 @@
 package com.qmth.teachcloud.common.util;
 
-import com.qmth.teachcloud.common.util.MD5Util;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 
 import java.security.NoSuchAlgorithmException;
 import java.util.Objects;
@@ -25,7 +25,7 @@ public class SessionUtil {
         StringJoiner stringJoiner = new StringJoiner("");
         if (Objects.nonNull(o) && o.length > 0) {
             for (int i = 0; i < o.length; i++) {
-                stringJoiner.add(String.valueOf(o[i])).add("-");
+                stringJoiner.add(String.valueOf(o[i])).add(SystemConstant.HYPHEN);
             }
         }
         return MD5Util.encoder(stringJoiner.toString().substring(0, stringJoiner.length() - 1));

+ 2 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/excel/ExcelExport.java

@@ -1,6 +1,7 @@
 package com.qmth.teachcloud.common.util.excel;
 
 import com.qmth.teachcloud.common.annotation.ExcelProperty;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
@@ -62,7 +63,7 @@ public abstract class ExcelExport {
             ExcelProperty exportProperty = field.getAnnotation(ExcelProperty.class);
             if (exportProperty != null && exportProperty.name().trim().length() > 0) {
                 ColumnSetting columnSetting = new ColumnSetting(exportProperty.name(),
-                        "get" + toUpperCaseFirstOne(field.getName()), field, exportProperty.width(),
+                        SystemConstant.GET + toUpperCaseFirstOne(field.getName()), field, exportProperty.width(),
                         exportProperty.index());
                 columnSettings.add(columnSetting);
             }

+ 9 - 9
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/AnalyzeForReportServiceImpl.java

@@ -675,7 +675,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                         taExamCourseRecordDio.setStudentCode(taExamCourseRecord.getStudentCode());
                         taExamCourseRecordDio.setCourseCode(effectiveCourseCode);
                         taExamCourseRecordDio.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
-                        String[] dimCodeArr = s.split("-");
+                        String[] dimCodeArr = s.split(SystemConstant.HYPHEN);
                         if (dimCodeArr.length != 2) {
                             throw ExceptionResultEnum.ERROR.exception("获得的考查点标识不符合标准,标准为 type-dimensionCode,结果为:  " + s);
                         }
@@ -746,7 +746,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 // 8.计算此次考试各个考查点得分率并插入't_a_exam_course_dio'表
                 List<TAExamCourseDio> taExamCourseDioList = new ArrayList<>();
                 for (String s : everyPointTotalScore.keySet()) {
-                    String[] dimCodeArr = s.split("-");
+                    String[] dimCodeArr = s.split(SystemConstant.HYPHEN);
                     if (dimCodeArr.length != 2) {
                         throw ExceptionResultEnum.ERROR.exception("获得的考查点标识不符合标准,标准为 type-dimensionCode,结果为:  " + s);
                     }
@@ -821,7 +821,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 for (LevelRuleEnum levelRuleEnum : levelRuleEnumArr) {
                     if (formula.equals(levelRuleEnum.getValue())) {
                         Field field = taExamCourseRecordMod.getClass().getDeclaredField(levelRuleEnum.getAttribute()); //对应属性
-                        Method getMethod = taExamCourseRecordMod.getClass().getDeclaredMethod("get" + ConversionUtils.initCap(field.getName())); // 找到该属性的方法
+                        Method getMethod = taExamCourseRecordMod.getClass().getDeclaredMethod(SystemConstant.GET + ConversionUtils.initCap(field.getName())); // 找到该属性的方法
 
                         double value = Double.parseDouble(String.valueOf(getMethod.invoke(taExamCourseRecordMod)));
                         if (!formula.equals(LevelRuleEnum.COLLEGE_RANK.getValue())) {  // 当计算规则不为学院排名时,为了方便计算,将minNumber设置为1 使其无效
@@ -1626,7 +1626,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
         if (collegeCount > 0) {
             for (Long inspectCollegeId : inspectCollegeInfo) {
                 SysOrg college = sysOrgService.getById(inspectCollegeId);
-                inspectCollegeNames.append(college.getName()).append("、");
+                inspectCollegeNames.append(college.getName()).append(SystemConstant.PAUSE_SIGN);
             }
             // 考查学院名称
             inspectCollegeNames = new StringBuilder(inspectCollegeNames.substring(0, inspectCollegeNames.length() - 1));
@@ -2305,7 +2305,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 List<TBPaperStruct> paperStructList = new ArrayList<>();
                 for (TBPaperStruct paperStruct : tbPaperStructList) {
                     Field field = paperStruct.getClass().getDeclaredField(value.getAttribute()); //获取该模块对应试卷结构中的属性
-                    Method getMethod = paperStruct.getClass().getDeclaredMethod("get" + ConversionUtils.initCap(field.getName())); //获取该属性的get方法
+                    Method getMethod = paperStruct.getClass().getDeclaredMethod(SystemConstant.GET + ConversionUtils.initCap(field.getName())); //获取该属性的get方法
                     String dimensions = (String) getMethod.invoke(paperStruct); //调用该属性的get方法获取改题目的考查点
                     if (dimensions != null && dimensions.length() > 0) {
                         if (dimensions.contains(tmpOne)) {
@@ -2315,7 +2315,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 }
                 if (paperStructList.size() > 0) {
                     // 只记录试卷结构中出现的考查点包含的题目
-                    pointToPaper.put(value.getModuleType() + "-" + tmpOne, paperStructList);
+                    pointToPaper.put(value.getModuleType() + SystemConstant.HYPHEN + tmpOne, paperStructList);
                 }
             }
 
@@ -2323,7 +2323,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 List<TBPaperStruct> paperStructList = new ArrayList<>();
                 for (TBPaperStruct paperStruct : tbPaperStructList) {
                     Field field = paperStruct.getClass().getDeclaredField(value.getAttribute());
-                    Method getMethod = paperStruct.getClass().getDeclaredMethod("get" + ConversionUtils.initCap(field.getName()));
+                    Method getMethod = paperStruct.getClass().getDeclaredMethod(SystemConstant.GET + ConversionUtils.initCap(field.getName()));
                     String dimensions = (String) getMethod.invoke(paperStruct);
                     if (dimensions != null && dimensions.length() > 0) {
                         if (Arrays.asList(dimensions.split(",")).contains(tmpTwo)) {
@@ -2333,7 +2333,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 }
                 if (paperStructList.size() > 0) {
                     // 只记录试卷结构中出现的考查点包含的题目
-                    pointToPaper.put(value.getModuleType() + "-" + tmpTwo, paperStructList);
+                    pointToPaper.put(value.getModuleType() + SystemConstant.HYPHEN + tmpTwo, paperStructList);
                 }
             }
         }
@@ -2370,7 +2370,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
 
                 for (TBPaperStruct paperStruct : tbPaperStructList) {
                     Field field = paperStruct.getClass().getDeclaredField(attribute);
-                    Method getMethod = paperStruct.getClass().getDeclaredMethod("get" + ConversionUtils.initCap(field.getName()));
+                    Method getMethod = paperStruct.getClass().getDeclaredMethod(SystemConstant.GET + ConversionUtils.initCap(field.getName()));
                     String value = (String) getMethod.invoke(paperStruct);
                     if (value != null && value.length() != 0) {
                         paperStructList.add(paperStruct);

+ 10 - 10
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/CallPrintOpenApiServiceImpl.java

@@ -52,8 +52,8 @@ public class CallPrintOpenApiServiceImpl implements CallPrintOpenApiService {
         SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.TEACHCLOUD_PRINT_HOST_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置分布式印刷地址"));
         String hostUrl = sysConfig.getConfigValue();
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String callResult = HttpUtil.postJson(hostUrl + SystemConstant.TEACHCLOUD_PRINT_OPEN_PAPER_CONFIG_API, JacksonUtil.parseJson(printOpenParams), accessToken, timestamp);
         PaperConfig paperConfig = new PaperConfig();
@@ -79,8 +79,8 @@ public class CallPrintOpenApiServiceImpl implements CallPrintOpenApiService {
         SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.TEACHCLOUD_PRINT_HOST_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置分布式印刷地址"));
         String hostUrl = sysConfig.getConfigValue();
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String callResult = HttpUtil.postJson(hostUrl + SystemConstant.TEACHCLOUD_PRINT_OPEN_PAPER_DIMENSION_API, JacksonUtil.parseJson(printOpenParams), accessToken, timestamp);
         List<PaperDimension> paperDimensionList = new ArrayList<>();
@@ -106,8 +106,8 @@ public class CallPrintOpenApiServiceImpl implements CallPrintOpenApiService {
         SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.TEACHCLOUD_PRINT_HOST_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置分布式印刷地址"));
         String hostUrl = sysConfig.getConfigValue();
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String callResult = HttpUtil.postJson(hostUrl + SystemConstant.TEACHCLOUD_PRINT_OPEN_PAPER_STRUCTURE_API, JacksonUtil.parseJson(printOpenParams), accessToken, timestamp);
         List<PaperStructure> paperStructureList = new ArrayList<>();
@@ -133,8 +133,8 @@ public class CallPrintOpenApiServiceImpl implements CallPrintOpenApiService {
         SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.TEACHCLOUD_PRINT_HOST_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置分布式印刷地址"));
         String hostUrl = sysConfig.getConfigValue();
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
         String callResult = HttpUtil.postJson(hostUrl + SystemConstant.TEACHCLOUD_PRINT_OPEN_PAPER_EVALUATION_API, JacksonUtil.parseJson(printOpenParams), accessToken, timestamp);
         List<PaperEvaluation> paperEvaluationList = new ArrayList<>();
@@ -161,8 +161,8 @@ public class CallPrintOpenApiServiceImpl implements CallPrintOpenApiService {
         SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.TEACHCLOUD_PRINT_HOST_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置分布式印刷地址"));
         String hostUrl = sysConfig.getConfigValue();
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
 
         int pageNumber = 1;

+ 4 - 4
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/ChangNamesServiceImpl.java

@@ -226,7 +226,7 @@ public class ChangNamesServiceImpl implements ChangNamesService {
             }
             String inspectCollegeNameStr = taExamCourse.getInspectCollegeNames();
             List<String> newInspect = new ArrayList<>();
-            String[] inspectCollegeNameList = inspectCollegeNameStr.split("、");
+            String[] inspectCollegeNameList = inspectCollegeNameStr.split(SystemConstant.PAUSE_SIGN);
             for (String s : inspectCollegeNameList) {
                 List<SysOrg> cellList = sysOrgList.stream().filter(e -> e.getHistoricName().equals(s) && e.getSchoolId().equals(schoolId)).collect(Collectors.toList());
                 if (cellList.size() > 0) {
@@ -241,7 +241,7 @@ public class ChangNamesServiceImpl implements ChangNamesService {
                 }
             }
             if (newInspect.size() > 0) {
-                taExamCourse.setInspectCollegeNames(String.join("、", newInspect));
+                taExamCourse.setInspectCollegeNames(String.join(SystemConstant.PAUSE_SIGN, newInspect));
             }
         }
         taExamCourseService.updateBatchById(taExamCourseList);
@@ -519,7 +519,7 @@ public class ChangNamesServiceImpl implements ChangNamesService {
         for (TAExamTotal taExamTotal : taExamTotalList) {
             String collegeNameStr = taExamTotal.getCollegeNames();
             List<String> newCollegeList = new ArrayList<>();
-            String[] collegeNameList = collegeNameStr.split("、");
+            String[] collegeNameList = collegeNameStr.split(SystemConstant.PAUSE_SIGN);
             for (String s : collegeNameList) {
                 List<SysOrg> cellList = sysOrgList.stream().filter(e -> e.getHistoricName().equals(s) && e.getSchoolId().equals(taExamTotal.getSchoolId())).collect(Collectors.toList());
                 if (cellList.size() > 0) {
@@ -534,7 +534,7 @@ public class ChangNamesServiceImpl implements ChangNamesService {
                 }
             }
             if (newCollegeList.size() > 0) {
-                taExamTotal.setCollegeNames(String.join("、", newCollegeList));
+                taExamTotal.setCollegeNames(String.join(SystemConstant.PAUSE_SIGN, newCollegeList));
             }
         }
         log.info("表 't_a_exam_total' 更新完成");

+ 7 - 8
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/InsteadOrgServiceImpl.java

@@ -1,6 +1,7 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.report.business.entity.*;
 import com.qmth.teachcloud.report.business.service.*;
 import org.slf4j.Logger;
@@ -87,17 +88,16 @@ public class InsteadOrgServiceImpl implements InsteadOrgService {
     public void insteadOrgTAExamCourse(Long schoolId, Map<String, String> orgNameMap) {
         List<TAExamCourse> taExamCourseList = taExamCourseService.list(new QueryWrapper<TAExamCourse>().lambda().eq(TAExamCourse::getSchoolId, schoolId));
         taExamCourseService.updateBatchById(taExamCourseList.stream().peek(e -> {
-            final String separator = "、";
             StringBuilder newStr = new StringBuilder();
             String inspectCollegeStr = e.getInspectCollegeNames();
-            String[] inspectCollegeArr = inspectCollegeStr.split(separator);
+            String[] inspectCollegeArr = inspectCollegeStr.split(SystemConstant.PAUSE_SIGN);
             for (String s : inspectCollegeArr) {
                 if (orgNameMap.containsKey(s)) {
                     s = orgNameMap.get(s);
                 }
-                newStr.append(s).append(separator);
+                newStr.append(s).append(SystemConstant.PAUSE_SIGN);
             }
-            e.setInspectCollegeNames(newStr.substring(0, newStr.length() - separator.length()));
+            e.setInspectCollegeNames(newStr.substring(0, newStr.length() - SystemConstant.PAUSE_SIGN.length()));
         }).collect(Collectors.toSet()));
         log.info("'t_a_exam_course' 表更新成功");
     }
@@ -308,17 +308,16 @@ public class InsteadOrgServiceImpl implements InsteadOrgService {
     public void insteadOrgTAExamTotal(Long schoolId, Map<String, String> orgNameMap) {
         List<TAExamTotal> taExamTotalList = taExamTotalService.list(new QueryWrapper<TAExamTotal>().lambda().eq(TAExamTotal::getSchoolId, schoolId));
         taExamTotalService.updateBatchById(taExamTotalList.stream().peek(e -> {
-            final String separator = "、";
             StringBuilder newStr = new StringBuilder();
             String inspectCollegeStr = e.getCollegeNames();
-            String[] inspectCollegeArr = inspectCollegeStr.split(separator);
+            String[] inspectCollegeArr = inspectCollegeStr.split(SystemConstant.PAUSE_SIGN);
             for (String s : inspectCollegeArr) {
                 if (orgNameMap.containsKey(s)) {
                     s = orgNameMap.get(s);
                 }
-                newStr.append(s).append(separator);
+                newStr.append(s).append(SystemConstant.PAUSE_SIGN);
             }
-            e.setCollegeNames(newStr.substring(0, newStr.length() - separator.length()));
+            e.setCollegeNames(newStr.substring(0, newStr.length() - SystemConstant.PAUSE_SIGN.length()));
         }).collect(Collectors.toSet()));
         log.info("'t_a_exam_total' 表更新成功");
     }

+ 3 - 3
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/ReportCommonServiceImpl.java

@@ -649,7 +649,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
         String casLogoutURL = "http://cas.whu.edu.cn/authserver/logout";
         // service后面带的参数为应用的访问地址,需要使用URLEncoder进行编码
         String redirectURL = casLogoutURL + "?service=" + URLEncoder.encode("https://ggjckcjfx.whu.edu.cn/api/report/wuda/open/user/authentication", SystemConstant.CHARSET_NAME);
-        response.setHeader("Access-Control-Allow-Origin", "*");
+        response.setHeader("Access-Control-Allow-Origin", SystemConstant.PATH_MATCH);
         response.sendRedirect(redirectURL);
     }
 
@@ -671,7 +671,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
                 HttpServletResponse response = ServletUtil.getResponse();
                 String redirectURL = ThirdUserAuthCacheUtil.getAuthReturnUrl(String.valueOf(sysUser.getId()));
                 SystemConstant.deleteUserCache(sysUser.getId());
-                response.setHeader("Access-Control-Allow-Origin", "*");
+                response.setHeader("Access-Control-Allow-Origin", SystemConstant.PATH_MATCH);
                 response.sendRedirect(redirectURL);
             }
         }
@@ -776,7 +776,7 @@ public class ReportCommonServiceImpl implements ReportCommonService {
             stringJoiner.add(SystemConstant.getNanoId()).add(format);
 
             JSONObject jsonObject = new JSONObject();
-            String dirName = stringJoiner.toString().replaceAll("\\\\", "/");
+            String dirName = stringJoiner.toString().replaceAll("\\\\", SystemConstant.ORG_SPLIT);
             if (oss) {//上传至oss\
                 fileStoreUtil.ossUpload(dirName, file.getInputStream(), md5, type.getFssType());
                 jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamCourseDeleteServiceImpl.java

@@ -313,7 +313,7 @@ public class TBExamCourseDeleteServiceImpl implements TBExamCourseDeleteService
         Long lockExamId = examIdList.get(0);
         List<String> courseCodeList = tbExamCourseDeleteParamsList.stream().map(TBExamCourseDeleteParams::getCourseCode).distinct().sorted().collect(Collectors.toList());
         String lockCourseCode = DigestUtils.md5Hex(JSON.toJSONString(courseCodeList));
-        String lockKey = SystemConstant.REDIS_LOCK_GRADE_COURSE_DELETE_PREFIX + lockSchoolId + "-" + lockExamId + "-" + lockCourseCode;
+        String lockKey = SystemConstant.REDIS_LOCK_GRADE_COURSE_DELETE_PREFIX + lockSchoolId + SystemConstant.HYPHEN + lockExamId + SystemConstant.HYPHEN + lockCourseCode;
 
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_LOCK_BATCH_NO_TIME_OUT);
         if (!lock) {

+ 2 - 2
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/templete/strategy/CalculateTaskTemplate.java

@@ -154,8 +154,8 @@ public abstract class CalculateTaskTemplate {
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置分布式印刷地址"));
         String hostUrl = sysConfig.getConfigValue();
         BasicSchool basicSchool = commonCacheService.schoolCache(calculateParams.getSchoolId());
-        if (hostUrl.contains("*")) {
-            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        if (hostUrl.contains(SystemConstant.PATH_MATCH)) {
+            hostUrl = hostUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
 
         String callbackResult = HttpUtil.postJson(hostUrl + SystemConstant.TEACHCLOUD_PRINT_NOTIFY_ANALYSIS_PROGRESS_API, jsonObject.toJSONString(), sign, time);

+ 2 - 2
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/BasicDatasourceController.java

@@ -1612,12 +1612,12 @@ public class BasicDatasourceController {
     private Map<String, String> disposeTeacherInfo(String teacherInfo) {
         StringBuilder teacherName = new StringBuilder();
         StringBuilder teacherCode = new StringBuilder();
-        teacherInfo = teacherInfo.trim().replaceAll(";", ";").replaceAll("\\\\", "/");
+        teacherInfo = teacherInfo.trim().replaceAll(";", ";").replaceAll("\\\\", SystemConstant.ORG_SPLIT);
         String[] teacherInfoArr = teacherInfo.split(";");
         for (String teacher : teacherInfoArr) {
             String cellName = "";
             String cellCode = "";
-            String[] cellArr = teacher.split("/");
+            String[] cellArr = teacher.split(SystemConstant.ORG_SPLIT);
             if (cellArr.length == 1) {
                 cellName = cellArr[0];
             } else if (cellArr.length == 2) {

+ 4 - 4
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/SsoApiController.java

@@ -147,15 +147,15 @@ public class SsoApiController {
         ThirdUserAuthCacheUtil.setAuthReturnUrl(String.valueOf(sysUser.getId()), returnUrl);
 
         HttpServletResponse response = ServletUtil.getResponse();
-        response.setHeader("Access-Control-Allow-Origin", "*");
+        response.setHeader("Access-Control-Allow-Origin", SystemConstant.PATH_MATCH);
 
         SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.TEACHCLOUD_REPORT_LOGIN_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置单点登录地址"));
         String loginAuthenUrl = sysConfig.getConfigValue();
-        if (loginAuthenUrl.contains("*")) {
-            loginAuthenUrl = loginAuthenUrl.replace("*", basicSchool.getCode());
+        if (loginAuthenUrl.contains(SystemConstant.PATH_MATCH)) {
+            loginAuthenUrl = loginAuthenUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }
-        response.sendRedirect(loginAuthenUrl + code + "/" + AppSourceEnum.PRINT_THIRD);
+        response.sendRedirect(loginAuthenUrl + code + SystemConstant.ORG_SPLIT + AppSourceEnum.PRINT_THIRD);
     }
 
     @ApiOperation(value = "用户临时授权登录接口")

+ 1 - 1
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/SysController.java

@@ -242,7 +242,7 @@ public class SysController {
                 if (Objects.nonNull(dictionaryConfig.fssLocalFileDomain()) && !StringUtils.isBlank(dictionaryConfig.fssLocalFileDomain().getServer())) {
                     String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.fssLocalFileDomain().getServer());
                     String filePath = SystemConstant.getLocalFilePath(hostUrl, basicSchool.getLogo());
-                    if (filePath.startsWith("/")) {
+                    if (filePath.startsWith(SystemConstant.ORG_SPLIT)) {
                         url = hostUrl + filePath;
                     } else {
                         url = hostUrl + File.separator + filePath;

+ 8 - 8
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/WudaOpenApiController.java

@@ -95,11 +95,11 @@ public class WudaOpenApiController {
         SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.TEACHCLOUD_REPORT_STUDENT_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置学生报告地址"));
 
-        String testUrl = sysConfig.getConfigValue() + basicSchool.getId() + "/" + uid + "/" + cn;
+        String testUrl = sysConfig.getConfigValue() + basicSchool.getId() + SystemConstant.ORG_SPLIT + uid + SystemConstant.ORG_SPLIT + cn;
         log.info("test-stu-testUrl:{}", testUrl);
         String encoderUid = EncrypAES.encrypt(uid);
         log.info("test-encoderUid:{}", encoderUid);
-        response.sendRedirect(sysConfig.getConfigValue() + basicSchool.getId() + "/" + encoderUid);
+        response.sendRedirect(sysConfig.getConfigValue() + basicSchool.getId() + SystemConstant.ORG_SPLIT + encoderUid);
     }
 
     @ApiOperation(value = "cas用户鉴权退出接口")
@@ -139,7 +139,7 @@ public class WudaOpenApiController {
         String code = URLEncoder.encode(MessageFormat.format(pattern, userAuthenticationDto.getUid(), SignatureEntityTest.FIELD_JOINER, SignatureEntityTest.encrypt(userAuthenticationDto.getCode())), SystemConstant.CHARSET_NAME);
         // 测试开始
         String testPattern = "{0}{1}{2}{3}";
-        String testCode = URLEncoder.encode(MessageFormat.format(testPattern, userAuthenticationDto.getUid() + "/" + cn, SignatureEntityTest.FIELD_JOINER, SignatureEntityTest.encrypt(userAuthenticationDto.getCode())), SystemConstant.CHARSET_NAME);
+        String testCode = URLEncoder.encode(MessageFormat.format(testPattern, userAuthenticationDto.getUid() + SystemConstant.ORG_SPLIT + cn, SignatureEntityTest.FIELD_JOINER, SignatureEntityTest.encrypt(userAuthenticationDto.getCode())), SystemConstant.CHARSET_NAME);
         log.info("test-tea-code:{}", testCode);
         SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.TEACHCLOUD_REPORT_LOGIN_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置单点登录地址"));
@@ -147,8 +147,8 @@ public class WudaOpenApiController {
         log.info("test-tea-url:{}", sysConfig.getConfigValue() + testCode);
         // 测试结束
         log.info("code:{}", code);
-        response.setHeader("Access-Control-Allow-Origin", "*");
-        response.sendRedirect(sysConfig.getConfigValue() + code + "/" + AppSourceEnum.WHU_THIRD);
+        response.setHeader("Access-Control-Allow-Origin", SystemConstant.PATH_MATCH);
+        response.sendRedirect(sysConfig.getConfigValue() + code + SystemConstant.ORG_SPLIT + AppSourceEnum.WHU_THIRD);
     }
 
 //    @ApiOperation(value = "cas用户鉴权测试接口")
@@ -162,7 +162,7 @@ public class WudaOpenApiController {
 //        String pattern = "{0}{1}{2}";
 //        String code = URLEncoder.encode(MessageFormat.format(pattern, userAuthenticationDto.getUid(), SignatureEntityTest.FIELD_JOINER, SignatureEntityTest.encrypt(userAuthenticationDto.getCode())), SystemConstant.CHARSET_NAME);
 //        log.info("code:{}", code);
-//        response.setHeader("Access-Control-Allow-Origin", "*");
+//        response.setHeader("Access-Control-Allow-Origin", SystemConstant.PATH_MATCH);
 //        response.sendRedirect(dictionaryConfig.sysDomain().getLoginAuthenUrl() + code);
 //    }
 
@@ -204,7 +204,7 @@ public class WudaOpenApiController {
 //    public void authenticationStudentCode(HttpServletRequest request, HttpServletResponse response, @PathVariable String studentCode
 //    ) throws IOException {
 //        BasicSchool basicSchool = cacheService.schoolCache(SystemConstant.SCHOOL_CODE);
-//        response.setHeader("Access-Control-Allow-Origin", "*");
-//        response.sendRedirect(dictionaryConfig.sysDomain().getReportUrl() + basicSchool.getId() + "/" + studentCode);
+//        response.setHeader("Access-Control-Allow-Origin", SystemConstant.PATH_MATCH);
+//        response.sendRedirect(dictionaryConfig.sysDomain().getReportUrl() + basicSchool.getId() + SystemConstant.ORG_SPLIT + studentCode);
 //    }
 }