| | |
| | | on |
| | | si.departmentid = bu.dept_id |
| | | where 1=1 |
| | | and bu.is_deleted = 0 |
| | | and bu.status = 1 |
| | | <if test="dispatcher.dispatcherUnitId!=null"> |
| | | and sd.dispatcher_unit_id = #{dispatcher.dispatcherUnitId} |
| | | </if> |
| | |
| | | * @param query page,size |
| | | */ |
| | | @GetMapping("/score-page") |
| | | public R<IPage<ExamScoreVO>> scorePage(Query query, String deptid, String jurisdiction) { |
| | | IPage<ExamScoreVO> pages = examScoreService.scorePage(Condition.getPage(query),deptid,jurisdiction); |
| | | public R<IPage<ExamScoreVO>> scorePage(Query query, String deptid, String jurisdiction,String realName) { |
| | | IPage<ExamScoreVO> pages = examScoreService.scorePage(Condition.getPage(query),deptid,jurisdiction,realName); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | * @param page 分页 |
| | | * @return |
| | | */ |
| | | List<ExamScoreVO> scorePage(IPage page,String deptid,String jurisdiction); |
| | | List<ExamScoreVO> scorePage(IPage page,String deptid,String jurisdiction,String realName); |
| | | |
| | | /** |
| | | * 自定义分页-模拟考试 |
| | |
| | | SELECT |
| | | exam.*, |
| | | user.jurisdiction, |
| | | user.dept_id |
| | | user.dept_id, |
| | | user.real_name realName, |
| | | ke.exam_name examName |
| | | FROM |
| | | exam_score exam |
| | | LEFT JOIN blade_user user ON exam.user_id = user.id |
| | | LEFT JOIN blade_user user |
| | | ON exam.user_id = user.id |
| | | left join |
| | | ksxt_exam ke |
| | | on |
| | | ke.id = exam.exam_id |
| | | left join |
| | | sys_information si |
| | | on |
| | | user.dept_id = si.departmentid |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction |
| | | WHERE |
| | | 1 = 1 |
| | | <if test="realName!=null and realName!=''"> |
| | | AND user.real_name = #{realName} |
| | | </if> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'"> |
| | | AND user.jurisdiction = #{jurisdiction} |
| | | AND (sj.id = #{jurisdiction} or sj.parent_id = #{jurisdiction}) |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | AND user.dept_id = #{deptid} |
| | | AND user.dept_id = #{deptid} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<ExamScoreVO> scorePage(IPage<ExamScoreVO> page,String deptid,String jurisdiction); |
| | | IPage<ExamScoreVO> scorePage(IPage<ExamScoreVO> page,String deptid,String jurisdiction,String realName); |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<ExamScoreVO> scorePage(IPage<ExamScoreVO> page,String deptid,String jurisdiction) { |
| | | return page.setRecords(baseMapper.scorePage(page,deptid,jurisdiction)); |
| | | public IPage<ExamScoreVO> scorePage(IPage<ExamScoreVO> page,String deptid,String jurisdiction,String realName) { |
| | | return page.setRecords(baseMapper.scorePage(page,deptid,jurisdiction,realName)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | private Long trainUnitId; |
| | | |
| | | |
| | | private String realName; |
| | | |
| | | private String examName; |
| | | |
| | | } |
| | |
| | | AND dispatch = 0 |
| | | GROUP BY |
| | | dept_id |
| | | ) A ON A.dept_id = H.departmentid |
| | | ) A |
| | | ON A.dept_id = H.departmentid |
| | | LEFT JOIN ( |
| | | SELECT |
| | | COUNT( * ) AS lastnum, |
| | |
| | | AND dispatch = 1 |
| | | GROUP BY |
| | | dept_id |
| | | ) B ON H.departmentid = B.dept_id where 1=1 |
| | | ) B |
| | | ON H.departmentid = B.dept_id |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = H.jurisdiction |
| | | where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'"> |
| | | and H.jurisdiction = #{jurisdiction} |
| | | and (sj.id = #{jurisdiction} or sj.parent_id = #{jurisdiction}) |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and H.departmentid = #{deptid} |
| | |
| | | <select id="selectSoil" resultType="java.util.HashMap"> |
| | | SELECT IFNULL(A.numj, 0) as numj, |
| | | IFNULL(B.numwj, 0) as numz |
| | | FROM (SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction) H |
| | | LEFT JOIN (SELECT COUNT(*) AS numj, dept_id |
| | | FROM |
| | | ( |
| | | SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction |
| | | ) H |
| | | LEFT JOIN |
| | | ( |
| | | SELECT COUNT(*) AS numj, dept_id |
| | | FROM blade_user |
| | | WHERE soil = 0 AND `status` = 1 AND is_deleted = 0 AND role_id = '1412226235153731586' |
| | | GROUP BY dept_id) A ON A.dept_id = H.departmentid |
| | | LEFT JOIN (SELECT COUNT(*) AS numwj, dept_id FROM blade_user WHERE soil = 1 and `status` = 1 AND is_deleted = 0 |
| | | AND role_id = '1412226235153731586' GROUP BY |
| | | dept_id) B |
| | | ON H.departmentid = B.dept_id where 1=1 |
| | | GROUP BY dept_id |
| | | ) A |
| | | ON A.dept_id = H.departmentid |
| | | LEFT JOIN |
| | | ( |
| | | SELECT COUNT(*) AS numwj, dept_id FROM blade_user |
| | | WHERE soil = 1 |
| | | and `status` = 1 |
| | | AND is_deleted = 0 |
| | | AND role_id = '1412226235153731586' |
| | | GROUP BY dept_id |
| | | ) B |
| | | ON H.departmentid = B.dept_id |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = H.jurisdiction |
| | | where 1=1 |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{jurisdiction} or sj.parent_id = #{jurisdiction}) |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and H.departmentid = #{deptid} |
| | | </if> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'"> |
| | | and H.jurisdiction = #{jurisdiction} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | <select id="selectSocialPage" resultMap="socialResultMap"> |
| | | SELECT |
| | | s.*, |
| | | distinct u.id, |
| | | u.real_name as realname |
| | | FROM |
| | | blade_user u |
| | | LEFT JOIN |
| | | sys_socil s |
| | | LEFT JOIN blade_user u ON s.namb = u.id where 1=1 |
| | | ON |
| | | s.cardid = u.cardid |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = s.jurisdiction |
| | | where 1=1 |
| | | and u.is_deleted = 0 |
| | | AND u.status = 1 |
| | | and u.soil = 0 |
| | | AND u.role_id = '1412226235153731586' |
| | | <if test="social.jurisdiction!=null and social.jurisdiction!='' and social.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id=#{social.jurisdiction} or sj.parent_id = #{social.jurisdiction}) |
| | | </if> |
| | | <if test="social.realname!=null and social.realname!=''"> |
| | | and u.real_name like concat(concat('%', #{social.realname}),'%') |
| | | </if> |
| | | <if test="social.cardid!=null and social.cardid!=''"> |
| | | and s.cardid like concat(concat('%', #{social.cardid}),'%') |
| | | </if> |
| | | <if test="social.namb!=null and social.namb!=''"> |
| | | and s.namb=#{social.namb} |
| | | and s.namb like concat('%',#{social.namb},'%') |
| | | </if> |
| | | <if test="social.deptid!=null and social.deptid!=''"> |
| | | and s.deptid=#{social.deptid} |
| | | </if> |
| | | <if test="social.jurisdiction!=null and social.jurisdiction!=''"> |
| | | and s.jurisdiction=#{social.jurisdiction} |
| | | </if> |
| | | </select> |
| | | |