开班计划和考试申请增加统计。
This commit is contained in:
parent
7c8c39c4d0
commit
0e3dbcdd98
@ -108,4 +108,12 @@ public class ExamApplyController extends DefaultBaseController {
|
|||||||
return new SuccessResultData<>(examApplyService.count(params));
|
return new SuccessResultData<>(examApplyService.count(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "考试申请统计", notes = "考试申请统计接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("statistics")
|
||||||
|
SuccessResultData<Map<String, Object>> statistics() {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return new SuccessResultData<>(examApplyService.statistics(params));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -108,4 +108,12 @@ public class ExamCheckController extends DefaultBaseController {
|
|||||||
return new SuccessResultData<>(examCheckService.count(params));
|
return new SuccessResultData<>(examCheckService.count(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "开班计划统计", notes = "开班计划统计接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("statistics")
|
||||||
|
SuccessResultData<Map<String, Object>> statistics() {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return new SuccessResultData<>(examCheckService.statistics(params));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -117,4 +117,11 @@ public interface IExamApplyDao {
|
|||||||
*/
|
*/
|
||||||
Integer count(Map<String, Object> params) throws SearchException;
|
Integer count(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考试申请统计
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
Integer statisticsCount(Map<String, Object> params) throws SearchException;
|
||||||
}
|
}
|
@ -117,4 +117,12 @@ public interface IExamCheckDao {
|
|||||||
*/
|
*/
|
||||||
Integer count(Map<String, Object> params) throws SearchException;
|
Integer count(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开班计划统计
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
Integer statisticsCount(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
}
|
}
|
@ -193,4 +193,11 @@ public interface IExamApplyService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer count(Map<String, Object> params);
|
Integer count(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考试申请
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> statistics(Map<String, Object> params);
|
||||||
}
|
}
|
@ -236,4 +236,31 @@ public class ExamApplyServiceImpl extends DefaultBaseService implements IExamApp
|
|||||||
return count == null ? 0 : count;
|
return count == null ? 0 : count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> statistics(Map<String, Object> params) {
|
||||||
|
params.put("checkStatus", 1);
|
||||||
|
Integer noCheck = statisticsCount(params);
|
||||||
|
params.put("checkStatus", 2);
|
||||||
|
Integer pass = statisticsCount(params);
|
||||||
|
params.put("checkStatus", 3);
|
||||||
|
Integer fail = statisticsCount(params);
|
||||||
|
params = new HashMap<>(1);
|
||||||
|
params.put("noCheck", noCheck);
|
||||||
|
params.put("pass", pass);
|
||||||
|
params.put("fail", fail);
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开班计划统计
|
||||||
|
* checkStatus == 2 通过率
|
||||||
|
* checkStatus == 3 驳回率
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Integer statisticsCount(Map<String, Object> params) {
|
||||||
|
Integer count = examApplyDao.statisticsCount(params);
|
||||||
|
return count == null ? 0 : count;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -185,4 +185,10 @@ public interface IExamCheckService {
|
|||||||
*/
|
*/
|
||||||
Integer count(Map<String, Object> params);
|
Integer count(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开班计划通过率计算
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> statistics(Map<String, Object> params);
|
||||||
}
|
}
|
@ -201,4 +201,28 @@ public class ExamCheckServiceImpl extends DefaultBaseService implements IExamChe
|
|||||||
return count == null ? 0 : count;
|
return count == null ? 0 : count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> statistics(Map<String, Object> params) {
|
||||||
|
params.put("checkStatus", 2);
|
||||||
|
Integer pass = statisticsCount(params);
|
||||||
|
params.put("checkStatus", 3);
|
||||||
|
Integer fail = statisticsCount(params);
|
||||||
|
params = new HashMap<>(1);
|
||||||
|
params.put("pass", pass);
|
||||||
|
params.put("fail", fail);
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开班计划统计
|
||||||
|
* checkStatus == 2 通过率
|
||||||
|
* checkStatus == 3 驳回率
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Integer statisticsCount(Map<String, Object> params) {
|
||||||
|
Integer count = examCheckDao.statisticsCount(params);
|
||||||
|
return count == null ? 0 : count;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -444,4 +444,15 @@
|
|||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 考试申请统计 -->
|
||||||
|
<select id="statisticsCount" parameterType="map" resultType="Integer">
|
||||||
|
SELECT
|
||||||
|
COUNT(*)
|
||||||
|
FROM
|
||||||
|
management_exam_apply t1
|
||||||
|
WHERE
|
||||||
|
t1.is_delete = 0
|
||||||
|
AND t1.check_status = #{checkStatus}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -303,4 +303,15 @@
|
|||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 开班计划统计 -->
|
||||||
|
<select id="statisticsCount" parameterType="map" resultType="Integer">
|
||||||
|
SELECT
|
||||||
|
COUNT(*)
|
||||||
|
FROM
|
||||||
|
management_exam_check t1
|
||||||
|
WHERE
|
||||||
|
t1.is_delete = 0
|
||||||
|
AND t1.check_status = #{checkStatus}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user