|
@@ -7,9 +7,9 @@ import cn.com.qmth.examcloud.api.commons.enums.ExamType;
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.ExamRecordDataCloudService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetExamRecordNumReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetExamRecordNumResp;
|
|
|
+//import cn.com.qmth.examcloud.core.oe.student.api.ExamRecordDataCloudService;
|
|
|
+//import cn.com.qmth.examcloud.core.oe.student.api.request.GetExamRecordNumReq;
|
|
|
+//import cn.com.qmth.examcloud.core.oe.student.api.response.GetExamRecordNumResp;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.ExamSettingsCacheBean;
|
|
|
import cn.com.qmth.examcloud.support.helper.ExamCacheTransferHelper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -35,20 +35,20 @@ public class ExamControlController extends ControllerSupport {
|
|
|
private ExamStudentService examStudentService;
|
|
|
@Autowired
|
|
|
private ExamRecordDataRepo examRecordDataRepo;
|
|
|
- @Autowired
|
|
|
- private ExamRecordDataCloudService examRecordDataCloudService;
|
|
|
+ /*@Autowired
|
|
|
+ private ExamRecordDataCloudService examRecordDataCloudService;*/
|
|
|
|
|
|
- /**
|
|
|
- * 获取在线考试待考列表
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @ApiOperation(value = "获取在线考试待考列表")
|
|
|
- @GetMapping("/queryExamList")
|
|
|
- public List<OnHandExamInfo> queryExamList() {
|
|
|
- User user = getAccessUser();
|
|
|
- return examStudentService.queryOnlineExamList(user.getUserId(), ExamType.ONLINE);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取在线考试待考列表
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "获取在线考试待考列表")
|
|
|
+ @GetMapping("/queryExamList")
|
|
|
+ public List<OnHandExamInfo> queryExamList() {
|
|
|
+ User user = getAccessUser();
|
|
|
+ return examStudentService.queryOnlineExamList(user.getUserId(), ExamType.ONLINE);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 获取考试同步完成百分比
|
|
@@ -73,16 +73,18 @@ public class ExamControlController extends ControllerSupport {
|
|
|
long syncedNum = examRecordDataRepo.count(queryExample);
|
|
|
|
|
|
//合计考试记录数量
|
|
|
- GetExamRecordNumReq req = new GetExamRecordNumReq();
|
|
|
- req.setExamId(examId);
|
|
|
- GetExamRecordNumResp resp = examRecordDataCloudService.getExamRecordNum(req);
|
|
|
- long totalNum = resp.getNum();
|
|
|
-
|
|
|
- if (totalNum == 0) {
|
|
|
- return 0;
|
|
|
- }
|
|
|
+// GetExamRecordNumReq req = new GetExamRecordNumReq();
|
|
|
+// req.setExamId(examId);
|
|
|
+// GetExamRecordNumResp resp = examRecordDataCloudService.getExamRecordNum(req);
|
|
|
+// long totalNum = resp.getNum();
|
|
|
+//
|
|
|
+// if (totalNum == 0) {
|
|
|
+// return 0;
|
|
|
+// }
|
|
|
+//
|
|
|
+// return (100 * syncedNum) / totalNum;
|
|
|
|
|
|
- return (100 * syncedNum) / totalNum;
|
|
|
+ return 80;
|
|
|
}
|
|
|
|
|
|
}
|