Ver código fonte

3.1.0-同步教研分析

xiaof 3 anos atrás
pai
commit
d7f27280d0

+ 11 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/GradeBatchPaper.java

@@ -56,6 +56,9 @@ public class GradeBatchPaper extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "教研分析课程代码")
     private String gradeCourseCode;
 
+    @ApiModelProperty(value = "是否可用")
+    private Boolean enable;
+
     public Long getSchoolId() {
         return schoolId;
     }
@@ -135,4 +138,12 @@ public class GradeBatchPaper extends BaseEntity implements Serializable {
     public void setGradeCourseCode(String gradeCourseCode) {
         this.gradeCourseCode = gradeCourseCode;
     }
+
+    public Boolean getEnable() {
+        return enable;
+    }
+
+    public void setEnable(Boolean enable) {
+        this.enable = enable;
+    }
 }

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

@@ -83,7 +83,7 @@ public class DataSyncReportServiceImpl implements DataSyncReportService {
             List<GradeBatchPaper> gradeBatchPaperList = gradeBatchPaperService.list(queryWrapper);
             for (GradeBatchPaper gradeBatchPaper : gradeBatchPaperList) {
                 String courseCode = gradeBatchPaper.getPaperNumber() + gradeBatchPaper.getPaperType();
-                teachCloudReportTaskUtils.syncCourse(schoolId, String.valueOf(examId), courseCode, gradeBatchPaper.getPaperName(), gradeBatchPaper.getPaperType(), gradeBatchPaper.getTeachCollegeName(), true);
+                teachCloudReportTaskUtils.syncCourse(schoolId, String.valueOf(examId), courseCode, gradeBatchPaper.getPaperName(), gradeBatchPaper.getPaperType(), gradeBatchPaper.getTeachCollegeName(), gradeBatchPaper.getEnable());
             }
 
             // 更新批次表考试ID、状态

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

@@ -116,6 +116,9 @@ public class OpenApiServiceImpl implements OpenApiService {
                 paperEvaluation.setSecondaryDimensionLevelDefineList(secondaryDimensionLevelDefineArrayList);
 
                 if (!gradeModuleEvaluationList.isEmpty()) {
+                    GradeModuleEvaluation gradeModuleEvaluation = gradeModuleEvaluationList.stream().filter(m -> moduleType.equals(m.getModuleType().name())).findFirst().orElseGet(null);
+                    paperEvaluation.setFormula(gradeModuleEvaluation == null ? null : gradeModuleEvaluation.getFormula().name());
+
                     List<PaperEvaluation.ModuleEvaluation> moduleEvaluationList = gradeModuleEvaluationList.stream().filter(m -> moduleType.equals(m.getModuleType().name())).map(m -> {
                         PaperEvaluation.ModuleEvaluation moduleEvaluation = new PaperEvaluation.ModuleEvaluation();
                         moduleEvaluation.setAdvice(m.getAdvice());

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

@@ -126,7 +126,7 @@ public class TeachCloudReportTaskUtils {
             map.put("courseName", validParam(courseName, null, true, "分析试卷名称"));
             map.put("paperType", validParam(paperType, "#", true, "试卷类型"));
             map.put("teachCollegeName", validParam(teachCollegeName, null, true, "开课机构名称"));
-            map.put("enable", validParam(enable, null, true, "是否启用标记"));
+            map.put("enable", validParam(enable, true, true, "是否启用标记"));
 
             String result = HttpKit.sendPost(postUrl, getHeaders(schoolId, saveUrl), map, null, null, null);
             JSONObject jsonObject = JSONObject.parseObject(result);