|
@@ -24,7 +24,7 @@ import java.util.Date;
|
|
|
*/
|
|
|
@Service("examRecordDataService")
|
|
|
public class ExamRecordDataServiceImpl implements ExamRecordDataService {
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
|
|
@@ -67,22 +67,27 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
|
|
|
return examRecordDataRepo.save(examRecordDataEntity);
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public Long getGetAwaitingAuditCount(Long rootOrgId, Long examId) {
|
|
|
- Long count=jdbcTemplate.queryForObject("select count(1) from ec_oe_exam_record_data t where t.is_warn=1 and t.is_audit = 0 and t.root_org_id="+rootOrgId+" and t.exam_id="+examId, Long.class);
|
|
|
- return count;
|
|
|
- }
|
|
|
+ @Override
|
|
|
+ public Long getGetAwaitingAuditCount(Long rootOrgId, Long examId) {
|
|
|
+ StringBuilder sql = new StringBuilder()
|
|
|
+ .append(" select count(1) from ec_oe_exam_record_data t")
|
|
|
+ .append(" where t.exam_id = ").append(examId)
|
|
|
+ .append(" and t.exam_record_status != 'EXAM_INVALID'")
|
|
|
+ .append(" and t.is_warn=1 and t.is_audit = 0")
|
|
|
+ .append(" and t.root_org_id = ").append(rootOrgId);
|
|
|
+ return jdbcTemplate.queryForObject(sql.toString(), Long.class);
|
|
|
+ }
|
|
|
|
|
|
- @Override
|
|
|
- public CheckPaperInExamResp checkPaperInExam(CheckPaperInExamReq req) {
|
|
|
- Long id=examRecordDataRepo.getRecordIdByPaperId(req.getBasePaperId());
|
|
|
- CheckPaperInExamResp res=new CheckPaperInExamResp();
|
|
|
- if(id==null) {
|
|
|
- res.setInExam(false);
|
|
|
- }else {
|
|
|
- res.setInExam(true);
|
|
|
- }
|
|
|
- return res;
|
|
|
- }
|
|
|
+ @Override
|
|
|
+ public CheckPaperInExamResp checkPaperInExam(CheckPaperInExamReq req) {
|
|
|
+ Long id = examRecordDataRepo.getRecordIdByPaperId(req.getBasePaperId());
|
|
|
+ CheckPaperInExamResp res = new CheckPaperInExamResp();
|
|
|
+ if (id == null) {
|
|
|
+ res.setInExam(false);
|
|
|
+ } else {
|
|
|
+ res.setInExam(true);
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
}
|