Browse Source

update rpc api

deason 2 years ago
parent
commit
07531aa8dd

+ 18 - 3
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamStatisticServiceImpl.java

@@ -13,6 +13,9 @@ import cn.com.qmth.examcloud.core.oe.admin.service.ExamStatisticService;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.statistic.ExamStatisticInfo;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.statistic.ExamStudentScoreInfo;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.statistic.OverviewInfo;
+import cn.com.qmth.examcloud.examwork.api.ExamCloudService;
+import cn.com.qmth.examcloud.examwork.api.request.GetExamCourseReq;
+import cn.com.qmth.examcloud.examwork.api.response.GetExamCourseResp;
 import com.google.common.collect.Lists;
 import org.apache.commons.collections4.CollectionUtils;
 import org.slf4j.Logger;
@@ -42,16 +45,28 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
     @Autowired
     private OrgCloudService orgCloudService;
 
+    @Autowired
+    private ExamCloudService examCloudService;
+
     @Autowired
     private JdbcTemplate jdbcTemplate;
 
     @Override
     public void refresh(Long examId, Long courseId) {
-        int passScoreLine = 60;
-        int goodScoreLine = 90;
-
         long start = System.currentTimeMillis();
 
+        GetExamCourseReq req = new GetExamCourseReq();
+        req.setExamId(examId);
+        req.setCourseId(courseId);
+        GetExamCourseResp resp = examCloudService.getExamCourseSetting(req);
+
+        int passScoreLine = 60;// 默认值
+        int goodScoreLine = 90;// 默认值
+        if (resp != null && resp.getBean() != null) {
+            passScoreLine = resp.getBean().getPassScoreLine();
+            goodScoreLine = resp.getBean().getGoodScoreLine();
+        }
+
         StringBuffer sql = new StringBuffer();
         sql.append(" select es.exam_id,es.course_id,es.org_id,es.exam_student_id,sc.total_score,d.paper_score");
         sql.append(" from ec_oe_exam_student es");