deason 3 anos atrás
pai
commit
ce6a4363f6

+ 8 - 4
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/exam_record_data/ExamRecordDataTool.java

@@ -34,14 +34,18 @@ public class ExamRecordDataTool {
 
     public void start() {
         StringBuilder querySql = new StringBuilder()
-                .append(" select t.id,t.root_org_id,t.exam_id,t.course_id,")
-                .append(" t.student_id,t.exam_student_id,t.exam_type,t.creation_time")
+                .append(" select t.id,t.root_org_id,org.name as rootOrgName,t.exam_id,t.course_id,c.code as courseCode,")
+                .append(" t.student_id,t.exam_student_id,s.identity_number,t.exam_type,t.exam_record_status,t.creation_time")
                 .append(" from ec_oes_exam_record_data t")
+                .append(" inner join ec_b_student s on s.id = t.student_id")
+                .append(" inner join ec_b_course c on c.id = t.course_id")
+                .append(" inner join ec_b_org org on org.id = t.root_org_id")
                 .append(" where 1=1")
                 .append(" and t.creation_time >= '2022-05-08 00:00:00'")
                 .append(" and t.creation_time <= '2022-05-08 18:00:00'")
-                .append(" and t.sync_status = 'UNSYNC'");
-        // .append(" limit 3");
+                .append(" and t.sync_status = 'UNSYNC'")
+                .append(" order by t.root_org_id,t.exam_id")
+                .append(" limit 3");
 
         List<ExamRecordDataVO> allList = jdbcTemplate.query(querySql.toString(), new BeanPropertyRowMapper(ExamRecordDataVO.class));
         System.out.println("total is " + allList.size());

+ 30 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/exam_record_data/ExamRecordDataVO.java

@@ -11,16 +11,22 @@ public class ExamRecordDataVO implements Serializable {
 
     private Long rootOrgId;
 
+    private String rootOrgName;
+
     private Long examId;
 
     private Long courseId;
 
+    private String courseCode;
+
     private Long studentId;
 
     private Long examStudentId;
 
     private String examType;
 
+    private String identityNumber;
+
     private String examRecordStatus;
 
     private Date creationTime;
@@ -41,6 +47,14 @@ public class ExamRecordDataVO implements Serializable {
         this.rootOrgId = rootOrgId;
     }
 
+    public String getRootOrgName() {
+        return rootOrgName;
+    }
+
+    public void setRootOrgName(String rootOrgName) {
+        this.rootOrgName = rootOrgName;
+    }
+
     public Long getExamId() {
         return examId;
     }
@@ -57,6 +71,14 @@ public class ExamRecordDataVO implements Serializable {
         this.courseId = courseId;
     }
 
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
     public Long getStudentId() {
         return studentId;
     }
@@ -81,6 +103,14 @@ public class ExamRecordDataVO implements Serializable {
         this.examType = examType;
     }
 
+    public String getIdentityNumber() {
+        return identityNumber;
+    }
+
+    public void setIdentityNumber(String identityNumber) {
+        this.identityNumber = identityNumber;
+    }
+
     public String getExamRecordStatus() {
         return examRecordStatus;
     }