Просмотр исходного кода

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

xiaof 4 лет назад
Родитель
Сommit
095b4a3522

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

@@ -572,15 +572,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         System.out.println(JSON.toJSONString(examinationImportDtoList));
 
         // 校验课程代码和试卷编号在印刷计划下是1对1的关系
-        List<String> courseCodeList = examinationImportDtoList.stream().map(ExaminationImportDto::getCourseCode).distinct().collect(Collectors.toList());
         List<String> paperNumberList = examinationImportDtoList.stream().map(ExaminationImportDto::getPaperNumber).distinct().collect(Collectors.toList());
-        for (String courseCode : courseCodeList) {
-            List<String> tmp = examinationImportDtoList.stream().filter(e -> courseCode.equals(e.getCourseCode()))
-                    .map(ExaminationImportDto::getPaperNumber).distinct().collect(Collectors.toList());
-            if (tmp.size() != 1) {
-                throw ExceptionResultEnum.ERROR.exception("课程代码为 " + courseCode + ",对应多个试卷编号 : " + tmp);
-            }
-        }
         for (String paperNumber : paperNumberList) {
             List<String> tmp = examinationImportDtoList.stream().filter(e -> paperNumber.equals(e.getPaperNumber()))
                     .map(ExaminationImportDto::getCourseCode).distinct().collect(Collectors.toList());
@@ -720,7 +712,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             if (Objects.isNull(examTask)) {
                 throw ExceptionResultEnum.ERROR.exception("未找到命题任务");
             }
-            String examTaskSign = examTask.getSchoolId() + "-" + examTask.getCourseName() + "-" + examTask.getPaperNumber();
+            String examTaskSign = examTask.getCourseName() + "-" + examTask.getPaperNumber();
             String firstPath = zipLocalRootPath + File.separator + examTaskSign;
 //            List<ExamTaskDetail> examTaskDetailList = examTaskDetailService.list(new QueryWrapper<ExamTaskDetail>().lambda().eq(ExamTaskDetail::getExamTaskId, id));
 //            if (examTaskDetailList.size() != 1) {
@@ -818,7 +810,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             }
             count++;
         }
-        ZipUtil.zip(zipLocalRootPath, zipFile.getPath(), true);
+        ZipUtil.zip(zipLocalRootPath, zipFile.getPath(), false);
         ossUtil.ossUpload(dirNameTmp, zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))));
         JSONObject jsonObject = new JSONObject();
         jsonObject.put(SystemConstant.PATH, dirNameTmp);