Parcourir la source

Merge remote-tracking branch 'origin/dev_v3.2.3' into dev_v3.2.3

wangliang il y a 2 ans
Parent
commit
44a0b8d9fd

+ 22 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamDetailCourseDto.java

@@ -1,6 +1,8 @@
 package com.qmth.distributed.print.business.bean.dto;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.qmth.distributed.print.business.entity.ExamDetailCourse;
+import com.qmth.distributed.print.business.enums.ExamTaskSyncStatusEnum;
 import io.swagger.annotations.ApiModelProperty;
 
 /**
@@ -10,6 +12,10 @@ public class ExamDetailCourseDto extends ExamDetailCourse {
 
     private Long examTaskId;
 
+    private Integer thirdRelateId;
+
+    private ExamTaskSyncStatusEnum syncStatus;
+
     public Long getExamTaskId() {
         return examTaskId;
     }
@@ -17,4 +23,20 @@ public class ExamDetailCourseDto extends ExamDetailCourse {
     public void setExamTaskId(Long examTaskId) {
         this.examTaskId = examTaskId;
     }
+
+    public Integer getThirdRelateId() {
+        return thirdRelateId;
+    }
+
+    public void setThirdRelateId(Integer thirdRelateId) {
+        this.thirdRelateId = thirdRelateId;
+    }
+
+    public ExamTaskSyncStatusEnum getSyncStatus() {
+        return syncStatus;
+    }
+
+    public void setSyncStatus(ExamTaskSyncStatusEnum syncStatus) {
+        this.syncStatus = syncStatus;
+    }
 }

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

@@ -173,8 +173,8 @@ public class DataSyncServiceImpl implements DataSyncService {
                     examTaskSync.setSyncStatus(ExamTaskSyncStatusEnum.FAIL);
                 } finally {
                     examTaskSync.setSyncStatus(ExamTaskSyncStatusEnum.FINISH);
-                    examTaskSyncService.saveOrUpdate(examTaskSync);
                 }
+                examTaskSyncService.saveOrUpdate(examTaskSync);
             }
             // 任务结果
             result = TaskResultEnum.SUCCESS;

+ 5 - 2
distributed-print-business/src/main/resources/mapper/ExamDetailCourseMapper.xml

@@ -226,8 +226,8 @@
                b.course_name   courseName,
                b.paper_number  paperNumber,
                b.paper_type paperType,
-               b.third_relate_id thirdRelateId,
-               b.sync_status syncStatus
+               ets.third_relate_id thirdRelateId,
+               ets.sync_status syncStatus
         FROM exam_detail_course b
                  LEFT JOIN
              exam_detail c ON b.exam_detail_id = c.id
@@ -235,6 +235,9 @@
              exam_task et ON b.school_id = et.school_id
                  and b.course_code = et.course_code
                  and b.paper_number = et.paper_number
+                 LEFT JOIN
+             exam_task_sync ets ON et.school_id = ets.school_id
+                 and et.paper_number = ets.paper_number
         <where>
             <if test="examTaskId != null">
                 and et.id = #{examTaskId}