Commit fcff9d8a by 阳浪

培训测试统计

parent 0a875e1b
......@@ -149,9 +149,12 @@ public interface ExamClient {
@GetMapping("/manage/exam/listByName")
List<Exam> selectExamListByName(@RequestBody ContextAndPageSizeVO contextAndPageSizeVO);
/**
* 根据考试名称获取总数
*/
@GetMapping("/manage/exam/selectExamListBySta")
List<ExamDetailsMarkingVO> selectExamListBySta(@RequestBody ContextAndPageSizeVO contextAndPageSizeVO);
/**
* 根据考试名称获取总数
*/
@GetMapping("/manage/exam/listByName/count")
int selectExamListByNameCount(@RequestBody ContextAndPageSizeVO contextAndPageSizeVO);
......
......@@ -45,6 +45,9 @@ public class ContextAndPageSizeVO {
@ApiModelProperty("题干关键字")
private String stemKey;
@ApiModelProperty("年度")
private String year;
@ApiModelProperty("题库关键字")
private String libraryKey;
......
......@@ -31,6 +31,9 @@ public class ExamDetailsMarkingVO {
@ApiModelProperty(value = "应该考试人数")
private Integer shouldExamNum;
@ApiModelProperty(value = "考试范围,1平台用户可见 2指定用户可见")
private Integer visibleRange;
@ApiModelProperty(value = "提交考试人数")
private Integer commitExamNum;
......@@ -39,4 +42,7 @@ public class ExamDetailsMarkingVO {
@ApiModelProperty(value = "合格人数")
private Integer qualifidNum;
@ApiModelProperty(value = "一次合格人数")
private Integer qualifiedNumFrist;
}
......@@ -363,6 +363,15 @@ public class ExamController {
}
/**
* 根据考试统计考试列表
*/
@GetMapping("/selectExamListBySta")
public List<ExamDetailsMarkingVO> selectExamListBySta(@RequestBody ContextAndPageSizeVO contextAndPageSizeVO) {
LOG.info("***************************************************************查询考试统计阅卷列表*****************************************");
return iExamService.selectExamListBySta(contextAndPageSizeVO);
}
/**
* 根据考试名称获取总数
*/
@GetMapping("/listByName/count")
......
......@@ -105,6 +105,8 @@ public interface ExamMapper extends BaseMapper<Exam> {
*/
List<Exam> selectExamListByName(ContextAndPageSizeVO contextAndPageSizeVO);
List<ExamDetailsMarkingVO> selectExamListBySta(ContextAndPageSizeVO contextAndPageSizeVO);
@Select({"<script>",
" SELECT ex.*"
+ " FROM exam ex"
......
......@@ -222,6 +222,8 @@ public interface IExamService extends IService<Exam> {
* */
List<com.yizhi.exam.application.vo.domain.Exam> selectExamListByName(ContextAndPageSizeVO contextAndPageSizeVO);
List<ExamDetailsMarkingVO> selectExamListBySta(ContextAndPageSizeVO contextAndPageSizeVO);
/**
* 根据考试名称关键字查询总数
* */
......
......@@ -1317,6 +1317,14 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, com.yizhi.applicati
}
@Override
public List<ExamDetailsMarkingVO> selectExamListBySta(ContextAndPageSizeVO contextAndPageSizeVO) {
List<ExamDetailsMarkingVO> examList = examMapper.selectExamListBySta(contextAndPageSizeVO);
return examList;
}
@Override
public int selectExamListByNameCount(ContextAndPageSizeVO contextAndPageSizeVO) {
HQueryUtil.startHQ(Exam.class);
return examMapper.selectExamListByNameCount(contextAndPageSizeVO);
......
......@@ -312,6 +312,19 @@
limit #{pageNo},#{pageSize}
</select>
<select id="selectExamListBySta" resultType="com.yizhi.exam.application.vo.ExamDetailsMarkingVO">
SELECT ex.id,ex.visible_range as visibleRange,
(select count(1) from tr_exam_authorize where exam_id = ex.id and state =1) as shouldExamNum,
(SELECT COUNT(DISTINCT account_id) FROM tr_exam_answer WHERE exam_id = ex.id AND state in(1,2)) as commitExamNum,
(select COUNT(distinct account_id) from tr_exam_answer where state=2 AND exam_id = ex.id AND score >= ex.qualified_score group by account_id having count(1)>1) as qualifidNum,
(select COUNT(distinct account_id) from tr_exam_answer where state=2 AND exam_id = ex.id AND score >= ex.qualified_score group by account_id having count(1)=1) as qualifiedNumFrist
FROM exam ex
WHERE ex.state>1 and ex.company_id = #{companyId} and ex.site_id = #{siteId}
and DATE_FORMAT(ex.create_time,'%Y') = #{year}
GROUP BY ex.id
ORDER BY ex.create_time desc
</select>
<select id="selectExamListByNameCount" resultType="java.lang.Integer">
SELECT COUNT(ex.id)
FROM exam ex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment