7 files modified
1 files added
| | |
| | | import org.springblade.modules.exam.service.ExamPaperService; |
| | | import org.springblade.modules.exam.vo.ExamPaperSubjectVO; |
| | | import org.springblade.modules.exam.vo.ExamPaperVO; |
| | | import org.springblade.modules.exam.vo.ExamStatisticsVO; |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | import org.springblade.modules.exam.wrapper.ExamPaperWrapper; |
| | | import org.springblade.modules.system.entity.User; |
| | |
| | | return R.data(examPaperService.getExamRefreshInfo(examPaperVO)); |
| | | } |
| | | |
| | | /** |
| | | * 查询考试统计信息 |
| | | * @param examPaperVO |
| | | * @return |
| | | */ |
| | | @GetMapping("/getExamStatistics") |
| | | public R getExamStatistics(ExamPaperVO examPaperVO, Query query){ |
| | | IPage<ExamStatisticsVO> pages = examPaperService.getExamStatistics(Condition.getPage(query), examPaperVO); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import org.springblade.modules.exam.entity.ExamSubjectChoices; |
| | | import org.springblade.modules.exam.vo.ExamPaperSubjectVO; |
| | | import org.springblade.modules.exam.vo.ExamPaperVO; |
| | | import org.springblade.modules.exam.vo.ExamStatisticsVO; |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | Integer getExamNumber(@Param("examPaper") ExamPaperVO examPaperVO1); |
| | | |
| | | /** |
| | | * 查询考试统计信息 |
| | | * @param examPaper |
| | | * @param page |
| | | * @return |
| | | */ |
| | | List<ExamStatisticsVO> getExamStatistics(@Param("page") IPage<ExamStatisticsVO> page,@Param("examPaper") ExamPaperVO examPaper); |
| | | } |
| | |
| | | and cancel = 1 |
| | | </select> |
| | | |
| | | <!--考试查询统计--> |
| | | <select id="getExamStatistics" resultType="org.springblade.modules.exam.vo.ExamStatisticsVO"> |
| | | SELECt |
| | | ke.id,ke.start_time startTime,ke.end_time endTime,bd.dept_name schoolName, |
| | | ifnull(a.c,0) znum, |
| | | ifnull(b.c,0) yknum, |
| | | ifnull(c.c,0) qknum, |
| | | ifnull(d.c,0) ycnum, |
| | | ifnull(e.c,0) qxnum |
| | | from ksxt_exam ke |
| | | left join (select count(*) c,train_exam_id from sys_training_registration GROUP BY train_exam_id) a on a.train_exam_id = ke.id |
| | | left join (select count(*) c,train_exam_id from sys_training_registration where 1=1 and (is_exam = 2 or is_exam = 3) GROUP BY train_exam_id) b on b.train_exam_id = ke.id |
| | | left join (select count(*) c,train_exam_id from sys_training_registration str left join blade_user bu on bu.id = str.user_id where 1=1 and is_exam = 4 and cancel =2 or (is_exam=1 and cancel =1) and bu.examination_type!=1 GROUP BY train_exam_id) c on c.train_exam_id = ke.id |
| | | left join (select count(*) c,train_exam_id from sys_training_registration str left join blade_user bu on bu.id = str.user_id where 1=1 and cancel =1 and is_exam = 1 and bu.examination_type = 1 GROUP BY train_exam_id) d on d.train_exam_id = ke.id |
| | | left join (select count(*) c,train_exam_id from sys_training_registration where 1=1 and is_exam = 1 and cancel =2 GROUP BY train_exam_id) e on e.train_exam_id = ke.id |
| | | left join blade_user bu2 on bu2.id = ke.creator |
| | | left join blade_dept bd on bd.id = bu2.dept_id |
| | | where 1=1 |
| | | and ke.audit_status = 1 |
| | | <if test="examPaper.schoolName!=null and examPaper.schoolName!=''"> |
| | | and bd.dept_name like concat('%',#{examPaper.schoolName},'%') |
| | | </if> |
| | | <if test="examPaper.examTime!=null and examPaper.examTime!=''"> |
| | | and date_format(ke.start_time,'%Y-%m-%d') = #{examPaper.examTime} |
| | | </if> |
| | | order by ke.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import org.springblade.modules.apply.entity.Apply; |
| | | import org.springblade.modules.exam.entity.ExamPaper; |
| | | import org.springblade.modules.exam.entity.ExamSubjectChoices; |
| | | import org.springblade.modules.exam.vo.ExamPaperSubjectVO; |
| | | import org.springblade.modules.exam.vo.ExamPaperVO; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | import org.springblade.modules.exam.vo.*; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return |
| | | */ |
| | | Map<String,Object> getExamRefreshInfo(ExamPaperVO examPaperVO); |
| | | |
| | | /** |
| | | * 查询考试统计信息 |
| | | * @param examPaperVO |
| | | * @return |
| | | */ |
| | | IPage<ExamStatisticsVO> getExamStatistics(IPage<ExamStatisticsVO> page, ExamPaperVO examPaperVO); |
| | | } |
| | |
| | | import org.springblade.modules.exam.entity.*; |
| | | import org.springblade.modules.exam.mapper.ExamPaperMapper; |
| | | import org.springblade.modules.exam.service.*; |
| | | import org.springblade.modules.exam.vo.ExamPaperSubjectVO; |
| | | import org.springblade.modules.exam.vo.ExamPaperVO; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | import org.springblade.modules.exam.vo.*; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.service.TrainingRegistrationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询考试统计信息 |
| | | * @param examPaperVO |
| | | * @param page |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<ExamStatisticsVO> getExamStatistics(IPage<ExamStatisticsVO> page, ExamPaperVO examPaperVO) { |
| | | return page.setRecords(baseMapper.getExamStatistics(page,examPaperVO)); |
| | | } |
| | | } |
| | |
| | | * 考试时间 |
| | | */ |
| | | private String examTime; |
| | | |
| | | /** |
| | | * 学校名称 |
| | | */ |
| | | private String schoolName; |
| | | } |
| New file |
| | |
| | | package org.springblade.modules.exam.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 考试查询统计返回VO |
| | | * @author zhongrj |
| | | * @since 2022-01-18 |
| | | */ |
| | | @Data |
| | | public class ExamStatisticsVO { |
| | | private Long id; |
| | | |
| | | /** |
| | | * 培训学校名称 |
| | | */ |
| | | private String schoolName; |
| | | |
| | | /** |
| | | * 考试开始时间 |
| | | */ |
| | | private String startTime; |
| | | |
| | | /** |
| | | * 考试结束时间 |
| | | */ |
| | | private String endTime; |
| | | |
| | | /** |
| | | * 报名总人数 |
| | | */ |
| | | private Integer znum; |
| | | |
| | | /** |
| | | * 已考试人数 |
| | | */ |
| | | private Integer yknum; |
| | | |
| | | /** |
| | | * 缺考/未考试/笔试人数 |
| | | */ |
| | | private Integer qknum; |
| | | |
| | | /** |
| | | * 审查异常人数 |
| | | */ |
| | | private Integer ycnum; |
| | | |
| | | /** |
| | | * 已取消考试人数 |
| | | */ |
| | | private Integer qxnum; |
| | | |
| | | |
| | | } |
| | |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- 日志文件输出的文件名 --> |
| | | <!-- 日志文件输出的文件名 --> |
| | | <FileNamePattern>/home/zhongsong/log/info/info-%d{yyyy-MM-dd}.log</FileNamePattern> |
| | | <maxHistory>10</maxHistory> |
| | | <FileNamePattern>/home/zhongsong/log/warn/warn-%d{yyyy-MM-dd}.log</FileNamePattern> |
| | | <maxHistory>30</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <pattern>%n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId}] [%logger{50}] %n%-5level: %msg%n</pattern> |
| | |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- 日志文件输出的文件名 --> |
| | | <FileNamePattern>/home/zhongsong/log/error/error-%d{yyyy-MM-dd}.log</FileNamePattern> |
| | | <maxHistory>10</maxHistory> |
| | | <maxHistory>30</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <pattern>%n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId}] [%logger{50}] %n%-5level: %msg%n</pattern> |