diff --git a/src/main/java/cn/com/tenlion/controller/api/examapply/ExamApplyController.java b/src/main/java/cn/com/tenlion/controller/api/examapply/ExamApplyController.java index 6127709..9e3f178 100644 --- a/src/main/java/cn/com/tenlion/controller/api/examapply/ExamApplyController.java +++ b/src/main/java/cn/com/tenlion/controller/api/examapply/ExamApplyController.java @@ -116,4 +116,13 @@ public class ExamApplyController extends DefaultBaseController { return new SuccessResultData<>(examApplyService.statistics(params)); } + + @ApiOperation(value = "考试分布统计", notes = "考试分布统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("exam-date") + SuccessResultData> examDate() { + Map params = requestParams(); + return new SuccessResultData<>(examApplyService.examDate(params)); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/dao/examapply/IExamApplyDao.java b/src/main/java/cn/com/tenlion/dao/examapply/IExamApplyDao.java index 9226dc4..6c2959c 100644 --- a/src/main/java/cn/com/tenlion/dao/examapply/IExamApplyDao.java +++ b/src/main/java/cn/com/tenlion/dao/examapply/IExamApplyDao.java @@ -124,4 +124,12 @@ public interface IExamApplyDao { * @throws SearchException */ Integer statisticsCount(Map params) throws SearchException; + + /** + * 考试分布统计 + * @param params + * @return + * @throws SearchException + */ + List examDate(Map params) throws SearchException; } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/examapply/ExamApplyDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/examapply/ExamApplyDTO.java index 0f202d8..925939d 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/examapply/ExamApplyDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/examapply/ExamApplyDTO.java @@ -51,6 +51,12 @@ public class ExamApplyDTO { private ClassPlanDTO classPlanDTO; @ApiModelProperty(name = "reason", value = "审核原因") private String reason; + @ApiModelProperty(name = "examName", value = "考试名称") + private String examName; + @ApiModelProperty(name = "startTime", value = "考试开始时间") + private String startTime; + @ApiModelProperty(name = "endTime", value = "考试结束时间") + private String endTime; public String getExamApplyId() { return examApplyId; @@ -195,4 +201,28 @@ public class ExamApplyDTO { public void setReason(String reason) { this.reason = reason; } + + public String getExamName() { + return examName; + } + + public void setExamName(String examName) { + this.examName = examName; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } } diff --git a/src/main/java/cn/com/tenlion/service/examapply/IExamApplyService.java b/src/main/java/cn/com/tenlion/service/examapply/IExamApplyService.java index b34e567..3d3052b 100644 --- a/src/main/java/cn/com/tenlion/service/examapply/IExamApplyService.java +++ b/src/main/java/cn/com/tenlion/service/examapply/IExamApplyService.java @@ -200,4 +200,11 @@ public interface IExamApplyService { * @return */ Map statistics(Map params); + + /** + * 考试分布统计 + * @param params + * @return + */ + List examDate(Map params); } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/examapply/impl/ExamApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/examapply/impl/ExamApplyServiceImpl.java index cd3789e..277dcc6 100644 --- a/src/main/java/cn/com/tenlion/service/examapply/impl/ExamApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/examapply/impl/ExamApplyServiceImpl.java @@ -251,6 +251,29 @@ public class ExamApplyServiceImpl extends DefaultBaseService implements IExamApp return params; } + @Override + public List examDate(Map params) { + List list = examApplyDao.examDate(params); + if(null != list && list.size() > 0) { + for(ExamApplyDTO examApplyDTO: list) { + ClassPlanDTO classPlanDTO = classPlanService.get(examApplyDTO.getExamId()); + examApplyDTO.setClassPlanDTO(classPlanDTO); + if(null != classPlanDTO) { + examApplyDTO.setExamName(classPlanDTO.getPlanName()); + if(1 == examApplyDTO.getExamType()) { + examApplyDTO.setStartTime(examApplyDTO.getTheoryExamStartTime()); + examApplyDTO.setEndTime(examApplyDTO.getTheoryExamEndTime()); + } + if(2 == examApplyDTO.getExamType()) { + examApplyDTO.setStartTime(examApplyDTO.getPracticeExamStartTime()); + examApplyDTO.setEndTime(examApplyDTO.getPracticeExamEndTime()); + } + } + } + } + return list; + } + /** * 开班计划统计 * checkStatus == 2 通过率 diff --git a/src/main/resources/mybatis/mapper/examapply/exam-apply-mapper.xml b/src/main/resources/mybatis/mapper/examapply/exam-apply-mapper.xml index abd155b..b3ba913 100644 --- a/src/main/resources/mybatis/mapper/examapply/exam-apply-mapper.xml +++ b/src/main/resources/mybatis/mapper/examapply/exam-apply-mapper.xml @@ -207,6 +207,9 @@ t1.theory_exam_address_id, t1.theory_exam_start_time, t1.theory_exam_end_time, + t1.practice_exam_address_id, + t1.practice_exam_start_time, + t1.practice_exam_end_time, t1.payment_voucher, t1.payment_voucher_num, t1.exam_apply_num, @@ -455,4 +458,32 @@ AND t1.check_status = #{checkStatus} + + + \ No newline at end of file