deason 1 سال پیش
والد
کامیت
26febca3ce

+ 0 - 8
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordController.java

@@ -204,14 +204,6 @@ public class ExamRecordController extends ControllerSupport {
         return new ResponseEntity<>(HttpStatus.OK);
     }
 
-    @PostMapping(value = "/clean/capture/statistic")
-    @ApiOperation(value = "监考待审-清理数据")
-    public ResponseEntity<String> cleanCaptureStatistic() {
-        //todo
-        //examRecordService.cleanCaptureStatistic();
-        return new ResponseEntity<>(HttpStatus.OK);
-    }
-
     @GetMapping("/select/byExamStudentId")
     @ApiOperation(value = "根据考生ID查询考试记录")
     public List<ExamRecordDataEntity> getExamRecordByExamStudentId(@RequestParam Long examStudentId) {

+ 1 - 130
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordServiceImpl.java

@@ -92,9 +92,6 @@ public class ExamRecordServiceImpl implements ExamRecordService {
     @Autowired
     private ExamRecordEntityConvert examRecordEntityConvert;
 
-    //    @Autowired
-    //    private LocalCacheService localCacheService;
-
     @Autowired
     private StudentCloudService studentCloudService;
 
@@ -267,39 +264,6 @@ public class ExamRecordServiceImpl implements ExamRecordService {
         return this.getExamRecordList(uds, query);
     }
 
-    //    @Override
-    //    public List<ExamRecordInfo> getExamRecordWaitingAudit(ExamRecordQuery query) {
-    //        Check.isNull(query, "查询参数不能为空!");
-    //        //默认条件
-    //        query.setIsAudit(false);
-    //        query.addRecordStatus(ExamRecordStatus.EXAM_END.name());
-    //        query.addRecordStatus(ExamRecordStatus.EXAM_OVERDUE.name());
-    //
-    //        //查询条件
-    //        StringBuilder sqlBuilder = new StringBuilder();
-    //        //待审核(按原先的sql,多了一个ip字段)
-    //        sqlBuilder.append(EXAM_RECORD_SQL);
-    //        sqlBuilder.append(buildExamRecordCommonSelectCondition(query));
-    //        if (query.getIsWarn() != null) {
-    //            //只查有异常未审核
-    //            if (query.getIsWarn()) {
-    //                sqlBuilder.append(" and record_data.is_warn  = 1 and record_data.is_audit = 0 ");
-    //            } else {
-    //                sqlBuilder.append(" and record_data.is_warn  = 0 ");
-    //            }
-    //        } else {
-    //            sqlBuilder.append(" and ((record_data.is_warn = 0) OR (record_data.is_warn  = 1 and record_data.is_audit = 0))");
-    //        }
-    //        sqlBuilder.append(" and record_data.is_illegality = 0");
-    //        //查询分页记录
-    //        sqlBuilder.append(" group by record_data.id ");
-    //
-    //        sqlBuilder.append(" order by record_data.id desc");
-    //        List<ExamRecordDataEntity> entities = jdbcTemplate.query(sqlBuilder.toString(), (rs, rowNum) -> getExamRecordDataEntityByResultSet(rs));
-    //
-    //        return examRecordEntityConvert.ofList(entities);
-    //    }
-
     @Override
     public Long getExamRecordWaitingAuditNextId(UserDataRules uds, ExamRecordQuery query, Long examRecordDataId, String next) {
         //****注意按ID倒序排列的****,上一条,下一条
@@ -446,17 +410,6 @@ public class ExamRecordServiceImpl implements ExamRecordService {
         return examRecordData;
     }
 
-    //    private long countExamRecordDetailListForPage(ExamRecordQuery query) {
-    //        StringBuilder sqlBuilder = new StringBuilder();
-    //        sqlBuilder.append("select count(distinct record_data.id) from ec_oe_exam_record_data record_data " +
-    //        		" LEFT JOIN ec_oe_exam_process_record AS process ON record_data.id = process.exam_record_data_id " +
-    //                " LEFT JOIN ec_oe_exam_audit AS audit ON record_data.id = audit.exam_record_data_id where 1=1 ");
-    //        sqlBuilder.append(buildExamRecordCommonSelectCondition(query));
-    //        sqlBuilder.append(" and ((record_data.is_warn = 0) OR (record_data.is_warn  = 1 and record_data.is_audit = 1))");
-    //        sqlBuilder.append(" group by record_data.id ");
-    //        return jdbcTemplate.queryForObject(sqlBuilder.toString(), Long.class);
-    //    }
-
     /**
      * 构建查询 考试明细sql语句
      *
@@ -633,26 +586,7 @@ public class ExamRecordServiceImpl implements ExamRecordService {
         return examRecordEntityConvert.of(page);
     }
 
-    /**
-     * 监考待审:数量查询
-     * 查询无异常的数据和有异常未审核的数据
-     */
-    //    private long countExamRecordListForPage(ExamRecordQuery query) {
-    //        StringBuilder sqlBuilder = new StringBuilder();
-    //        sqlBuilder.append("select count(record_data.id) from ec_oe_exam_record_data record_data where 1=1");
-    //        sqlBuilder.append(buildExamRecordCommonSelectCondition(query));
-    //        if (query.getIsWarn() != null) {
-    //            if (query.getIsWarn()) {
-    //                sqlBuilder.append(" and record_data.is_warn  = 1 and record_data.is_audit = 0 ");
-    //            } else {
-    //                sqlBuilder.append(" and record_data.is_warn  = 0 ");
-    //            }
-    //        } else {
-    //            sqlBuilder.append(" and ((record_data.is_warn = 0) OR (record_data.is_warn  = 1 and record_data.is_audit = 0))");
-    //        }
-    //        sqlBuilder.append(" and record_data.is_illegality = 0");
-    //        return jdbcTemplate.queryForObject(sqlBuilder.toString(), Long.class);
-    //    }
+
     @SuppressWarnings("unchecked")
     @Override
     public List<Long> getExamRecordingStudentIds(Long examId) {
@@ -1019,69 +953,6 @@ public class ExamRecordServiceImpl implements ExamRecordService {
         return ret;
     }
 
-    //    @Override
-    //    public List<ExamRecordInfo> getExamRecordDetailList(ExamRecordQuery query) {
-    //        Check.isNull(query, "查询参数不能为空!");
-    //        query.addRecordStatus(ExamRecordStatus.EXAM_END.name());
-    //        query.addRecordStatus(ExamRecordStatus.EXAM_OVERDUE.name());
-    //
-    //        StringBuilder sqlBuilder = new StringBuilder();
-    //        sqlBuilder.append(EXAM_RECORD_SQL);
-    //        sqlBuilder.append(buildExamRecordCommonSelectCondition(query));
-    //        sqlBuilder.append(" and ((record_data.is_warn = 0) OR (record_data.is_warn  = 1 and record_data.is_audit = 1))");
-    //        sqlBuilder.append(" group by record_data.id ");
-    //        //根据ip查询
-    //        /*if (StringUtils.isNoneBlank(query.getIp())) {
-    //            sqlBuilder.append(" having ip like '%"+query.getIp()+"%' ");
-    //        }*/
-    //        sqlBuilder.append(" order by record_data.id desc");
-    //
-    //        List<ExamRecordDataEntity> examRecordDataList = jdbcTemplate.query(sqlBuilder.toString(), new RowMapper<ExamRecordDataEntity>() {
-    //            @Override
-    //            public ExamRecordDataEntity mapRow(ResultSet rs, int rowNum) throws SQLException {
-    //                return getExamRecordDataEntityByResultSet(rs);
-    //            }
-    //        });
-    //
-    //        List<ExamRecordInfo> examRecordInfoList = examRecordEntityConvert.of(examRecordDataList);
-    //        return this.loadExamRecordDetailData(examRecordInfoList, query.getExamId());
-    //    }
-
-    //    private List<ExamRecordInfo> loadExamRecordDetailData(List<ExamRecordInfo> list, Long examId) {
-    //        if (list == null || list.size() == 0) {
-    //            return new ArrayList<ExamRecordInfo>();
-    //        }
-    //        //缓存
-    //        Map<String, Object> cahcheMap = new HashMap<String, Object>();
-    //
-    //        list.forEach(examRecordInfo -> {
-    //            //获取考试名称
-    //            ExamSettingsCacheBean examBean = ExamCacheTransferHelper.getDefaultCachedExam(examId);
-    //            examRecordInfo.setExamName(examBean.getName());
-    //
-    //            ExamStudentInfo examStudent = (ExamStudentInfo) cahcheMap.get("examStudentinfo_" + examRecordInfo.getExamStudentId());
-    //            if (examStudent == null) {
-    //                examStudent = examStudentService.getExamStudentInfo(examRecordInfo.getExamStudentId());
-    //                cahcheMap.put("examStudentinfo_" + examRecordInfo.getExamStudentId(), examStudent);
-    //            }
-    //
-    //            String photoNumber = localCacheService.getStudentPhotoNumber(cahcheMap, examRecordInfo.getStudentId());
-    //            examRecordInfo.setPhone(photoNumber);//电话号码
-    //            if (examStudent != null) {
-    //                examRecordInfo.setSpecialtyName(examStudent.getSpecialtyName());
-    //                examRecordInfo.setGrade(examStudent.getGrade());
-    //            }
-    //            Map<String, String> data = this.getPaperScore(examRecordInfo.getDataId());
-    //            //试卷总分
-    //            examRecordInfo.setPaperTotalScore(data.get("paperTotalScore"));
-    //            //客观题总分
-    //            examRecordInfo.setObjectiveTotalScore(data.get("objectiveTotalScore"));
-    //            //主观题总分
-    //            examRecordInfo.setSubjectiveTotalScore(data.get("subjectiveTotalScore"));
-    //        });
-    //        return list;
-    //    }
-
     @Override
     public List<ExamStudentQuestionScoreInfo> getExamStudentQuestionScoreList(Long examId, String courseCode) {
         //最终返回的结果集