Ver Fonte

Merge branch 'dev_v3.1.0' of http://git.qmth.com.cn/wangliang/distributed-print-service into dev_v3.1.0

xiaof há 3 anos atrás
pai
commit
c560b43534
30 ficheiros alterados com 296 adições e 49 exclusões
  1. 4 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/GradeBatchService.java
  2. 19 12
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DataSyncReportServiceImpl.java
  3. 19 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradeBatchServiceImpl.java
  4. 19 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradePaperStructServiceImpl.java
  5. 2 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/GradeBatchController.java
  6. 3 0
      distributed-print/src/main/resources/application-36dev.properties
  7. 9 5
      distributed-print/src/main/resources/application-dev.properties
  8. 3 0
      distributed-print/src/main/resources/application-offline.properties
  9. 3 0
      distributed-print/src/main/resources/application-release.properties
  10. 3 0
      distributed-print/src/main/resources/application-test.properties
  11. 20 7
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java
  12. 10 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/ReportOpenDomain.java
  13. 20 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/SysDomain.java
  14. 2 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/ExceptionResultEnum.java
  15. 40 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/sync/TeachCloudReportTaskUtils.java
  16. 46 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/params/TBExamDeleteParam.java
  17. 8 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamService.java
  18. 2 2
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/AnalyzeDataCheckServiceImpl.java
  19. 27 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamServiceImpl.java
  20. 17 4
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/OpenApiController.java
  21. 2 0
      teachcloud-report/src/main/resources/application-36dev.properties
  22. 2 0
      teachcloud-report/src/main/resources/application-dev.properties
  23. 2 0
      teachcloud-report/src/main/resources/application-offline.properties
  24. 2 0
      teachcloud-report/src/main/resources/application-release.properties
  25. 2 0
      teachcloud-report/src/main/resources/application-test.properties
  26. 2 0
      teachcloud-task/src/main/resources/application-task.properties
  27. 2 0
      teachcloud-task/src/main/resources/application-task_36dev.properties
  28. 2 0
      teachcloud-task/src/main/resources/application-task_offline.properties
  29. 2 0
      teachcloud-task/src/main/resources/application-task_release.properties
  30. 2 0
      teachcloud-task/src/main/resources/application-task_test.properties

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

@@ -45,10 +45,10 @@ public interface GradeBatchService extends IService<GradeBatch> {
     /**
      * 批量删除教研分析批次
      *
-     * @param idList      教研分析批次id
+     * @param id          批次id
      * @param requestUser 请求的用户
      */
-    void deleteGradeBatch(List<Long> idList, SysUser requestUser);
+    void deleteGradeBatch(Long id, SysUser requestUser);
 
     void downloadFile(Long batchId, HttpServletResponse response) throws IOException;
 
@@ -57,8 +57,8 @@ public interface GradeBatchService extends IService<GradeBatch> {
     /**
      * 创建Txt文件
      *
-     * @param gradeBatch   批次id
-     * @param exception 异常
+     * @param gradeBatch 批次id
+     * @param exception  异常
      */
     void createTxt(GradeBatch gradeBatch, String exception);
 }

+ 19 - 12
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DataSyncReportServiceImpl.java

@@ -114,9 +114,13 @@ public class DataSyncReportServiceImpl implements DataSyncReportService {
                     gradeBatchPaperService.updateById(gradeBatchPaper);
                 }
             }
+            if (gradeBatchPaperList.stream().noneMatch(GradeBatchPaper::getEnable)) {
+                gradeBatch.setStatus(GradeAnalyzePaperStatusEnum.SETTING_GRADE_PAPER);
+            } else {
+                long batchCount = gradeBatchPaperList.stream().filter(m -> m.getEnable() && GradeAnalyzePaperStatusEnum.SETTING_GRADE_PAPER_PARAM.equals(m.getStatus())).count();
+                gradeBatch.setStatus(batchCount > 0 ? GradeAnalyzePaperStatusEnum.SETTING_GRADE_PAPER_PARAM : GradeAnalyzePaperStatusEnum.READY_TO_CALCULATE);
+            }
 
-            long batchCount = gradeBatchPaperList.stream().filter(m -> m.getEnable() && GradeAnalyzePaperStatusEnum.SETTING_GRADE_PAPER_PARAM.equals(m.getStatus())).count();
-            gradeBatch.setStatus(batchCount > 0 ? GradeAnalyzePaperStatusEnum.SETTING_GRADE_PAPER_PARAM : GradeAnalyzePaperStatusEnum.READY_TO_CALCULATE);
 
             // 任务结果
             result = TaskResultEnum.SUCCESS;
