This commit is contained in:
zhuyy 2023-02-09 17:11:16 +08:00
parent 9642903945
commit 19a3f82ac4
6 changed files with 108 additions and 117 deletions

View File

@ -5,7 +5,7 @@ package com.ydool.common.constant;
* @version 1.0
* @date 2023/2/8 11:04
*/
public class AgesConst {
public class ArgsConst {
/**
*身份证附件
@ -43,4 +43,13 @@ public class AgesConst {
* 附件所属人员
*/
public static final String PERSONNEL = "personnel";
/**
* 附件所属内设机构
*/
public static final String ORGANIZATION = "organization";
/**
* 附件所属董监
*/
public static final String DIRECTORS = "directors";
}

View File

@ -6,6 +6,7 @@ import cn.hutool.core.io.FileUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.common.base.BaseService;
import com.ydool.common.constant.ArgsConst;
import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.entity.Attachment;
import com.ydool.staff.mapper.AttachmentMapper;
@ -80,7 +81,7 @@ public class AttachmentServiceImpl extends BaseService<AttachmentMapper, Attachm
public AjaxResult selectOrganizationFileList(String id) {
LambdaQueryWrapper<Attachment> attachmentLambdaQueryWrapper = new LambdaQueryWrapper<>();
attachmentLambdaQueryWrapper.eq(Attachment::getTargetId, id);
attachmentLambdaQueryWrapper.eq(Attachment::getTargetType, "organization");
attachmentLambdaQueryWrapper.eq(Attachment::getTargetType, ArgsConst.ORGANIZATION);
Page<Attachment> attachmentPage = attachmentMapper.selectPage(new Page<>(), attachmentLambdaQueryWrapper);
return AjaxResult.ok().data(attachmentPage);
}

View File

@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.common.constant.ArgsConst;
import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.dto.AttachmentDto;
import com.ydool.staff.dto.DirectorsSupervisorsDto;
@ -70,7 +71,7 @@ public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSuperv
List<Attachment> attachments = BeanUtil.copyToList(attachmentDtoList, Attachment.class);
for (Attachment attachment : attachments) {
attachment.setTargetId(directorsSupervisors.getId());
attachment.setTargetType("directors");
attachment.setTargetType(ArgsConst.DIRECTORS);
attachmentMapper.insert(attachment);
}
return AjaxResult.ok().msg("新增成功!");
@ -103,7 +104,7 @@ public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSuperv
if (ObjectUtil.isNull(directorsSupervisors)) {
return AjaxResult.fail().msg("未找到相关信息!");
}
List<Attachment> attachmentList = attachmentMapper.selectList(new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, directorsSupervisors.getId()).eq(Attachment::getTargetType, "directors"));
List<Attachment> attachmentList = attachmentMapper.selectList(new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, directorsSupervisors.getId()).eq(Attachment::getTargetType, ArgsConst.DIRECTORS));
List<AttachmentDto> attachmentDtos = BeanUtil.copyToList(attachmentList, AttachmentDto.class);
directorsSupervisors.setAttachmentDtoList(attachmentDtos);
return AjaxResult.ok().data(directorsSupervisors);

View File

