开班计划和考试申请增加统计。

This commit is contained in:
Renpc-kilig 2021-05-13 15:44:20 +08:00
parent d0e0a9437b
commit 3e1b1ef423
6 changed files with 108 additions and 0 deletions

View File

@ -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<List<ExamApplyDTO>> examDate() {
Map<String, Object> params = requestParams();
return new SuccessResultData<>(examApplyService.examDate(params));
}
}

View File

@ -124,4 +124,12 @@ public interface IExamApplyDao {
* @throws SearchException
*/
Integer statisticsCount(Map<String, Object> params) throws SearchException;
/**
* 考试分布统计
* @param params
* @return
* @throws SearchException
*/
List<ExamApplyDTO> examDate(Map<String, Object> params) throws SearchException;
}

View File

@ -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;
}
}

View File

@ -200,4 +200,11 @@ public interface IExamApplyService {
* @return
*/
Map<String, Object> statistics(Map<String, Object> params);
/**
* 考试分布统计
* @param params
* @return
*/
List<ExamApplyDTO> examDate(Map<String, Object> params);
}

View File

@ -251,6 +251,29 @@ public class ExamApplyServiceImpl extends DefaultBaseService implements IExamApp
return params;
}
@Override
public List<ExamApplyDTO> examDate(Map<String, Object> params) {
List<ExamApplyDTO> 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 通过率

View File

@ -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}
</select>
<!-- 考试分布统计 -->
<select id="examDate" parameterType="map" resultMap="examApplyDTO">
SELECT
t1.exam_id,
t1.certificate_office,
t1.theory_exam_address_id,
LEFT (t1.theory_exam_start_time, 10) theory_exam_start_time,
LEFT (t1.theory_exam_end_time, 10) theory_exam_end_time,
t1.practice_exam_address_id,
LEFT (t1.practice_exam_start_time, 10) practice_exam_start_time,
LEFT (t1.practice_exam_end_time, 10) practice_exam_end_time,
t1.payment_voucher,
t1.payment_voucher_num,
t1.exam_apply_num,
t1.`status`,
t1.user_status,
t1.check_status,
t1.exam_type,
t1.reason,
t1.exam_apply_id
FROM
management_exam_apply t1
WHERE
t1.is_delete = 0
AND t1.check_status = 1
AND t1.`status` = 1
</select>
</mapper>