瀏覽代碼

试卷结构上传、同步非必填bug

xiaof 3 年之前
父節點
當前提交
20e551fbaf

+ 2 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamPaperSubjectiveStructureDto.java

@@ -1,5 +1,6 @@
 package com.qmth.distributed.print.business.bean.dto;
 
+import com.qmth.teachcloud.common.annotation.ExcelImportTempleteVaild;
 import com.qmth.teachcloud.common.annotation.ExcelNote;
 
 import java.io.Serializable;
@@ -8,6 +9,7 @@ import java.io.Serializable;
  * @Date: 2021/10/28.
  */
 
+@ExcelImportTempleteVaild(value = true)
 public class ExamPaperSubjectiveStructureDto implements Serializable {
 
     @ExcelNote(value = "科目代码")

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

@@ -307,7 +307,8 @@ public class DataSyncServiceImpl implements DataSyncService {
         } catch (ApiException e) {
             throw ExceptionResultEnum.ERROR.exception("试卷结构同步失败:" + e.getMessage());
         } finally {
-            examPaperStructureService.updateStatusById(examPaperStructure.getId(), status);
+            examPaperStructure.setStatus(status);
+            examPaperStructureService.updateById(examPaperStructure);
         }
     }
 

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

@@ -197,12 +197,13 @@ public class ExamPaperStructureServiceImpl extends ServiceImpl<ExamPaperStructur
         if (!ExamPaperStructureStatusEnum.FINISH.equals(examPaperStructure.getStatus())) {
             throw ExceptionResultEnum.ERROR.exception("试卷结构没有同步成功");
         }
+        ExamTask examTask = examTaskService.getByCourseCodeAndPaperNumber(examPaperStructure.getSchoolId(), examPaperStructure.getCourseCode(), examPaperStructure.getPaperNumber());
         String paperType = examPaperStructure.getPaperType();
         List<Map> list = new ArrayList<>();
         for (String str : paperType.split(",")) {
             Map<String, Object> map = new HashMap<>();
             map.put("paperType", str);
-            List<Map> paperStructure = stmmsUtils.queryPaperStructure(examPaperStructure.getSchoolId(), String.valueOf(examPaperStructure.getThirdRelateId()), examPaperStructure.getPaperNumber() + str, null);
+            List<Map> paperStructure = stmmsUtils.queryPaperStructure(examPaperStructure.getSchoolId(), String.valueOf(examPaperStructure.getThirdRelateId()), examTask.getPaperNumberId() + str, null);
             map.put("content", paperStructure);
             list.add(map);
         }