@ -3,6 +3,7 @@ package com.ydool.staff.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.ydool.common.constant.ArgsConst;
import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.entity.Attachment;
import com.ydool.staff.entity.Mechanism;
@ -79,7 +80,7 @@ public class MechanismServiceImpl extends BaseService<MechanismMapper, Mechanism
List<Attachment> attachments = mechanismRequest.getAttachments();
for (Attachment attachment : attachments) {
attachment.setTargetId(organization.getId());
attachment.setTargetType("organization");
attachment.setTargetType(ArgsConst.ORGANIZATION);
attachment.setSize(attachment.getSize());
attachment.setSuffix(attachment.getSuffix());
attachmentMapper.insert(attachment);

View File

@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.common.constant.ArgsConst;
import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.dto.AttachmentDto;
import com.ydool.staff.entity.*;
@ -68,7 +69,7 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
return AjaxResult.fail().msg("未找到相关信息!");
} else {
List<Mechanism> mechanismList = mechanismMapper.selectList(new LambdaQueryWrapper<Mechanism>().eq(Mechanism::getOrganizationId, organization.getId()));
List<Attachment> attachmentList = attachmentMapper.selectList(new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, organization.getId()).eq(Attachment::getTargetType, "organization"));
List<Attachment> attachmentList = attachmentMapper.selectList(new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, organization.getId()).eq(Attachment::getTargetType, ArgsConst.ORGANIZATION));
List<PartyOrganization> partyOrganizationList = partyOrganizationMapper.selectList(new LambdaQueryWrapper<PartyOrganization>());
List<AttachmentDto> toList = BeanUtil.copyToList(attachmentList, AttachmentDto.class);
OrganizationRequest organizationRequest = new OrganizationRequest();

View File

