Commit 965753df authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents c5bd567f 1dc387ec
......@@ -31,11 +31,6 @@
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-mybatis</artifactId>
</dependency>
<!-- excel 导入导出 https://github.com/pig-mesh/excel-spring-boot-starter -->
<dependency>
<groupId>com.pig4cloud.excel</groupId>
<artifactId>excel-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
......
......@@ -8,6 +8,8 @@ package com.yifu.cloud.plus.v1.yifu.archives.constants;
*/
public class ArchivesConstants {
public static final String EMP_BAD_RECORD="不良记录";
/**
* 复档
*/
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 员工合同续签待办
*
* @author fxj
* @date 2022-07-01 14:15:05
*/
@Data
@TableName("t_emp_contract_alert")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "员工合同续签待办")
public class TEmpContractAlert extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelAttribute(name = "主键" )
@Schema(description ="主键")
@ExcelIgnore
private String id;
/**
* 员工名称
*/
@ExcelAttribute(name = "员工名称" )
@Schema(description ="员工名称")
@ExcelProperty("员工名称")
private String empName;
/**
* 员工ID
*/
@ExcelAttribute(name = "员工ID" )
@Schema(description ="员工ID")
@ExcelProperty("员工ID")
private String empId;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称" )
@Schema(description ="项目名称")
@ExcelProperty("项目名称")
private String project;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码" )
@Schema(description ="项目编码")
@ExcelProperty("项目编码")
private String projectNo;
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号" )
@Schema(description ="身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 员工编码
*/
@ExcelAttribute(name = "员工编码" )
@Schema(description ="员工编码")
@ExcelProperty("员工编码")
private String empCode;
/**
* 合同开始日期
*/
@ExcelAttribute(name = "合同开始日期" )
@Schema(description ="合同开始日期")
@ExcelProperty("合同开始日期")
private Date contractStart;
/**
* 合同截止日期
*/
@ExcelAttribute(name = "合同截止日期" )
@Schema(description ="合同截止日期")
@ExcelProperty("合同截止日期")
private Date contractEnd;
/**
* 档案地-省
*/
@ExcelAttribute(name = "档案地-省" )
@Schema(description ="档案地-省")
@ExcelProperty("档案地-省")
private String fileProvince;
/**
* 档案地-市
*/
@ExcelAttribute(name = "档案地-市" )
@Schema(description ="档案地-市")
@ExcelProperty("档案地-市")
private String fileCity;
/**
* 档案地-县
*/
@ExcelAttribute(name = "档案地-县" )
@Schema(description ="档案地-县")
@ExcelProperty("档案地-县")
private String fileTown;
/**
* 员工类型
*/
@ExcelAttribute(name = "员工类型" )
@Schema(description ="员工类型")
@ExcelProperty("员工类型")
private String empType;
/**
* 合同类型
*/
@ExcelAttribute(name = "合同类型" )
@Schema(description ="合同类型")
@ExcelProperty("合同类型")
private String contractType;
/**
* 合同期限
*/
@ExcelAttribute(name = "合同期限" )
@Schema(description ="合同期限")
@ExcelProperty("合同期限")
private String contractTerm;
/**
* 到期天数
*/
@ExcelAttribute(name = "到期天数" )
@Schema(description ="到期天数")
@ExcelProperty("到期天数")
private Integer daysDue;
/**
* 是否过期:0 未过期 1 过期
*/
@ExcelAttribute(name = "是否过期:0 未过期 1 过期" )
@Schema(description ="是否过期:0 未过期 1 过期")
@ExcelProperty("是否过期:0 未过期 1 过期")
private String dueFlag;
/**
* 过期天数
*/
@ExcelAttribute(name = "过期天数" )
@Schema(description ="过期天数")
@ExcelProperty("过期天数")
private Integer daysOver;
/**
* 首次提醒时间
*/
@ExcelAttribute(name = "首次提醒时间" )
@Schema(description ="首次提醒时间")
@ExcelProperty("首次提醒时间")
private Date firstAlertTime;
/**
* 提醒人
*/
@ExcelAttribute(name = "提醒人" )
@Schema(description ="提醒人")
@ExcelProperty("提醒人")
private String alertPerson;
/**
* 处理状态
*/
@ExcelAttribute(name = "处理状态" )
@Schema(description ="处理状态")
@ExcelProperty("处理状态")
private String handleStatus;
}
......@@ -16,10 +16,7 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -85,6 +82,7 @@ public class TEmpFamily extends BaseEntity {
/**
* 出生日期
*/
@TableField(value = "birthday", updateStrategy = FieldStrategy.IGNORED)
@Schema(description ="出生日期")
private LocalDateTime birthday;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author fxj
* @Date 2022/7/1
* @Description
* @Version 1.0
*/
@Data
public class ContractAlertExportVo implements Serializable {
/**
* 员工名称
*/
@ExcelAttribute(name = "员工名称" )
@Schema(description ="员工名称")
@ExcelProperty("员工名称")
private String empName;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称" )
@Schema(description ="项目名称")
@ExcelProperty("项目名称")
private String project;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码" )
@Schema(description ="项目编码")
@ExcelProperty("项目编码")
private String projectNo;
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号" )
@Schema(description ="身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 员工编码
*/
@ExcelAttribute(name = "员工编码" )
@Schema(description ="员工编码")
@ExcelProperty("员工编码")
private String empCode;
/**
* 合同开始日期
*/
@ExcelAttribute(name = "合同开始日期",isDate = true )
@Schema(description ="合同开始日期")
@ExcelProperty("合同开始日期")
private Date contractStart;
/**
* 合同截止日期
*/
@ExcelAttribute(name = "合同截止日期" ,isDate = true)
@Schema(description ="合同截止日期")
@ExcelProperty("合同截止日期")
private Date contractEnd;
/**
* 档案地-省
*/
@ExcelAttribute(name = "档案地-省" ,isArea = true)
@Schema(description ="档案地-省")
@ExcelProperty("档案地-省")
private String fileProvince;
/**
* 档案地-市
*/
@ExcelAttribute(name = "档案地-市" ,isArea = true,parentField = "fileProvince")
@Schema(description ="档案地-市")
@ExcelProperty("档案地-市")
private String fileCity;
/**
* 档案地-县
*/
@ExcelAttribute(name = "档案地-县" ,isArea = true,parentField = "fileCity")
@Schema(description ="档案地-县")
@ExcelProperty("档案地-县")
private String fileTown;
/**
* 员工类型
*/
@ExcelAttribute(name = "员工类型" ,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description ="员工类型")
@ExcelProperty("员工类型")
private String empType;
/**
* 合同类型
*/
@ExcelAttribute(name = "合同类型", isDataId = true,dataType = ExcelAttributeConstants.EMPLOYEE_CONTRACT_TYPE)
@Schema(description ="合同类型")
@ExcelProperty("合同类型")
private String contractType;
/**
* 合同期限
*/
@ExcelAttribute(name = "合同期限" )
@Schema(description ="合同期限")
@ExcelProperty("合同期限")
private String contractTerm;
/**
* 到期天数
*/
@ExcelAttribute(name = "到期天数" )
@Schema(description ="到期天数")
@ExcelProperty("到期天数")
private Integer daysDue;
/**
* 是否过期:0 未过期 1 过期
*/
@ExcelAttribute(name = "是否过期",readConverterExp = "0=未过期,1=过期")
@Schema(description ="是否过期:0 未过期 1 过期")
@ExcelProperty("是否过期")
private String dueFlag;
/**
* 过期天数
*/
@ExcelAttribute(name = "过期天数" )
@Schema(description ="过期天数")
@ExcelProperty("过期天数")
private Integer daysOver;
/**
* 首次提醒时间
*/
@ExcelAttribute(name = "首次提醒时间" )
@Schema(description ="首次提醒时间")
@ExcelProperty("首次提醒时间")
private Date firstAlertTime;
/**
* 提醒人
*/
@ExcelAttribute(name = "提醒人" )
@Schema(description ="提醒人")
@ExcelProperty("提醒人")
private String alertPerson;
/**
* 处理状态
*/
@ExcelAttribute(name = "处理状态", readConverterExp = "0=待处理,1=处理中")
@Schema(description ="处理状态")
@ExcelProperty("处理状态")
private String handleStatus;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Date 2022/7/1
* @Description
* @Version 1.0
*/
@Data
public class ContractAlertSearchVo extends TEmpContractAlert {
/**
* 导出IDS
*/
@Schema(description = "导出IDS")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
private int limitEnd;
}
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
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.ExcelAttributeConstants;
import lombok.Data;
import javax.validation.constraints.NotNull;
......@@ -37,7 +38,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/**
* 资格类型
*/
@ExcelAttribute(name = "资格类型",isNotEmpty = true,errorInfo = "资格类型不可为空",isDataId = true, dataType = "qualification_type")
@ExcelAttribute(name = "资格类型",isNotEmpty = true,errorInfo = "资格类型不可为空",isDataId = true, dataType = ExcelAttributeConstants.QUALIFICATION_TYPE)
@NotNull(message = "资格类型不可为空")
@ExcelProperty(value ="资格类型")
private String qualificationType;
......@@ -45,7 +46,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/**
* 资格等级
*/
@ExcelAttribute(name = "资格等级",isNotEmpty = true,errorInfo = "资格等级不可为空",isDataId = true, dataType = "qualification_level")
@ExcelAttribute(name = "资格等级",isNotEmpty = true,errorInfo = "资格等级不可为空",isDataId = true, dataType = ExcelAttributeConstants.QUALIFICATION_LEVEL)
@NotNull(message = "资格等级不可为空")
@ExcelProperty(value ="资格等级")
private String qualificationLevel;
......@@ -60,7 +61,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/**
* 获取方式
*/
@ExcelAttribute(name = "获取方式",isDataId = true, dataType = "obtain_type")
@ExcelAttribute(name = "获取方式",isDataId = true, dataType = ExcelAttributeConstants.OBTAIN_TYPE)
@ExcelProperty(value ="获取方式")
private String obtainType;
......
......@@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
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.ExcelAttributeConstants;
import lombok.Data;
import javax.validation.constraints.NotNull;
......@@ -57,7 +58,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
/**
* 伤残等级
*/
@ExcelAttribute(name = "伤残等级",isNotEmpty = true, errorInfo = "伤残等级不能为空",isDataId = true, dataType = "disability_grade")
@ExcelAttribute(name = "伤残等级",isNotEmpty = true, errorInfo = "伤残等级不能为空",isDataId = true, dataType = ExcelAttributeConstants.DISABILITY_GRADE)
@NotNull(message = "伤残等级不能为空")
@ExcelProperty(value ="伤残等级")
private String disabilityLevel;
......
......@@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
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.ExcelAttributeConstants;
import lombok.Data;
import javax.validation.constraints.NotNull;
......@@ -64,7 +65,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/**
* 学历名称
*/
@ExcelAttribute(name = "学历",isNotEmpty = true, errorInfo = "学历不可为空",isDataId = true,dataType = "education")
@ExcelAttribute(name = "学历",isNotEmpty = true, errorInfo = "学历不可为空",isDataId = true,dataType = ExcelAttributeConstants.EDUCATION)
@NotNull(message = "学历不可为空")
@ExcelProperty(value ="学历")
private String educationName;
......@@ -72,7 +73,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/**
* 学历类型:全日制、自考、函授等
*/
@ExcelAttribute(name = "学历类型",isDataId = true,dataType = "education_type")
@ExcelAttribute(name = "学历类型",isDataId = true,dataType = ExcelAttributeConstants.EDUCATION_TYPE)
@ExcelProperty(value ="学历类型")
private String type;
......@@ -87,7 +88,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/**
* 学制类型:四年、三年、五年、二年
*/
@ExcelAttribute(name = "学制类型",isDataId = true,dataType = "education_system")
@ExcelAttribute(name = "学制类型",isDataId = true,dataType = ExcelAttributeConstants.EDUCATION_SYSTEM)
@ExcelProperty(value ="学制类型")
private String educationSystem;
......
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import lombok.Data;
import javax.validation.constraints.NotNull;
......@@ -52,7 +53,7 @@ public class EmpEducationUpdateExcelVo extends RowIndex{
/**
* 学历名称
*/
@ExcelAttribute(name = "学历", isNotEmpty = true,errorInfo = "学历不可为空", isDataId = true, dataType = "education")
@ExcelAttribute(name = "学历", isNotEmpty = true,errorInfo = "学历不可为空", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION)
@NotNull(message = "学历不可为空")
@ExcelProperty(value ="学历")
private String educationName;
......@@ -60,7 +61,7 @@ public class EmpEducationUpdateExcelVo extends RowIndex{
/**
* 学历类型:全日制、自考、函授等
*/
@ExcelAttribute(name = "学历类型", isDataId = true, dataType = "education_type")
@ExcelAttribute(name = "学历类型", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION_TYPE)
@ExcelProperty(value ="学历类型")
private String type;
......@@ -75,7 +76,7 @@ public class EmpEducationUpdateExcelVo extends RowIndex{
/**
* 学制类型:四年、三年、五年、二年
*/
@ExcelAttribute(name = "学制类型", isDataId = true, dataType = "education_system")
@ExcelAttribute(name = "学制类型", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION_SYSTEM)
@ExcelProperty(value ="学制类型")
private String educationSystem;
......
......@@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
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.ExcelAttributeConstants;
import lombok.Data;
import javax.validation.constraints.NotNull;
......@@ -48,7 +49,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable {
/**
* 与本人关系
*/
@ExcelAttribute(name = "与本人关系",isNotEmpty = true,isDataId = true,dataType = "family_relation",errorInfo = "与本人关系不可为空")
@ExcelAttribute(name = "与本人关系",isNotEmpty = true,isDataId = true,dataType = ExcelAttributeConstants.FAMILY_RELATION,errorInfo = "与本人关系不可为空")
//@DictValidator(dictType = "family_relation",message = "与本人关系字典不匹配")
@NotNull(message = "与本人关系不可为空")
private String relationshipSelf;
......
......@@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
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.ExcelAttributeConstants;
import lombok.Data;
import javax.validation.constraints.NotNull;
......@@ -63,7 +64,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
/**
* 工作类型
*/
@ExcelAttribute(name = "工作类型",isDataId = true,dataType = "workinfo_type")
@ExcelAttribute(name = "工作类型",isDataId = true,dataType = ExcelAttributeConstants.WORKINFO_TYPE)
@ExcelProperty(value ="工作类型")
private String workingType;
......
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
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.ExcelAttributeConstants;
import lombok.Data;
import javax.validation.constraints.Past;
......@@ -42,7 +43,7 @@ public class EmployeeProjectExportVO{
* 档案员工类型(字典值,0外包1派遣2代理)
*/
@ExcelProperty(value ="档案员工类型")
@ExcelAttribute(name = "档案员工类型",isNotEmpty = true, errorInfo = "档案员工类型不可为空",isDataId = true,dataType = "emp_natrue")
@ExcelAttribute(name = "档案员工类型",isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
private String proEmpNatrue;
/**
......@@ -79,18 +80,21 @@ public class EmployeeProjectExportVO{
* 婚姻状况
*/
@ExcelProperty(value = "婚姻状况")
@ExcelAttribute(name = "婚姻状况", isDataId = true,dataType = ExcelAttributeConstants.EMP_MARRIED)
private String empMarriStatus;
/**
* 民族
*/
@ExcelProperty(value = "民族")
@ExcelAttribute(name = "民族", isDataId = true,dataType = ExcelAttributeConstants.EMP_NATIONAL)
private String empNational;
/**
* 政治面貌
*/
@ExcelProperty(value = "政治面貌")
@ExcelAttribute(name = "政治面貌", isDataId = true,dataType = ExcelAttributeConstants.EMP_POLITICAL)
private String politicalStatus;
/**
......@@ -108,6 +112,7 @@ public class EmployeeProjectExportVO{
/**
* 身份证-省
*/
@ExcelAttribute(name = "户籍所在省", isArea = true)
@ExcelProperty(value = "户籍所在省")
private String idProvince;
......@@ -115,48 +120,56 @@ public class EmployeeProjectExportVO{
* 身份证-市
*/
@ExcelProperty(value = "户籍所在市")
@ExcelAttribute(name = "户籍所在市", isArea = true, parentField = "idProvince")
private String idCity;
/**
* 身份证-县
*/
@ExcelProperty(value = "户籍所在县")
@ExcelAttribute(name = "户籍所在县", isArea = true, parentField = "idCity")
private String idTown;
/**
* 户口性质
*/
@ExcelProperty(value = "户口性质")
@ExcelAttribute(name = "户口性质", isDataId = true,dataType = ExcelAttributeConstants.EMP_REGISTYPE)
private String empRegisType;
/**
* 档案-省
*/
@ExcelProperty(value = "档案所在省")
@ExcelAttribute(name = "档案所在省", isArea = true)
private String fileProvince;
/**
* 档案-市
*/
@ExcelProperty(value = "档案所在市")
@ExcelAttribute(name = "档案所在市", isArea = true, parentField = "fileProvince")
private String fileCity;
/**
* 档案-县
*/
@ExcelProperty(value = "档案所在县")
@ExcelAttribute(name = "档案所在县", isArea = true, parentField = "fileCity")
private String fileTown;
/**
* 是否大专及以上(0否1是)
*/
@ExcelProperty(value = "是否大专及以上")
@ExcelAttribute(name = "是否大专及以上", readConverterExp = "0=否,1=是")
private String isCollege;
/**
* 最高学历(字典值)
*/
@ExcelProperty(value = "最高学历")
@ExcelAttribute(name = "最高学历", isDataId = true,dataType = ExcelAttributeConstants.EDUCATION)
private String hignEducation;
/**
......@@ -175,13 +188,13 @@ public class EmployeeProjectExportVO{
* 入学时间
*/
@ExcelProperty(value = "入学时间")
private LocalDate admissionDate;
private LocalDateTime admissionDate;
/**
* 毕业时间
*/
@ExcelProperty(value = "毕业时间")
private LocalDate gradutionDate;
private LocalDateTime gradutionDate;
/**
* 备注
......@@ -193,18 +206,21 @@ public class EmployeeProjectExportVO{
* 人员档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)
*/
@ExcelProperty(value = "人员档案来源")
@ExcelAttribute(name = "人员档案来源", readConverterExp = "1=社保公积金,2=薪酬,3=商险,4=人员档案新建")
private String fileSource;
/**
* 人员档案状态(0草稿、1已审核)
*/
@ExcelProperty(value = "人员档案状态")
@ExcelAttribute(name = "人员档案状态", readConverterExp = "0=草稿,1=已审核")
private Integer proStatus;
/**
* 档案状态(0正常;1已减档)
*/
@ExcelProperty(value = "档案状态")
@ExcelAttribute(name = "人员档案状态", readConverterExp = "0=正常,1=已减档")
private Integer fileStatus;
/**
......@@ -248,12 +264,14 @@ public class EmployeeProjectExportVO{
* 合同类型(字典值)
*/
@ExcelProperty(value ="合同类型")
@ExcelAttribute(name = "合同类型", isDataId = true,dataType = ExcelAttributeConstants.EMPLOYEE_CONTRACT_TYPE)
private String contractType;
/**
* 工时制
*/
@ExcelProperty(value ="工时制")
@ExcelAttribute(name = "工时制", isDataId = true,dataType = ExcelAttributeConstants.WORKING_HOURS)
private String workingHours;
/**
......@@ -279,6 +297,7 @@ public class EmployeeProjectExportVO{
* 项目员工类型
*/
@ExcelProperty(value ="项目员工类型")
@ExcelAttribute(name = "项目员工类型", isDataId = true,dataType = ExcelAttributeConstants.PERSONNEL_STATE)
private String empNatrue;
/**
......@@ -309,6 +328,7 @@ public class EmployeeProjectExportVO{
* 员工合同状态(字典)
*/
@ExcelProperty(value ="合同状态")
@ExcelAttribute(name = "合同状态", isDataId = true,dataType = ExcelAttributeConstants.PERSONNEL_STATE)
private Integer contractStatus;
/**
......@@ -333,30 +353,35 @@ public class EmployeeProjectExportVO{
* 商险状态(字典)
*/
@ExcelProperty(value ="商险状态")
@ExcelAttribute(name = "商险状态", isDataId = true,dataType = ExcelAttributeConstants.COMMERCIAL_SATTE)
private Integer insuranceStatus;
/**
* 社保状态(字典)
*/
@ExcelProperty(value ="社保状态")
@ExcelAttribute(name = "社保状态", isDataId = true,dataType = ExcelAttributeConstants.SOCIAL_ECURITY_STATE)
private Integer socialStatus;
/**
* 公积金状态(字典)
*/
@ExcelProperty(value ="公积金状态")
@ExcelAttribute(name = "公积金状态", isDataId = true,dataType = ExcelAttributeConstants.FUND_STATUS)
private Integer fundStatus;
/**
* 近3个月发薪(0否;1是)
*/
@ExcelProperty(value ="近3个月发薪")
@ExcelAttribute(name = "近3个月发薪", readConverterExp = "0=无,1=是,2=否")
private Integer salaryStatus;
/**
* 项目档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)
*/
@ExcelProperty(value ="项目档案来源")
@ExcelAttribute(name = "项目档案来源", readConverterExp = "1=社保/公积金,2=薪酬,3=商险,4=人员档案新建,5=项目档案新建")
private String projectSource;
/**
......
......@@ -17,14 +17,17 @@
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
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.ExcelAttributeConstants;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
* 项目档案表excel对应的实体
......@@ -34,7 +37,7 @@ import java.time.LocalDate;
*/
@Data
@ColumnWidth(30)
public class EmployeeProjectVO implements Serializable {
public class EmployeeProjectVO extends RowIndex implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -42,7 +45,7 @@ public class EmployeeProjectVO implements Serializable {
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotNull(message = "员工类型不能为空")
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 1)
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 2,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelProperty(value ="员工类型")
private String empNatrue;
......@@ -93,7 +96,7 @@ public class EmployeeProjectVO implements Serializable {
*/
@NotNull(message = "合同类型不能为空")
@ExcelProperty(value ="合同类型")
@ExcelAttribute(name = "合同类型",isNotEmpty = true, errorInfo = "项目编码不能为空",maxLength = 2)
@ExcelAttribute(name = "合同类型",isNotEmpty = true, errorInfo = "合同类型不能为空",maxLength = 10,isDataId = true,dataType = ExcelAttributeConstants.EMPLOYEE_CONTRACT_TYPE)
private String contractType;
/**
......@@ -101,7 +104,7 @@ public class EmployeeProjectVO implements Serializable {
*/
@NotNull(message = "工时制不能为空")
@ExcelProperty(value ="工时制")
@ExcelAttribute(name = "工时制",isNotEmpty = true, errorInfo = "工时制不能为空",maxLength = 1)
@ExcelAttribute(name = "工时制",isNotEmpty = true, errorInfo = "工时制不能为空",maxLength = 10,isDataId = true,dataType = ExcelAttributeConstants.WORKING_HOURS)
private String workingHours;
/**
......@@ -118,13 +121,15 @@ public class EmployeeProjectVO implements Serializable {
@ExcelProperty(value ="入职日期")
@NotNull(message = "入职日期不能为空")
@Past
private LocalDate enjoinDate;
@DateTimeFormat("yyyy-MM-dd")
private Date enjoinDate;
/**
* 试用期(单位月)
*/
@ExcelProperty(value ="试用期")
@NotNull(message = "试用期不能为空")
@ExcelAttribute(name = "试用期",isNotEmpty = true, errorInfo = "试用期不能为空",maxLength = 4)
private String tryPeriod;
}
......@@ -49,7 +49,7 @@ public class FileUploadController {
@Operation(description = "OSS文件上传接口" +
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 )\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同)\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
/*@ApiImplicitParams({
......
......@@ -54,7 +54,6 @@ public class TElecEmployeeInfoController {
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('archives_telecemployeeinfo_get')" )
public R getTElecEmployeeInfoPage(Page page, TElecEmployeeInfo tElecEmployeeInfo) {
return R.ok(tElecEmployeeInfoService.getTElecEmployeeInfoPage(page,tElecEmployeeInfo));
}
......@@ -67,7 +66,6 @@ public class TElecEmployeeInfoController {
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archives_telecemployeeinfo_get')" )
public R getById(@PathVariable("id" ) Long id) {
return R.ok(tElecEmployeeInfoService.getById(id));
}
......
......@@ -27,11 +27,9 @@ 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.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -90,21 +88,6 @@ public class TEmpBadRecordController {
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_tempbadrecord_get')" )
public R<TEmpBadRecord> getById(@PathVariable("id" ) String id) {
/* TEmpBadRecord record;
List<TEmpBadRecord> list = new ArrayList<>();
for (int i=200000;i<500000;i++){
record = new TEmpBadRecord();
record.setEmpId("1");
record.setEmpName("2");
record.setEmpIdcard("323333333333");
record.setHappenTime(new Date());
record.setLoseFee(BigDecimal.ONE);
record.setId(String.valueOf(i));
record.setProject("test");
record.setProjectCode("test");
list.add(record);
}
tEmpBadRecordService.saveBatch(list);*/
return R.ok(tEmpBadRecordService.getById(id));
}
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 员工合同续签待办
*
* @author fxj
* @date 2022-07-01 14:15:05
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tempcontractalert" )
@Tag(name = "员工合同续签待办管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TEmpContractAlertController {
private final TEmpContractAlertService tEmpContractAlertService;
/**
* 分页查询
* @param page 分页对象
* @param searchVo 员工合同续签待办
* @return
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" )
//@PreAuthorize("@pms.hasPermission('demo_tempcontractalert_get')" )
public R<IPage<TEmpContractAlert>> getTEmpContractAlertPage(Page page, ContractAlertSearchVo searchVo) {
return R.ok(tEmpContractAlertService.pageDiy(page, searchVo));
}
/**
* 不分页查询
* @param searchVo 员工合同续签待办
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tempcontractalert_get')" )
public R<List<TEmpContractAlert>> getTEmpContractAlertNoPage(@RequestBody ContractAlertSearchVo searchVo) {
return R.ok(tEmpContractAlertService.listDiy(searchVo));
}
/**
* 通过id查询员工合同续签待办
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_tempcontractalert_get')")
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_tempcontractalert_get')" )
public R<TEmpContractAlert> getById(@PathVariable("id" ) String id) {
return R.ok(tEmpContractAlertService.getById(id));
}
/**
* 新增员工合同续签待办
* @param tEmpContractAlert 员工合同续签待办
* @return R
*/
@Operation(summary = "新增员工合同续签待办", description = "新增员工合同续签待办:hasPermission('demo_tempcontractalert_add')")
@SysLog("新增员工合同续签待办" )
@PostMapping
@PreAuthorize("@pms.hasPermission('demo_tempcontractalert_add')" )
public R<Boolean> save(@RequestBody TEmpContractAlert tEmpContractAlert) {
return R.ok(tEmpContractAlertService.save(tEmpContractAlert));
}
/**
* 修改员工合同续签待办
* @param tEmpContractAlert 员工合同续签待办
* @return R
*/
@Operation(summary = "修改员工合同续签待办", description = "修改员工合同续签待办:hasPermission('demo_tempcontractalert_edit')")
@SysLog("修改员工合同续签待办" )
@PutMapping
@PreAuthorize("@pms.hasPermission('demo_tempcontractalert_edit')" )
public R<Boolean> updateById(@RequestBody TEmpContractAlert tEmpContractAlert) {
return R.ok(tEmpContractAlertService.updateById(tEmpContractAlert));
}
/**
* 通过id删除员工合同续签待办
* @param id id
* @return R
*/
@Operation(summary = "通过id删除员工合同续签待办", description = "通过id删除员工合同续签待办:hasPermission('demo_tempcontractalert_del')")
@SysLog("通过id删除员工合同续签待办" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_tempcontractalert_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tEmpContractAlertService.removeById(id));
}
/**
* 批量导出合同信息
* @param searchVo
* @return R<List>
* @Author FXJ
* @Date 2022-07-1
**/
@Operation(description = "导出")
@PostMapping("/export")
public void export(HttpServletResponse response, @RequestBody ContractAlertSearchVo searchVo) {
tEmpContractAlertService.listExport(response,searchVo);
}
}
......@@ -21,23 +21,26 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
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.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
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.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
import java.util.Map;
......@@ -159,7 +162,6 @@ public class TEmployeeProjectController {
@Operation(summary = "复档复项相关操作", description = "复档复项相关操作")
@SysLog("复档复项相关操作" )
@PostMapping("/reEmpInfo")
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_reempinfo')" )
public R reEmpInfo(@RequestBody JSONObject jsonObject) {
return tEmployeeProjectService.reEmpInfo(jsonObject);
}
......@@ -196,33 +198,35 @@ public class TEmployeeProjectController {
/**
* 批量新增项目档案信息
*
* @param excelVOList
* @param file
* @param idAdd
* @return R<List>
* @Author huyc
* @Date 2022-06-20
**/
@SneakyThrows
@Operation(description = "批量新增项目档案信息 hasPermission('wxhr:employeeProjectinfo_importListAdd')")
@SysLog("批量新增项目档案信息")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('wxhr:employeeProjectinfo_importListAdd')")
public R<List<ErrorMessage>> importListAdd(@RequestExcel List<EmployeeProjectVO> excelVOList, BindingResult bindingResult, @RequestParam("idAdd") String idAdd) {
return tEmployeeProjectService.importListAdd(excelVOList, bindingResult, idAdd);
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file, @RequestParam("idAdd") String idAdd){
return tEmployeeProjectService.importListAdd(file.getInputStream(), idAdd);
}
/**
* 批量更新项目档案信息
* @param excelVOList
* @param bindingResult
* @param file
* @return R<List>
* @Author huyc
* @Date 2022-06-21
**/
@SneakyThrows
@Operation(description = "批量更新项目档案信息 hasPermission('archives_project_importListUpdate')")
@SysLog("批量更新项目档案信息")
@PostMapping("/importListUpate")
@PreAuthorize("@pms.hasPermission('archives_project_importListUpdate')")
public R<List<ErrorMessage>> importListUpate(@RequestExcel List<EmployeeProjectVO> excelVOList, BindingResult bindingResult) {
return tEmployeeProjectService.importEmpProjectUpdate(excelVOList, bindingResult);
public R<List<ErrorMessage>> importListUpate(@RequestBody MultipartFile file) {
return tEmployeeProjectService.importEmpProjectUpdate(file.getInputStream());
}
/**
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import org.apache.ibatis.annotations.Mapper;
/**
* 员工合同续签待办
*
* @author fxj
* @date 2022-07-01 14:15:05
*/
@Mapper
public interface TEmpContractAlertMapper extends BaseMapper<TEmpContractAlert> {
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
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.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 员工合同续签待办
*
* @author fxj
* @date 2022-07-01 14:15:05
*/
public interface TEmpContractAlertService extends IService<TEmpContractAlert> {
IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo);
List<TEmpContractAlert> listDiy(ContractAlertSearchVo searchVo);
void listExport(HttpServletResponse response, ContractAlertSearchVo searchVo);
}
......@@ -21,15 +21,16 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.validation.BindingResult;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
......@@ -66,15 +67,14 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R<List<ErrorMessage>> batchDeleteEmpPro(List<EmployeeProjectVO> list, BindingResult bindingResult);
/**
* @param excelVOList
* @param bindingResult
* @param inputStream
* @param isAdd
* @Description: 批量新增项目档案
* @Author: huyc
* @Date: 2022/6/21 10:30
* @return: R
**/
R<List<ErrorMessage>> importListAdd(List<EmployeeProjectVO> excelVOList, BindingResult bindingResult, String isAdd);
R<List<ErrorMessage>> importListAdd(InputStream inputStream, String isAdd);
/**
* @param projectStatus 传0才过滤
......@@ -104,7 +104,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
* @Date: 2022/6/21 10:30
* @return: R
**/
R<List<ErrorMessage>> importEmpProjectUpdate(List<EmployeeProjectVO> excelVOList, BindingResult bindingResult);
R<List<ErrorMessage>> importEmpProjectUpdate(InputStream inputStream);
/**
* @param ids
......
......@@ -92,7 +92,7 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
@Override
public IPage<TCertRecord> pageDiy(Page page, CertRecordSearchVo searchVo) {
LambdaQueryWrapper<TCertRecord> wrapper = buildQueryWrapper(searchVo);
wrapper.orderByDesc(TCertRecord::getOpenTime);
wrapper.orderByDesc(TCertRecord::getCreateTime);
return baseMapper.selectPage(page,wrapper);
}
......
......@@ -235,22 +235,21 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
WriteSheet writeSheet = EasyExcel.writerSheet("不良记录"+index).build();
excelWriter.write(list,writeSheet);
index++;
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)){
list.clear();
}
}
excelWriter.finish();
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("不良记录"+index).build();
excelWriter.write(list,writeSheet);
excelWriter.finish();
}
if (Common.isNotNull(list)){
list.clear();
}
out.flush();
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}finally {
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
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.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
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.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* 员工合同续签待办
*
* @author fxj
* @date 2022-07-01 14:15:05
*/
@Service
public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertMapper, TEmpContractAlert> implements TEmpContractAlertService {
@Override
public IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo) {
LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo);
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectPage(page,wrapper);
}
@Override
public List<TEmpContractAlert> listDiy(ContractAlertSearchVo searchVo) {
LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TEmpContractAlert::getId,idList);
}
return baseMapper.selectList(wrapper);
}
private long noPageCountDiy(ContractAlertSearchVo searchVo) {
LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TEmpContractAlert::getId,idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() >= 0){
wrapper.last(" limit "+ searchVo.getLimitStart() +","+ searchVo.getLimitEnd());
}
return baseMapper.selectCount(wrapper);
}
@Override
public void listExport(HttpServletResponse response, ContractAlertSearchVo searchVo) {
String fileName = ArchivesConstants.EMP_BAD_RECORD + LocalDateTime.now() + ".xlsx";
//获取要导出的列表
List<TEmpContractAlert> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TEmpBadRecord.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = listDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TEmpContractAlert> util = new ExcelUtil<>(TEmpContractAlert.class);
for (TEmpContractAlert vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet(ArchivesConstants.EMP_BAD_RECORD+index).build();
excelWriter.write(list,writeSheet);
index++;
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
}
if (Common.isNotNull(list)){
list.clear();
}
}
excelWriter.finish();
}else {
WriteSheet writeSheet = EasyExcel.writerSheet(ArchivesConstants.EMP_BAD_RECORD+index).build();
excelWriter.write(list,writeSheet);
excelWriter.finish();
}
if (Common.isNotNull(list)){
list.clear();
}
out.flush();
}catch (Exception e){
log.error("执行异常" ,e);
}finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
private LambdaQueryWrapper buildQueryWrapper(ContractAlertSearchVo entity){
LambdaQueryWrapper<TEmpContractAlert> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TEmpContractAlert::getCreateTime, entity.getCreateTimes()[0])
.le(TEmpContractAlert::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getEmpName())){
wrapper.eq(TEmpContractAlert::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())){
wrapper.eq(TEmpContractAlert::getEmpIdcard,entity.getEmpIdcard());
}
if (Common.isNotNull(entity.getProject())){
wrapper.eq(TEmpContractAlert::getProject,entity.getProject());
}
if (Common.isNotNull(entity.getProjectNo())){
wrapper.eq(TEmpContractAlert::getProjectNo,entity.getProjectNo());
}
if (Common.isNotNull(entity.getEmpType())){
wrapper.eq(TEmpContractAlert::getEmpType,entity.getEmpType());
}
if (Common.isNotNull(entity.getContractType())){
wrapper.eq(TEmpContractAlert::getContractType,entity.getContractType());
}
if (Common.isNotNull(entity.getFileProvince())){
wrapper.eq(TEmpContractAlert::getFileProvince,entity.getFileProvince());
}
if (Common.isNotNull(entity.getFileCity())){
wrapper.eq(TEmpContractAlert::getFileCity,entity.getFileCity());
}
if (Common.isNotNull(entity.getFileTown())){
wrapper.eq(TEmpContractAlert::getFileTown,entity.getFileTown());
}
if (Common.isNotNull(entity.getAlertPerson())){
wrapper.eq(TEmpContractAlert::getAlertPerson,entity.getAlertPerson());
}
if (Common.isNotNull(entity.getDueFlag())){
wrapper.eq(TEmpContractAlert::getDueFlag,entity.getDueFlag());
}
if (Common.isNotNull(entity.getHandleStatus())){
wrapper.eq(TEmpContractAlert::getHandleStatus,entity.getHandleStatus());
}
return wrapper;
}
}
......@@ -64,6 +64,12 @@ spring:
#mvc:
# pathmatch:
# matching-strategy: ANT_PATH_MATCHER
servlet:
multipart:
#所有上传文件最大大小
max-request-size: 100MB
#单个文件最大大小
max-file-size: 5MB
#swagger 文档 https://springdoc.org/
### OpenAPI3 注解
# OpenAPI 3 注解位置
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper">
<resultMap id="tEmpContractAlertMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert">
<id property="id" column="ID"/>
<result property="empName" column="EMP_NAME"/>
<result property="empId" column="EMP_ID"/>
<result property="project" column="PROJECT"/>
<result property="projectNo" column="PROJECT_NO"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empCode" column="EMP_CODE"/>
<result property="contractStart" column="CONTRACT_START"/>
<result property="contractEnd" column="CONTRACT_END"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="empType" column="EMP_TYPE"/>
<result property="contractType" column="CONTRACT_TYPE"/>
<result property="contractTerm" column="CONTRACT_TERM"/>
<result property="daysDue" column="DAYS_DUE"/>
<result property="dueFlag" column="DUE_FLAG"/>
<result property="daysOver" column="DAYS_OVER"/>
<result property="firstAlertTime" column="FIRST_ALERT_TIME"/>
<result property="alertPerson" column="ALERT_PERSON"/>
<result property="handleStatus" column="HANDLE_STATUS"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
</mapper>
......@@ -37,11 +37,6 @@
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-mybatis</artifactId>
</dependency>
<!-- excel 导入导出 https://github.com/pig-mesh/excel-spring-boot-starter -->
<dependency>
<groupId>com.pig4cloud.excel</groupId>
<artifactId>excel-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
......
......@@ -63,7 +63,6 @@
<mybatis-plus.version>3.5.1</mybatis-plus.version>
<mysql.version>8.0.29</mysql.version>
<seata.version>1.4.2</seata.version>
<excel.version>1.1.1</excel.version>
<asm.version>7.1</asm.version>
<oss.version>1.0.4</oss.version>
<sms.version>2.0.2</sms.version>
......@@ -162,12 +161,6 @@
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- excel 导入导出 -->
<dependency>
<groupId>com.pig4cloud.excel</groupId>
<artifactId>excel-spring-boot-starter</artifactId>
<version>${excel.version}</version>
</dependency>
<!-- 阿里云短信下发 -->
<dependency>
<groupId>io.springboot.sms</groupId>
......
......@@ -263,6 +263,33 @@ public interface CommonConstants {
String PARAM_IS_NOT_ERROR = "传参异常,请检查参数";
int EXCEL_EXPORT_LIMIT = 60000;
/**
* multipart/form-data
* @Author fxj
* @Date 2020-10-13
**/
public static final String MULTIPART_FORM_DATA = "multipart/form-data";
/**
* Content-Disposition
* @Author fxj
* @Date 2020-10-13
**/
public static final String CONTENT_DISPOSITION = "Content-Disposition";
/**
* attachment;filename=
* @Author fxj
* @Date 2020-10-13
**/
public static final String ATTACHMENT_FILENAME = "attachment;filename=";
/**
* USER_AGENT
* @Author fxj
* @Date 2020-10-26
**/
public static final String USER_AGENT = "USER-AGENT";
/**
* 成功颜色
*/
......
......@@ -33,9 +33,9 @@ public class ExcelAttributeConstants {
//员工合同类型
public static final String EMPLOYEE_CONTRACT_TYPE = "employee_contract_type" ;
public static final String EMPLOYEE_CONTRACT_TYPE = "contract_type" ;
//员工合同工时制 1标准工时 2 综合工时 3不定时工时制
public static final String WORKING_HOURS = "working_hours";
public static final String WORKING_HOURS = "contract_working_hours";
//员工合同续签情况
public static final String EMPLOYEE_SITUATION_TYPE = "situation_type" ;
......@@ -100,5 +100,8 @@ public class ExcelAttributeConstants {
//工资形式 1.计时工资 2.计件工资 3.其他
public static final String SALARY_TYPE = "salary_type";
// 关系类型
public static final String FAMILY_RELATION = "family_relation";
// 工作类型---工具履历
public static final String WORKINFO_TYPE = "workinfo_type";
}
......@@ -82,7 +82,22 @@
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.1.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>poi-ooxml-schemas</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
</dependencies>
</project>
......@@ -56,6 +56,7 @@
<dependency>
<groupId>com.pig4cloud.excel</groupId>
<artifactId>excel-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
</project>
......@@ -99,10 +99,12 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
// 系统内置
Assert.state(!DictTypeEnum.SYSTEM.getType().equals(dict.getSystemFlag()),
MsgUtils.getMessage(ErrorCodes.SYS_DICT_UPDATE_SYSTEM));
// 更新字典
extractedRedis(item);
return this.updateById(item);
if (this.updateById(item)){
// 更新字典
extractedRedis(item);
return true;
}
return false;
}
private void extractedRedis(SysDictItem item) {
......@@ -114,12 +116,12 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
@CacheEvict(value = CacheConstants.DICT_DETAILS, allEntries = true)
@Override
public R<Boolean> saveDiy(SysDictItem sysDictItem) {
// 更新字典
extractedRedis(sysDictItem);
int res = baseMapper.insert(sysDictItem);
if (res < 0){
return R.failed();
}
// 更新字典
extractedRedis(sysDictItem);
return R.ok();
}
......
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