报名新增,报名查询,报名清册,培训报名,培训报名查询修改
| | |
| | | List<ApplyVO> selectApplyPage(IPage page, @Param("apply") ApplyVO apply); |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page 分页 |
| | | * @param apply 实体 |
| | | * @return |
| | | */ |
| | | List<ApplyVO> selectApplyPageStatis(IPage page, @Param("apply") ApplyVO apply); |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param apply 考试报名信息对象 |
| | |
| | | * @param id 考试id |
| | | * @return |
| | | */ |
| | | int getApplyDeatailNum(Long id); |
| | | int getApplyDeatailNum(@Param("id") Long id); |
| | | |
| | | /** |
| | | * 查询已报名的的人信息集合 |
| | | * @param id 考试id |
| | | * @return |
| | | */ |
| | | List<ApplyVO> getApplyDetailList(Long id); |
| | | List<ApplyVO> getApplyDetailList(@Param("id") Long id); |
| | | |
| | | /** |
| | | * 查询保安员个人报名信息 |
| | |
| | | * @param id 考试id |
| | | * @return |
| | | */ |
| | | int getTrainDeatailNum(Long id); |
| | | int getTrainDeatailNum(@Param("id") Long id); |
| | | |
| | | /** |
| | | * 查询已培训报名的的人信息集合 |
| | | * @param id 考试id |
| | | * @return |
| | | */ |
| | | List<ApplyVO> getTrainDetailList(Long id); |
| | | List<ApplyVO> getTrainDetailList(@Param("id") Long id); |
| | | |
| | | /** |
| | | * 查询报名信息,取最新的一条(即当前userId,)applyId最大的一条记录 |
| | |
| | | sa.examination_type examinationType,sa.examination_mx examinationMx, |
| | | ke.total_score paperScore,ke.exam_type examType,ke.start_time examTime,ke.exam_name examName, |
| | | bu.real_name realName,bu.is_apply isApply, ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING(bu.cardid,7,4),0) age, |
| | | bu.sex,bu.phone,bu.nativePlace, |
| | | bd.dept_name deptName,bu.cardid idCardNo,"保安证" applyCard |
| | | FROM |
| | | sys_apply sa |
| | |
| | | on |
| | | sa.exam_id = ke.id |
| | | left join |
| | | blade_user bu |
| | | ( |
| | | select * from blade_user where 1=1 |
| | | <if test="apply.deptId!=null and apply.deptId!=''"> |
| | | and dept_id = #{apply.deptId} |
| | | </if> |
| | | ) bu |
| | | on |
| | | sa.user_id = bu.id |
| | | left join |
| | |
| | | WHERE |
| | | 1=1 |
| | | and is_exam = 1 |
| | | and sa.apply_status = 2 |
| | | <if test="apply.applyStatus==2"> |
| | | and sa.exam_id is null |
| | | and bu.is_apply = 1 |
| | | and sa.apply_status = 2 |
| | | </if> |
| | | <if test="apply.applyStatus==4"> |
| | | and sa.apply_status = 4 |
| | | </if> |
| | | <if test="apply.applyStatus==1"> |
| | | and |
| | | ( |
| | | sa.exam_id is null |
| | | and bu.is_apply = 1 |
| | | and sa.apply_status = 2 |
| | | ) |
| | | or |
| | | ( |
| | | sa.apply_status = 4 |
| | | ) |
| | | </if> |
| | | <if test="apply.realName!=null and apply.realName!=''"> |
| | | and bu.real_name like concat('%', #{apply.realName},'%') |
| | | </if> |
| | |
| | | <if test="apply.userId!=null and apply.userId!=''"> |
| | | and sa.user_id like concat('%', #{apply.userId},'%') |
| | | </if> |
| | | <if test="apply.idCardNo!=null and apply.idCardNo!=''"> |
| | | and bu.cardid like concat('%', #{apply.idCardNo},'%') |
| | | </if> |
| | | <if test="apply.examinationType!=null and apply.examinationType!=''"> |
| | | and sa.examination_type = #{apply.examinationType} |
| | | </if> |
| | | <if test="apply.deptId!=null and apply.deptId!=''"> |
| | | and bu.dept_id = #{apply.deptId} |
| | | </if> |
| | | <if test="apply.applyStatus==2"> |
| | | and exam_id is null |
| | | <if test="apply.applyExamType!=null"> |
| | | and apply_exam_type = #{apply.applyExamType} |
| | | </if> |
| | | <if test="apply.examId!=null"> |
| | | and sa.exam_id = #{apply.examId} |
| | | </if> |
| | | <if test="apply.beginTime!=null and apply.beginTime!=''"> |
| | | and sa.apply_time >= #{apply.beginTime} |
| | | </if> |
| | | <if test="apply.overTime!=null and apply.overTime!=''"> |
| | | and sa.apply_time <= #{apply.overTime} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!--考试报名分页信息 清册--> |
| | | <select id="selectApplyPageStatis" resultType="org.springblade.modules.apply.vo.ApplyVO"> |
| | | SELECT |
| | | sa.id,sa.apply_status applyStatus,sa.user_id userId,sa.candidate_no candidateNo,apply_time,exam_id examId, |
| | | sa.examination_type examinationType,sa.examination_mx examinationMx, |
| | | ke.total_score paperScore,ke.exam_type examType,ke.start_time examTime,ke.exam_name examName, |
| | | bu.real_name realName,bu.is_apply isApply, ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING(bu.cardid,7,4),0) age, |
| | | bu.sex,bu.phone,bu.nativePlace, |
| | | bd.dept_name deptName,bu.cardid idCardNo,"保安证" applyCard |
| | | FROM |
| | | sys_apply sa |
| | | left join |
| | | ksxt_exam ke |
| | | on |
| | | sa.exam_id = ke.id |
| | | left join |
| | | ( |
| | | select * from blade_user where 1=1 |
| | | <if test="apply.deptId!=null and apply.deptId!=''"> |
| | | and dept_id = #{apply.deptId} |
| | | </if> |
| | | ) bu |
| | | on |
| | | sa.user_id = bu.id |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bd.id = bu.dept_id |
| | | WHERE |
| | | 1=1 |
| | | <if test="apply.applyStatus==3"> |
| | | and sa.apply_status = 2 |
| | | </if> |
| | | <if test="apply.applyStatus==4"> |
| | | and sa.apply_status = 4 |
| | | and bu.is_apply = 2 |
| | | </if> |
| | | <if test="apply.realName!=null and apply.realName!=''"> |
| | | and bu.real_name like concat('%', #{apply.realName},'%') |
| | | </if> |
| | | <if test="apply.deptName!=null and apply.deptName!=''"> |
| | | and bd.dept_name like concat('%', #{apply.deptName},'%') |
| | | </if> |
| | | <if test="apply.userId!=null and apply.userId!=''"> |
| | | and sa.user_id like concat('%', #{apply.userId},'%') |
| | | </if> |
| | | <if test="apply.idCardNo!=null and apply.idCardNo!=''"> |
| | | and bu.cardid like concat('%', #{apply.idCardNo},'%') |
| | | </if> |
| | | <if test="apply.examinationType!=null and apply.examinationType!=''"> |
| | | and sa.examination_type = #{apply.examinationType} |
| | | </if> |
| | | <if test="apply.deptId!=null and apply.deptId!=''"> |
| | | and bu.dept_id = #{apply.deptId} |
| | | </if> |
| | | <if test="apply.applyExamType!=null"> |
| | | and apply_exam_type = #{apply.applyExamType} |
| | | </if> |
| | | <if test="apply.examId!=null"> |
| | | and sa.exam_id = #{apply.examId} |
| | | </if> |
| | | <if test="apply.beginTime!=null and apply.beginTime!=''"> |
| | | and sa.apply_time >= #{apply.beginTime} |
| | | </if> |
| | | <if test="apply.overTime!=null and apply.overTime!=''"> |
| | | and sa.apply_time <= #{apply.overTime} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | sa.user_id = bu.id |
| | | WHERE |
| | | 1=1 |
| | | and is_exam = 1 |
| | | and sa.apply_status = 2 |
| | | and bu.is_apply = 1 |
| | | and sa.exam_id is not null |
| | | and sa.exam_id = #{id} |
| | | </select> |
| | | |
| | | <!-- 查询培训考试人数--> |
| | |
| | | sr.user_id = bu.id |
| | | WHERE |
| | | 1=1 |
| | | and is_exam = 1 |
| | | and sr.cancel = 1 |
| | | and bu.is_train = 1 |
| | | and sr.train_exam_id is not null |
| | | and sr.train_exam_id = #{id} |
| | | </select> |
| | | |
| | | <!--查询已报名的的人信息集合--> |
| | |
| | | bd.id = bu.dept_id |
| | | WHERE |
| | | 1=1 |
| | | and is_exam = 1 |
| | | and sa.apply_status = 2 |
| | | and bu.is_apply = 1 |
| | | and sa.exam_id is not null |
| | | and sa.exam_id = #{id} |
| | | </select> |
| | | |
| | | <!--查询已培训报名的的人信息集合--> |
| | |
| | | bd.id = bu.dept_id |
| | | WHERE |
| | | 1=1 |
| | | and is_exam = 1 |
| | | and sr.cancel = 1 |
| | | and bu.is_train = 1 |
| | | and sr.train_exam_id is not null |
| | | and sr.train_exam_id = #{id} |
| | | </select> |
| | | |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public IPage<ApplyVO> selectApplyPage(IPage<ApplyVO> page, ApplyVO apply) { |
| | | if (null!=apply.getApplyStatus()){ |
| | | if(apply.getApplyStatus()==3){ |
| | | return page.setRecords(baseMapper.selectApplyPageStatis(page,apply)); |
| | | } |
| | | } |
| | | return page.setRecords(baseMapper.selectApplyPage(page, apply)); |
| | | } |
| | | |
| | |
| | | * 培训考试结束时间 |
| | | */ |
| | | private Date endTime; |
| | | |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | private String beginTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | private String overTime; |
| | | |
| | | /** |
| | | * 电话 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 籍贯 |
| | | */ |
| | | private String nativePlace; |
| | | } |
| | |
| | | dispatcher.setStatus(1); |
| | | Boolean status = dispatcherService.updateById(dispatcher); |
| | | |
| | | //用户状态改变 |
| | | //查询当前用户的派遣记录,是否存在多条未结束派遣的 |
| | | Dispatcher dispatcher1 = new Dispatcher(); |
| | | dispatcher1.setUserIds(dispatcher.getUserIds()); |
| | | List<Dispatcher> dispatcherList = dispatcherService.list(Condition.getQueryWrapper(dispatcher1)); |
| | | |
| | | User user = new User(); |
| | | if (dispatcherList.size()<1){ |
| | | //用户状态改变 |
| | | user.setDispatch("1"); |
| | | }else { |
| | | //用户状态改变 |
| | | user.setDispatch("0"); |
| | | } |
| | | user.setId(Long.parseLong(dispatcher.getUserIds())); |
| | | user.setDispatch("1"); |
| | | userService.updateById(user); |
| | | |
| | | //内网同步 |
| | |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 培训公司信息查询,下拉 |
| | | */ |
| | | @GetMapping("/train-unit-tree") |
| | | public List<InformationVO> trainUnitTree(InformationVO information) { |
| | | List<InformationVO> pages = informationService.trainUnitTree(information); |
| | | return pages; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | |
| | | * @return |
| | | */ |
| | | void importInfor(List<InforExcel> data, Boolean isCovered); |
| | | |
| | | /** |
| | | * 培训公司信息查询,下拉 |
| | | */ |
| | | List<InformationVO> trainUnitTree(InformationVO information); |
| | | } |
| | |
| | | return page.setRecords(baseMapper.securityPage(page, information)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 培训公司信息查询,下拉 |
| | | */ |
| | | @Override |
| | | public List<InformationVO> trainUnitTree(InformationVO information) { |
| | | return baseMapper.securityPage(null, information); |
| | | } |
| | | |
| | | @Override |
| | | public void importInfor(List<InforExcel> data, Boolean isCovered) { |
| | | data.forEach(InforExcel -> { |
| | |
| | | and bu.dept_id = #{user.deptId} |
| | | </if> |
| | | <if test="user.isApply!=null"> |
| | | and sa.is_apply = #{user.isApply} |
| | | and bu.is_apply = #{user.isApply} |
| | | </if> |
| | | <if test="user.roleId!=null and user.roleId != ''"> |
| | | and bu.role_id = #{user.roleId} |
| | |
| | | |
| | | |
| | | <!--保安员列表树 安员列表树,帅选无保安证,下拉tree--> |
| | | <!-- <select id="getSecurityApplyTree" resultType="org.springblade.modules.system.node.TreeNode">--> |
| | | <!-- (--> |
| | | <!-- select #{user.deptId} as id,--> |
| | | <!-- bd2.dept_name as name,--> |
| | | <!-- 0 as parentId--> |
| | | <!-- from blade_user bu2--> |
| | | <!-- left join--> |
| | | <!-- blade_dept bd2--> |
| | | <!-- on --> |
| | | <!-- bu2.dept_id = bd2.id--> |
| | | <!-- )--> |
| | | |
| | | <!-- union all--> |
| | | |
| | | <!-- (--> |
| | | <!-- select--> |
| | | <!-- distinct--> |
| | | <!-- bu.id,--> |
| | | <!-- bu.real_name as name,--> |
| | | <!-- #{user.deptId} parentId--> |
| | | <!-- from--> |
| | | <!-- blade_user bu--> |
| | | <!-- left join--> |
| | | <!-- blade_dept bd--> |
| | | <!-- on--> |
| | | <!-- bu.dept_id = bd.id--> |
| | | <!-- where--> |
| | | <!-- bu.is_deleted = 0--> |
| | | <!-- and bu.status = 1--> |
| | | <!-- and bu.examination_type != 1--> |
| | | <!-- and (hold = 2 or hold = 3)--> |
| | | <!-- and bd.id = #{user.deptId}--> |
| | | <!-- <if test="user.examType==1">--> |
| | | <!-- and bu.is_apply != 1--> |
| | | <!-- </if>--> |
| | | <!-- <if test="user.examType==2">--> |
| | | <!-- and bu.is_train != 1--> |
| | | <!-- </if>--> |
| | | <!-- )--> |
| | | <!-- </select> --> |
| | | |
| | | |
| | | <!--保安员列表树 安员列表树,帅选无保安证,下拉tree--> |
| | | <select id="getSecurityApplyTree" resultType="org.springblade.modules.system.node.TreeNode"> |
| | | ( |
| | | select #{user.deptId} as id, |
| | | '全部' as name, |
| | | 0 as parentId |
| | | from blade_user |
| | | ) |
| | | |
| | | union all |
| | | |
| | | ( |
| | | select |
| | | distinct |
| | | bu.id, |
| | |
| | | <if test="user.examType==2"> |
| | | and bu.is_train != 1 |
| | | </if> |
| | | ) |
| | | </select> |
| | | |
| | | |
| | |
| | | <select id="getUserDetails" resultType="org.springblade.modules.system.vo.UserVO"> |
| | | select |
| | | bu.*, |
| | | ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( cardid,7,4),0) age, |
| | | bd.dept_name deptName |
| | | from |
| | | blade_user bu |
| | |
| | | blade_dept bd |
| | | on |
| | | bu.dept_id = bd.id |
| | | where bu.id = #{user.id} |
| | | where |
| | | 1=1 |
| | | and bu.id = #{user.id} |
| | | </select> |
| | | |
| | | <!--获取派遣信息--> |
| | |
| | | <!--报名培训分页信息--> |
| | | <select id="selectTrainingRegistrationPage" resultType="org.springblade.modules.training.vo.TrainingRegistrationVo"> |
| | | SELECT |
| | | sr.*, |
| | | sr.id,sr.training_time trainingTime,sr.user_id userId,sr.cancel, |
| | | bt.dept_name AS deptName, |
| | | bt0.dept_name AS trainUnitName, |
| | | bu.real_name realName,bu.phone,bu.cardid idCardNo, |
| | | bu.real_name realName,bu.cardid idCardNo,ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING(bu.cardid,7,4),0) age, |
| | | bu.sex,bu.phone,bu.nativePlace, |
| | | ke.start_time trainExamTime,if(ke.audit_status=1,ke.exam_name,"") trainExamName, |
| | | ke.exam_type examType,sr.audit_status auditStatus, |
| | | "保安证" applyCard |
| | |
| | | ON |
| | | sr.training_unit_id = bt0.id |
| | | left join |
| | | blade_user bu |
| | | ( |
| | | select * from blade_user where 1=1 |
| | | <if test="trainingRegistration.deptId!=null and trainingRegistration.deptId!=''"> |
| | | and dept_id = #{trainingRegistration.deptId} |
| | | </if> |
| | | ) bu |
| | | on |
| | | sr.user_id = bu.id |
| | | LEFT JOIN |
| | |
| | | ke.id = sr.train_exam_id |
| | | WHERE |
| | | 1=1 |
| | | and is_exam = 1 |
| | | <if test="trainingRegistration.cancel==1"> |
| | | and sr.cancel = 1 |
| | | and bu.is_train = 1 |
| | | </if> |
| | | <if test="trainingRegistration.cancel==2"> |
| | | and sr.cancel = 2 |
| | | </if> |
| | | <if test="trainingRegistration.cancel==11"> |
| | | and ( |
| | | sr.cancel = 2 |
| | | ) |
| | | or |
| | | (sr.cancel = 1 |
| | | and bu.is_train = 1) |
| | | </if> |
| | | <if test="trainingRegistration.trainingUnitId!=null and trainingRegistration.trainingUnitId!=''"> |
| | | and sr.training_unit_id = #{trainingRegistration.trainingUnitId} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="trainingRegistration.userId!=null and trainingRegistration.userId!=''"> |
| | | and sr.user_id = #{trainingRegistration.userId} |
| | | </if> |
| | | <if test="trainingRegistration.deptId!=null and trainingRegistration.deptId!=''"> |
| | | and bu.dept_id = #{trainingRegistration.deptId} |
| | | </if> |
| | | <if test="trainingRegistration.idCardNo!=null and trainingRegistration.idCardNo!=''"> |
| | | and bu.cardid like concat('%', #{trainingRegistration.idCardNo},'%') |
| | | </if> |
| | | <if test="trainingRegistration.auditStatus!=null and trainingRegistration.auditStatus!=0"> |
| | | and sr.audit_status = #{trainingRegistration.auditStatus} |
| | |
| | | <if test="trainingRegistration.realName!=null and trainingRegistration.realName!=''"> |
| | | and bu.real_name like concat('%', #{trainingRegistration.realName},'%') |
| | | </if> |
| | | <if test="trainingRegistration.cancel==1"> |
| | | and sr.cancel = 1 |
| | | and bu.is_train = 1 |
| | | <if test="trainingRegistration.beginTime!=null and trainingRegistration.beginTime!=''"> |
| | | and sr.training_time >= #{trainingRegistration.beginTime} |
| | | </if> |
| | | <if test="trainingRegistration.cancel==2"> |
| | | and sr.cancel = 2 |
| | | and bu.is_train = 2 |
| | | <if test="trainingRegistration.overTime!=null and trainingRegistration.overTime!=''"> |
| | | and sr.training_time <= #{trainingRegistration.overTime} |
| | | </if> |
| | | and is_exam = 1 |
| | | </select> |
| | | |
| | | <!--报名培训详情信息--> |
| | |
| | | * 培训考试结束时间 |
| | | */ |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | private String beginTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | private String overTime; |
| | | |
| | | /** |
| | | * 籍贯 |
| | | */ |
| | | private String nativePlace; |
| | | } |