deason 5 năm trước cách đây
mục cha
commit
4ca0e6006e

+ 3 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/export_exam_student_score/ExportExamStudentScore.java

@@ -26,6 +26,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
+/**
+ * 导出 - 小题分
+ */
 @Component
 public class ExportExamStudentScore {
 

+ 5 - 15
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/get_student_answer_detail/GetStduentAnswerDetailService.java

@@ -28,11 +28,7 @@ import java.util.Map;
 import java.util.Set;
 
 /**
- * 获取考生作答明细
- *
- * @author WANGWEI
- * @date 2019年7月11日
- * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ * 导出 - 考生得分明细
  */
 @Service
 public class GetStduentAnswerDetailService {
@@ -137,18 +133,15 @@ public class GetStduentAnswerDetailService {
                 }
 
                 if (null == questionType) {
-                    throw new RuntimeException(
-                            "questionType is null. examRecordDataId=" + cur + "; order=" + order);
+                    throw new RuntimeException("questionType is null. examRecordDataId=" + cur + "; order=" + order);
                 }
 
                 if (null == studentScore) {
                     // 无作答时,0分
                     if (StringUtils.isBlank(studentAnswer)) {
                         studentScore = 0D;
-                    }
-                    // 计算分数
-                    else {
-
+                    } else {
+                        // 计算分数
                         if (null == questionScore) {
                             throw new RuntimeException("questionScore is null. examRecordDataId="
                                     + cur + ";courseCode=" + courseCode + ";order=" + order);
@@ -172,7 +165,6 @@ public class GetStduentAnswerDetailService {
                                     studentScore = 0D;
                                 }
                             }
-
                         }
                         // 主观题
                         else if (questionType.equals("FILL_UP") || questionType.equals("ESSAY")) {
@@ -183,7 +175,6 @@ public class GetStduentAnswerDetailService {
                                     + questionType + "; examRecordDataId=" + cur + ";courseCode="
                                     + courseCode + ";order=" + order);
                         }
-
                     }
                 }
 
@@ -235,8 +226,7 @@ public class GetStduentAnswerDetailService {
             String ids = StringUtils.join(examRecordDataIdSet, ",");
             sql4QueryExamStudentInfo = sql4QueryExamStudentInfo.replace("$$", ids);
 
-            List<Map<String, Object>> studentInfoList = jdbcTemplate
-                    .queryForList(sql4QueryExamStudentInfo);
+            List<Map<String, Object>> studentInfoList = jdbcTemplate.queryForList(sql4QueryExamStudentInfo);
 
             for (Map<String, Object> curStudent : studentInfoList) {
                 System.out.println(JsonUtil.toJson(curStudent));

+ 3 - 7
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/get_student_one_question_answer/GetStduentOneAnswerService.java

@@ -21,11 +21,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * 获取考生作答明细
- *
- * @author WANGWEI
- * @date 2019年7月11日
- * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ * 导出 - 考生作答结果(带手机号)
  */
 @Service
 public class GetStduentOneAnswerService {
@@ -78,9 +74,9 @@ public class GetStduentOneAnswerService {
                 String studentAnswer = doc.getString("studentAnswer");
 
                 if (null == order) {
-                    throw new RuntimeException(
-                            "order is null. examRecordDataId=" + examRecordDataId);
+                    throw new RuntimeException("order is null. examRecordDataId=" + examRecordDataId);
                 }
+
                 if (!order.equals(questionOrder)) {
                     continue;
                 }

+ 8 - 5
src/test/java/cn/com/qmth/dp/examcloud/oe/test/ExportTest.java

@@ -18,19 +18,22 @@ public class ExportTest {
     private ExportExamStudentScore exportExamStudentScore;
 
     @Autowired
-    private GetStduentOneAnswerService getStduentOneAnswerService;
+    private GetStduentOneAnswerService studentOneAnswerService;
 
     @Autowired
-    private GetStduentAnswerDetailService getStduentAnswerDetailService;
+    private GetStduentAnswerDetailService studentAnswerDetailService;
 
     @Test
     public void exportTest() throws Exception {
+        // 导出 - 小题分
         // exportExamStudentScore.start();
 
-        // getStduentOneAnswerService.start(1213L, 1, "01");
-        // getStduentOneAnswerService.start(1213L, 1, "28");
+        // 导出 - 考生作答结果(带手机号)
+        // studentOneAnswerService.start(1213L, 1, "01");
+        // studentOneAnswerService.start(1213L, 1, "28");
 
-        // getStduentAnswerDetailService.start(19L, "03013750");
+        // 导出 - 考生得分明细
+        // studentAnswerDetailService.start(1606L, "410901031");
     }
 
 }