Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param idCardNum 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "根据身份证查询") |
| | | @GetMapping("query/{idCardNum}") |
| | | public AjaxResult getByIdCardNum(@PathVariable String idCardNum) { |
| | | return success(this.ncStaffService.getByIdCardNum(idCardNum)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param addForm 实体对象 |
| | |
| | | package com.gkhy.exam.noncoalmine.controller; |
| | | |
| | | |
| | | |
| | | import com.gkhy.exam.noncoalmine.model.addForm.ViolationRegistrationAddForm; |
| | | import com.gkhy.exam.noncoalmine.model.modForm.ViolationRegistrationModForm; |
| | | import com.gkhy.exam.noncoalmine.model.query.ViolationRegistrationQuery; |
| | |
| | | @ApiImplicitParam(name = "name", dataTypeClass = String.class,value = "姓名"), |
| | | @ApiImplicitParam(name = "idCard", dataTypeClass = String.class,value = "身份证号"), |
| | | @ApiImplicitParam(name = "operateTypeId", dataTypeClass = Long.class,value = "作业类型Id"), |
| | | @ApiImplicitParam(name = "isCm", dataTypeClass = Long.class,value = "是否为煤矿:0为非,1是"), |
| | | }) |
| | | @GetMapping("page/list") |
| | | public TableDataInfo listByPage(ViolationRegistrationQuery query) { |
| | |
| | | @ApiImplicitParam(name = "name", dataTypeClass = String.class,value = "姓名"), |
| | | @ApiImplicitParam(name = "idCard", dataTypeClass = String.class,value = "身份证号"), |
| | | @ApiImplicitParam(name = "operateTypeId", dataTypeClass = Long.class,value = "作业类型Id"), |
| | | @ApiImplicitParam(name = "isCm", dataTypeClass = Long.class,value = "是否为煤矿:0为非,1是"), |
| | | |
| | | }) |
| | | @GetMapping("/list/page") |
| | | public TableDataInfo listByPage(WorkRegistrationQuery query) { |
| | |
| | | //IC卡编号 |
| | | private String icNum; |
| | | //作业时间 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date workTime; |
| | | //所属单位 |
| | | private String dept; |
| | |
| | | //作业时间 |
| | | @ApiModelProperty(value = "作业时间",required = true) |
| | | @NotNull(message = "请填写做业时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date violationTime; |
| | | //违章附件 |
| | | @ApiModelProperty(value = "违章附件") |
| | |
| | | @NotNull(message = "请选择操作类型") |
| | | private Long operateTypeId; |
| | | //是否为煤矿:0为非,1是 |
| | | @ApiModelProperty(value = "是否为煤矿",required = true) |
| | | @ApiModelProperty(value = "是否为煤矿:0为非,1是",required = true) |
| | | @NotNull(message = "是否为煤矿不可为空") |
| | | private Integer isCm; |
| | | //描述 |
| | |
| | | //作业时间 |
| | | @ApiModelProperty(value = "作业时间",required = true) |
| | | @NotNull(message = "请填写做业时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date workTime; |
| | | //所属单位 |
| | | @ApiModelProperty(value = "所属单位") |
| | |
| | | package com.gkhy.exam.noncoalmine.model.query; |
| | | |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | private String name; |
| | | private String idCard; |
| | | private Long operateTypeId; |
| | | private Integer isCm; |
| | | } |
| | |
| | | private String name; |
| | | private String idCard; |
| | | private Long operateTypeId; |
| | | private Integer isCm; |
| | | } |
| | |
| | | //IC卡编号 |
| | | private String icNum; |
| | | //违章时间 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date violationTime; |
| | | //所属单位 |
| | | private String dept; |
| | |
| | | //IC卡编号 |
| | | private String icNum; |
| | | //作业时间 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date violationTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date workTime; |
| | | //所属单位 |
| | | private String dept; |
| | | //操作类型id |
| | |
| | | NcStaff getByIdCard(String IdCard); |
| | | |
| | | void delBatch(List<Long> staffIds); |
| | | |
| | | NcStaffVO getByIdCardNum(String idCardNum); |
| | | } |
| | | |
| | |
| | | } |
| | | return staffVOList; |
| | | } |
| | | @Override |
| | | public NcStaffVO getByIdCardNum(String idCardNum) { |
| | | NcStaff ncStaff = ncStaffMapper.selectOne(new LambdaQueryWrapper<NcStaff>() |
| | | .eq(NcStaff::getDelFlag, (byte) 0) |
| | | .eq(NcStaff::getIdCardNum, idCardNum)); |
| | | NcStaffVO ncStaffVO = new NcStaffVO(); |
| | | if(ncStaff != null){ |
| | | BeanUtils.copyProperties(ncStaff,ncStaffVO); |
| | | List<NcStaffResume> resumeList = ncStaffResumeService.getByStaffId(ncStaff.getId()); |
| | | List<NcStaffTrain> trainList = ncStaffTrainService.getByStaffId(ncStaff.getId()); |
| | | List<NcExaminees> examineesList = ncExamineesService.getByIdCard(ncStaff.getIdCardNum()); |
| | | List<ViolationRegistrationVO> violationList = violationRegistrationService.getByIdCard(ncStaff.getIdCardNum(), (byte) 0); |
| | | List<WorkRegistrationVO> workList = workRegistrationService.getByIdCard(ncStaff.getIdCardNum(), (byte) 0); |
| | | List<NcCert> certList = ncCertService.getByIdCard(ncStaff.getIdCardNum()); |
| | | ncStaffVO.setResumeList(resumeList); |
| | | ncStaffVO.setTrainList(trainList); |
| | | ncStaffVO.setExamineeList(examineesList); |
| | | ncStaffVO.setViolationList(violationList); |
| | | ncStaffVO.setWorkList(workList); |
| | | ncStaffVO.setCertList(certList); |
| | | ncStaffVO.setCertCount(certList.size()); |
| | | ncStaffVO.setViolationCount(violationList.size()); |
| | | ncStaffVO.setWorkCount(workList.size()); |
| | | } |
| | | return ncStaffVO; |
| | | |
| | | } |
| | | /** |
| | | * 新增 |
| | | * @param addForm |
| | |
| | | this.update(updateWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | //修改履历 |
| | | public void updateBatchResume(List<NcStaffResumeAddForm> resumeFormList,NcStaff ncStaff){ |
| | | if(!CollectionUtils.isEmpty(resumeFormList)){ |
| | |
| | | import com.gkhy.exam.noncoalmine.model.vo.ViolationRegistrationVO; |
| | | import com.gkhy.exam.noncoalmine.model.vo.WorkRegistrationVO; |
| | | import com.gkhy.exam.noncoalmine.service.ViolationRegistrationService; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.file.entity.AttachmentInfo; |
| | | import com.ruoyi.file.mapper.AttachmentInfoMapper; |
| | |
| | | */ |
| | | public List<ViolationRegistrationVO> getByIdCard(String idCard,byte isCm){ |
| | | List<ViolationRegistration> violationRegistrations = baseMapper.selectList(new LambdaQueryWrapper<ViolationRegistration>() |
| | | .eq(ViolationRegistration::getDelFlag, 0) |
| | | .eq(ViolationRegistration::getDelFlag, (byte)0) |
| | | .eq(ViolationRegistration::getIdCard, idCard) |
| | | .eq(idCard != null,ViolationRegistration::getIsCm,isCm)); |
| | | .eq(ViolationRegistration::getIsCm,isCm)); |
| | | List<ViolationRegistrationVO> list = violationRegistrations.stream().map(registration -> { |
| | | ViolationRegistrationVO violationRegistrationVO = new ViolationRegistrationVO(); |
| | | BeanUtils.copyProperties(registration, violationRegistrationVO); |
| | |
| | | * @return |
| | | */ |
| | | private String getAttachmentUrl(String keys){ |
| | | if(StringUtils.isEmpty(keys)){ |
| | | return null; |
| | | } |
| | | String[] arry = keys.split(","); |
| | | StringBuffer paths = new StringBuffer(); |
| | | List<AttachmentInfo> attachmentList = attachmentInfoService.findByKeys(Arrays.asList(arry)); |
| | |
| | | */ |
| | | public List<WorkRegistrationVO> getByIdCard(String idCard, byte isCm){ |
| | | List<WorkRegistration> workRegistrations = baseMapper.selectList(new LambdaQueryWrapper<WorkRegistration>() |
| | | .eq(WorkRegistration::getDelFlag, 0) |
| | | .eq(WorkRegistration::getDelFlag, (byte)0) |
| | | .eq(WorkRegistration::getIdCard, idCard) |
| | | .eq(idCard != null,WorkRegistration::getIsCm,isCm)); |
| | | .eq(WorkRegistration::getIsCm,isCm)); |
| | | List<WorkRegistrationVO> list = workRegistrations.stream().map(workRegistration -> { |
| | | WorkRegistrationVO workRegistrationVO = new WorkRegistrationVO(); |
| | | BeanUtils.copyProperties(workRegistration, workRegistrationVO); |
| | |
| | | <if test="query.idCard != null and query.idCard != ''"> |
| | | and id_card like concat('%', #{query.idCard}, '%') |
| | | </if> |
| | | <if test="query.operateTypeId != null and query.operateTypeId != 0"> |
| | | <if test="query.operateTypeId != null"> |
| | | and (operate_type_id = #{query.operateTypeId} OR operate_type_id IN ( SELECT t.id FROM sys_operate_type t WHERE find_in_set(#{query.operateTypeId}, ancestors))) |
| | | </if> |
| | | <if test="query.isCm != null"> |
| | | and is_cm = #{query.isCm} |
| | | </if> |
| | | order by create_time desc |
| | | |
| | | </select> |
| | |
| | | <if test="query.idCard != null and query.idCard != ''"> |
| | | and id_card like concat('%', #{query.idCard}, '%') |
| | | </if> |
| | | <if test="query.operateTypeId != null and query.operateTypeId != 0"> |
| | | <if test="query.operateTypeId != null"> |
| | | and (operate_type_id = #{query.operateTypeId} OR operate_type_id IN ( SELECT t.id FROM sys_operate_type t WHERE find_in_set(#{query.operateTypeId}, ancestors))) |
| | | </if> |
| | | <if test="query.isCm != null"> |
| | | and is_cm = #{query.isCm} |
| | | </if> |
| | | order by create_time desc |
| | | </select> |
| | | |