@ -1,15 +1,13 @@
package com.ydool.staff.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollStreamUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.common.base.BaseService;
import com.ydool.common.constant.AgesConst;
import com.ydool.common.constant.ArgsConst;
import com.ydool.common.data.dto.AjaxResult;
import com.ydool.common.utils.ColumnUtil;
import com.ydool.staff.dto.AttachmentDto;
@ -19,12 +17,10 @@ import com.ydool.staff.dto.PersonnelUpdateDto;
import com.ydool.staff.entity.Alteration;
import com.ydool.staff.entity.Attachment;
import com.ydool.staff.entity.CompanyName;
import com.ydool.staff.entity.Organization;
import com.ydool.staff.entity.Personnel;
import com.ydool.staff.entity.SelectRequest;
import com.ydool.staff.mapper.AlterationMapper;
import com.ydool.staff.mapper.CompanyNameMapper;
import com.ydool.staff.mapper.OrganizationMapper;
import com.ydool.staff.mapper.PersonnelMapper;
import com.ydool.staff.request.AttachmentRequest;
import com.ydool.staff.request.ChangeRequest;
@ -35,17 +31,13 @@ import com.ydool.staff.service.IAttachmentService;
import com.ydool.staff.service.IPersonnelService;
import com.ydool.system.entity.Dept;
import com.ydool.system.mapper.DeptMapper;
import org.apache.poi.ss.formula.functions.Column;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.thymeleaf.util.StringUtils;
import javax.annotation.Resource;
import javax.validation.constraints.Null;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@ -73,11 +65,11 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
/**
* 人员列表
*
* @return
*/
@Override
public AjaxResult personnelList(Page page, SelectRequest request, String orderBy, String column) {
QueryWrapper wrapper = selectWrapper(request, orderBy, column);
Page personnelPage = page(page, wrapper);
List<Personnel> list = personnelPage.getRecords();
@ -91,9 +83,8 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
return dto;
}).collect(Collectors.toList()));
return AjaxResult.ok().data(personnelPage);
}
public AjaxResult getById(String id) {
if (StrUtil.isNotBlank(id)) {
Personnel personnel = personnelMapper.selectById(id);
@ -118,23 +109,24 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
/**
* 新增人员申报
*
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult savePersonnel(PersonnelRequest personnelRequest) {
Personnel personnel = BeanUtil.copyProperties(personnelRequest, Personnel.class);
personnel.setCardFile(StringUtils.join(saveFilePath(personnelRequest.getCardFile(),AgesConst.CARD_FILE,AgesConst.SAVE,""),','));
personnel.setEngageFile(StringUtils.join(saveFilePath(personnelRequest.getEngageFile(),AgesConst.ENGAGE_FILE,AgesConst.SAVE,""),','));
personnel.setJobTitleFile(StringUtils.join(saveFilePath(personnelRequest.getJobTitleFile(),AgesConst.EDUCATION_FILE,AgesConst.SAVE,""),','));
personnel.setEducationFile(StringUtils.join(saveFilePath(personnelRequest.getEducationFile(),AgesConst.JOBTITLE_FILE,AgesConst.SAVE,""),','));
personnel.setAuditFile(StringUtils.join(saveFilePath(personnelRequest.getAuditFile(),AgesConst.AUDIT_FILE,AgesConst.SAVE,""),','));
personnel.setCardFile(StringUtils.join(saveFilePath(personnelRequest.getCardFile(), ArgsConst.CARD_FILE, ArgsConst.SAVE, ""), ','));
personnel.setEngageFile(StringUtils.join(saveFilePath(personnelRequest.getEngageFile(), ArgsConst.ENGAGE_FILE, ArgsConst.SAVE, ""), ','));
personnel.setJobTitleFile(StringUtils.join(saveFilePath(personnelRequest.getJobTitleFile(), ArgsConst.EDUCATION_FILE, ArgsConst.SAVE, ""), ','));
personnel.setEducationFile(StringUtils.join(saveFilePath(personnelRequest.getEducationFile(), ArgsConst.JOBTITLE_FILE, ArgsConst.SAVE, ""), ','));
personnel.setAuditFile(StringUtils.join(saveFilePath(personnelRequest.getAuditFile(), ArgsConst.AUDIT_FILE, ArgsConst.SAVE, ""), ','));
boolean save = save(personnel);
saveAttachment(personnelRequest.getCardFile(),AgesConst.CARD_FILE,personnel.getId(),AgesConst.SAVE);
saveAttachment(personnelRequest.getEngageFile(),AgesConst.ENGAGE_FILE,personnel.getId(),AgesConst.SAVE);
saveAttachment(personnelRequest.getEducationFile(),AgesConst.EDUCATION_FILE,personnel.getId(),AgesConst.SAVE);
saveAttachment(personnelRequest.getJobTitleFile(),AgesConst.JOBTITLE_FILE,personnel.getId(),AgesConst.SAVE);
saveAttachment(personnelRequest.getAuditFile(),AgesConst.AUDIT_FILE,personnel.getId(),AgesConst.SAVE);
saveAttachment(personnelRequest.getCardFile(), ArgsConst.CARD_FILE, personnel.getId(), ArgsConst.SAVE);
saveAttachment(personnelRequest.getEngageFile(), ArgsConst.ENGAGE_FILE, personnel.getId(), ArgsConst.SAVE);
saveAttachment(personnelRequest.getEducationFile(), ArgsConst.EDUCATION_FILE, personnel.getId(), ArgsConst.SAVE);
saveAttachment(personnelRequest.getJobTitleFile(), ArgsConst.JOBTITLE_FILE, personnel.getId(), ArgsConst.SAVE);
saveAttachment(personnelRequest.getAuditFile(), ArgsConst.AUDIT_FILE, personnel.getId(), ArgsConst.SAVE);
return save ? AjaxResult.ok().msg("保存成功!") : AjaxResult.fail().msg("保存失败!");
}
@ -157,14 +149,14 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
List<AttachmentRequest> cardFile = updateRequest.getCardFile();
List<AttachmentRequest> educationFile = updateRequest.getEducationFile();
List<AttachmentRequest> auditFile = updateRequest.getAuditFile();
String card = StringUtils.join(saveFilePath(cardFile, AgesConst.CARD_FILE, AgesConst.UPDATE, updateRequest.getId()), ',');
String education = StringUtils.join(saveFilePath(educationFile,AgesConst.EDUCATION_FILE,AgesConst.UPDATE,updateRequest.getId()),',');
String audit = StringUtils.join(saveFilePath(auditFile,AgesConst.AUDIT_FILE,AgesConst.UPDATE,updateRequest.getId()),',');
String card = StringUtils.join(saveFilePath(cardFile, ArgsConst.CARD_FILE, ArgsConst.UPDATE, updateRequest.getId()), ',');
String education = StringUtils.join(saveFilePath(educationFile, ArgsConst.EDUCATION_FILE, ArgsConst.UPDATE, updateRequest.getId()), ',');
String audit = StringUtils.join(saveFilePath(auditFile, ArgsConst.AUDIT_FILE, ArgsConst.UPDATE, updateRequest.getId()), ',');
System.out.println("per = " + per);
if (per.getAuditState().equals(0) || per.getAuditState().equals(1)) {
return AjaxResult.fail().msg("该人员修改的资料未审批完成,请联系管理员!");
}
String type =AgesConst.PERSONNEL;
String type = ArgsConst.PERSONNEL;
saveAlteration("民族更改", per.getNation(), updateRequest.getNation(), type, updateRequest.getId(), ColumnUtil.getFieldName(Personnel::getNation));
saveAlteration("政治面貌更改", per.getPoliticsStatus(), updateRequest.getPoliticsStatus(), type, updateRequest.getId(), ColumnUtil.getFieldName(Personnel::getPoliticsStatus));
saveAlteration("学历更改", per.getEducation(), updateRequest.getEducation(), type, updateRequest.getId(), ColumnUtil.getFieldName(Personnel::getEducation));
@ -179,9 +171,9 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
per.setAuditState(0);
boolean update = updateById(per);
saveAttachment(cardFile,AgesConst.CARD_FILE,updateRequest.getId(),AgesConst.UPDATE);
saveAttachment(educationFile,AgesConst.EDUCATION_FILE,updateRequest.getId(),AgesConst.UPDATE);
saveAttachment(auditFile,AgesConst.AUDIT_FILE,updateRequest.getId(),AgesConst.UPDATE);
saveAttachment(cardFile, ArgsConst.CARD_FILE, updateRequest.getId(), ArgsConst.UPDATE);
saveAttachment(educationFile, ArgsConst.EDUCATION_FILE, updateRequest.getId(), ArgsConst.UPDATE);
saveAttachment(auditFile, ArgsConst.AUDIT_FILE, updateRequest.getId(), ArgsConst.UPDATE);
return update ? AjaxResult.ok().msg("修改成功!") : AjaxResult.fail().msg("修改失败!");
}
@ -196,12 +188,12 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
if (per.getAuditState().equals(0) || per.getAuditState().equals(1)) {
return AjaxResult.fail().msg("该人员修改的资料未审批完成,请联系管理员!");
}
String type =AgesConst.CHANGE;
String card = StringUtils.join(saveFilePath(cardFiles, AgesConst.CARD_FILE, type, request.getId()), ',');
String jobTitle = StringUtils.join(saveFilePath(jobTitleFiles,AgesConst.JOBTITLE_FILE,type,request.getId()),',');
String engage = StringUtils.join(saveFilePath(engageFiles,AgesConst.ENGAGE_FILE,type,request.getId()),',');
String education = StringUtils.join(saveFilePath(educationFiles,AgesConst.EDUCATION_FILE,type,request.getId()),',');
String audit = StringUtils.join(saveFilePath(auditFiles,AgesConst.AUDIT_FILE,type,request.getId()),',');
String type = ArgsConst.CHANGE;
String card = StringUtils.join(saveFilePath(cardFiles, ArgsConst.CARD_FILE, type, request.getId()), ',');
String jobTitle = StringUtils.join(saveFilePath(jobTitleFiles, ArgsConst.JOBTITLE_FILE, type, request.getId()), ',');
String engage = StringUtils.join(saveFilePath(engageFiles, ArgsConst.ENGAGE_FILE, type, request.getId()), ',');
String education = StringUtils.join(saveFilePath(educationFiles, ArgsConst.EDUCATION_FILE, type, request.getId()), ',');
String audit = StringUtils.join(saveFilePath(auditFiles, ArgsConst.AUDIT_FILE, type, request.getId()), ',');
saveAlteration("录用方式更改", per.getHireType(), request.getHireType(), type, request.getId(), ColumnUtil.getFieldName(Personnel::getHireType));
saveAlteration("执业资格更改", per.getQualification(), request.getQualification(), type, request.getId(), ColumnUtil.getFieldName(Personnel::getQualification));
saveAlteration("专业技术职称更改", per.getJobTitle(), request.getJobTitle(), type, request.getId(), ColumnUtil.getFieldName(Personnel::getJobTitle));
@ -218,16 +210,17 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
saveAlteration("审批资料附件更改", per.getAuditFile(), audit, type, request.getId(), ColumnUtil.getFieldName(Personnel::getAuditFile));
per.setAuditState(0);
boolean update = updateById(per);
saveAttachment(cardFiles,AgesConst.CARD_FILE,request.getId(),AgesConst.UPDATE);
saveAttachment(jobTitleFiles,AgesConst.JOBTITLE_FILE,request.getId(),AgesConst.UPDATE);
saveAttachment(engageFiles,AgesConst.ENGAGE_FILE,request.getId(),AgesConst.UPDATE);
saveAttachment(educationFiles,AgesConst.EDUCATION_FILE,request.getId(),AgesConst.UPDATE);
saveAttachment(auditFiles,AgesConst.AUDIT_FILE,request.getId(),AgesConst.UPDATE);
saveAttachment(cardFiles, ArgsConst.CARD_FILE, request.getId(), ArgsConst.UPDATE);
saveAttachment(jobTitleFiles, ArgsConst.JOBTITLE_FILE, request.getId(), ArgsConst.UPDATE);
saveAttachment(engageFiles, ArgsConst.ENGAGE_FILE, request.getId(), ArgsConst.UPDATE);
saveAttachment(educationFiles, ArgsConst.EDUCATION_FILE, request.getId(), ArgsConst.UPDATE);
saveAttachment(auditFiles, ArgsConst.AUDIT_FILE, request.getId(), ArgsConst.UPDATE);
return update ? AjaxResult.ok().msg("修改成功!") : AjaxResult.fail().msg("修改失败!");
}
/**
* 保存附件
*
* @param file
* @param type
* @param id
@ -238,7 +231,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
Attachment attachment = BeanUtil.copyProperties(request, Attachment.class);
attachment.setTargetType(type);
attachment.setTargetId(id);
if (AgesConst.UPDATE.equals(ages)){
if (ArgsConst.UPDATE.equals(ages)) {
attachment.setFileState(0);
} else {
attachment.setFileState(1);
@ -246,11 +239,11 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
attachmentService.savePersonnel(attachment);
}
}
}
/**
* 保存附件返路径
*
* @param file
* @param type
* @param args
@ -261,7 +254,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
if (CollectionUtil.isNotEmpty(file)) {
ArrayList<String> path = new ArrayList<>();
for (AttachmentRequest request : file) {
if (AgesConst.UPDATE.equals(args)){
if (ArgsConst.UPDATE.equals(args)) {
attachmentService.deleteById(type, id);
}
path.add(request.getPath());
@ -289,8 +282,8 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
alterationMapper.insert(alteration);
}
}
}
public List<AttachmentDto> nameAndPath(String file, String id) {
if (StrUtil.isNotBlank(file)) {
List<String> cardFile = Arrays.asList(file.split(","));
@ -304,7 +297,6 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
dto.setSize(attachment.getSize());
attachmentDtos.add(dto);
}
}
return attachmentDtos;
}
@ -313,28 +305,14 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
public QueryWrapper selectWrapper(SelectRequest request, String orderBy, String column) {
QueryWrapper<Personnel> wrapper = new QueryWrapper<>();
wrapper.lambda().eq(StrUtil.isNotBlank(request.getPersonnelType()),Personnel::getPersonnelType,request.getPersonnelType())
.eq(StrUtil.isNotBlank(request.getPresentDept()),Personnel::getPresentDept,request.getPresentDept())
.eq(StrUtil.isNotBlank(request.getPoliticsStatus()),Personnel::getPoliticsStatus,request.getPoliticsStatus())
.eq(StrUtil.isNotBlank(request.getHireType()),Personnel::getHireType,request.getHireType())
.eq(StrUtil.isNotBlank(request.getPosition()),Personnel::getPosition,request.getPosition())
.eq(StrUtil.isNotBlank(request.getContractModality()),Personnel::getContractModality,request.getContractModality())
.eq(StrUtil.isNotBlank(request.getQualification()),Personnel::getQualification,request.getQualification())
.eq(StrUtil.isNotBlank(request.getPersonnelType()),Personnel::getPersonnelType,request.getPersonnelType())
.eq(ObjectUtil.isNotNull(request.getHireDate()),Personnel::getHireDate,request.getHireDate())
.eq(ObjectUtil.isNotNull(request.getResignationTime()),Personnel::getResignationTime,request.getResignationTime())
.eq(StrUtil.isNotBlank(request.getWorkState()),Personnel::getWorkState,request.getWorkState())
.eq(StrUtil.isNotBlank(request.getReceipts()),Personnel::getRecruitNumber,request.getReceipts())
.eq(StrUtil.isNotBlank(request.getAlterationSign()),Personnel::getAlterationSign,request.getAlterationSign());
wrapper.lambda().like(Personnel::getUserName,request.getUserName())
.like(Personnel::getNumberId,request.getNumberId())
wrapper.lambda().eq(StrUtil.isNotBlank(request.getPersonnelType()), Personnel::getPersonnelType, request.getPersonnelType()).eq(StrUtil.isNotBlank(request.getPresentDept()), Personnel::getPresentDept, request.getPresentDept()).eq(StrUtil.isNotBlank(request.getPoliticsStatus()), Personnel::getPoliticsStatus, request.getPoliticsStatus()).eq(StrUtil.isNotBlank(request.getHireType()), Personnel::getHireType, request.getHireType()).eq(StrUtil.isNotBlank(request.getPosition()), Personnel::getPosition, request.getPosition()).eq(StrUtil.isNotBlank(request.getContractModality()), Personnel::getContractModality, request.getContractModality()).eq(StrUtil.isNotBlank(request.getQualification()), Personnel::getQualification, request.getQualification()).eq(StrUtil.isNotBlank(request.getPersonnelType()), Personnel::getPersonnelType, request.getPersonnelType()).eq(ObjectUtil.isNotNull(request.getHireDate()), Personnel::getHireDate, request.getHireDate()).eq(ObjectUtil.isNotNull(request.getResignationTime()), Personnel::getResignationTime, request.getResignationTime()).eq(StrUtil.isNotBlank(request.getWorkState()), Personnel::getWorkState, request.getWorkState()).eq(StrUtil.isNotBlank(request.getReceipts()), Personnel::getRecruitNumber, request.getReceipts()).eq(StrUtil.isNotBlank(request.getAlterationSign()), Personnel::getAlterationSign, request.getAlterationSign());
wrapper.lambda().like(Personnel::getUserName, request.getUserName()).like(Personnel::getNumberId, request.getNumberId())
.exists(StrUtil.isNotBlank(request.getCompanyName()), "select t2.id from t_lc_company_name t2 where " + "t_lc_personnel.company_name = t2.id and t2.company_name like '%" + request.getCompanyName() + "%'");
/*.like(Personnel::getAuditFile,request.getFileName()).or()
.like(Personnel::getCardFile,request.getFileName()).or()
.like(Personnel::getEducationFile,request.getFileName()).or()
.like(Personnel::getEngageFile,request.getFileName()).or()
.like(Personnel::getJobTitleFile,request.getFileName()).or()*/
.exists(StrUtil.isNotBlank(request.getCompanyName()), "select t2.id from t_lc_company_name t2 where " +
"t_lc_personnel.company_name = t2.id and t2.company_name like '%" + request.getCompanyName() + "%'");
if ("desc".equals(orderBy) && StrUtil.isNotBlank(column)) {
wrapper.orderByDesc(column);
}