@@ -170,16 +174,19 @@ public class DataSyncReportServiceImpl implements DataSyncReportService {
         } catch (Exception e) {
             result = TaskResultEnum.ERROR;
             errorMessage = e.getMessage();
-            if (e instanceof ApiException){
+            if (e instanceof ApiException) {
                 ApiException apiException = (ApiException) e;
-                if (SystemConstant.PAPER_STRUCT_EXCEPTION_CODE.equals(apiException.getCode())){
-                    // 截取试卷编号当做remark
-                    remark = errorMessage.substring(errorMessage.indexOf("【") + 1,errorMessage.indexOf("】"));
-
-                    // 更新状态(structureChange)
-                    UpdateWrapper<ExamPaperStructure> updateWrapper = new UpdateWrapper<>();
-                    updateWrapper.lambda().set(ExamPaperStructure::getStructureChange, true).eq(ExamPaperStructure::getSchoolId, schoolId).eq(ExamPaperStructure::getPaperNumber, remark);
-                    examPaperStructureService.update(updateWrapper);
+                if (SystemConstant.strNotNull(errorMessage) && errorMessage.contains("(") && errorMessage.contains("(") && errorMessage.contains("【") && errorMessage.contains("】")) {
+                    String code = errorMessage.substring(errorMessage.indexOf("(") + 1, errorMessage.indexOf(")"));
+                    if (String.valueOf(ExceptionResultEnum.PAPER_STRUCT_EXCEPTION.getCode()).equals(code)) {
+                        // 截取试卷编号当做remark
+                        remark = errorMessage.substring(errorMessage.indexOf("【") + 1, errorMessage.indexOf("】"));
+                        errorMessage = errorMessage.substring(0, errorMessage.indexOf("("));
+                        // 更新状态(structureChange)
+                        UpdateWrapper<ExamPaperStructure> updateWrapper = new UpdateWrapper<>();
+                        updateWrapper.lambda().set(ExamPaperStructure::getStructureChange, true).eq(ExamPaperStructure::getSchoolId, schoolId).eq(ExamPaperStructure::getPaperNumber, remark);
+                        examPaperStructureService.update(updateWrapper);
+                    }
                 }
             }
 
@@ -188,7 +195,7 @@ public class DataSyncReportServiceImpl implements DataSyncReportService {
         } finally {
             // 同步结束
             status = TaskStatusEnum.FINISH;
-            tbSyncTaskService.updateStatusAndResultById(tbSyncTask.getId(), null, status, result, errorMessage,remark);
+            tbSyncTaskService.updateStatusAndResultById(tbSyncTask.getId(), null, status, result, errorMessage, remark);
         }
     }
 

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

@@ -34,6 +34,7 @@ import com.qmth.teachcloud.common.service.SysRoleService;
 import com.qmth.teachcloud.common.service.SysUserRoleService;
 import com.qmth.teachcloud.common.service.SysUserService;
 import com.qmth.teachcloud.common.service.TeachcloudCommonService;
+import com.qmth.teachcloud.common.sync.TeachCloudReportTaskUtils;
 import com.qmth.teachcloud.common.util.ExcelUtil;
 import com.qmth.teachcloud.common.util.FileStoreUtil;
 import com.qmth.teachcloud.common.util.ResultUtil;
@@ -92,6 +93,9 @@ public class GradeBatchServiceImpl extends ServiceImpl<GradeBatchMapper, GradeBa
     @Resource
     ExamTaskService examTaskService;
 
+    @Resource
+    TeachCloudReportTaskUtils teachCloudReportTaskUtils;
+
     @Override
     public IPage<GradeBatchResult> gradeBatchPage(String batchName, int pageNumber, int pageSize, SysUser requestUser) {
         batchName = SystemConstant.translateSpecificSign(batchName);
@@ -140,16 +144,24 @@ public class GradeBatchServiceImpl extends ServiceImpl<GradeBatchMapper, GradeBa
     }
 
     @Override
-    public void deleteGradeBatch(List<Long> idList, SysUser requestUser) {
+    public void deleteGradeBatch(Long id, SysUser requestUser) {
         Long schoolId = requestUser.getSchoolId();
-        if (idList == null || idList.size() == 0) {
+        if (!SystemConstant.longNotNull(id)){
             throw ExceptionResultEnum.ERROR.exception("请选择要删除的批次对象");
         }
+        GradeBatch gradeBatch = this.getById(id);
+        if (Objects.isNull(gradeBatch)){
+            throw ExceptionResultEnum.ERROR.exception("要删除的批次不存在");
+        }
+        Long thirdExamId = gradeBatch.getThirdExamId();
+        if (!SystemConstant.longNotNull(thirdExamId)){
+            throw ExceptionResultEnum.ERROR.exception("要删除的批次中第三方考试id不存在,删除失败");
+        }
         // 要删除的批次试卷集合
         List<GradeBatchPaper> gradeBatchPaperList = gradeBatchPaperService.list(new QueryWrapper<GradeBatchPaper>()
                 .lambda()
                 .eq(GradeBatchPaper::getSchoolId, schoolId)
-                .in(GradeBatchPaper::getBatchId, idList));
+                .in(GradeBatchPaper::getBatchId, id));
 
         if (gradeBatchPaperList != null && gradeBatchPaperList.size() > 0) {
             Set<Long> batchIdSet = gradeBatchPaperList.stream().map(GradeBatchPaper::getBatchId).collect(Collectors.toSet());
@@ -162,7 +174,10 @@ public class GradeBatchServiceImpl extends ServiceImpl<GradeBatchMapper, GradeBa
 
             throw ExceptionResultEnum.ERROR.exception("成绩分析批次【" + String.join(",", cantDeleteBatchNameList) + "】存在分析课程,不能删除");
         }
-        this.removeByIds(idList);
+        boolean result = teachCloudReportTaskUtils.syncDeleteExam(schoolId,thirdExamId);
+        if (result){
+            this.removeById(id);
+        }
     }
 
     @Override

+ 19 - 9
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradePaperStructServiceImpl.java

@@ -251,9 +251,9 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
         // 更新试卷结构参数的云阅卷试卷结构
         List<ExamPaperStructure> examPaperStructureList = examPaperStructureService.list(new QueryWrapper<ExamPaperStructure>()
                 .lambda()
-                .eq(ExamPaperStructure::getSchoolId,schoolId)
-                .eq(ExamPaperStructure::getPaperNumber,paperNumber));
-        if (examPaperStructureList.size() != 1){
+                .eq(ExamPaperStructure::getSchoolId, schoolId)
+                .eq(ExamPaperStructure::getPaperNumber, paperNumber));
+        if (examPaperStructureList.size() != 1) {
             throw ExceptionResultEnum.ERROR.exception("知学知考试卷结构异常");
         }
         ExamPaperStructure examPaperStructure = examPaperStructureList.get(0);
@@ -261,7 +261,17 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
         String examId = String.valueOf(examPaperStructure.getThirdRelateId());
         // 科目代码(课程代码+卷型+课程序号)
         String subjectCode = examPaperStructure.getCourseCode().concat(examPaperStructure.getPaperType()).concat(examPaperStructure.getSequence());
-        String cloudInfoJson = cloudMarkingTaskUtils.queryPaperStructure(schoolId, examId, subjectCode, examPaperStructure.getPaperType());
+
+        String paperType = null;
+        String examPaperObj = examPaperStructure.getObjectiveStructure();
+        if (SystemConstant.strNotNull(examPaperObj)) {
+            List<Question> examPaperObjList = JSON.parseArray(examPaperObj, Question.class);
+            if (examPaperObjList != null && examPaperObjList.size() > 0) {
+                paperType = examPaperStructure.getPaperType();
+            }
+        }
+
+        String cloudInfoJson = cloudMarkingTaskUtils.queryPaperStructure(schoolId, examId, subjectCode,paperType);
         examPaperStructure.setCloudInfoJson(cloudInfoJson);
         examPaperStructure.setStructureChange(false);
         examPaperStructureService.updateById(examPaperStructure);
@@ -269,8 +279,8 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
         // 更新grade_paper_struct
         this.remove(new QueryWrapper<GradePaperStruct>()
                 .lambda()
-                .eq(GradePaperStruct::getSchoolId,schoolId)
-                .eq(GradePaperStruct::getPaperNumber,paperNumber));
+                .eq(GradePaperStruct::getSchoolId, schoolId)
+                .eq(GradePaperStruct::getPaperNumber, paperNumber));
     }
 
     /**
@@ -310,7 +320,7 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
             examPaperObjList = questionTypeListMap.get(QuestionType.OBJECTIVE);
             examPaperSubList = questionTypeListMap.get(QuestionType.SUBJECTIVE);
             comparison = "云阅卷";
-            code = SystemConstant.PAPER_STRUCT_EXCEPTION_CODE;
+            code = ExceptionResultEnum.PAPER_STRUCT_EXCEPTION.getCode();
         } else {
             // 当云阅卷试卷结构同步结果没有时与知学知考对比
             String examPaperObj = examPaperStructure.getObjectiveStructure();
@@ -334,7 +344,7 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
                     return Stream.of(cell);
                 }).collect(Collectors.toList());
         if (!Question.matchTwoQuestionList(examPaperObjList, gradePaperObjList)) {
-            throw ExceptionResultEnum.ERROR.exception(code,"试卷编号为【" + paperNumber + "】,试卷类型为【" + paperType +
+            throw ExceptionResultEnum.ERROR.exception(code, "试卷编号为【" + paperNumber + "】,试卷类型为【" + paperType +
                     "】的分析试卷结构和 [" + comparison + "] 试卷结构在【" + QuestionType.OBJECTIVE.getDesc() + "】上不一致");
         }
 
@@ -349,7 +359,7 @@ public class GradePaperStructServiceImpl extends ServiceImpl<GradePaperStructMap
                     return Stream.of(cell);
                 }).collect(Collectors.toList());
         if (!Question.matchTwoQuestionList(examPaperSubList, gradePaperSubList)) {
-            throw ExceptionResultEnum.ERROR.exception(code,"试卷编号为【" + paperNumber + "】,试卷类型为【" + paperType +
+            throw ExceptionResultEnum.ERROR.exception(code, "试卷编号为【" + paperNumber + "】,试卷类型为【" + paperType +
                     "】的分析试卷结构和 [" + comparison + "] 试卷结构在【" + QuestionType.SUBJECTIVE.getDesc() + "】上不一致");
         }
 

+ 2 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/GradeBatchController.java

@@ -72,9 +72,9 @@ public class GradeBatchController {
     @ApiOperation(value = "成绩分析批次-删除")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = EditResult.class)})
-    public Result deleteGradeBatch(@ApiParam(value = "选择的要删除的成绩分析批次id集合", required = true) @RequestParam List<String> idList) {
+    public Result deleteGradeBatch(@ApiParam(value = "选择的要删除的成绩分析批次id", required = true) @RequestParam String id) {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
-        gradeBatchService.deleteGradeBatch(idList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList()), requestUser);
+        gradeBatchService.deleteGradeBatch(SystemConstant.convertIdToLong(id), requestUser);
         return ResultUtil.ok();
     }
 

+ 3 - 0
distributed-print/src/main/resources/application-36dev.properties

@@ -82,6 +82,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=test-school-2
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=test-school-1,test-school-3
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 org.center.url=https://solar.qmth.com.cn
 org.center.orgQueryApi=/api/open/org/query
@@ -199,6 +201,7 @@ sms.config.aliyunSMSAuditCopyUserCode=SMS_237206065
 report.open.hostUrl=http://192.168.10.86:7004
 report.open.semesterApi=/api/report/open/semester_edit
 report.open.examApi=/api/report/open/exam_edit
+report.open.examDeleteApi=/api/report/open/exam_delete
 report.open.courseEditApi=/api/report/open/course_edit
 report.open.courseDelApi=/api/report/open/course_del
 report.open.calculateApi=/api/report/open/calculate

+ 9 - 5
distributed-print/src/main/resources/application-dev.properties

@@ -60,18 +60,19 @@ com.qmth.fss.public.server=https://oss-file.qmth.com.cn/teachcloud-print-dev-pub
 com.qmth.fss.private.config=oss://key:secret@teachcloud-print-dev-private.oss-api.qmth.com.cn
 com.qmth.fss.private.server=https://oss-file.qmth.com.cn/teachcloud-print-dev-private
 
+#com.qmth.fss.fileTemp.config=oss://key:secret@teachcloud-print-dev-public.oss-api.qmth.com.cn
+#com.qmth.fss.fileTemp.server=https://oss-file.qmth.com.cn/teachcloud-print-dev-public
+#com.qmth.fss.pdfTemp.config=oss://key:secret@teachcloud-print-dev-private.oss-api.qmth.com.cn
+#com.qmth.fss.pdfTemp.server=https://oss-file.qmth.com.cn/teachcloud-print-dev-private
+
 #\u7CFB\u7EDF\u914D\u7F6E
-sys.config.oss=true
+sys.config.oss=false
 sys.config.attachmentType=.xlsx,.xls,.doc,.docx,.pdf,.jpg,.jpeg,.png,.html,.zip,.mp3,.wav,.dll,.exe,.ftl,.bpmn,.xml
 sys.config.attachmentLength=100
 sys.config.attachmentSize=200
 sys.config.serverUpload=
-#sys.config.fileHost=localhost:7001
-#sys.config.serverHost=localhost:7001
 sys.config.fileHost=http://127.0.0.1:7001
 sys.config.serverHost=http://127.0.0.1:7001
-#sys.config.accessKey=0bce69d94a7b4aef8bc0badf150351a9
-#sys.config.accessSecret=LdUwb5X4etmjW7fDn0KAdoXG0Yt7AkDu
 sys.config.accessKey=274f823e5f59410f8b3bb6edcd8e2b6e
 sys.config.accessSecret=y7AO6W0TOdTF8HpWBwGHbp3wfIHsmUKr
 sys.config.adminLogoUrl=http://qmth-test.oss-cn-shenzhen.aliyuncs.com/frontend/wx_logo.png
@@ -84,6 +85,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=test-school-2
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=test-school-1,test-school-3
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 org.center.url=https://solar.qmth.com.cn
 org.center.orgQueryApi=/api/open/org/query
@@ -203,6 +206,7 @@ sms.config.aliyunSMSAuditCopyUserCode=SMS_237206065
 report.open.hostUrl=http://127.0.0.1:7004
 report.open.semesterApi=/api/report/open/semester_edit
 report.open.examApi=/api/report/open/exam_edit
+report.open.examDeleteApi=/api/report/open/exam_delete
 report.open.courseEditApi=/api/report/open/course_edit
 report.open.courseDelApi=/api/report/open/course_del
 report.open.calculateApi=/api/report/open/calculate

+ 3 - 0
distributed-print/src/main/resources/application-offline.properties

@@ -81,6 +81,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=test-school-0
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=test-school-1,test-school-2
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/file-temp
+sys.config.pdfTempPath=/pdf-temp
 
 org.center.url=https://solar.qmth.com.cn
 org.center.orgQueryApi=/api/open/org/query
@@ -199,6 +201,7 @@ sms.config.aliyunSMSAuditCopyUserCode=SMS_237206065
 report.open.hostUrl=http://192.168.10.136:7783
 report.open.semesterApi=/api/report/open/semester_edit
 report.open.examApi=/api/report/open/exam_edit
+report.open.examDeleteApi=/api/report/open/exam_delete
 report.open.courseEditApi=/api/report/open/course_edit
 report.open.courseDelApi=/api/report/open/course_del
 report.open.calculateApi=/api/report/open/calculate

+ 3 - 0
distributed-print/src/main/resources/application-release.properties

@@ -87,6 +87,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=gdpu
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=jxutcm,sisu,test-school-2
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 #com.qmth.solar.access-key=274f823e5f59410f8b3bb6edcd8e2b6e
 #com.qmth.solar.access-secret=y7AO6W0TOdTF8HpWBwGHbp3wfIHsmUKr
@@ -205,6 +207,7 @@ sms.config.aliyunSMSAuditCopyUserCode=SMS_237206065
 report.open.hostUrl=http://192.168.10.86:7004
 report.open.semesterApi=/api/report/open/semester_edit
 report.open.examApi=/api/report/open/exam_edit
+report.open.examDeleteApi=/api/report/open/exam_delete
 report.open.courseEditApi=/api/report/open/course_edit
 report.open.courseDelApi=/api/report/open/course_del
 report.open.calculateApi=/api/report/open/calculate

+ 3 - 0
distributed-print/src/main/resources/application-test.properties

@@ -81,6 +81,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=test-school-0
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=test-school-1,test-school-2
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 org.center.url=https://solar.qmth.com.cn
 org.center.orgQueryApi=/api/open/org/query
@@ -199,6 +201,7 @@ sms.config.aliyunSMSAuditCopyUserCode=SMS_237206065
 report.open.hostUrl=https://*.teachcloud-report-test.work
 report.open.semesterApi=/api/report/open/semester_edit
 report.open.examApi=/api/report/open/exam_edit
+report.open.examDeleteApi=/api/report/open/exam_delete
 report.open.courseEditApi=/api/report/open/course_edit
 report.open.courseDelApi=/api/report/open/course_del
 report.open.calculateApi=/api/report/open/calculate

+ 20 - 7
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -112,7 +112,6 @@ public class SystemConstant {
     public static final String COMMA_OF_ENGLISH = ",";
     public static final String COMMA_OF_CHINESE = ",";
     public static final String PAUSE_SIGN = "、";
-    public static final Integer PAPER_STRUCT_EXCEPTION_CODE = 5100003;
 
     /**
      * oss url过期时间
@@ -276,14 +275,28 @@ public class SystemConstant {
      * 初始化附件文件路径
      */
     public static void initTempFiles() {
-        StringJoiner localPath = new StringJoiner("").add(System.getProperty(USER_DIR));
-        String mkdir = localPath.toString().substring(0, localPath.toString().lastIndexOf(File.separator));
-        File fileTempDir = new File(new StringBuffer(mkdir).append(File.separator).append(FILE_TEMP).toString());
-        if (!fileTempDir.exists()) {
+        File fileTempDir = null, pdfTempDir = null;
+        DictionaryConfig dictionaryConfig = SpringContextHolder.getBean(DictionaryConfig.class);
+
+        if (Objects.nonNull(dictionaryConfig.sysDomain().getFileTempPath()) && !Objects.equals("", dictionaryConfig.sysDomain().getFileTempPath())) {
+            fileTempDir = new File(dictionaryConfig.sysDomain().getFileTempPath().toString());
+        } else {
+            StringJoiner fileTempLocalPath = new StringJoiner("").add(System.getProperty(USER_DIR));
+            String mkdir = fileTempLocalPath.toString().substring(0, fileTempLocalPath.toString().lastIndexOf(File.separator));
+            fileTempDir = new File(new StringBuffer(mkdir).append(File.separator).append(FILE_TEMP).toString());
+        }
+        if (Objects.nonNull(fileTempDir) && !fileTempDir.exists()) {
             fileTempDir.mkdirs();
         }
-        File pdfTempDir = new File(new StringBuffer(mkdir).append(File.separator).append(PDF_TEMP).toString());
-        if (!pdfTempDir.exists()) {
+
+        if (Objects.nonNull(dictionaryConfig.sysDomain().getPdfTempPath()) && !Objects.equals("", dictionaryConfig.sysDomain().getPdfTempPath())) {
+            pdfTempDir = new File(dictionaryConfig.sysDomain().getPdfTempPath().toString());
+        } else {
+            StringJoiner pdfTempLocalPath = new StringJoiner("").add(System.getProperty(USER_DIR));
+            String mkdir = pdfTempLocalPath.toString().substring(0, pdfTempLocalPath.toString().lastIndexOf(File.separator));
+            pdfTempDir = new File(new StringBuffer(mkdir).append(File.separator).append(PDF_TEMP).toString());
+        }
+        if (Objects.nonNull(pdfTempDir) && !pdfTempDir.exists()) {
             pdfTempDir.mkdirs();
         }
         TEMP_FILES_DIR = fileTempDir.getPath();

+ 10 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/ReportOpenDomain.java

@@ -17,6 +17,8 @@ public class ReportOpenDomain implements Serializable {
 
     String examApi;
 
+    String examDeleteApi;
+
     String courseEditApi;
 
     String courseDelApi;
@@ -51,6 +53,14 @@ public class ReportOpenDomain implements Serializable {
         this.examApi = examApi;
     }
 
+    public String getExamDeleteApi() {
+        return examDeleteApi;
+    }
+
+    public void setExamDeleteApi(String examDeleteApi) {
+        this.examDeleteApi = examDeleteApi;
+    }
+
     public String getCourseEditApi() {
         return courseEditApi;
     }

+ 20 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/SysDomain.java

@@ -54,6 +54,26 @@ public class SysDomain implements Serializable {
         return flowSchoolCodeMap;
     }
 
+    String fileTempPath;
+
+    String pdfTempPath;
+
+    public String getFileTempPath() {
+        return fileTempPath;
+    }
+
+    public void setFileTempPath(String fileTempPath) {
+        this.fileTempPath = fileTempPath;
+    }
+
+    public String getPdfTempPath() {
+        return pdfTempPath;
+    }
+
+    public void setPdfTempPath(String pdfTempPath) {
+        this.pdfTempPath = pdfTempPath;
+    }
+
     public void setFlowSchoolCodeMap(Map<String, List<String>> flowSchoolCodeMap) {
         this.flowSchoolCodeMap = flowSchoolCodeMap;
     }

+ 2 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/ExceptionResultEnum.java

@@ -85,6 +85,8 @@ public enum ExceptionResultEnum {
 
     SYNC_TASK_NO_DATA(HttpStatus.INTERNAL_SERVER_ERROR, 5000033, "同步任务不存在"),
 
+    PAPER_STRUCT_EXCEPTION(HttpStatus.INTERNAL_SERVER_ERROR,5100003,"试卷结构不一致"),
+
     /**
      * 401
      */

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

@@ -137,6 +137,46 @@ public class TeachCloudReportTaskUtils {
         }
     }
 
+    /**
+     * 同步删除排批次(考试)
+     * @param schoolId 学校id
+     * @param id 第三方id
+     * @return 结果
+     */
+    public Boolean syncDeleteExam(Long schoolId, Long id) {
+        String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
+        Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
+        BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
+        if (hostUrl.contains("*")) {
+            hostUrl = hostUrl.replace("*", basicSchool.getCode());
+        }
+        String saveUrl = dictionaryConfig.reportOpenDomain().getExamDeleteApi();
+        validUrl(hostUrl, saveUrl);
+        String postUrl = hostUrl.concat(saveUrl);
+        long timestamp = System.currentTimeMillis();
+        try {
+            //参数
+            Map<String, Object> map = new HashMap<>();
+            map.put("id", validParam(id, null, false, "考试ID"));
+
+            String accessToken = createSign(schoolId, timestamp, saveUrl);
+            String result = HttpUtil.postJson(postUrl, JacksonUtil.parseJson(map), accessToken, timestamp);
+            JSONObject jsonObject = JSONObject.parseObject(result);
+            if (jsonObject.containsKey("code")) {
+                String code = jsonObject.getString("code");
+                if ("200".equals(code)) {
+                    return jsonObject.getBoolean("data");
+                } else {
+                    throw ExceptionResultEnum.ERROR.exception(jsonObject.getString("error"));
+                }
+            } else {
+                throw ExceptionResultEnum.ERROR.exception("考试删除失败");
+            }
+        } catch (Exception e) {
+            throw ExceptionResultEnum.ERROR.exception(e.getMessage());
+        }
+    }
+
     /**
      * @param schoolId         学校ID
      * @param examId           考试ID

+ 46 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/params/TBExamDeleteParam.java

@@ -0,0 +1,46 @@
+package com.qmth.teachcloud.report.business.bean.params;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Optional;
+
+/**
+ * @Description: 考试删除参数
+ * @Author: CaoZixuan
+ * @Date: 2022-07-12
+ */
+public class TBExamDeleteParam {
+    @ApiModelProperty(value = "考试id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    @ApiModelProperty(value = "学校id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long schoolId;
+
+    /**
+     * 参数校验
+     */
+    public void validParams() {
+        Optional.ofNullable(this.getId()).orElseThrow(() -> ExceptionResultEnum.PARAMS_ERROR.exception("考试id为空"));
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Long schoolId) {
+        this.schoolId = schoolId;
+    }
+}

+ 8 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamService.java

@@ -1,6 +1,7 @@
 package com.qmth.teachcloud.report.business.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.teachcloud.report.business.bean.params.TBExamDeleteParam;
 import com.qmth.teachcloud.report.business.bean.params.TBExamParam;
 import com.qmth.teachcloud.report.business.entity.TBExam;
 
@@ -33,4 +34,11 @@ public interface TBExamService extends IService<TBExam> {
      * @return 考试id
      */
     Long editTBExam(TBExamParam tbExamParam);
+
+    /**
+     * 删除考试
+     * @param tbExamDeleteParam 考试参数
+     * @return 是否删除成功
+     */
+    Boolean deleteTBExam(TBExamDeleteParam tbExamDeleteParam);
 }

+ 2 - 2
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/AnalyzeDataCheckServiceImpl.java

@@ -139,10 +139,10 @@ public class AnalyzeDataCheckServiceImpl implements AnalyzeDataCheckService {
         }).collect(Collectors.toList());
         if (!Answer.matchTwoAnswerList(al1,al2)){
             String paperNumber = courseCode.substring(0,courseCode.length() - tbPaper.getPaperType().length());
-            throw ExceptionResultEnum.ERROR.exception(SystemConstant.PAPER_STRUCT_EXCEPTION_CODE, "考生作答中的试卷结构和分析参数中配置的试卷结构不一致(检查内容 : 题目类型(主观题、客观题),大题号,小题号)," +
+            throw ExceptionResultEnum.PAPER_STRUCT_EXCEPTION.exception("考生作答中的试卷结构和分析参数中配置的试卷结构不一致(检查内容 : 题目类型(主观题、客观题),大题号,小题号)," +
                     "请试卷编号为: 【" + paperNumber + "】的命题老师在知学知考教研分析板块下按照如下操作重新配置试卷结构:" +
                     "数据初始化 -> 基础配置 -> 命题蓝图设置 -> 更新试卷结构 -> 保存。" +
-                    "之后管理员再重新计算该分析批次");
+                    "之后管理员再重新计算该分析批次。(" + ExceptionResultEnum.PAPER_STRUCT_EXCEPTION.getCode() + ")");
         }
     }
 

+ 27 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamServiceImpl.java

@@ -4,19 +4,24 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.BasicSemester;
+import com.qmth.teachcloud.common.enums.ExamModelEnum;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.service.BasicSemesterService;
+import com.qmth.teachcloud.report.business.bean.params.TBExamDeleteParam;
 import com.qmth.teachcloud.report.business.bean.params.TBExamParam;
 import com.qmth.teachcloud.report.business.entity.TBCloudExam;
 import com.qmth.teachcloud.report.business.entity.TBExam;
+import com.qmth.teachcloud.report.business.entity.TBExamCourse;
 import com.qmth.teachcloud.report.business.mapper.TBExamMapper;
 import com.qmth.teachcloud.report.business.service.TBCloudExamService;
+import com.qmth.teachcloud.report.business.service.TBExamCourseService;
 import com.qmth.teachcloud.report.business.service.TBExamService;
 import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.util.List;
 import java.util.Objects;
 
 /**
@@ -33,6 +38,8 @@ public class TBExamServiceImpl extends ServiceImpl<TBExamMapper, TBExam> impleme
     private TBCloudExamService tbCloudExamService;
     @Resource
     private BasicSemesterService basicSemesterService;
+    @Resource
+    private TBExamCourseService tbExamCourseService;
 
     @Override
     public TBExam findByCloudExamId(Long cloudExamId) {
@@ -96,4 +103,24 @@ public class TBExamServiceImpl extends ServiceImpl<TBExamMapper, TBExam> impleme
         }
         return id;
     }
+
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public synchronized Boolean deleteTBExam(TBExamDeleteParam tbExamDeleteParam) {
+        Long examId = tbExamDeleteParam.getId();
+        Long schoolId = tbExamDeleteParam.getSchoolId();
+        if (!SystemConstant.longNotNull(schoolId)) {
+            throw ExceptionResultEnum.ERROR.exception("缺少参数学校id");
+        }
+        TBExam tbExam = this.getById(examId);
+        if (Objects.isNull(tbExam)){
+            throw ExceptionResultEnum.ERROR.exception("未找到考试信息");
+        }
+        List<TBExamCourse> tbExamCourseList = tbExamCourseService.list(new QueryWrapper<TBExamCourse>().lambda().eq(TBExamCourse::getSchoolId,schoolId).eq(TBExamCourse::getExamId, examId));
+        if (tbExamCourseList.size() > 0){
+            throw ExceptionResultEnum.ERROR.exception("考试下还有分析课程不能删除");
+        }
+        return this.removeById(examId);
+    }
 }

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

@@ -15,10 +15,7 @@ import com.qmth.teachcloud.common.util.AuthThirdUtil;
 import com.qmth.teachcloud.common.util.JacksonUtil;
 import com.qmth.teachcloud.common.util.Result;
 import com.qmth.teachcloud.common.util.ResultUtil;
-import com.qmth.teachcloud.report.business.bean.params.CalculateParams;
-import com.qmth.teachcloud.report.business.bean.params.CourseParam;
-import com.qmth.teachcloud.report.business.bean.params.PublishParams;
-import com.qmth.teachcloud.report.business.bean.params.TBExamParam;
+import com.qmth.teachcloud.report.business.bean.params.*;
 import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
 import com.qmth.teachcloud.report.business.service.AnalyzeForReportService;
 import com.qmth.teachcloud.report.business.service.TBExamCourseDeleteService;
@@ -112,6 +109,22 @@ public class OpenApiController {
         return ResultUtil.ok(tbExamService.editTBExam(tbExamParam));
     }
 
+    @ApiOperation(value = "考试删除接口")
+    @ApiResponses({@ApiResponse(code = 200, message = "考试删除接口", response = Object.class)})
+    @RequestMapping(value = "/exam_delete", method = RequestMethod.POST)
+    @Aac(auth = BOOL.FALSE)
+    public Result examDelete(@ApiParam(value = "删除考试数据信息", required = true) @RequestBody String result) throws IOException {
+        Optional.ofNullable(result).orElseThrow(() -> ExceptionResultEnum.PARAMS_ERROR.exception("数据为空"));
+        String decodeJson = URLDecoder.decode(result, SystemConstant.CHARSET_NAME);
+        log.info("examDelete进来了,result:{}", decodeJson);
+        TBExamDeleteParam tbExamDeleteParam = JacksonUtil.readJson(decodeJson, TBExamDeleteParam.class);
+        Optional.ofNullable(tbExamDeleteParam).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("转换后的数据为空"));
+        tbExamDeleteParam.validParams();
+        BasicSchool basicSchool = AuthThirdUtil.hasPermission();
+        tbExamDeleteParam.setSchoolId(basicSchool.getId());
+        return ResultUtil.ok(tbExamService.deleteTBExam(tbExamDeleteParam));
+    }
+
     @ApiOperation(value = "分析课程(试卷)创建/更新接口")
     @ApiResponses({@ApiResponse(code = 200, message = "分析课程(试卷)创建/更新接口", response = Object.class)})
     @RequestMapping(value = "/course_edit", method = RequestMethod.POST)

+ 2 - 0
teachcloud-report/src/main/resources/application-36dev.properties

@@ -58,6 +58,8 @@ sys.config.sessionActive=2h
 sys.config.reportUrl=http://localhost:9099/#/student-report/
 sys.config.loginAuthenUrl=http://192.168.10.86:8057/#/login-authen/
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 org.center.url=https://solar.qmth.com.cn
 org.center.orgQueryApi=/api/open/org/query

+ 2 - 0
teachcloud-report/src/main/resources/application-dev.properties

@@ -58,6 +58,8 @@ sys.config.sessionActive=2h
 sys.config.reportUrl=http://localhost:9099/#/student-report/
 sys.config.loginAuthenUrl=http://127.0.0.1:8057/#/login-authen/
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 org.center.url=https://solar.qmth.com.cn
 org.center.orgQueryApi=/api/open/org/query

+ 2 - 0
teachcloud-report/src/main/resources/application-offline.properties

@@ -58,6 +58,8 @@ sys.config.sessionActive=2h
 sys.config.reportUrl=http://192.168.10.136/#/student-report/
 sys.config.loginAuthenUrl=http://192.168.10.136/#/login-authen/
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/file-temp
+sys.config.pdfTempPath=/pdf-temp
 
 org.center.url=https://solar.qmth.com.cn
 org.center.orgQueryApi=/api/open/org/query

+ 2 - 0
teachcloud-report/src/main/resources/application-release.properties

@@ -59,6 +59,8 @@ sys.config.sessionActive=2h
 sys.config.reportUrl=https://wdfx.qmth.com.cn/#/student-report/
 sys.config.loginAuthenUrl=https://wdfx.qmth.com.cn/#/login-authen/
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 org.center.url=https://solar.qmth.com.cn
 org.center.orgQueryApi=/api/open/org/query

+ 2 - 0
teachcloud-report/src/main/resources/application-test.properties

@@ -58,6 +58,8 @@ sys.config.sessionActive=2h
 sys.config.reportUrl=https://*.teachcloud-report-test.work/#/student-report/
 sys.config.loginAuthenUrl=https://*.teachcloud-report-test.work/#/login-authen/
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 org.center.url=https://solar.qmth.com.cn
 org.center.orgQueryApi=/api/open/org/query

+ 2 - 0
teachcloud-task/src/main/resources/application-task.properties

@@ -83,6 +83,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=test-school-2
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=test-school-1
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 #\u65E5\u671F\u683C\u5F0F\u5316
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss

+ 2 - 0
teachcloud-task/src/main/resources/application-task_36dev.properties

@@ -83,6 +83,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=test-school-2
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=test-school-1
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 #\u65E5\u671F\u683C\u5F0F\u5316
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss

+ 2 - 0
teachcloud-task/src/main/resources/application-task_offline.properties

@@ -82,6 +82,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=test-school-0
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=test-school-1,test-school-2
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/file-temp
+sys.config.pdfTempPath=/pdf-temp
 
 #\u65E5\u671F\u683C\u5F0F\u5316
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss

+ 2 - 0
teachcloud-task/src/main/resources/application-task_release.properties

@@ -88,6 +88,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=gdpu
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=jxutcm,sisu,test-school-2
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 #\u65E5\u671F\u683C\u5F0F\u5316
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss

+ 2 - 0
teachcloud-task/src/main/resources/application-task_test.properties

@@ -82,6 +82,8 @@ sys.config.sessionActive=4h
 sys.config.flowSchoolCodeMap.GdykdxPaperApprove=test-school-0
 sys.config.flowSchoolCodeMap.JxzyyPaperApprove=test-school-1,test-school-2
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
+sys.config.fileTempPath=/Users/king/Downloads/file-temp
+sys.config.pdfTempPath=/Users/king/Downloads/pdf-temp
 
 #\u65E5\u671F\u683C\u5F0F\u5316
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss