1.新增保安个人照片,准考证信息接口修改
2.新增导出清册接口
14 files modified
1 files added
| | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.apply.entity.Apply; |
| | | import org.springblade.modules.apply.excel.ApplyExcel; |
| | | import org.springblade.modules.apply.excel.ApplyImporter; |
| | | import org.springblade.modules.apply.excel.ApplyInfoExcel; |
| | | import org.springblade.modules.apply.service.ApplyService; |
| | | import org.springblade.modules.apply.vo.ApplyPaPerVO; |
| | | import org.springblade.modules.apply.vo.ApplyVO; |
| | |
| | | ExcelUtil.export(response, "考试报名数据模板", "考试报名数据表", list, ApplyExcel.class); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出报名数数据 |
| | | * @param response |
| | | * @param apply 报名对象 |
| | | */ |
| | | @GetMapping("export-apply") |
| | | @ApiOperation(value = "导出报名清册") |
| | | public void exportApply(HttpServletResponse response,Apply apply) { |
| | | List<ApplyInfoExcel> list = applyService.getApplyExcelList(apply); |
| | | ExcelUtil.export(response, "考试报名清册数据"+ DateUtil.time(), "考试报名清册数据表", list, ApplyInfoExcel.class); |
| | | } |
| | | |
| | | /** |
| | | * 生成准考证号码 |
| | | * @param apply 考试报名信息对象 |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.apply.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * ExamPaymentExcel |
| | | * @author zhongrj |
| | | * @since 2021-08-02 |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class ApplyInfoExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("姓名") |
| | | private String realName; |
| | | |
| | | |
| | | @ColumnWidth(25) |
| | | @ExcelProperty("考试名称") |
| | | private String examName; |
| | | |
| | | @ColumnWidth(25) |
| | | @ExcelProperty("所属单位名称") |
| | | private String deptName; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("准考证号") |
| | | private String candidateNo; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("身份证号") |
| | | private String idCardNo; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("考试证件") |
| | | private String applyCard; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("报名时间") |
| | | private Date applyTime; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("考试时间") |
| | | private Date examTime; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.apply.entity.Apply; |
| | | import org.springblade.modules.apply.excel.ApplyExcel; |
| | | import org.springblade.modules.apply.excel.ApplyInfoExcel; |
| | | import org.springblade.modules.apply.vo.ApplyPaPerVO; |
| | | import org.springblade.modules.apply.vo.ApplyVO; |
| | | |
| | |
| | | Integer getApplyNum(@Param("applyCode") String applyCode); |
| | | |
| | | /** |
| | | * 获取准考证信息 |
| | | * 获取准考证信息(正式考试) |
| | | * @param apply |
| | | * @return |
| | | */ |
| | | ApplyPaPerVO getApplyInfo(@Param("apply")Apply apply); |
| | | |
| | | /** |
| | | * 导出报名数数据 |
| | | * @param apply 报名对象 |
| | | * @return |
| | | */ |
| | | List<ApplyInfoExcel> getApplyExcelList(@Param("apply")Apply apply); |
| | | |
| | | /** |
| | | * 获取准考证信息(模拟考试) |
| | | * @param apply |
| | | * @return |
| | | */ |
| | | ApplyPaPerVO getTrainApplyInfo(@Param("apply")Apply apply); |
| | | } |
| | |
| | | <if test="apply.name!=null and apply.name!=''"> |
| | | and sa.name like concat('%', #{apply.name},'%') |
| | | </if> |
| | | <if test="apply.userId!=null and apply.userId!=''"> |
| | | and sa.user_id like concat('%', #{apply.userId},'%') |
| | | </if> |
| | | <if test="apply.applyStatus!=null"> |
| | | and apply_status = #{apply.applyStatus} |
| | | </if> |
| | |
| | | select count(*) from sys_apply where apply_code = #{applyCode} |
| | | </select> |
| | | |
| | | <!--获取准考证信息--> |
| | | <!--获取准考证信息(正式考试)--> |
| | | <select id="getApplyInfo" resultType="org.springblade.modules.apply.vo.ApplyPaPerVO"> |
| | | SELECT |
| | | sa.id,sa.candidate_no candidateNo, |
| | | ke.exam_type examType,ke.start_time startTime,ke.end_time endTime,ke.exam_name examName, |
| | | bu.real_name realName,bu.cardid idCardNo,ifnull(bu.sex,0) sex, |
| | | bu.real_name realName,bu.cardid idCardNo,ifnull(bu.sex,0) sex,bu.my_picture myPicture, |
| | | bd.dept_name deptName,"保安证" applyCard |
| | | FROM |
| | | sys_apply sa |
| | |
| | | WHERE |
| | | sa.id = #{apply.id} |
| | | </select> |
| | | |
| | | |
| | | <!--获取准考证信息(模拟考试)--> |
| | | <select id="getTrainApplyInfo" resultType="org.springblade.modules.apply.vo.ApplyPaPerVO"> |
| | | select |
| | | sr.candidate_no candidateNo, |
| | | bt.dept_name AS deptName,"保安证" applyCard, |
| | | bu.real_name realName,bu.cardid idCardNo,ifnull(bu.sex,0) sex,bu.my_picture myPicture, |
| | | ke.exam_type examType,ke.start_time startTime,ke.end_time endTime,ke.exam_name examName |
| | | FROM |
| | | sys_training_registration sr |
| | | LEFT JOIN |
| | | blade_dept bt |
| | | ON |
| | | sr.dept_id = bt.id |
| | | LEFT JOIN |
| | | blade_dept bt0 |
| | | ON |
| | | sr.training_unit_id = bt0.id |
| | | left join |
| | | blade_user bu |
| | | on |
| | | sr.user_id = bu.id |
| | | left join |
| | | ksxt_exam ke |
| | | on |
| | | ke.id = sr.train_exam_id |
| | | WHERE |
| | | 1=1 |
| | | and sr.id = #{apply.id} |
| | | </select> |
| | | |
| | | <!--导出报名清册数据--> |
| | | <select id="getApplyExcelList" resultType="org.springblade.modules.apply.excel.ApplyInfoExcel"> |
| | | SELECT |
| | | sa.candidate_no candidateNo,sa.apply_time applyTime, |
| | | ke.start_time examTime,ke.exam_name examName, |
| | | bu.real_name realName,bu.cardid idCardNo, |
| | | bd.dept_name deptName,"保安证" applyCard |
| | | FROM |
| | | sys_apply sa |
| | | left join |
| | | ksxt_exam ke |
| | | on |
| | | sa.exam_id = ke.id |
| | | left join |
| | | blade_user bu |
| | | on |
| | | sa.user_id = bu.id |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bd.id = bu.dept_id |
| | | WHERE |
| | | 1=1 |
| | | <if test="apply.name!=null and apply.name!=''"> |
| | | and sa.name like concat('%', #{apply.name},'%') |
| | | </if> |
| | | <if test="apply.userId!=null and apply.userId!=''"> |
| | | and sa.user_id like concat('%', #{apply.userId},'%') |
| | | </if> |
| | | <if test="apply.applyStatus!=null"> |
| | | and apply_status = #{apply.applyStatus} |
| | | </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> |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.apply.entity.Apply; |
| | | import org.springblade.modules.apply.excel.ApplyExcel; |
| | | import org.springblade.modules.apply.excel.ApplyInfoExcel; |
| | | import org.springblade.modules.apply.vo.ApplyPaPerVO; |
| | | import org.springblade.modules.apply.vo.ApplyVO; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | ApplyPaPerVO getApplyInfo(Apply apply); |
| | | |
| | | /** |
| | | * 导出报名数数据 |
| | | * @param apply 报名对象 |
| | | */ |
| | | List<ApplyInfoExcel> getApplyExcelList(Apply apply); |
| | | } |
| | |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.modules.apply.entity.Apply; |
| | | import org.springblade.modules.apply.excel.ApplyExcel; |
| | | import org.springblade.modules.apply.excel.ApplyInfoExcel; |
| | | import org.springblade.modules.apply.mapper.ApplyMapper; |
| | | import org.springblade.modules.apply.service.ApplyService; |
| | | import org.springblade.modules.apply.vo.ApplyPaPerVO; |
| | |
| | | */ |
| | | @Override |
| | | public ApplyPaPerVO getApplyInfo(Apply apply) { |
| | | ApplyPaPerVO applyPaPerVO = baseMapper.getApplyInfo(apply); |
| | | //正式考试 |
| | | if (apply.getApplyExamType()==1){ |
| | | ApplyPaPerVO applyPaPerVO = baseMapper.getApplyInfo(apply); |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[0]; |
| | | String startTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[1]; |
| | | String endTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getEndTime()).split(" ")[1]; |
| | | applyPaPerVO.setStringTime(time+" "+startTime.substring(0,startTime.length()-3) +"-"+ endTime.substring(0,endTime.length()-3)); |
| | | return applyPaPerVO; |
| | | } |
| | | |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[0]; |
| | | String startTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[1]; |
| | | String endTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getEndTime()).split(" ")[1]; |
| | | applyPaPerVO.setStringTime(time+" "+startTime.substring(0,startTime.length()-3) +"-"+ endTime.substring(0,endTime.length()-3)); |
| | | return applyPaPerVO; |
| | | //模拟考试 |
| | | if (apply.getApplyExamType()==2){ |
| | | ApplyPaPerVO applyPaPerVO = baseMapper.getTrainApplyInfo(apply); |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[0]; |
| | | String startTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[1]; |
| | | String endTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getEndTime()).split(" ")[1]; |
| | | applyPaPerVO.setStringTime(time+" "+startTime.substring(0,startTime.length()-3) +"-"+ endTime.substring(0,endTime.length()-3)); |
| | | return applyPaPerVO; |
| | | } |
| | | |
| | | |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 导出报名数数据 |
| | | * @param apply 报名对象 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ApplyInfoExcel> getApplyExcelList(Apply apply) { |
| | | return baseMapper.getApplyExcelList(apply); |
| | | } |
| | | } |
| | |
| | | |
| | | private String stringTime; |
| | | |
| | | /** |
| | | * 个人照片 |
| | | */ |
| | | private String myPicture; |
| | | |
| | | } |
| | |
| | | * 是否采集照片 |
| | | */ |
| | | private String photo; |
| | | |
| | | /** |
| | | * 是否派遣 |
| | | */ |
| | | private String dispatch; |
| | | |
| | | /** |
| | | * 个人照片,电子照,用于展示保安证,准考证用 |
| | | */ |
| | | @TableField("my_picture") |
| | | private String myPicture; |
| | | |
| | | } |
| | |
| | | <result column="jurisdiction" property="jurisdiction"/> |
| | | <result column="securitynumber" property="securitynumber"/> |
| | | <result column="dispatch" property="dispatch"/> |
| | | <result column="my_picture" property="myPicture"/> |
| | | <result column="deptname" property="deptname"/> |
| | | </resultMap> |
| | | |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.apply.entity.Apply; |
| | | import org.springblade.modules.apply.excel.ApplyInfoExcel; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.service.TrainingRegistrationService; |
| | | import org.springblade.modules.training.vo.TrainingRegistrationVo; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 导出报名数数据 |
| | | * @param response |
| | | * @param trainingRegistration 培训报名对象 |
| | | */ |
| | | @GetMapping("export-apply") |
| | | @ApiOperation(value = "导出报名清册") |
| | | public void exportApply(HttpServletResponse response,TrainingRegistrationVo trainingRegistration) { |
| | | List<ApplyInfoExcel> list = trainingRegistrationService.getTrainingRegistrationExcelList(trainingRegistration); |
| | | ExcelUtil.export(response, "考试报名清册数据"+ DateUtil.time(), "考试报名清册数据表", list, ApplyInfoExcel.class); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.apply.excel.ApplyInfoExcel; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.vo.TrainingRegistrationVo; |
| | | |
| | |
| | | * @param trainingRegistration 报名培训信息对象 |
| | | */ |
| | | TrainingRegistrationVo selectTrainingRegistrationInfo(@Param("trainingRegistration") TrainingRegistration trainingRegistration); |
| | | |
| | | /** |
| | | * 导出报名数数据 |
| | | * @param trainingRegistration 培训报名对象 |
| | | * @return |
| | | */ |
| | | List<ApplyInfoExcel> getTrainingRegistrationExcelList(@Param("trainingRegistration")TrainingRegistrationVo trainingRegistration); |
| | | } |
| | |
| | | bt.dept_name AS deptName, |
| | | bt0.dept_name AS trainUnitName, |
| | | bu.real_name realName,bu.phone,bu.cardid idCardNo, |
| | | ke.start_time trainExamTime,ke.exam_name trainExamName |
| | | ke.start_time trainExamTime,ke.exam_name trainExamName,ke.exam_type examType, |
| | | "保安证" applyCard |
| | | FROM |
| | | sys_training_registration sr |
| | | LEFT JOIN |
| | |
| | | 1=1 |
| | | <if test="trainingRegistration.trainingUnitId!=null and trainingRegistration.trainingUnitId!=''"> |
| | | and sr.training_unit_id = #{trainingRegistration.trainingUnitId} |
| | | </if> |
| | | <if test="trainingRegistration.examId!=null and trainingRegistration.examId!=''"> |
| | | and ke.id = #{trainingRegistration.examId} |
| | | </if> |
| | | <if test="trainingRegistration.userId!=null and trainingRegistration.userId!=''"> |
| | | and sr.user_id = #{trainingRegistration.userId} |
| | | </if> |
| | | <if test="trainingRegistration.deptName!=null and trainingRegistration.deptName!=''"> |
| | | and bt.dept_name like concat('%', #{trainingRegistration.deptName},'%') |
| | |
| | | and sr.id = #{trainingRegistration.id} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--导出报名数数据--> |
| | | <select id="getTrainingRegistrationExcelList" resultType="org.springblade.modules.apply.excel.ApplyInfoExcel"> |
| | | select |
| | | sr.training_time applyTime,sr.candidate_no candidateNo, |
| | | bt.dept_name AS deptName,"保安证" applyCard, |
| | | bu.real_name realName,bu.cardid idCardNo, |
| | | ke.start_time examTime,ke.exam_name examName |
| | | FROM |
| | | sys_training_registration sr |
| | | LEFT JOIN |
| | | blade_dept bt |
| | | ON |
| | | sr.dept_id = bt.id |
| | | LEFT JOIN |
| | | blade_dept bt0 |
| | | ON |
| | | sr.training_unit_id = bt0.id |
| | | left join |
| | | blade_user bu |
| | | on |
| | | sr.user_id = bu.id |
| | | left join |
| | | ksxt_exam ke |
| | | on |
| | | ke.id = sr.train_exam_id |
| | | WHERE |
| | | 1=1 |
| | | <if test="trainingRegistration.trainingUnitId!=null and trainingRegistration.trainingUnitId!=''"> |
| | | and sr.training_unit_id = #{trainingRegistration.trainingUnitId} |
| | | </if> |
| | | <if test="trainingRegistration.examId!=null and trainingRegistration.examId!=''"> |
| | | and ke.id = #{trainingRegistration.examId} |
| | | </if> |
| | | <if test="trainingRegistration.userId!=null and trainingRegistration.userId!=''"> |
| | | and sr.user_id = #{trainingRegistration.userId} |
| | | </if> |
| | | <if test="trainingRegistration.deptName!=null and trainingRegistration.deptName!=''"> |
| | | and bt.dept_name like concat('%', #{trainingRegistration.deptName},'%') |
| | | </if> |
| | | <if test="trainingRegistration.realName!=null and trainingRegistration.realName!=''"> |
| | | and bu.real_name like concat('%', #{trainingRegistration.realName},'%') |
| | | </if> |
| | | <if test="trainingRegistration.cancel!=null"> |
| | | and sr.cancel = #{trainingRegistration.cancel} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.apply.excel.ApplyInfoExcel; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.vo.TrainingRegistrationVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 报名培训服务类 |
| | |
| | | * @param trainingRegistration 报名培训信息对象 |
| | | */ |
| | | TrainingRegistrationVo selectTrainingRegistrationInfo(TrainingRegistration trainingRegistration); |
| | | |
| | | /** |
| | | * 导出报名数数据 |
| | | * @param trainingRegistration 培训报名对象 |
| | | * @return |
| | | */ |
| | | List<ApplyInfoExcel> getTrainingRegistrationExcelList(TrainingRegistrationVo trainingRegistration); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.apply.excel.ApplyInfoExcel; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.mapper.TrainingRegistrationMapper; |
| | | import org.springblade.modules.training.service.TrainingRegistrationService; |
| | |
| | | public TrainingRegistrationVo selectTrainingRegistrationInfo(TrainingRegistration trainingRegistration) { |
| | | return baseMapper.selectTrainingRegistrationInfo(trainingRegistration); |
| | | } |
| | | |
| | | /** |
| | | * 导出报名数数据 |
| | | * @param trainingRegistration 培训报名对象 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ApplyInfoExcel> getTrainingRegistrationExcelList(TrainingRegistrationVo trainingRegistration) { |
| | | return baseMapper.getTrainingRegistrationExcelList(trainingRegistration); |
| | | } |
| | | } |
| | |
| | | * 考试名称 |
| | | */ |
| | | private String trainExamName; |
| | | |
| | | /** |
| | | * 考试id |
| | | */ |
| | | private String examId; |
| | | |
| | | /** |
| | | * 考的证 |
| | | */ |
| | | private String applyCard; |
| | | |
| | | |
| | | /** |
| | | * 考试类型 |
| | | */ |
| | | private Integer examType; |
| | | } |