人员模块多条件查询
This commit is contained in:
parent
42a9a604cd
commit
bf4a9217f2
|
@ -0,0 +1,46 @@
|
||||||
|
package com.ydool.common.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author msh
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2023/2/8 11:04
|
||||||
|
*/
|
||||||
|
public class AgesConst {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*身份证附件
|
||||||
|
*/
|
||||||
|
public static final String CARD_FILE = "card";
|
||||||
|
/**
|
||||||
|
* 聘任证书附件
|
||||||
|
*/
|
||||||
|
public static final String ENGAGE_FILE = "engage";
|
||||||
|
/**
|
||||||
|
* 职称证书附件
|
||||||
|
*/
|
||||||
|
public static final String JOBTITLE_FILE = "jobtitle";
|
||||||
|
/**
|
||||||
|
* 学历证书附件
|
||||||
|
*/
|
||||||
|
public static final String EDUCATION_FILE = "education";
|
||||||
|
/**
|
||||||
|
* 审批资料附件
|
||||||
|
*/
|
||||||
|
public static final String AUDIT_FILE = "audit";
|
||||||
|
/**
|
||||||
|
* 新增类型参数
|
||||||
|
*/
|
||||||
|
public static final String SAVE = "save";
|
||||||
|
/**
|
||||||
|
* 修改类型参数
|
||||||
|
*/
|
||||||
|
public static final String UPDATE = "update";
|
||||||
|
/**
|
||||||
|
* 附件所属:变更
|
||||||
|
*/
|
||||||
|
public static final String CHANGE = "Change";
|
||||||
|
/**
|
||||||
|
* 附件所属:人员
|
||||||
|
*/
|
||||||
|
public static final String PERSONNEL = "personnel";
|
||||||
|
}
|
|
@ -39,6 +39,7 @@ public interface UrlConstant {
|
||||||
String ORGANIZATION = API + "/organization";
|
String ORGANIZATION = API + "/organization";
|
||||||
String PARTY_ORGANIZATION = API + "/party_organization";
|
String PARTY_ORGANIZATION = API + "/party_organization";
|
||||||
String DIRECTORS_SUPERVISORS = API + "/directors_supervisors";
|
String DIRECTORS_SUPERVISORS = API + "/directors_supervisors";
|
||||||
|
String ALTERATION = API + "/alteration";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.ydool.staff.controller;
|
||||||
|
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
import com.ydool.common.base.BaseController;
|
||||||
|
import com.ydool.common.constant.UrlConstant;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.dto.PersonnelDto;
|
||||||
|
import com.ydool.staff.service.IAlterationService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author msh
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2023/2/7 17:04
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(UrlConstant.ALTERATION)
|
||||||
|
@Api(tags = "人员变更", value = "人员变更")
|
||||||
|
@ApiSupport(order = 9)
|
||||||
|
public class AlterationController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IAlterationService alterationService;
|
||||||
|
|
||||||
|
@GetMapping( "alterationPage")
|
||||||
|
@ApiOperation(value = "变更记录列表")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "id", value = "员工id")})
|
||||||
|
public AjaxResult alterationPage(String id){
|
||||||
|
return alterationService.alterationList(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.common.utils.UploadUtils;
|
import com.ydool.common.utils.UploadUtils;
|
||||||
import com.ydool.staff.dto.PersonnelDto;
|
import com.ydool.staff.dto.PersonnelDto;
|
||||||
import com.ydool.staff.entity.Attachment;
|
import com.ydool.staff.entity.Attachment;
|
||||||
|
import com.ydool.staff.entity.SelectRequest;
|
||||||
import com.ydool.staff.request.ChangeRequest;
|
import com.ydool.staff.request.ChangeRequest;
|
||||||
import com.ydool.staff.request.PersonnelDeleteRequest;
|
import com.ydool.staff.request.PersonnelDeleteRequest;
|
||||||
import com.ydool.staff.request.PersonnelRequest;
|
import com.ydool.staff.request.PersonnelRequest;
|
||||||
|
@ -40,14 +41,15 @@ public class PersonnelController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
IAttachmentService attachmentService;
|
IAttachmentService attachmentService;
|
||||||
|
|
||||||
@GetMapping( "personnelList")
|
@PostMapping( "personnelList")
|
||||||
@ApiOperation(value = "人员列表,传id查一条",response = PersonnelDto.class)
|
@ApiOperation(value = "人员列表,传id查一条",response = PersonnelDto.class)
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "orderBy", value = "排序顺序 降序:desc,升序:asc"),
|
||||||
|
@ApiImplicitParam(name = "column", value = "排序字段 字段名"),
|
||||||
@ApiImplicitParam(name = "current", value = "当前页"),
|
@ApiImplicitParam(name = "current", value = "当前页"),
|
||||||
@ApiImplicitParam(name = "size", value = "每页条数"),
|
@ApiImplicitParam(name = "size", value = "每页条数")})
|
||||||
@ApiImplicitParam(name = "id", value = "人员id")})
|
public AjaxResult personnelList(@RequestBody SelectRequest request, String orderBy,String column){
|
||||||
public AjaxResult personnelList(String id){
|
return personnelService.personnelList(getPage(),request,orderBy,column);
|
||||||
return personnelService.personnelList(getPage(),id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "savePersonnel")
|
@PostMapping(value = "savePersonnel")
|
||||||
|
@ -72,6 +74,7 @@ public class PersonnelController extends BaseController {
|
||||||
return personnelService.updateChange(request);
|
return personnelService.updateChange(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/download")
|
@GetMapping("/download")
|
||||||
@ApiOperation(value = "下载文件")
|
@ApiOperation(value = "下载文件")
|
||||||
@ApiImplicitParams({@ApiImplicitParam(name = "path", value = "文件路径"), @ApiImplicitParam(name = "fileName", value = "文件名")})
|
@ApiImplicitParams({@ApiImplicitParam(name = "path", value = "文件路径"), @ApiImplicitParam(name = "fileName", value = "文件名")})
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.ydool.staff.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author msh
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2023/2/7 17:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AlterationDto {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "变更前")
|
||||||
|
private String beforeChange;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "变更后")
|
||||||
|
private String afterChange;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "变更内容")
|
||||||
|
private String details;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "变更人")
|
||||||
|
private String createdName;
|
||||||
|
}
|
|
@ -44,4 +44,8 @@ public class Attachment extends BaseEntity{
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String suffix;
|
private String suffix;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "附件状态:0:暂存 1:已存")
|
||||||
|
private Integer fileState;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,12 +32,6 @@ public class Personnel extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
public static final String CARD_FILE = "card";
|
|
||||||
public static final String ENGAGE_FILE = "engage";
|
|
||||||
public static final String JOBTITLE_FILE = "jobtitle";
|
|
||||||
public static final String EDUCATION_FILE = "education";
|
|
||||||
public static final String AUDIT_FILE = "audit";
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "统一社会信用代码")
|
@ApiModelProperty(value = "统一社会信用代码")
|
||||||
private String socialCreditCode;
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
@ -155,4 +149,7 @@ public class Personnel extends BaseEntity {
|
||||||
@ApiModelProperty(value = "变更标志")
|
@ApiModelProperty(value = "变更标志")
|
||||||
private String alterationSign;
|
private String alterationSign;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批状态 0 未审批 1 待审批,2已通过,3已拒绝")
|
||||||
|
private Integer auditState;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
package com.ydool.staff.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author msh
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2023/2/8 13:55
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SelectRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "文件名")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "身份证号")
|
||||||
|
private String numberId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在部门")
|
||||||
|
private String presentDept;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "政治面貌")
|
||||||
|
private String politicsStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "录用方式")
|
||||||
|
private String hireType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位职务")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "合同形式")
|
||||||
|
private String contractModality;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "执业资格证书")
|
||||||
|
private String qualification;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "专业技术职称")
|
||||||
|
private String jobTitle;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员类型")
|
||||||
|
private String personnelType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "入职时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date hireDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "离职时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date resignationTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "工作状态")
|
||||||
|
private String workState;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员招聘单号")
|
||||||
|
private String recruitNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "变更标志")
|
||||||
|
private String alterationSign;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -35,7 +35,7 @@ public class PersonnelUpdateRequest {
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否应届毕业生")
|
@ApiModelProperty(value = "是否应届毕业生")
|
||||||
@NotBlank(message = "是否应届毕业生不能为空")
|
@NotBlank(message = "是否应届毕业生不能为空")
|
||||||
private Boolean freshGraduate;
|
private Integer freshGraduate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "毕业院校")
|
@ApiModelProperty(value = "毕业院校")
|
||||||
@NotBlank(message = "毕业院校不能为空")
|
@NotBlank(message = "毕业院校不能为空")
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package com.ydool.staff.service;
|
package com.ydool.staff.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 变更记录表 服务类
|
* 变更记录表 服务类
|
||||||
|
@ -10,5 +13,7 @@ package com.ydool.staff.service;
|
||||||
*/
|
*/
|
||||||
public interface IAlterationService {
|
public interface IAlterationService {
|
||||||
|
|
||||||
|
AjaxResult alterationList(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.ydool.staff.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ydool.common.data.dto.AjaxResult;
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.entity.SelectRequest;
|
||||||
import com.ydool.staff.request.ChangeRequest;
|
import com.ydool.staff.request.ChangeRequest;
|
||||||
import com.ydool.staff.request.PersonnelDeleteRequest;
|
import com.ydool.staff.request.PersonnelDeleteRequest;
|
||||||
import com.ydool.staff.request.PersonnelRequest;
|
import com.ydool.staff.request.PersonnelRequest;
|
||||||
|
@ -22,7 +23,7 @@ public interface IPersonnelService {
|
||||||
* 人员列表
|
* 人员列表
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult personnelList(Page page , String id);
|
AjaxResult personnelList(Page page , SelectRequest request, String orderBy,String column);
|
||||||
|
|
||||||
AjaxResult personnelByExchangeList();
|
AjaxResult personnelByExchangeList();
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,26 @@
|
||||||
package com.ydool.staff.service.impl;
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
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.base.BaseService;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.dto.AlterationDto;
|
||||||
|
import com.ydool.staff.dto.PersonnelDto;
|
||||||
import com.ydool.staff.entity.Alteration;
|
import com.ydool.staff.entity.Alteration;
|
||||||
|
import com.ydool.staff.entity.Organization;
|
||||||
|
import com.ydool.staff.entity.Personnel;
|
||||||
import com.ydool.staff.mapper.AlterationMapper;
|
import com.ydool.staff.mapper.AlterationMapper;
|
||||||
import com.ydool.staff.service.IAlterationService;
|
import com.ydool.staff.service.IAlterationService;
|
||||||
|
import com.ydool.system.entity.Dept;
|
||||||
|
import com.ydool.system.entity.User;
|
||||||
|
import com.ydool.system.mapper.UserMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 变更记录表 服务类
|
* 变更记录表 服务类
|
||||||
|
@ -17,5 +32,19 @@ import org.springframework.stereotype.Service;
|
||||||
@Service
|
@Service
|
||||||
public class AlterationServiceImpl extends BaseService<AlterationMapper, Alteration> implements IAlterationService {
|
public class AlterationServiceImpl extends BaseService<AlterationMapper, Alteration> implements IAlterationService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult alterationList(String id) {
|
||||||
|
List<Alteration> list = list(new LambdaQueryWrapper<Alteration>().eq(Alteration::getRelevancyId, id));
|
||||||
|
List<AlterationDto> alterationDtos = BeanUtil.copyToList(list, AlterationDto.class);
|
||||||
|
for (Alteration dto : list) {
|
||||||
|
UserMapper userMapper = SpringUtil.getBean(UserMapper.class);
|
||||||
|
User user = userMapper.selectById(dto.getCreatedId());
|
||||||
|
for (AlterationDto alterationDto : alterationDtos) {
|
||||||
|
alterationDto.setCreatedName(user.getUserName());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return AjaxResult.ok().data(alterationDtos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,10 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
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.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ydool.common.base.BaseService;
|
import com.ydool.common.base.BaseService;
|
||||||
|
import com.ydool.common.constant.AgesConst;
|
||||||
import com.ydool.common.data.dto.AjaxResult;
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.staff.dto.AttachmentDto;
|
import com.ydool.staff.dto.AttachmentDto;
|
||||||
import com.ydool.staff.dto.PersonnelByExchangeDto;
|
import com.ydool.staff.dto.PersonnelByExchangeDto;
|
||||||
|
@ -14,9 +16,12 @@ import com.ydool.staff.dto.PersonnelDto;
|
||||||
import com.ydool.staff.dto.PersonnelUpdateDto;
|
import com.ydool.staff.dto.PersonnelUpdateDto;
|
||||||
import com.ydool.staff.entity.Alteration;
|
import com.ydool.staff.entity.Alteration;
|
||||||
import com.ydool.staff.entity.Attachment;
|
import com.ydool.staff.entity.Attachment;
|
||||||
|
import com.ydool.staff.entity.CompanyName;
|
||||||
import com.ydool.staff.entity.Organization;
|
import com.ydool.staff.entity.Organization;
|
||||||
import com.ydool.staff.entity.Personnel;
|
import com.ydool.staff.entity.Personnel;
|
||||||
|
import com.ydool.staff.entity.SelectRequest;
|
||||||
import com.ydool.staff.mapper.AlterationMapper;
|
import com.ydool.staff.mapper.AlterationMapper;
|
||||||
|
import com.ydool.staff.mapper.CompanyNameMapper;
|
||||||
import com.ydool.staff.mapper.OrganizationMapper;
|
import com.ydool.staff.mapper.OrganizationMapper;
|
||||||
import com.ydool.staff.mapper.PersonnelMapper;
|
import com.ydool.staff.mapper.PersonnelMapper;
|
||||||
import com.ydool.staff.request.AttachmentRequest;
|
import com.ydool.staff.request.AttachmentRequest;
|
||||||
|
@ -58,7 +63,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
@Resource
|
@Resource
|
||||||
private AlterationMapper alterationMapper;
|
private AlterationMapper alterationMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private OrganizationMapper organizationMapper;
|
private CompanyNameMapper companyNameMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private DeptMapper deptMapper;
|
private DeptMapper deptMapper;
|
||||||
|
|
||||||
|
@ -68,9 +73,9 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult personnelList(Page page , String id) {
|
public AjaxResult personnelList(Page page , SelectRequest request, String orderBy,String column) {
|
||||||
if (ObjectUtil.isNotNull(id)){
|
if (ObjectUtil.isNotNull(request.getId())){
|
||||||
Personnel personnel = personnelMapper.selectById(id);
|
Personnel personnel = personnelMapper.selectById(request.getId());
|
||||||
PersonnelUpdateDto personnelUpdateDto = BeanUtil.copyProperties(personnel, PersonnelUpdateDto.class);
|
PersonnelUpdateDto personnelUpdateDto = BeanUtil.copyProperties(personnel, PersonnelUpdateDto.class);
|
||||||
personnelUpdateDto.setCardFiles(nameAndPath(personnel.getCardFile(), personnel.getId()));
|
personnelUpdateDto.setCardFiles(nameAndPath(personnel.getCardFile(), personnel.getId()));
|
||||||
personnelUpdateDto.setEngageFiles(nameAndPath(personnel.getEngageFile(), personnel.getId()));
|
personnelUpdateDto.setEngageFiles(nameAndPath(personnel.getEngageFile(), personnel.getId()));
|
||||||
|
@ -79,14 +84,16 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
personnelUpdateDto.setAuditFiles(nameAndPath(personnel.getAuditFile(), personnel.getId()));
|
personnelUpdateDto.setAuditFiles(nameAndPath(personnel.getAuditFile(), personnel.getId()));
|
||||||
return AjaxResult.ok().data(personnelUpdateDto);
|
return AjaxResult.ok().data(personnelUpdateDto);
|
||||||
}
|
}
|
||||||
Page personnelPage = page(page, new LambdaQueryWrapper<>());
|
|
||||||
|
QueryWrapper wrapper = selectWrapper(request, orderBy, column);
|
||||||
|
Page personnelPage = page(page, wrapper);
|
||||||
List<Personnel> list = personnelPage.getRecords();
|
List<Personnel> list = personnelPage.getRecords();
|
||||||
personnelPage.setRecords(list.stream().map(e->{
|
personnelPage.setRecords(list.stream().map(e->{
|
||||||
PersonnelDto dto = BeanUtil.copyProperties(e, PersonnelDto.class);
|
PersonnelDto dto = BeanUtil.copyProperties(e, PersonnelDto.class);
|
||||||
Organization organization = organizationMapper.selectById(e.getCompanyName());
|
CompanyName companyName = companyNameMapper.selectById(e.getCompanyName());
|
||||||
Dept dept = deptMapper.selectById(e.getPresentDept());
|
Dept dept = deptMapper.selectById(e.getPresentDept());
|
||||||
dto.setPresentDept(dept.getName());
|
dto.setPresentDept(dept.getName());
|
||||||
dto.setCompanyName(organization.getCompanyName());
|
dto.setCompanyName(companyName.getCompanyName());
|
||||||
dto.setCreatedAt(e.getCreatedAt());
|
dto.setCreatedAt(e.getCreatedAt());
|
||||||
return dto;
|
return dto;
|
||||||
}).collect(Collectors.toList()));
|
}).collect(Collectors.toList()));
|
||||||
|
@ -110,17 +117,17 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult savePersonnel(PersonnelRequest personnelRequest) {
|
public AjaxResult savePersonnel(PersonnelRequest personnelRequest) {
|
||||||
Personnel personnel = BeanUtil.copyProperties(personnelRequest, Personnel.class);
|
Personnel personnel = BeanUtil.copyProperties(personnelRequest, Personnel.class);
|
||||||
personnel.setCardFile(StringUtils.join(saveFilePath(personnelRequest.getCardFile(),Personnel.CARD_FILE,"",""),','));
|
personnel.setCardFile(StringUtils.join(saveFilePath(personnelRequest.getCardFile(),AgesConst.CARD_FILE,AgesConst.SAVE,""),','));
|
||||||
personnel.setEngageFile(StringUtils.join(saveFilePath(personnelRequest.getEngageFile(),Personnel.ENGAGE_FILE,"",""),','));
|
personnel.setEngageFile(StringUtils.join(saveFilePath(personnelRequest.getEngageFile(),AgesConst.ENGAGE_FILE,AgesConst.SAVE,""),','));
|
||||||
personnel.setJobTitleFile(StringUtils.join(saveFilePath(personnelRequest.getJobTitleFile(),Personnel.EDUCATION_FILE,"",""),','));
|
personnel.setJobTitleFile(StringUtils.join(saveFilePath(personnelRequest.getJobTitleFile(),AgesConst.EDUCATION_FILE,AgesConst.SAVE,""),','));
|
||||||
personnel.setEducationFile(StringUtils.join(saveFilePath(personnelRequest.getEducationFile(),Personnel.JOBTITLE_FILE,"",""),','));
|
personnel.setEducationFile(StringUtils.join(saveFilePath(personnelRequest.getEducationFile(),AgesConst.JOBTITLE_FILE,AgesConst.SAVE,""),','));
|
||||||
personnel.setAuditFile(StringUtils.join(saveFilePath(personnelRequest.getAuditFile(),Personnel.AUDIT_FILE,"",""),','));
|
personnel.setAuditFile(StringUtils.join(saveFilePath(personnelRequest.getAuditFile(),AgesConst.AUDIT_FILE,AgesConst.SAVE,""),','));
|
||||||
boolean save = save(personnel);
|
boolean save = save(personnel);
|
||||||
saveAttachment(personnelRequest.getCardFile(),Personnel.CARD_FILE,personnel.getId());
|
saveAttachment(personnelRequest.getCardFile(),AgesConst.CARD_FILE,personnel.getId(),AgesConst.SAVE);
|
||||||
saveAttachment(personnelRequest.getEngageFile(),Personnel.ENGAGE_FILE,personnel.getId());
|
saveAttachment(personnelRequest.getEngageFile(),AgesConst.ENGAGE_FILE,personnel.getId(),AgesConst.SAVE);
|
||||||
saveAttachment(personnelRequest.getEducationFile(),Personnel.EDUCATION_FILE,personnel.getId());
|
saveAttachment(personnelRequest.getEducationFile(),AgesConst.EDUCATION_FILE,personnel.getId(),AgesConst.SAVE);
|
||||||
saveAttachment(personnelRequest.getJobTitleFile(),Personnel.JOBTITLE_FILE,personnel.getId());
|
saveAttachment(personnelRequest.getJobTitleFile(),AgesConst.JOBTITLE_FILE,personnel.getId(),AgesConst.SAVE);
|
||||||
saveAttachment(personnelRequest.getAuditFile(),Personnel.AUDIT_FILE,personnel.getId());
|
saveAttachment(personnelRequest.getAuditFile(),AgesConst.AUDIT_FILE,personnel.getId(),AgesConst.SAVE);
|
||||||
return save ? AjaxResult.ok().msg("保存成功!"):AjaxResult.fail().msg("保存失败!");
|
return save ? AjaxResult.ok().msg("保存成功!"):AjaxResult.fail().msg("保存失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,16 +150,16 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult updatePersonnel(PersonnelUpdateRequest updateRequest) {
|
public AjaxResult updatePersonnel(PersonnelUpdateRequest updateRequest) {
|
||||||
Personnel per = get(updateRequest.getId());
|
Personnel per = get(updateRequest.getId());
|
||||||
Personnel personnel = BeanUtil.copyProperties(updateRequest, Personnel.class);
|
|
||||||
List<AttachmentRequest> cardFile = updateRequest.getCardFile();
|
List<AttachmentRequest> cardFile = updateRequest.getCardFile();
|
||||||
List<AttachmentRequest> educationFile = updateRequest.getEducationFile();
|
List<AttachmentRequest> educationFile = updateRequest.getEducationFile();
|
||||||
List<AttachmentRequest> auditFile = updateRequest.getAuditFile();
|
List<AttachmentRequest> auditFile = updateRequest.getAuditFile();
|
||||||
personnel.setCardFile(StringUtils.join(saveFilePath(cardFile,Personnel.CARD_FILE,"update",personnel.getId()),','));
|
String card = StringUtils.join(saveFilePath(cardFile, AgesConst.CARD_FILE, AgesConst.UPDATE, updateRequest.getId()), ',');
|
||||||
personnel.setEducationFile(StringUtils.join(saveFilePath(educationFile,Personnel.EDUCATION_FILE,"update",personnel.getId()),','));
|
String education = StringUtils.join(saveFilePath(educationFile,AgesConst.EDUCATION_FILE,AgesConst.UPDATE,updateRequest.getId()),',');
|
||||||
personnel.setAuditFile(StringUtils.join(saveFilePath(auditFile,Personnel.AUDIT_FILE,"update",personnel.getId()),','));
|
String audit = StringUtils.join(saveFilePath(auditFile,AgesConst.AUDIT_FILE,AgesConst.UPDATE,updateRequest.getId()),',');
|
||||||
boolean update = updateById(personnel);
|
if (per.getAuditState().equals(0)||per.getAuditState().equals(1)) {
|
||||||
String type ="personnel";
|
return AjaxResult.fail().msg("该人员修改的资料未审批完成,请联系管理员!");
|
||||||
if (update){
|
}
|
||||||
|
String type =AgesConst.PERSONNEL;
|
||||||
saveAlteration("民族更改",per.getNation(),updateRequest.getNation(),type,updateRequest.getId());
|
saveAlteration("民族更改",per.getNation(),updateRequest.getNation(),type,updateRequest.getId());
|
||||||
saveAlteration("政治面貌更改",per.getPoliticsStatus(),updateRequest.getPoliticsStatus(),type,updateRequest.getId());
|
saveAlteration("政治面貌更改",per.getPoliticsStatus(),updateRequest.getPoliticsStatus(),type,updateRequest.getId());
|
||||||
saveAlteration("学历更改",per.getEducation(),updateRequest.getEducation(),type,updateRequest.getId());
|
saveAlteration("学历更改",per.getEducation(),updateRequest.getEducation(),type,updateRequest.getId());
|
||||||
|
@ -161,34 +168,35 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
saveAlteration("专业更改",per.getSpecialty(),updateRequest.getSpecialty(),type,updateRequest.getId());
|
saveAlteration("专业更改",per.getSpecialty(),updateRequest.getSpecialty(),type,updateRequest.getId());
|
||||||
saveAlteration("所在部门更改",per.getPresentDept(),updateRequest.getPresentDept(),type,updateRequest.getId());
|
saveAlteration("所在部门更改",per.getPresentDept(),updateRequest.getPresentDept(),type,updateRequest.getId());
|
||||||
saveAlteration("合同形式更改",per.getContractModality(),updateRequest.getContractModality(),type,updateRequest.getId());
|
saveAlteration("合同形式更改",per.getContractModality(),updateRequest.getContractModality(),type,updateRequest.getId());
|
||||||
saveAlteration("身份证附件更改",per.getCardFile(),personnel.getCardFile(),type,updateRequest.getId());
|
saveAlteration("身份证附件更改",per.getCardFile(),card,type,updateRequest.getId());
|
||||||
saveAlteration("学历证书附件更改",per.getEducationFile(),personnel.getEducationFile(),type,updateRequest.getId());
|
saveAlteration("学历证书附件更改",per.getEducationFile(),education,type,updateRequest.getId());
|
||||||
saveAlteration("审批资料附件更改",per.getAuditFile(),personnel.getAuditFile(),type,updateRequest.getId());
|
saveAlteration("审批资料附件更改",per.getAuditFile(),audit,type,updateRequest.getId());
|
||||||
|
|
||||||
}
|
per.setAuditState(0);
|
||||||
saveAttachment(cardFile,Personnel.CARD_FILE,personnel.getId());
|
boolean update = updateById(per);
|
||||||
saveAttachment(educationFile,Personnel.EDUCATION_FILE,personnel.getId());
|
saveAttachment(cardFile,AgesConst.CARD_FILE,updateRequest.getId(),AgesConst.UPDATE);
|
||||||
saveAttachment(auditFile,Personnel.AUDIT_FILE,personnel.getId());
|
saveAttachment(educationFile,AgesConst.EDUCATION_FILE,updateRequest.getId(),AgesConst.UPDATE);
|
||||||
|
saveAttachment(auditFile,AgesConst.AUDIT_FILE,updateRequest.getId(),AgesConst.UPDATE);
|
||||||
return update ? AjaxResult.ok().msg("修改成功!"):AjaxResult.fail().msg("修改失败!");
|
return update ? AjaxResult.ok().msg("修改成功!"):AjaxResult.fail().msg("修改失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult updateChange(ChangeRequest request) {
|
public AjaxResult updateChange(ChangeRequest request) {
|
||||||
Personnel per = get(request.getId());
|
Personnel per = get(request.getId());
|
||||||
Personnel personnel = BeanUtil.copyProperties(request, Personnel.class);
|
|
||||||
List<AttachmentRequest> cardFiles = request.getCardFiles();
|
List<AttachmentRequest> cardFiles = request.getCardFiles();
|
||||||
List<AttachmentRequest> jobTitleFiles = request.getJobTitleFiles();
|
List<AttachmentRequest> jobTitleFiles = request.getJobTitleFiles();
|
||||||
List<AttachmentRequest> engageFiles = request.getEngageFiles();
|
List<AttachmentRequest> engageFiles = request.getEngageFiles();
|
||||||
List<AttachmentRequest> educationFiles = request.getEducationFiles();
|
List<AttachmentRequest> educationFiles = request.getEducationFiles();
|
||||||
List<AttachmentRequest> auditFiles = request.getAuditFiles();
|
List<AttachmentRequest> auditFiles = request.getAuditFiles();
|
||||||
personnel.setCardFile(StringUtils.join(saveFilePath(cardFiles,Personnel.CARD_FILE,"Change",personnel.getId()),','));
|
if (per.getAuditState().equals(0)||per.getAuditState().equals(1)) {
|
||||||
personnel.setJobTitleFile(StringUtils.join(saveFilePath(jobTitleFiles,Personnel.JOBTITLE_FILE,"Change",personnel.getId()),','));
|
return AjaxResult.fail().msg("该人员修改的资料未审批完成,请联系管理员!");
|
||||||
personnel.setEngageFile(StringUtils.join(saveFilePath(engageFiles,Personnel.ENGAGE_FILE,"Change",personnel.getId()),','));
|
}
|
||||||
personnel.setEducationFile(StringUtils.join(saveFilePath(educationFiles,Personnel.EDUCATION_FILE,"Change",personnel.getId()),','));
|
String type =AgesConst.CHANGE;
|
||||||
personnel.setAuditFile(StringUtils.join(saveFilePath(auditFiles,Personnel.AUDIT_FILE,"Change",personnel.getId()),','));
|
String card = StringUtils.join(saveFilePath(cardFiles, AgesConst.CARD_FILE, type, request.getId()), ',');
|
||||||
boolean update = updateById(personnel);
|
String jobTitle = StringUtils.join(saveFilePath(jobTitleFiles,AgesConst.JOBTITLE_FILE,type,request.getId()),',');
|
||||||
String type ="Change";
|
String engage = StringUtils.join(saveFilePath(engageFiles,AgesConst.ENGAGE_FILE,type,request.getId()),',');
|
||||||
if (update){
|
String education = StringUtils.join(saveFilePath(educationFiles,AgesConst.EDUCATION_FILE,type,request.getId()),',');
|
||||||
|
String audit = StringUtils.join(saveFilePath(auditFiles,AgesConst.AUDIT_FILE,type,request.getId()),',');
|
||||||
saveAlteration("录用方式更改",per.getHireType(),request.getHireType(),type,request.getId());
|
saveAlteration("录用方式更改",per.getHireType(),request.getHireType(),type,request.getId());
|
||||||
saveAlteration("执业资格更改",per.getQualification(),request.getQualification(),type,request.getId());
|
saveAlteration("执业资格更改",per.getQualification(),request.getQualification(),type,request.getId());
|
||||||
saveAlteration("专业技术职称更改",per.getJobTitle(),request.getJobTitle(),type,request.getId());
|
saveAlteration("专业技术职称更改",per.getJobTitle(),request.getJobTitle(),type,request.getId());
|
||||||
|
@ -198,18 +206,18 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
saveAlteration("年薪更改",per.getAnnualSalary(),request.getAnnualSalary(),type,request.getId());
|
saveAlteration("年薪更改",per.getAnnualSalary(),request.getAnnualSalary(),type,request.getId());
|
||||||
saveAlteration("退休时间更改",per.getRetirementTime(),request.getRetirementTime(),type,request.getId());
|
saveAlteration("退休时间更改",per.getRetirementTime(),request.getRetirementTime(),type,request.getId());
|
||||||
saveAlteration("人员招聘单号更改",per.getRecruitNumber(),request.getRecruitNumber(),type,request.getId());
|
saveAlteration("人员招聘单号更改",per.getRecruitNumber(),request.getRecruitNumber(),type,request.getId());
|
||||||
saveAlteration("身份证附件更改",per.getCardFile(),personnel.getCardFile(),type,request.getId());
|
saveAlteration("身份证附件更改",per.getCardFile(),card,type,request.getId());
|
||||||
saveAlteration("聘任证书附件更改",per.getEngageFile(),personnel.getEngageFile(),type,request.getId());
|
saveAlteration("聘任证书附件更改",per.getEngageFile(),jobTitle,type,request.getId());
|
||||||
saveAlteration("职称证书附件更改",per.getJobTitleFile(),personnel.getJobTitleFile(),type,request.getId());
|
saveAlteration("职称证书附件更改",per.getJobTitleFile(),engage,type,request.getId());
|
||||||
saveAlteration("学历证书附件更改",per.getEducationFile(),personnel.getEducationFile(),type,request.getId());
|
saveAlteration("学历证书附件更改",per.getEducationFile(),education,type,request.getId());
|
||||||
saveAlteration("审批资料附件更改",per.getAuditFile(),personnel.getAuditFile(),type,request.getId());
|
saveAlteration("审批资料附件更改",per.getAuditFile(),audit,type,request.getId());
|
||||||
|
per.setAuditState(0);
|
||||||
}
|
boolean update = updateById(per);
|
||||||
saveAttachment(cardFiles,Personnel.CARD_FILE,personnel.getId());
|
saveAttachment(cardFiles,AgesConst.CARD_FILE,request.getId(),AgesConst.UPDATE);
|
||||||
saveAttachment(jobTitleFiles,Personnel.JOBTITLE_FILE,personnel.getId());
|
saveAttachment(jobTitleFiles,AgesConst.JOBTITLE_FILE,request.getId(),AgesConst.UPDATE);
|
||||||
saveAttachment(engageFiles,Personnel.ENGAGE_FILE,personnel.getId());
|
saveAttachment(engageFiles,AgesConst.ENGAGE_FILE,request.getId(),AgesConst.UPDATE);
|
||||||
saveAttachment(educationFiles,Personnel.EDUCATION_FILE,personnel.getId());
|
saveAttachment(educationFiles,AgesConst.EDUCATION_FILE,request.getId(),AgesConst.UPDATE);
|
||||||
saveAttachment(auditFiles,Personnel.AUDIT_FILE,personnel.getId());
|
saveAttachment(auditFiles,AgesConst.AUDIT_FILE,request.getId(),AgesConst.UPDATE);
|
||||||
return update ? AjaxResult.ok().msg("修改成功!"):AjaxResult.fail().msg("修改失败!");
|
return update ? AjaxResult.ok().msg("修改成功!"):AjaxResult.fail().msg("修改失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,12 +227,17 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
* @param type
|
* @param type
|
||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
public void saveAttachment(List<AttachmentRequest> file,String type, String id){
|
public void saveAttachment(List<AttachmentRequest> file,String type, String id,String ages){
|
||||||
if (CollectionUtil.isNotEmpty(file)){
|
if (CollectionUtil.isNotEmpty(file)){
|
||||||
for (AttachmentRequest request : file) {
|
for (AttachmentRequest request : file) {
|
||||||
Attachment attachment = BeanUtil.copyProperties(request, Attachment.class);
|
Attachment attachment = BeanUtil.copyProperties(request, Attachment.class);
|
||||||
attachment.setTargetType(type);
|
attachment.setTargetType(type);
|
||||||
attachment.setTargetId(id);
|
attachment.setTargetId(id);
|
||||||
|
if (AgesConst.UPDATE.equals(ages)){
|
||||||
|
attachment.setFileState(0);
|
||||||
|
}else {
|
||||||
|
attachment.setFileState(1);
|
||||||
|
}
|
||||||
attachmentService.savePersonnel(attachment);
|
attachmentService.savePersonnel(attachment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -243,7 +256,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
if (CollectionUtil.isNotEmpty(file)){
|
if (CollectionUtil.isNotEmpty(file)){
|
||||||
ArrayList<String> path = new ArrayList<>();
|
ArrayList<String> path = new ArrayList<>();
|
||||||
for (AttachmentRequest request : file) {
|
for (AttachmentRequest request : file) {
|
||||||
if ("update".equals(args)){
|
if (AgesConst.UPDATE.equals(args)){
|
||||||
attachmentService.deleteById(type,id);
|
attachmentService.deleteById(type,id);
|
||||||
}
|
}
|
||||||
path.add(request.getPath());
|
path.add(request.getPath());
|
||||||
|
@ -254,7 +267,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveAlteration(String details,Object before ,Object after,String type, String id){
|
public void saveAlteration(String details,Object before ,Object after,String type, String id){
|
||||||
if (ObjectUtil.isNotNull(after)){
|
if (!before.equals(after)){
|
||||||
Alteration alteration = new Alteration();
|
Alteration alteration = new Alteration();
|
||||||
alteration.setDetails(details);
|
alteration.setDetails(details);
|
||||||
alteration.setType(type);
|
alteration.setType(type);
|
||||||
|
@ -267,7 +280,6 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
alteration.setAfterChange(after.toString());
|
alteration.setAfterChange(after.toString());
|
||||||
alterationMapper.insert(alteration);
|
alterationMapper.insert(alteration);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public List<AttachmentDto> nameAndPath(String file,String id){
|
public List<AttachmentDto> nameAndPath(String file,String id){
|
||||||
if (StrUtil.isNotBlank(file)){
|
if (StrUtil.isNotBlank(file)){
|
||||||
|
@ -288,5 +300,38 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.getRecruitNumber()),Personnel::getRecruitNumber,request.getRecruitNumber())
|
||||||
|
.eq(StrUtil.isNotBlank(request.getAlterationSign()),Personnel::getAlterationSign,request.getAlterationSign());
|
||||||
|
wrapper.lambda().like(Personnel::getUserName,request.getUserName())
|
||||||
|
.like(Personnel::getNumberId,request.getNumberId())
|
||||||
|
/*.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);
|
||||||
|
}
|
||||||
|
if ("asc".equals(orderBy) && StrUtil.isNotBlank(column)) {
|
||||||
|
wrapper.orderByAsc(column);
|
||||||
|
}
|
||||||
|
return wrapper;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue