智慧保安后台管理-外网
Administrator
2022-01-04 2649be9534e68592660ecd4d03f14edcdc9b5c45
考试成绩查询修改,保安员学历情况分布统计
9 files modified
87 ■■■■■ changed files
src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml 27 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/service/ExamScoreService.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/vo/ExamScoreVO.java 30 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/vo/InformationVO.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java
@@ -419,8 +419,8 @@
     * @param query     page,size
     */
    @GetMapping("/score-page")
    public R<IPage<ExamScoreVO>> scorePage(Query query,InformationVO information) {
        IPage<ExamScoreVO> pages = examScoreService.scorePage(Condition.getPage(query),information);
    public R<IPage<ExamScoreVO>> scorePage(Query query,ExamScoreVO examScore) {
        IPage<ExamScoreVO> pages = examScoreService.scorePage(Condition.getPage(query),examScore);
        return R.data(pages);
    }
src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.java
@@ -72,7 +72,7 @@
     * @param page  分页
     * @return
     */
    List<ExamScoreVO> scorePage(IPage page,@Param("information") InformationVO information);
    List<ExamScoreVO> scorePage(IPage page,@Param("examScore") ExamScoreVO examScore);
    /**
     * 查询所有考试不合格的数据
src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
@@ -290,7 +290,7 @@
        exam.*,
        user.jurisdiction,
        user.real_name securityName,
        ke.exam_name examName,sis.enterpriseName trainingUnitName
        ke.exam_name examName,sis.enterpriseName trainingUnitName,ke.start_time examStartTime
        FROM
        exam_score exam
        left join blade_user user on exam.user_id = user.id
@@ -302,20 +302,23 @@
        WHERE
        1 = 1
        and ke.exam_type = 2
        <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1372091709474910209'">
            and (sj.id = #{information.jurisdiction} or sj.parent_id = #{information.jurisdiction})
        <if test="examScore.jurisdiction!=null and examScore.jurisdiction!='' and examScore.jurisdiction!='1372091709474910209'">
            and (sj.id = #{examScore.jurisdiction} or sj.parent_id = #{examScore.jurisdiction})
        </if>
        <if test="information.securityName!=null and information.securityName!=''">
            AND user.real_name like concat('%',#{information.securityName},'%')
        <if test="examScore.securityName!=null and examScore.securityName!=''">
            AND user.real_name like concat('%',#{examScore.securityName},'%')
        </if>
        <if test="information.trainingUnitName!=null and information.trainingUnitName!=''">
            AND sis.enterpriseName like concat('%',#{information.trainingUnitName},'%')
        <if test="examScore.trainingUnitName!=null and examScore.trainingUnitName!=''">
            AND sis.enterpriseName like concat('%',#{examScore.trainingUnitName},'%')
        </if>
        <if test="information.deptid!=null and information.deptid!=''">
            AND user.dept_id = #{information.deptid}
        <if test="examScore.deptId!=null and examScore.deptId!=''">
            AND user.dept_id = #{examScore.deptId}
        </if>
        <if test="information.qualified!=null">
            AND exam.qualified = #{information.qualified}
        <if test="examScore.month!=null and examScore.month!=''">
            AND date_format(ke.start_time,'%Y-%m') = #{examScore.month}
        </if>
        <if test="examScore.qualified!=null">
            AND exam.qualified = #{examScore.qualified}
        </if>
    </select>
@@ -460,6 +463,7 @@
            WHERE
                qualified = 0
                and training_unit_id = #{information.departmentid}
                and YEAR ( ke.start_time ) = YEAR ( now() )
                <if test="information.deptid!=null and information.deptid!=''">
                    and bu.dept_id = #{information.deptid}
                </if>
@@ -485,6 +489,7 @@
            WHERE
                qualified = 1
                and training_unit_id = #{information.departmentid}
                and YEAR ( ke.start_time ) = YEAR ( now() )
                <if test="information.deptid!=null and information.deptid!=''">
                    and bu.dept_id = #{information.deptid}
                </if>
src/main/java/org/springblade/modules/exam/service/ExamScoreService.java
@@ -62,7 +62,7 @@
     * @param page  分页
     * @return
     */
    IPage<ExamScoreVO> scorePage(IPage page,InformationVO information);
    IPage<ExamScoreVO> scorePage(IPage page,ExamScoreVO examScore);
    /**
     * 考试成绩及状态修改
src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java
@@ -489,8 +489,8 @@
    }
    @Override
    public IPage<ExamScoreVO> scorePage(IPage page, InformationVO information) {
        return page.setRecords(baseMapper.scorePage(page,information));
    public IPage<ExamScoreVO> scorePage(IPage page, ExamScoreVO examScore) {
        return page.setRecords(baseMapper.scorePage(page,examScore));
    }
    /**
src/main/java/org/springblade/modules/exam/vo/ExamScoreVO.java
@@ -111,4 +111,34 @@
     */
    private String trainingUnitName;
    /**
     * 考试开始时间
     */
    private Date examStartTime;
    /**
     * 考试开始时间
     */
    private String startTime;
    /**
     * 考试结束时间
     */
    private String endTime;
    /**
     * 月份
     */
    private String month;
    /**
     * 保安员姓名
     */
    private String securityName;
    /**
     * 辖区
     */
    private String jurisdiction;
}
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -1330,6 +1330,9 @@
        left join sys_information si on si.departmentid = bd.id
        left join sys_jurisdiction sj on sj.id = si.jurisdiction
        where 1=1
        and bu.role_id = 1412226235153731586
        and bu.status = 1
        and bu.is_deleted = 0
        <if test="jurisdiction!=null and jurisdiction != '' and jurisdiction!='1372091709474910209'">
            and (sj.id = #{jurisdiction} or sj.parent_id = #{jurisdiction})
        </if>
src/main/java/org/springblade/modules/information/vo/InformationVO.java
@@ -62,16 +62,4 @@
     */
    private String deptid;
    /**
     * 培训公司名称
     */
    private String trainingUnitName;
    /**
     * 保安员姓名
     */
    private String securityName;
    private Integer qualified;
}
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -129,6 +129,9 @@
        <if test="user.status!=null and user.status != '' and user.status != 6">
            and bu.status = #{user.status}
        </if>
        <if test="user.education!=null  and user.education != ''">
            and bu.education = #{user.education}
        </if>
        <if test="user.trainingUnitId!=null and user.trainingUnitId != ''">
            and str.training_unit_id = #{user.trainingUnitId}
        </if>