Commit 4de7b702 authored by fangxinjiang's avatar fangxinjiang

excel导入导出组件

parent bc0a048d
...@@ -24,9 +24,6 @@ import io.swagger.v3.oas.annotations.media.Schema; ...@@ -24,9 +24,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
/** /**
* 档案变更日志表 * 档案变更日志表
* *
......
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import cn.hutool.core.date.DateTime;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
/** /**
* @Author fxj * @Author fxj
* @Date 2022/6/23 * @Date 2022/6/23
...@@ -12,4 +16,10 @@ import lombok.Data; ...@@ -12,4 +16,10 @@ import lombok.Data;
@Data @Data
public class CertifySearchVo extends TEmpProfessionalQualification { public class CertifySearchVo extends TEmpProfessionalQualification {
private String ids; private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
} }
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import cn.hutool.core.date.DateTime;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
/** /**
* @Author fxj * @Author fxj
* @Date 2022/6/23 * @Date 2022/6/23
...@@ -12,4 +16,10 @@ import lombok.Data; ...@@ -12,4 +16,10 @@ import lombok.Data;
@Data @Data
public class DisabilitySearchVo extends TEmpDisabilityInfo { public class DisabilitySearchVo extends TEmpDisabilityInfo {
private String ids; private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
} }
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import cn.hutool.core.date.DateTime;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
/** /**
* @Author fxj * @Author fxj
* @Date 2022/6/23 * @Date 2022/6/23
...@@ -12,4 +16,10 @@ import lombok.Data; ...@@ -12,4 +16,10 @@ import lombok.Data;
@Data @Data
public class EducationSearchVo extends TEmpEducation { public class EducationSearchVo extends TEmpEducation {
private String ids; private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
} }
...@@ -22,14 +22,14 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable { ...@@ -22,14 +22,14 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/** /**
* 员工姓名 * 员工姓名
*/ */
@ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空") @ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空",maxLength = 20)
@NotNull(message = "员工姓名不可为空") @NotNull(message = "员工姓名不可为空")
@ExcelProperty(value ="员工姓名") @ExcelProperty(value ="员工姓名")
private String empName; private String empName;
/** /**
* 员工身份证 * 员工身份证
*/ */
@ExcelAttribute(name = "身份证号",errorInfo = "员工身份证不可为空") @ExcelAttribute(name = "身份证号",errorInfo = "员工身份证不可为空",maxLength = 20)
@NotNull(message = "员工身份证不可为空") @NotNull(message = "员工身份证不可为空")
@ExcelProperty(value ="身份证号") @ExcelProperty(value ="身份证号")
private String empIdcard; private String empIdcard;
...@@ -37,7 +37,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable { ...@@ -37,7 +37,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/** /**
* 资格类型 * 资格类型
*/ */
@ExcelAttribute(name = "资格类型",errorInfo = "资格类型不可为空") @ExcelAttribute(name = "资格类型",errorInfo = "资格类型不可为空",isDataId = true, dataType = "qualification_type")
@NotNull(message = "资格类型不可为空") @NotNull(message = "资格类型不可为空")
@ExcelProperty(value ="资格类型") @ExcelProperty(value ="资格类型")
private String qualificationType; private String qualificationType;
...@@ -45,7 +45,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable { ...@@ -45,7 +45,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/** /**
* 资格等级 * 资格等级
*/ */
@ExcelAttribute(name = "资格等级",errorInfo = "资格等级不可为空") @ExcelAttribute(name = "资格等级",errorInfo = "资格等级不可为空",isDataId = true, dataType = "qualification_level")
@NotNull(message = "资格等级不可为空") @NotNull(message = "资格等级不可为空")
@ExcelProperty(value ="资格等级") @ExcelProperty(value ="资格等级")
private String qualificationLevel; private String qualificationLevel;
...@@ -53,21 +53,21 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable { ...@@ -53,21 +53,21 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/** /**
* 证书编号 * 证书编号
*/ */
@ExcelAttribute(name = "证书编号") @ExcelAttribute(name = "证书编号",maxLength = 50)
@ExcelProperty(value ="证书编号") @ExcelProperty(value ="证书编号")
private String certificationNo; private String certificationNo;
/** /**
* 获取方式 * 获取方式
*/ */
@ExcelAttribute(name = "获取方式") @ExcelAttribute(name = "获取方式",isDataId = true, dataType = "obtain_type")
@ExcelProperty(value ="获取方式") @ExcelProperty(value ="获取方式")
private String obtainType; private String obtainType;
/** /**
* 评定机构 * 评定机构
*/ */
@ExcelAttribute(name = "评定机构") @ExcelAttribute(name = "评定机构",maxLength = 50)
@ExcelProperty(value ="评定机构") @ExcelProperty(value ="评定机构")
private String assessmentUnit; private String assessmentUnit;
...@@ -81,14 +81,14 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable { ...@@ -81,14 +81,14 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/** /**
* 是否最高资格0是/1否 * 是否最高资格0是/1否
*/ */
@ExcelAttribute(name = "是否最高资格",errorInfo = "是否最高资格不可为空") @ExcelAttribute(name = "是否最高资格",errorInfo = "是否最高资格不可为空",readConverterExp = "0:是,1:否")
@NotNull(message = "是否最高资格不可为空") @NotNull(message = "是否最高资格不可为空")
@ExcelProperty(value ="是否最高资格") @ExcelProperty(value ="是否最高资格")
private String heightIdentification; private String heightIdentification;
/** /**
* 备注 * 备注
*/ */
@ExcelAttribute(name = "备注") @ExcelAttribute(name = "备注",maxLength = 200)
@ExcelProperty(value ="备注") @ExcelProperty(value ="备注")
private String remark; private String remark;
} }
...@@ -3,17 +3,12 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -3,17 +3,12 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past; import javax.validation.constraints.Past;
import javax.validation.constraints.Pattern;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
...@@ -31,7 +26,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable { ...@@ -31,7 +26,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
/** /**
* 员工姓名 * 员工姓名
*/ */
@ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空") @ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空",maxLength = 20)
@NotNull(message = "员工姓名不能为空") @NotNull(message = "员工姓名不能为空")
@ExcelProperty(value ="员工姓名") @ExcelProperty(value ="员工姓名")
private String empName; private String empName;
...@@ -39,7 +34,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable { ...@@ -39,7 +34,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
/** /**
* 员工身份证 * 员工身份证
*/ */
@ExcelAttribute(name = "身份证号",errorInfo = "员工身份证不能为空") @ExcelAttribute(name = "身份证号",errorInfo = "员工身份证不能为空",maxLength = 20)
@NotNull(message = "员工身份证不能为空") @NotNull(message = "员工身份证不能为空")
@ExcelProperty(value ="身份证号") @ExcelProperty(value ="身份证号")
private String empIdcard; private String empIdcard;
...@@ -47,7 +42,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable { ...@@ -47,7 +42,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
/** /**
* 伤残病名称 * 伤残病名称
*/ */
@ExcelAttribute(name = "伤残病名称",errorInfo = "伤残病名称不能为空") @ExcelAttribute(name = "伤残病名称",errorInfo = "伤残病名称不能为空",maxLength = 50)
@NotNull(message = "伤残病名称不能为空") @NotNull(message = "伤残病名称不能为空")
@ExcelProperty(value ="伤残病名称") @ExcelProperty(value ="伤残病名称")
private String disabilityName; private String disabilityName;
...@@ -55,14 +50,14 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable { ...@@ -55,14 +50,14 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
/** /**
* 职业病名称 * 职业病名称
*/ */
@ExcelAttribute(name = "职业病名称") @ExcelAttribute(name = "职业病名称",maxLength = 50)
@ExcelProperty(value ="职业病名称") @ExcelProperty(value ="职业病名称")
private String occupationalDisease; private String occupationalDisease;
/** /**
* 伤残等级 * 伤残等级
*/ */
@ExcelAttribute(name = "伤残等级",errorInfo = "伤残等级不能为空") @ExcelAttribute(name = "伤残等级",errorInfo = "伤残等级不能为空",isDataId = true, dataType = "disability_grade")
@NotNull(message = "伤残等级不能为空") @NotNull(message = "伤残等级不能为空")
@ExcelProperty(value ="伤残等级") @ExcelProperty(value ="伤残等级")
private String disabilityLevel; private String disabilityLevel;
...@@ -90,7 +85,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable { ...@@ -90,7 +85,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
/** /**
* 是否工伤标识0是/1否 * 是否工伤标识0是/1否
*/ */
@ExcelAttribute(name = "是否工伤",errorInfo = "是否工伤不可为空") @ExcelAttribute(name = "是否工伤",errorInfo = "是否工伤不可为空",readConverterExp = "0:是,1:否")
@NotNull(message = "是否工伤标识(0是/1否)不能为空") @NotNull(message = "是否工伤标识(0是/1否)不能为空")
@ExcelProperty(value ="是否工伤") @ExcelProperty(value ="是否工伤")
private String injuryIdentification; private String injuryIdentification;
...@@ -98,7 +93,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable { ...@@ -98,7 +93,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
/** /**
* 备注 * 备注
*/ */
@ExcelAttribute(name = "备注") @ExcelAttribute(name = "备注",maxLength = 200)
@ExcelProperty(value ="备注") @ExcelProperty(value ="备注")
private String remark; private String remark;
......
...@@ -8,8 +8,6 @@ import lombok.Data; ...@@ -8,8 +8,6 @@ import lombok.Data;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
...@@ -27,7 +25,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable { ...@@ -27,7 +25,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/** /**
* 员工姓名 * 员工姓名
*/ */
@ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空") @ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空",maxLength = 20)
@NotNull(message = "员工姓名不可为空") @NotNull(message = "员工姓名不可为空")
@ExcelProperty(value ="员工姓名") @ExcelProperty(value ="员工姓名")
private String empName; private String empName;
...@@ -35,7 +33,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable { ...@@ -35,7 +33,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/** /**
* 身份证号 * 身份证号
*/ */
@ExcelAttribute(name = "身份证号",errorInfo = "员工身份证不可为空") @ExcelAttribute(name = "身份证号",errorInfo = "员工身份证不可为空", maxLength = 20)
@NotNull(message = "员工身份证不可为空") @NotNull(message = "员工身份证不可为空")
@ExcelProperty(value ="身份证号") @ExcelProperty(value ="身份证号")
private String empIdcard; private String empIdcard;
...@@ -43,7 +41,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable { ...@@ -43,7 +41,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/** /**
* 学校名称 * 学校名称
*/ */
@ExcelAttribute(name = "学校",errorInfo = "学校不可为空") @ExcelAttribute(name = "学校",errorInfo = "学校不可为空",maxLength = 50)
@NotNull(message = "学校不可为空") @NotNull(message = "学校不可为空")
@ExcelProperty(value ="学校") @ExcelProperty(value ="学校")
private String school; private String school;
...@@ -51,14 +49,14 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable { ...@@ -51,14 +49,14 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/** /**
* 院系名称 * 院系名称
*/ */
@ExcelAttribute(name = "院系名称") @ExcelAttribute(name = "院系名称",maxLength = 50)
@ExcelProperty(value ="院系名称") @ExcelProperty(value ="院系名称")
private String collageSystem; private String collageSystem;
/** /**
* 专业 * 专业
*/ */
@ExcelAttribute(name = "专业",errorInfo = "专业不可为空") @ExcelAttribute(name = "专业",errorInfo = "专业不可为空",maxLength = 50)
@NotNull(message = "专业不可为空") @NotNull(message = "专业不可为空")
@ExcelProperty(value ="专业") @ExcelProperty(value ="专业")
private String major; private String major;
...@@ -74,7 +72,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable { ...@@ -74,7 +72,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/** /**
* 学历类型:全日制、自考、函授等 * 学历类型:全日制、自考、函授等
*/ */
@ExcelAttribute(name = "学历类型") @ExcelAttribute(name = "学历类型",isDataId = true,dataType = "education_type")
@ExcelProperty(value ="学历类型") @ExcelProperty(value ="学历类型")
private String type; private String type;
...@@ -89,7 +87,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable { ...@@ -89,7 +87,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/** /**
* 学制类型:四年、三年、五年、二年 * 学制类型:四年、三年、五年、二年
*/ */
@ExcelAttribute(name = "学制类型") @ExcelAttribute(name = "学制类型",isDataId = true,dataType = "education_system")
@ExcelProperty(value ="学制类型") @ExcelProperty(value ="学制类型")
private String educationSystem; private String educationSystem;
...@@ -114,13 +112,13 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable { ...@@ -114,13 +112,13 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/** /**
* 证书名称 * 证书名称
*/ */
@ExcelAttribute(name = "证书名称") @ExcelAttribute(name = "证书名称",maxLength = 50)
@ExcelProperty(value ="证书名称") @ExcelProperty(value ="证书名称")
private String certificationName; private String certificationName;
/** /**
* 备注 * 备注
*/ */
@ExcelAttribute(name = "备注") @ExcelAttribute(name = "备注",maxLength = 200)
@ExcelProperty(value ="备注") @ExcelProperty(value ="备注")
private String remark; private String remark;
......
...@@ -24,7 +24,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable { ...@@ -24,7 +24,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable {
/** /**
* 员工姓名 * 员工姓名
*/ */
@ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空") @ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空",maxLength = 20)
@NotNull(message = "员工姓名不可为空") @NotNull(message = "员工姓名不可为空")
@ExcelProperty(value ="员工姓名") @ExcelProperty(value ="员工姓名")
private String empName; private String empName;
...@@ -32,7 +32,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable { ...@@ -32,7 +32,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable {
/** /**
* 员工身份证 * 员工身份证
*/ */
@ExcelAttribute(name = "身份证号",errorInfo = "身份证号不可为空") @ExcelAttribute(name = "身份证号",errorInfo = "身份证号不可为空",maxLength = 20)
@NotNull(message = "员工身份证不可为空") @NotNull(message = "员工身份证不可为空")
@ExcelProperty(value ="身份证号") @ExcelProperty(value ="身份证号")
private String empIdcard; private String empIdcard;
...@@ -40,7 +40,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable { ...@@ -40,7 +40,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable {
/** /**
* 家庭成员姓名 * 家庭成员姓名
*/ */
@ExcelAttribute(name = "成员姓名",errorInfo = "成员姓名不可为空") @ExcelAttribute(name = "成员姓名",errorInfo = "成员姓名不可为空",maxLength = 20)
@NotNull(message = "家庭成员姓名不可为空") @NotNull(message = "家庭成员姓名不可为空")
@ExcelProperty(value ="成员姓名") @ExcelProperty(value ="成员姓名")
private String familyName; private String familyName;
...@@ -65,7 +65,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable { ...@@ -65,7 +65,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable {
/** /**
* 工作/学习单位 * 工作/学习单位
*/ */
@ExcelAttribute(name = "工作单位") @ExcelAttribute(name = "工作单位",maxLength = 100)
@ExcelProperty(value ="工作单位") @ExcelProperty(value ="工作单位")
private String workUnit; private String workUnit;
......
...@@ -4,14 +4,10 @@ import com.alibaba.excel.annotation.ExcelProperty; ...@@ -4,14 +4,10 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
...@@ -29,14 +25,14 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable { ...@@ -29,14 +25,14 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
/** /**
* 员工姓名 * 员工姓名
*/ */
@ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空") @ExcelAttribute(name = "员工姓名",errorInfo = "员工姓名不可为空",maxLength = 20)
@NotNull(message = "员工姓名不可为空") @NotNull(message = "员工姓名不可为空")
@ExcelProperty(value ="员工姓名") @ExcelProperty(value ="员工姓名")
private String empName; private String empName;
/** /**
* 员工身份证 * 员工身份证
*/ */
@ExcelAttribute(name = "身份证号",errorInfo = "员工身份证不可为空") @ExcelAttribute(name = "身份证号",errorInfo = "员工身份证不可为空",maxLength = 20)
@NotNull(message = "员工身份证不可为空") @NotNull(message = "员工身份证不可为空")
@ExcelProperty(value ="身份证号") @ExcelProperty(value ="身份证号")
private String empIdcard; private String empIdcard;
...@@ -44,7 +40,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable { ...@@ -44,7 +40,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
/** /**
* 工作单位 * 工作单位
*/ */
@ExcelAttribute(name = "工作单位",errorInfo = "工作单位不可为空") @ExcelAttribute(name = "工作单位",errorInfo = "工作单位不可为空",maxLength = 100)
@NotNull(message = "工作单位不可为空") @NotNull(message = "工作单位不可为空")
@ExcelProperty(value ="工作单位") @ExcelProperty(value ="工作单位")
private String workUnit; private String workUnit;
...@@ -52,7 +48,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable { ...@@ -52,7 +48,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
/** /**
* 工作部门 * 工作部门
*/ */
@ExcelAttribute(name = "工作部门",errorInfo = "工作部门不可为空") @ExcelAttribute(name = "工作部门",errorInfo = "工作部门不可为空",maxLength = 100)
@NotNull(message = "工作部门不可为空") @NotNull(message = "工作部门不可为空")
@ExcelProperty(value ="工作部门") @ExcelProperty(value ="工作部门")
private String workDepart; private String workDepart;
...@@ -60,21 +56,21 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable { ...@@ -60,21 +56,21 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
/** /**
* 工作岗位 * 工作岗位
*/ */
@ExcelAttribute(name = "工作岗位") @ExcelAttribute(name = "工作岗位",maxLength = 100)
@ExcelProperty(value ="工作岗位") @ExcelProperty(value ="工作岗位")
private String workJob; private String workJob;
/** /**
* 工作类型 * 工作类型
*/ */
@ExcelAttribute(name = "工作类型") @ExcelAttribute(name = "工作类型",isDataId = true,dataType = "workinfo_type")
@ExcelProperty(value ="工作类型") @ExcelProperty(value ="工作类型")
private String workingType; private String workingType;
/** /**
* 是否在岗:0是/1否 * 是否在岗:0是/1否
*/ */
@ExcelAttribute(name = "在职状态",errorInfo = "在职状态不可为空") @ExcelAttribute(name = "在职状态",errorInfo = "在职状态不可为空",isDataId = true,readConverterExp = "0:是,1:否")
@NotNull(message = "是否在岗不可为空") @NotNull(message = "是否在岗不可为空")
@ExcelProperty(value ="在职状态") @ExcelProperty(value ="在职状态")
private String workingStatus; private String workingStatus;
......
...@@ -18,11 +18,8 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -18,11 +18,8 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past; import javax.validation.constraints.Past;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import cn.hutool.core.date.DateTime;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
/** /**
* @Author fxj * @Author fxj
* @Date 2022/6/22 * @Date 2022/6/22
...@@ -12,4 +16,10 @@ import lombok.Data; ...@@ -12,4 +16,10 @@ import lombok.Data;
@Data @Data
public class FamilySearchVO extends TEmpFamily { public class FamilySearchVO extends TEmpFamily {
private String ids; private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
} }
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import cn.hutool.core.date.DateTime;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
/** /**
* @Author fxj * @Author fxj
* @Date 2022/6/23 * @Date 2022/6/23
...@@ -12,4 +16,10 @@ import lombok.Data; ...@@ -12,4 +16,10 @@ import lombok.Data;
@Data @Data
public class WorkRecordSearchVO extends TEmpWorkRecording { public class WorkRecordSearchVO extends TEmpWorkRecording {
private String ids; private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
} }
...@@ -23,13 +23,11 @@ import com.alibaba.excel.read.listener.ReadListener; ...@@ -23,13 +23,11 @@ import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder; import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils; import com.alibaba.excel.util.ListUtils;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpDisabilityInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpDisabilityInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.DisabilitySearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.DisabilitySearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDisabilityExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDisabilityExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
...@@ -41,7 +39,6 @@ import io.swagger.v3.oas.annotations.tags.Tag; ...@@ -41,7 +39,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -67,13 +64,13 @@ public class TEmpDisabilityInfoController { ...@@ -67,13 +64,13 @@ public class TEmpDisabilityInfoController {
/** /**
* 分页查询 * 分页查询
* @param page 分页对象 * @param page 分页对象
* @param tEmpDisabilityInfo 员工伤残信息表 * @param searchVo 员工伤残信息表
* @return * @return
*/ */
@Operation(summary = "分页查询", description = "分页查询") @Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
public R<IPage<TEmpDisabilityInfo>> getTEmpDisabilityInfoPage(Page page, TEmpDisabilityInfo tEmpDisabilityInfo) { public R<IPage<TEmpDisabilityInfo>> getTEmpDisabilityInfoPage(Page page, DisabilitySearchVo searchVo) {
return R.ok(tEmpDisabilityInfoService.page(page, Wrappers.query(tEmpDisabilityInfo))); return R.ok(tEmpDisabilityInfoService.pageDiy(page, searchVo));
} }
/** /**
...@@ -84,16 +81,8 @@ public class TEmpDisabilityInfoController { ...@@ -84,16 +81,8 @@ public class TEmpDisabilityInfoController {
@Operation(summary = "不分页查询", description = "不分页查询") @Operation(summary = "不分页查询", description = "不分页查询")
@GetMapping("/noPage" ) @GetMapping("/noPage" )
public R<List<TEmpDisabilityInfo>> getTEmpDisabilityInfoNoPage(DisabilitySearchVo searchVo) { public R<List<TEmpDisabilityInfo>> getTEmpDisabilityInfoNoPage(DisabilitySearchVo searchVo) {
List<String> idList = null; return R.ok(tEmpDisabilityInfoService.getTEmpDisabilityInfoNoPage(searchVo));
if (Common.isNotNull(searchVo.getIds())){
idList = Common.initStrToList(searchVo.getIds(), CommonConstants.COMMA_STRING);
}
if (Common.isNotNull(idList)){
return R.ok(tEmpDisabilityInfoService.list( Wrappers.<TEmpDisabilityInfo>query(searchVo).lambda().in(TEmpDisabilityInfo::getId,idList)));
} }
return R.ok(tEmpDisabilityInfoService.list(Wrappers.query(searchVo)));
}
/** /**
* 通过id查询员工伤残信息表 * 通过id查询员工伤残信息表
...@@ -158,10 +147,7 @@ public class TEmpDisabilityInfoController { ...@@ -158,10 +147,7 @@ public class TEmpDisabilityInfoController {
@DeleteMapping("/removeByIds" ) @DeleteMapping("/removeByIds" )
@PreAuthorize("@pms.hasPermission('archives_tempdisabilityinfo_del_batch')" ) @PreAuthorize("@pms.hasPermission('archives_tempdisabilityinfo_del_batch')" )
public R<Boolean> removeByIds(@RequestParam String ids) { public R<Boolean> removeByIds(@RequestParam String ids) {
List<String> idList = null; List<String> idList = Common.getList(ids);
if (Common.isNotNull(ids)){
idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
}
return R.ok(tEmpDisabilityInfoService.removeByIds(idList)); return R.ok(tEmpDisabilityInfoService.removeByIds(idList));
} }
/** /**
......
...@@ -23,14 +23,11 @@ import com.alibaba.excel.read.listener.ReadListener; ...@@ -23,14 +23,11 @@ import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder; import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils; import com.alibaba.excel.util.ListUtils;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EducationSearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EducationSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateExcelVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateExcelVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
...@@ -42,7 +39,6 @@ import io.swagger.v3.oas.annotations.tags.Tag; ...@@ -42,7 +39,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -73,8 +69,8 @@ public class TEmpEducationController { ...@@ -73,8 +69,8 @@ public class TEmpEducationController {
*/ */
@Operation(description = "分页查询") @Operation(description = "分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
public R<IPage<TEmpEducation>> getTEmpEducationPage(Page page, TEmpEducation tEmpEducation) { public R<IPage<TEmpEducation>> getTEmpEducationPage(Page page, EducationSearchVo tEmpEducation) {
return R.ok(tEmpEducationService.page(page, Wrappers.query(tEmpEducation))); return R.ok(tEmpEducationService.pageDiy(page, tEmpEducation));
} }
/** /**
* 不分页查询 * 不分页查询
...@@ -84,14 +80,7 @@ public class TEmpEducationController { ...@@ -84,14 +80,7 @@ public class TEmpEducationController {
@Operation(description = "不分页查询") @Operation(description = "不分页查询")
@GetMapping("/noPage" ) @GetMapping("/noPage" )
public R<List<TEmpEducation>> getTEmpEducationNoPage(EducationSearchVo searchVo) { public R<List<TEmpEducation>> getTEmpEducationNoPage(EducationSearchVo searchVo) {
List<String> idList = null; return R.ok(tEmpEducationService.getTEmpEducationNoPage(searchVo));
if (Common.isNotNull(searchVo.getIds())){
idList = Common.initStrToList(searchVo.getIds(),CommonConstants.COMMA_STRING);
}
if (Common.isNotNull(idList)){
return R.ok(tEmpEducationService.list( Wrappers.<TEmpEducation>query(searchVo).lambda().in(TEmpEducation::getId,idList)));
}
return R.ok(tEmpEducationService.list( Wrappers.query(searchVo)));
} }
/** /**
......
...@@ -23,7 +23,6 @@ import com.alibaba.excel.read.listener.ReadListener; ...@@ -23,7 +23,6 @@ import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder; import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils; import com.alibaba.excel.util.ListUtils;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpFamilyService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpFamilyService;
...@@ -70,9 +69,8 @@ public class TEmpFamilyController { ...@@ -70,9 +69,8 @@ public class TEmpFamilyController {
*/ */
@Operation(description = "分页查询") @Operation(description = "分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
public R<IPage<TEmpFamily>> getTEmpFamilyPage(Page page, TEmpFamily tEmpFamily) { public R<IPage<TEmpFamily>> getTEmpFamilyPage(Page page, FamilySearchVO tEmpFamily) {
//Object codeObj = redisTemplate.opsForValue().get("family_relation"); return R.ok(tEmpFamilyService.pageDiy(page,tEmpFamily));
return R.ok(tEmpFamilyService.page(page, Wrappers.query(tEmpFamily)));
} }
/** /**
* 不分页查询 * 不分页查询
...@@ -82,14 +80,7 @@ public class TEmpFamilyController { ...@@ -82,14 +80,7 @@ public class TEmpFamilyController {
@Operation(description = "不分页查询") @Operation(description = "不分页查询")
@GetMapping("/noPage" ) @GetMapping("/noPage" )
public R<List<TEmpFamily>> getTEmpFamilyNoPage(FamilySearchVO family) { public R<List<TEmpFamily>> getTEmpFamilyNoPage(FamilySearchVO family) {
List<String> idList = null; return R.ok(tEmpFamilyService.getTEmpFamilyNoPage(family));
if (Common.isNotNull(family.getIds())){
idList = Common.initStrToList(family.getIds(),CommonConstants.COMMA_STRING);
}
if (Common.isNotNull(idList)){
return R.ok(tEmpFamilyService.list( Wrappers.<TEmpFamily>query(family).lambda().in(TEmpFamily::getId,idList)));
}
return R.ok(tEmpFamilyService.list( Wrappers.query(family)));
} }
/** /**
...@@ -163,10 +154,7 @@ public class TEmpFamilyController { ...@@ -163,10 +154,7 @@ public class TEmpFamilyController {
@DeleteMapping("/removeByIds" ) @DeleteMapping("/removeByIds" )
@PreAuthorize("@pms.hasPermission('archives-family-batch-delete')" ) @PreAuthorize("@pms.hasPermission('archives-family-batch-delete')" )
public R<Boolean> removeByIds(String ids) { public R<Boolean> removeByIds(String ids) {
List<String> idList = null; List<String> idList = Common.getList(ids);
if (Common.isNotNull(ids)){
idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
}
return tEmpFamilyService.removeByIdsDiy(idList); return tEmpFamilyService.removeByIdsDiy(idList);
} }
...@@ -234,8 +222,6 @@ public class TEmpFamilyController { ...@@ -234,8 +222,6 @@ public class TEmpFamilyController {
cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT); cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
} }
} }
@Override @Override
public void doAfterAllAnalysed(AnalysisContext context) { public void doAfterAllAnalysed(AnalysisContext context) {
saveData(); saveData();
......
...@@ -23,13 +23,11 @@ import com.alibaba.excel.read.listener.ReadListener; ...@@ -23,13 +23,11 @@ import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder; import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils; import com.alibaba.excel.util.ListUtils;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpProfessionalQualificationService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpProfessionalQualificationService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.CertifySearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.CertifySearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpCertificateExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpCertificateExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
...@@ -66,13 +64,13 @@ public class TEmpProfessionalQualificationController { ...@@ -66,13 +64,13 @@ public class TEmpProfessionalQualificationController {
/** /**
* 分页查询 * 分页查询
* @param page 分页对象 * @param page 分页对象
* @param tEmpProfessionalQualification 员工职业资格信息表 * @param searchVo 员工职业资格信息表
* @return * @return
*/ */
@Operation(description = "分页查询") @Operation(description = "分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
public R<IPage<TEmpProfessionalQualification>> getTEmpProfessionalQualificationPage(Page page, TEmpProfessionalQualification tEmpProfessionalQualification) { public R<IPage<TEmpProfessionalQualification>> getTEmpProfessionalQualificationPage(Page page, CertifySearchVo searchVo) {
return R.ok(qualificationService.page(page, Wrappers.query(tEmpProfessionalQualification))); return R.ok(qualificationService.pageDiy(page, searchVo));
} }
/** /**
* 不分页查询 * 不分页查询
...@@ -82,16 +80,7 @@ public class TEmpProfessionalQualificationController { ...@@ -82,16 +80,7 @@ public class TEmpProfessionalQualificationController {
@Operation(description = "不分页查询") @Operation(description = "不分页查询")
@GetMapping("/noPage" ) @GetMapping("/noPage" )
public R<List<TEmpProfessionalQualification>> getTEmpProfessionalQualificationNoPage(CertifySearchVo searchVo) { public R<List<TEmpProfessionalQualification>> getTEmpProfessionalQualificationNoPage(CertifySearchVo searchVo) {
return R.ok(qualificationService.getDataNoPage(searchVo));
List<String> idList = null;
if (Common.isNotNull(searchVo.getIds())){
idList = Common.initStrToList(searchVo.getIds(), CommonConstants.COMMA_STRING);
}
if (Common.isNotNull(idList)){
return R.ok(qualificationService.list( Wrappers.<TEmpProfessionalQualification>query(searchVo)
.lambda().in(TEmpProfessionalQualification::getId,idList)));
}
return R.ok(qualificationService.list(Wrappers.query(searchVo)));
} }
/** /**
...@@ -155,10 +144,7 @@ public class TEmpProfessionalQualificationController { ...@@ -155,10 +144,7 @@ public class TEmpProfessionalQualificationController {
@DeleteMapping("/removeByIds" ) @DeleteMapping("/removeByIds" )
@PreAuthorize("@pms.hasPermission('archives_tempprofessionalqualification_del_batch')" ) @PreAuthorize("@pms.hasPermission('archives_tempprofessionalqualification_del_batch')" )
public R removeByIds(@RequestParam String ids) { public R removeByIds(@RequestParam String ids) {
List<String> idList = null; List<String> idList = Common.getList(ids);
if (Common.isNotNull(ids)){
idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
}
return R.ok(qualificationService.removeByIds(idList)); return R.ok(qualificationService.removeByIds(idList));
} }
/** /**
......
...@@ -23,7 +23,6 @@ import com.alibaba.excel.read.listener.ReadListener; ...@@ -23,7 +23,6 @@ import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder; import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils; import com.alibaba.excel.util.ListUtils;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpWorkRecordingService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpWorkRecordingService;
...@@ -70,8 +69,8 @@ public class TEmpWorkRecordingController { ...@@ -70,8 +69,8 @@ public class TEmpWorkRecordingController {
*/ */
@Operation(summary = "分页查询", description = "分页查询") @Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
public R<IPage<TEmpWorkRecording>> getTEmpWorkRecordingPage(Page page, TEmpWorkRecording tEmpWorkRecording) { public R<IPage<TEmpWorkRecording>> getTEmpWorkRecordingPage(Page page, WorkRecordSearchVO tEmpWorkRecording) {
return R.ok(tEmpWorkRecordingService.page(page, Wrappers.query(tEmpWorkRecording))); return R.ok(tEmpWorkRecordingService.pageDiy(page, tEmpWorkRecording));
} }
/** /**
...@@ -82,15 +81,7 @@ public class TEmpWorkRecordingController { ...@@ -82,15 +81,7 @@ public class TEmpWorkRecordingController {
@Operation(description = "不分页查询") @Operation(description = "不分页查询")
@GetMapping("/noPage" ) @GetMapping("/noPage" )
public R<List<TEmpWorkRecording>> getTEmpWorkRecordingNoPage(WorkRecordSearchVO searchVo) { public R<List<TEmpWorkRecording>> getTEmpWorkRecordingNoPage(WorkRecordSearchVO searchVo) {
List<String> idList = null; return R.ok(tEmpWorkRecordingService.getTEmpWorkRecordingNoPage(searchVo));
if (Common.isNotNull(searchVo.getIds())){
idList = Common.initStrToList(searchVo.getIds(),CommonConstants.COMMA_STRING);
}
if (Common.isNotNull(idList)){
return R.ok(tEmpWorkRecordingService.list( Wrappers.<TEmpWorkRecording>query(searchVo)
.lambda().in(TEmpWorkRecording::getId,idList)));
}
return R.ok(tEmpWorkRecordingService.list(Wrappers.query(searchVo)));
} }
/** /**
* 通过id查询员工工作履历信息表 * 通过id查询员工工作履历信息表
...@@ -153,10 +144,7 @@ public class TEmpWorkRecordingController { ...@@ -153,10 +144,7 @@ public class TEmpWorkRecordingController {
@DeleteMapping("/removeByIds" ) @DeleteMapping("/removeByIds" )
@PreAuthorize("@pms.hasPermission('archives_tempworkrecording_del_batch')" ) @PreAuthorize("@pms.hasPermission('archives_tempworkrecording_del_batch')" )
public R<Boolean> removeByIds(String ids) { public R<Boolean> removeByIds(String ids) {
List<String> idList = null; List<String> idList = Common.getList(ids);
if (Common.isNotNull(ids)){
idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
}
return R.ok(tEmpWorkRecordingService.removeByIds(idList)); return R.ok(tEmpWorkRecordingService.removeByIds(idList));
} }
......
...@@ -21,11 +21,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,11 +21,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel; import com.pig4cloud.plugin.excel.annotation.RequestExcel;
import com.pig4cloud.plugin.excel.vo.ErrorMessage; import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDataAuth; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDataAuth;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...@@ -33,7 +31,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; ...@@ -33,7 +31,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
......
...@@ -21,7 +21,6 @@ import com.alibaba.fastjson.JSONObject; ...@@ -21,7 +21,6 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel; import com.pig4cloud.plugin.excel.annotation.RequestExcel;
import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
import com.pig4cloud.plugin.excel.vo.ErrorMessage; import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
......
...@@ -17,8 +17,11 @@ ...@@ -17,8 +17,11 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.DisabilitySearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDisabilityExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDisabilityExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -36,4 +39,8 @@ public interface TEmpDisabilityInfoService extends IService<TEmpDisabilityInfo> ...@@ -36,4 +39,8 @@ public interface TEmpDisabilityInfoService extends IService<TEmpDisabilityInfo>
void importTmpDisability(List<EmpDisabilityExcelVO> excelVOList, List<ErrorMessage> errorMessages); void importTmpDisability(List<EmpDisabilityExcelVO> excelVOList, List<ErrorMessage> errorMessages);
R<Boolean> saveDiy(TEmpDisabilityInfo tEmpDisabilityInfo); R<Boolean> saveDiy(TEmpDisabilityInfo tEmpDisabilityInfo);
IPage<TEmpDisabilityInfo> pageDiy(Page page, DisabilitySearchVo searchVo);
List<TEmpDisabilityInfo> getTEmpDisabilityInfoNoPage(DisabilitySearchVo searchVo);
} }
...@@ -17,8 +17,11 @@ ...@@ -17,8 +17,11 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EducationSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateExcelVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateExcelVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
...@@ -43,4 +46,8 @@ public interface TEmpEducationService extends IService<TEmpEducation> { ...@@ -43,4 +46,8 @@ public interface TEmpEducationService extends IService<TEmpEducation> {
void importEmpEducationUpdate(List<EmpEducationUpdateExcelVo> excelVOList, List<ErrorMessage> errorMessageList); void importEmpEducationUpdate(List<EmpEducationUpdateExcelVo> excelVOList, List<ErrorMessage> errorMessageList);
R<Boolean> insertEducationOfEmp(TEmpEducation education); R<Boolean> insertEducationOfEmp(TEmpEducation education);
IPage<TEmpEducation> pageDiy(Page page, EducationSearchVo tEmpEducation);
List<TEmpEducation> getTEmpEducationNoPage(EducationSearchVo searchVo);
} }
...@@ -17,9 +17,12 @@ ...@@ -17,9 +17,12 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.FamilySearchVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -38,4 +41,8 @@ public interface TEmpFamilyService extends IService<TEmpFamily> { ...@@ -38,4 +41,8 @@ public interface TEmpFamilyService extends IService<TEmpFamily> {
String checkRepeat(String empIdcard, String familyName, String updateId); String checkRepeat(String empIdcard, String familyName, String updateId);
R<Boolean> removeByIdsDiy(List<String> idList); R<Boolean> removeByIdsDiy(List<String> idList);
IPage<TEmpFamily> pageDiy(Page page, FamilySearchVO tEmpFamily);
List<TEmpFamily> getTEmpFamilyNoPage(FamilySearchVO family);
} }
...@@ -17,12 +17,14 @@ ...@@ -17,12 +17,14 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification;
import com.yifu.cloud.plus.v1.yifu.archives.vo.CertifySearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpCertificateExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpCertificateExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.validation.BindingResult;
import java.util.List; import java.util.List;
...@@ -37,4 +39,8 @@ public interface TEmpProfessionalQualificationService extends IService<TEmpProfe ...@@ -37,4 +39,8 @@ public interface TEmpProfessionalQualificationService extends IService<TEmpProfe
R<Boolean> saveDiy(TEmpProfessionalQualification tEmpProfessionalQualification); R<Boolean> saveDiy(TEmpProfessionalQualification tEmpProfessionalQualification);
void importEmpCertificate(List<EmpCertificateExcelVO> excelVOList, List<ErrorMessage> errorMessageList); void importEmpCertificate(List<EmpCertificateExcelVO> excelVOList, List<ErrorMessage> errorMessageList);
List<TEmpProfessionalQualification> getDataNoPage(CertifySearchVo searchVo);
IPage<TEmpProfessionalQualification> pageDiy(Page page, CertifySearchVo searchVo);
} }
...@@ -17,9 +17,12 @@ ...@@ -17,9 +17,12 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpWorkRecordExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpWorkRecordExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.WorkRecordSearchVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -38,4 +41,8 @@ public interface TEmpWorkRecordingService extends IService<TEmpWorkRecording> { ...@@ -38,4 +41,8 @@ public interface TEmpWorkRecordingService extends IService<TEmpWorkRecording> {
R<Boolean> updateByIdDiy(TEmpWorkRecording tEmpWorkRecording); R<Boolean> updateByIdDiy(TEmpWorkRecording tEmpWorkRecording);
R<Boolean> saveDiy(TEmpWorkRecording tEmpWorkRecording); R<Boolean> saveDiy(TEmpWorkRecording tEmpWorkRecording);
IPage<TEmpWorkRecording> pageDiy(Page page, WorkRecordSearchVO tEmpWorkRecording);
List<TEmpWorkRecording> getTEmpWorkRecordingNoPage(WorkRecordSearchVO searchVo);
} }
...@@ -17,7 +17,11 @@ ...@@ -17,7 +17,11 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
...@@ -25,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper; ...@@ -25,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpDisabilityInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpDisabilityInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpDisabilityInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpDisabilityInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.DisabilitySearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDisabilityExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDisabilityExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
...@@ -32,10 +37,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; ...@@ -32,10 +37,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils; import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.List;
/** /**
* 员工伤残信息表 * 员工伤残信息表
...@@ -124,6 +130,43 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf ...@@ -124,6 +130,43 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
} }
} }
@Override
public IPage<TEmpDisabilityInfo> pageDiy(Page page, DisabilitySearchVo searchVo) {
LambdaQueryWrapper<TEmpDisabilityInfo> wrapper = buildQueryWrapper(searchVo);
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectPage(page,wrapper);
}
@Override
public List<TEmpDisabilityInfo> getTEmpDisabilityInfoNoPage(DisabilitySearchVo searchVo) {
LambdaQueryWrapper<TEmpDisabilityInfo> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TEmpDisabilityInfo::getId,idList);
}
return baseMapper.selectList(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(DisabilitySearchVo entity){
LambdaQueryWrapper<TEmpDisabilityInfo> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TEmpDisabilityInfo::getDeleteFlag,CommonConstants.ZERO_STRING);
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TEmpDisabilityInfo::getCreateTime, entity.getCreateTimes()[0])
.le(TEmpDisabilityInfo::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getEmpName())){
wrapper.likeRight(TEmpDisabilityInfo::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())){
wrapper.likeRight(TEmpDisabilityInfo::getEmpIdcard,entity.getEmpIdcard());
}
if (Common.isNotNull(entity.getCreateName())){
wrapper.eq(TEmpDisabilityInfo::getCreateName,entity.getCreateName());
}
return wrapper;
}
/** /**
* 插入excel * 插入excel
*/ */
......
...@@ -17,32 +17,34 @@ ...@@ -17,32 +17,34 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpEducationMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpEducationMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EducationSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateExcelVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateExcelVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils; import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.BindingResult;
import java.util.*; import java.util.List;
/** /**
* 员工学历信息表 * 员工学历信息表
...@@ -259,4 +261,39 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T ...@@ -259,4 +261,39 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
return R.ok(); return R.ok();
} }
@Override
public IPage<TEmpEducation> pageDiy(Page page, EducationSearchVo tEmpEducation) {
LambdaQueryWrapper<TEmpEducation> wrapper = buildQueryWrapper(tEmpEducation);
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectPage(page,wrapper);
}
@Override
public List<TEmpEducation> getTEmpEducationNoPage(EducationSearchVo searchVo) {
LambdaQueryWrapper<TEmpEducation> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TEmpEducation::getId,idList);
}
return baseMapper.selectList(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(EducationSearchVo entity){
LambdaQueryWrapper<TEmpEducation> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TEmpEducation::getDeleteFlag,CommonConstants.ZERO_STRING);
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TEmpEducation::getCreateTime, entity.getCreateTimes()[0])
.le(TEmpEducation::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getEmpName())){
wrapper.likeRight(TEmpEducation::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())){
wrapper.likeRight(TEmpEducation::getEmpIdcard,entity.getEmpIdcard());
}
if (Common.isNotNull(entity.getCreateName())){
wrapper.eq(TEmpEducation::getCreateName,entity.getCreateName());
}
return wrapper;
}
} }
...@@ -17,11 +17,14 @@ ...@@ -17,11 +17,14 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
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.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
...@@ -29,17 +32,19 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpFamilyMapper; ...@@ -29,17 +32,19 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpFamilyMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpFamilyService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpFamilyService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.FamilySearchVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils; import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.List;
/** /**
* 员工家庭信息表 * 员工家庭信息表
...@@ -139,6 +144,43 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam ...@@ -139,6 +144,43 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
return R.ok(this.update(updateWrapper)); return R.ok(this.update(updateWrapper));
} }
@Override
public IPage<TEmpFamily> pageDiy(Page page, FamilySearchVO tEmpFamily) {
LambdaQueryWrapper<TEmpFamily> wrapper = buildQueryWrapper(tEmpFamily);
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectPage(page,wrapper);
}
@Override
public List<TEmpFamily> getTEmpFamilyNoPage(FamilySearchVO family) {
LambdaQueryWrapper<TEmpFamily> wrapper = buildQueryWrapper(family);
List<String> idList = Common.getList(family.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TEmpFamily::getId,idList);
}
return baseMapper.selectList(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(FamilySearchVO entity){
LambdaQueryWrapper<TEmpFamily> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TEmpFamily::getDeleteFlag,CommonConstants.ZERO_STRING);
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TEmpFamily::getCreateTime, entity.getCreateTimes()[0])
.le(TEmpFamily::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getEmpName())){
wrapper.likeRight(TEmpFamily::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())){
wrapper.likeRight(TEmpFamily::getEmpIdcard,entity.getEmpIdcard());
}
if (Common.isNotNull(entity.getCreateName())){
wrapper.eq(TEmpFamily::getCreateName,entity.getCreateName());
}
return wrapper;
}
/** /**
* 插入excel family * 插入excel family
*/ */
......
...@@ -17,7 +17,11 @@ ...@@ -17,7 +17,11 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
...@@ -25,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper; ...@@ -25,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpProfessionalQualificationMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpProfessionalQualificationMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpProfessionalQualificationService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpProfessionalQualificationService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.CertifySearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpCertificateExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpCertificateExcelVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
...@@ -32,10 +37,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; ...@@ -32,10 +37,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils; import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.List;
/** /**
* 员工职业资格信息表 * 员工职业资格信息表
...@@ -99,6 +105,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr ...@@ -99,6 +105,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS));
} }
} }
/** /**
* 插入excel * 插入excel
*/ */
...@@ -128,5 +135,39 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr ...@@ -128,5 +135,39 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
} }
return null; return null;
} }
@Override
public List<TEmpProfessionalQualification> getDataNoPage(CertifySearchVo searchVo) {
LambdaQueryWrapper<TEmpProfessionalQualification> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TEmpProfessionalQualification::getId,idList);
}
return baseMapper.selectList(wrapper);
}
@Override
public IPage<TEmpProfessionalQualification> pageDiy(Page page, CertifySearchVo searchVo) {
LambdaQueryWrapper<TEmpProfessionalQualification> wrapper = buildQueryWrapper(searchVo);
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectPage(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(CertifySearchVo entity){
LambdaQueryWrapper<TEmpProfessionalQualification> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TEmpProfessionalQualification::getDeleteFlag,CommonConstants.ZERO_STRING);
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TEmpProfessionalQualification::getCreateTime, entity.getCreateTimes()[0])
.le(TEmpProfessionalQualification::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getEmpName())){
wrapper.likeRight(TEmpProfessionalQualification::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())){
wrapper.likeRight(TEmpProfessionalQualification::getEmpIdcard,entity.getEmpIdcard());
}
if (Common.isNotNull(entity.getCreateName())){
wrapper.eq(TEmpProfessionalQualification::getCreateName,entity.getCreateName());
}
return wrapper;
}
} }
...@@ -17,10 +17,12 @@ ...@@ -17,10 +17,12 @@
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil;
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.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
...@@ -29,12 +31,14 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpWorkRecordingMapper; ...@@ -29,12 +31,14 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpWorkRecordingMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpWorkRecordingService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpWorkRecordingService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpWorkRecordExcelVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpWorkRecordExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.WorkRecordSearchVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils; import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -163,4 +167,42 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM ...@@ -163,4 +167,42 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
insert.setEmpId(emp.getId()); insert.setEmpId(emp.getId());
this.save(insert); this.save(insert);
} }
@Override
public IPage<TEmpWorkRecording> pageDiy(Page page, WorkRecordSearchVO tEmpWorkRecording) {
LambdaQueryWrapper<TEmpWorkRecording> wrapper = buildQueryWrapper(tEmpWorkRecording);
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectPage(page,wrapper);
}
@Override
public List<TEmpWorkRecording> getTEmpWorkRecordingNoPage(WorkRecordSearchVO searchVo) {
LambdaQueryWrapper<TEmpWorkRecording> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TEmpWorkRecording::getId,idList);
}
return baseMapper.selectList(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(WorkRecordSearchVO entity){
LambdaQueryWrapper<TEmpWorkRecording> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TEmpWorkRecording::getDeleteFlag,CommonConstants.ZERO_STRING);
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TEmpWorkRecording::getCreateTime, entity.getCreateTimes()[0])
.le(TEmpWorkRecording::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getEmpName())){
wrapper.likeRight(TEmpWorkRecording::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())){
wrapper.likeRight(TEmpWorkRecording::getEmpIdcard,entity.getEmpIdcard());
}
if (Common.isNotNull(entity.getCreateName())){
wrapper.eq(TEmpWorkRecording::getCreateName,entity.getCreateName());
}
return wrapper;
}
} }
...@@ -242,4 +242,6 @@ public interface CommonConstants { ...@@ -242,4 +242,6 @@ public interface CommonConstants {
int EIGHT_INT = 8; int EIGHT_INT = 8;
int BATCH_COUNT = 100; int BATCH_COUNT = 100;
String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式"; String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式";
String CREATE_TIME = "create_time";
String ID = "ID";
} }
...@@ -158,4 +158,12 @@ public class Common { ...@@ -158,4 +158,12 @@ public class Common {
public static <T> boolean isNotNull(Collection<T> obj) { public static <T> boolean isNotNull(Collection<T> obj) {
return null != obj && obj.size() > 0; return null != obj && obj.size() > 0;
} }
public static List<String> getList(String ids) {
List<String> idList = null;
if (Common.isNotNull(ids)){
idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
}
return idList;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment