Commit 34723e95 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.6.6' into MVP1.6.6

parents 76ffdae3 e9374c97
......@@ -58,14 +58,14 @@ public class TAttaInfo extends BaseEntity {
private String attaType;
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信
*/
@NotBlank(message = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件))不能为空")
@Length(max = 2, message = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件))不能超过2个字符")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件))")
@NotBlank(message = "关系类型不能为空")
@Length(max = 2, message = "关系类型不能超过2个字符")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信)")
private String relationType;
/**
* 实体id和关系类型共同确定附件所属
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
*/
@NotBlank(message = "实体id和关系类型共同确定附件所属不能为空")
@Length(max = 32, message = "实体id和关系类型共同确定附件所属不能超过32个字符")
......
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.TableName;
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;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
@TableName("t_complete_monitor")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "档案完整度监控")
public class TCompleteMonitor extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
@Schema(description = "客户名称")
private String unitName;
@Schema(description = "客户编码")
private String unitNo;
@Schema(description = "项目名称")
private String deptName;
@Schema(description = "项目编码")
private String deptNo;
@Schema(description = "业务类型一级分类")
private String businessPrimaryType;
@Schema(description = "业务类型二级分类")
private String businessSecondType;
@Schema(description = "业务类型三级分类")
private String businessThirdType;
@Schema(description = "在项人数")
private Integer inusePersonNum;
@Schema(description = "信息是否完整 0是 1 否")
private String isComplete;
@Schema(description = "信息不完整人数")
private Integer incompleteNum;
@Schema(description = "完整度占比")
private String completePer;
@Schema(description = "6月及后入职人数")
private Integer afterEmployment;
@Schema(description = "6月及后入职信息是否完整 0是 1 否")
private String afterIsComplete;
@Schema(description = "6月及后入职信息不完整人数")
private Integer afterIncompleteNum;
@Schema(description = "立项申请人")
private String alertUser;
}
......@@ -273,6 +273,13 @@ public class TEmployeeProject extends BaseEntity {
@Schema(description ="是否删除 0否/1是")
private String deleteFlag;
/**
* 是否完整 0是 1 否
*/
@Schema(description ="是否完整0是 1 否")
private String isComplete;
/**
* 备注
*/
......
......@@ -27,6 +27,7 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
......@@ -38,7 +39,7 @@ import java.time.LocalDateTime;
@Data
@TableName("t_pre_emp_declaration")
@Schema(description = "预入职-员工申明")
public class TPreEmpDeclaration {
public class TPreEmpDeclaration implements Serializable {
/**
* id
......
......@@ -19,9 +19,7 @@ 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.baomidou.mybatisplus.annotation.*;
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;
......@@ -30,6 +28,7 @@ import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.Date;
/**
......@@ -70,109 +69,117 @@ public class TPreEmpDisabilityInfo extends BaseEntity {
/**
* 员工ID
*/
@ExcelAttribute(name = "员工ID", isNotEmpty = true, errorInfo = "员工ID不能为空", maxLength = 32)
@NotBlank(message = "员工ID不能为空")
@Length(max = 32, message = "员工ID不能超过32个字符")
@ExcelProperty("员工ID")
@Schema(description = "员工ID")
@Schema(description ="员工ID")
private String empId;
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", isNotEmpty = true, errorInfo = "员工姓名不能为空", maxLength = 50)
@NotBlank(message = "员工姓名不能为空")
@Length(max = 50, message = "员工姓名不能超过50个字符")
@ExcelProperty("员工姓名")
@Schema(description = "员工姓名")
@Schema(description ="员工姓名")
private String empName;
/**
* 员工编码
*/
@ExcelAttribute(name = "员工编码", isNotEmpty = true, errorInfo = "员工编码不能为空", maxLength = 50)
@NotBlank(message = "员工编码不能为空")
@Length(max = 50, message = "员工编码不能超过50个字符")
@ExcelProperty("员工编码")
@Schema(description = "员工编码")
@Schema(description ="员工编码")
private String empCode;
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号", isNotEmpty = true, errorInfo = "身份证号不能为空", maxLength = 32)
@NotBlank(message = "身份证号不能为空")
@Length(max = 32, message = "身份证号不能超过32个字符")
@ExcelProperty("身份证号")
@Schema(description = "身份证号")
@Schema(description ="身份证号")
private String empIdcard;
/**
* 传染病名称
*/
@Schema(description ="传染病名称")
private String infectiousName;
/**
* 伤残病名称
*/
@ExcelAttribute(name = "伤残病名称", isNotEmpty = true, errorInfo = "伤残病名称不能为空", maxLength = 50)
@NotBlank(message = "伤残病名称不能为空")
@Length(max = 50, message = "伤残病名称不能超过50个字符")
@ExcelProperty("伤残病名称")
@Schema(description = "伤残病名称")
@Schema(description ="伤残病名称")
private String disabilityName;
/**
* 伤残等级
*/
@ExcelAttribute(name = "伤残等级", maxLength = 32)
@Length(max = 32, message = "伤残等级不能超过32个字符")
@ExcelProperty("伤残等级")
@Schema(description = "伤残等级")
@Schema(description ="伤残等级")
private String disabilityLevel;
/**
* 是否工伤标识0是/1否
*/
@ExcelAttribute(name = "是否工伤标识0是/1否", maxLength = 1)
@Length(max = 1, message = "是否工伤标识0是/1否不能超过1个字符")
@ExcelProperty("是否工伤标识0是/1否")
@Schema(description = "是否工伤标识0是/1否")
@Schema(description ="是否工伤标识0是/1否")
private String injuryIdentification;
/**
* 是否职业病0是/1否
*/
@Schema(description ="是否职业病 0是/1否")
private String occupationalDiseaseFlag;
/**
* 是否传染病病 0是/1否
*/
@Schema(description ="是否传染病病 0是/1否")
private String infectiousDiseaseFlag;
/**
* 是否持有残疾人证明 0是/1否
*/
@Schema(description ="是否持有残疾人证明 0是/1否")
private String disabilityFlag;
/**
* 是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 0是/1否
*/
@Schema(description ="是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 0是/1否")
private String otherFlag;
/**
* 伤残开始日期
*/
@ExcelAttribute(name = "伤残开始日期", isDate = true)
@ExcelProperty("伤残开始日期")
@Schema(description = "伤残开始日期")
private Date startTime;
@Schema(description ="伤残开始日期")
private LocalDateTime startTime;
/**
* 伤残结束日期
*/
@ExcelAttribute(name = "伤残结束日期", isDate = true)
@ExcelProperty("伤残结束日期")
@Schema(description = "伤残结束日期")
private Date endTime;
@Schema(description ="伤残结束日期")
private LocalDateTime endTime;
/**
* 职业病名称
*/
@ExcelAttribute(name = "职业病名称", maxLength = 50)
@Length(max = 50, message = "职业病名称不能超过50个字符")
@ExcelProperty("职业病名称")
@Schema(description = "职业病名称")
@Schema(description ="职业病名称")
private String occupationalDisease;
/**
* 0删除作废1正常
* 项目ID
*/
@ExcelAttribute(name = "0删除作废1正常", maxLength = 1)
@Length(max = 1, message = "0删除作废1正常不能超过1个字符")
@ExcelProperty("0删除作废1正常")
@Schema(description = "0删除作废1正常")
private String deleteFlag;
@Schema(description ="项目ID")
private String settleDomain;
/**
* 结算主体ID
* 0删除作废1正常
*/
@ExcelAttribute(name = "结算主体ID", maxLength = 32)
@Length(max = 32, message = "结算主体ID不能超过32个字符")
@ExcelProperty("结算主体ID")
@Schema(description = "结算主体ID")
private String settleDomain;
@TableLogic
@Schema(description ="0删除作废1正常")
private String deleteFlag;
/**
* 备注
*/
@ExcelAttribute(name = "备注", maxLength = 200)
@Length(max = 200, message = "备注不能超过200个字符")
@ExcelProperty("备注")
@Schema(description = "备注")
@Schema(description ="备注")
private String remark;
/**
* @Author fxj
* @Description 附件ID
* @Date 14:53 2022/6/21
**/
@TableField(exist = false)
private String attaIds;
}
......@@ -20,6 +20,7 @@ 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.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -31,6 +32,7 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;
/**
* 预入职-员工学历信息表
......@@ -214,4 +216,13 @@ public class TPreEmpEducation extends BaseEntity {
@Schema(description = "专业")
private String major;
/**
* @Description: 最高教育经历
* @Author: hgw
* @Date: 2024/6/20 15:11
* @return:
**/
@TableField(exist = false)
private List<TAttaInfo> attaList;
}
......@@ -51,13 +51,13 @@ public class TPreEmpMain extends BaseEntity {
@Schema(description = "主键")
private String id;
/**
* 审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过)
* 审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过;5初始未保存
*/
@ExcelAttribute(name = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过)", isNotEmpty = true, errorInfo = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过)", maxLength = 1)
@NotBlank(message = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过)不能为空")
@Length(max = 1, message = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过)不能超过1个字符")
@ExcelProperty("审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过)")
@Schema(description = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过)")
@ExcelAttribute(name = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过;5初始未保存)", isNotEmpty = true, errorInfo = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过;5初始未保存)", maxLength = 1)
@NotBlank(message = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过;5初始未保存)不能为空")
@Length(max = 1, message = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过;5初始未保存)不能超过1个字符")
@ExcelProperty("审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过;5初始未保存)")
@Schema(description = "审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过;5初始未保存)")
private String status;
/**
* 员工ID
......
......@@ -20,6 +20,7 @@ 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.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -30,6 +31,7 @@ import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.List;
/**
* 预入职-员工职业资格信息表
......@@ -186,4 +188,13 @@ public class TPreEmpProfessionalQualification extends BaseEntity {
@Schema(description = "备注")
private String remark;
/**
* @Description: 执业资格证书
* @Author: hgw
* @Date: 2024/6/20 15:11
* @return:
**/
@TableField(exist = false)
private List<TAttaInfo> attaList;
}
......@@ -46,15 +46,15 @@ public class PreEmpMainDetailVo implements Serializable {
// 预入职-员工学历信息表
private TPreEmpEducation tPreEmpEducation;
// 预入职-员工家庭信息表
private List<TPreEmpFamily> tPreEmpFamily;
private List<TPreEmpFamily> tPreEmpFamilyList;
// 预入职-人员档案表
private TPreEmployeeInfo tPreEmployeeInfo;
// 预入职-项目档案表
private TPreEmployeeProject tPreEmployeeProject;
// 预入职-员工职业资格信息表
private List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification;
private List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualificationList;
// 预入职-员工工作履历信息表
private List<TPreEmpWorkRecording> tPreEmpWorkRecording;
private List<TPreEmpWorkRecording> tPreEmpWorkRecordingList;
// 预入职-9身份证 10 户口本;附件 21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
private List<TAttaInfo> attaInfoList;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
public class TCompleteMonitorFlagVo implements Serializable {
private String empSex;
private Date validityStart;
private Date validityEnd;
private Date empBirthday;
private Integer empAge;
private String empMarriStatus;
private String empNational;
private String politicalStatus;
private String empPhone;
private String empRegisType;
private Integer fileProvince;
private Integer fileCity;
private Integer isCollege;
private String hignEducation;
private String school;
private String major;
private Date admissionDate;
private Date gradutionDate;
private String contactAddress;
private String firstWorkFlag;
private String haveQualification;
private String deptName;
private String unitName;
private String businessPrimaryType;
private String businessSecondType;
private String businessThirdType;
private String workingHours;
private String tryPeriod;
private Date enjoinDate;
private String post;
private String empProjectId;
private String contactInfoId;
private String disabilityFlag;
private String badRecordFlag;
private String educationFlag;
private String familyFlag;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
public class TCompleteMonitorInfoVo implements Serializable {
@Schema(description = "姓名")
private String empName;
@Schema(description = "身份证号")
private String empIdCard;
@Schema(description = "手机号码")
private String phone;
@Schema(description = "进项目时间")
private LocalDateTime inTime;
@Schema(description = "信息是否完整")
private String isComplete;
@Schema(description = "人员档案id")
private String empInfoId;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
public class TCompleteMonitorSearchVo extends TCompleteMonitor {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
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.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Data
public class TCompleteMonitorVo extends RowIndex implements Serializable {
/**
* 客户名称
*/
@Length(max = 50, message = "客户名称 不能超过50 个字符")
@ExcelAttribute(name = "客户名称", maxLength = 50)
@Schema(description = "客户名称")
@ExcelProperty("客户名称")
private String unitName;
/**
* 客户编码
*/
@Length(max = 32, message = "客户编码 不能超过32 个字符")
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Schema(description = "客户编码")
@ExcelProperty("客户编码")
private String unitNo;
/**
* 项目名称
*/
@Length(max = 50, message = "项目名称 不能超过50 个字符")
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@NotBlank(message = "项目编码 不能为空")
@Length(max = 30, message = "项目编码 不能超过30 个字符")
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码不能为空", maxLength = 30)
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
/**
* 业务类型一级分类
*/
@Length(max = 64, message = "业务类型一级分类 不能超过64 个字符")
@ExcelAttribute(name = "业务类型", maxLength = 64)
@Schema(description = "业务类型")
@ExcelProperty("业务类型")
private String businessPrimaryType;
/**
* 在项人数
*/
@ExcelAttribute(name = "在项人数")
@Schema(description = "在项人数")
@ExcelProperty("在项人数")
private Integer inusePersonNum;
/**
* 信息是否完整
*/
@Length(max = 1, message = "信息是否完整 不能超过1 个字符")
@ExcelAttribute(name = "信息是否完整", maxLength = 1, readConverterExp = "0=否,1=是")
@Schema(description = "信息是否完整")
@ExcelProperty("信息是否完整")
private String isComplete;
/**
* 信息不完整人数
*/
@ExcelAttribute(name = "信息不完整人数")
@Schema(description = "信息不完整人数")
@ExcelProperty("信息不完整人数")
private Integer incompleteNum;
/**
* 完整度占比
*/
@Length(max = 8, message = "完整度占比 不能超过8 个字符")
@ExcelAttribute(name = "完整度占比", maxLength = 8)
@Schema(description = "完整度占比")
@ExcelProperty("完整度占比")
private String completePer;
/**
* 6月及后入职人数
*/
@ExcelAttribute(name = "6月及后入职人数")
@Schema(description = "6月及后入职人数")
@ExcelProperty("6月及后入职人数")
private Integer afterEmployment;
/**
* 6月及后入职信息是否完整
*/
@Length(max = 1, message = "6月及后入职信息是否完整 不能超过1 个字符")
@ExcelAttribute(name = "6月及后入职信息是否完整", maxLength = 1, readConverterExp = "0=否,1=是")
@Schema(description = "6月及后入职信息是否完整")
@ExcelProperty("6月及后入职信息是否完整")
private String afterIsComplete;
/**
* 6月及后入职信息不完整人数
*/
@ExcelAttribute(name = "6月及后入职信息不完整人数")
@Schema(description = "6月及后入职信息不完整人数")
@ExcelProperty("6月及后入职信息不完整人数")
private Integer afterIncompleteNum;
/**
* 立项申请人
*/
@Length(max = 32, message = "立项申请人 不能超过32 个字符")
@ExcelAttribute(name = "立项申请人", maxLength = 32)
@Schema(description = "立项申请人")
@ExcelProperty("立项申请人")
private String alertUser;
}
......@@ -17,20 +17,16 @@
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
* 预入职-主表
* 预入职批量完善信息使用
*
* @author hgw
* @date 2024-06-17 11:31:08
......@@ -38,215 +34,28 @@ import java.util.Date;
@Data
public class TPreEmpMainVo extends RowIndex implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "主键 不能为空")
@Length(max = 32, message = "主键 不能超过32 个字符")
@ExcelAttribute(name = "主键", isNotEmpty = true, errorInfo = "主键 不能为空", maxLength = 32)
@Schema(description = "主键")
@ExcelProperty("主键")
private String id;
/**
* 审核状态(0待完善;1待审核;2审核通过;3审核不通过)
*/
@NotBlank(message = "审核状态(0待完善;1待审核;2审核通过;3审核不通过) 不能为空")
@Length(max = 1, message = "审核状态(0待完善;1待审核;2审核通过;3审核不通过) 不能超过1 个字符")
@ExcelAttribute(name = "审核状态(0待完善;1待审核;2审核通过;3审核不通过)", isNotEmpty = true, errorInfo = "审核状态(0待完善;1待审核;2审核通过;3审核不通过) 不能为空", maxLength = 1)
@Schema(description = "审核状态(0待完善;1待审核;2审核通过;3审核不通过)")
@ExcelProperty("审核状态(0待完善;1待审核;2审核通过;3审核不通过)")
private String status;
/**
* 员工ID
*/
@Length(max = 32, message = "员工ID 不能超过32 个字符")
@ExcelAttribute(name = "员工ID", maxLength = 32)
@Schema(description = "员工ID")
@ExcelProperty("员工ID")
private String empId;
/**
* 员工姓名
*/
@Length(max = 32, message = "员工姓名 不能超过32 个字符")
@ExcelAttribute(name = "员工姓名", maxLength = 32)
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String empName;
/**
* 身份证号
*/
@Length(max = 20, message = "身份证号 不能超过20 个字符")
@ExcelAttribute(name = "身份证号", maxLength = 20)
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 手机号码
*/
@Length(max = 32, message = "手机号码 不能超过32 个字符")
@ExcelAttribute(name = "手机号码", maxLength = 32)
@Schema(description = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
/**
* 微信名
*/
@Length(max = 32, message = "微信名 不能超过32 个字符")
@ExcelAttribute(name = "微信名", maxLength = 32)
@Schema(description = "微信名")
@ExcelProperty("微信名")
private String empWx;
/**
* 客户id
*/
@Length(max = 32, message = "客户id 不能超过32 个字符")
@ExcelAttribute(name = "客户id", maxLength = 32)
@Schema(description = "客户id")
@ExcelProperty("客户id")
private String unitId;
/**
* 客户名称
*/
@Length(max = 50, message = "客户名称 不能超过50 个字符")
@ExcelAttribute(name = "客户名称", maxLength = 50)
@Schema(description = "客户名称")
@ExcelProperty("客户名称")
private String unitName;
/**
* 客户编码
*/
@Length(max = 32, message = "客户编码 不能超过32 个字符")
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Schema(description = "客户编码")
@ExcelProperty("客户编码")
private String unitNo;
/**
* 项目id
*/
@Length(max = 32, message = "项目id 不能超过32 个字符")
@ExcelAttribute(name = "项目id", maxLength = 32)
@Schema(description = "项目id")
@ExcelProperty("项目id")
private String deptId;
/**
* 项目名称
*/
@Length(max = 50, message = "项目名称 不能超过50 个字符")
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@NotBlank(message = "项目编码 不能为空")
@Length(max = 30, message = "项目编码 不能超过30 个字符")
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码 不能为空", maxLength = 30)
@Schema(description = "项目编码")
@Length(max = 32, message = "项目编码 不能超过32 个字符")
@ExcelAttribute(name = "项目编码", maxLength = 32)
@ExcelProperty("项目编码")
private String deptNo;
/**
* 业务类型一级分类
*/
@Length(max = 32, message = "业务类型一级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型一级分类", maxLength = 32)
@Schema(description = "业务类型一级分类")
@ExcelProperty("业务类型一级分类")
private String businessPrimaryType;
/**
* 业务类型二级分类
*/
@Length(max = 32, message = "业务类型二级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型二级分类", maxLength = 32)
@Schema(description = "业务类型二级分类")
@ExcelProperty("业务类型二级分类")
private String businessSecondType;
/**
* 业务类型三级分类
*/
@Length(max = 32, message = "业务类型三级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型三级分类", maxLength = 32)
@Schema(description = "业务类型三级分类")
@ExcelProperty("业务类型三级分类")
private String businessThirdType;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotBlank(message = "员工类型(字典值,0外包1派遣2代理) 不能为空")
@Length(max = 2, message = "员工类型(字典值,0外包1派遣2代理) 不能超过2 个字符")
@ExcelAttribute(name = "员工类型(字典值,0外包1派遣2代理)", isNotEmpty = true, errorInfo = "员工类型(字典值,0外包1派遣2代理) 不能为空", maxLength = 2)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)")
@ExcelProperty("员工类型(字典值,0外包1派遣2代理)")
@ExcelAttribute(name = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelProperty("员工类型")
private String empNatrue;
/**
* 审核人ID
*/
@Length(max = 32, message = "审核人ID 不能超过32 个字符")
@ExcelAttribute(name = "审核人ID", maxLength = 32)
@Schema(description = "审核人ID")
@ExcelProperty("审核人ID")
private String auditId;
/**
* 审核人姓名
*/
@Length(max = 20, message = "审核人姓名 不能超过20 个字符")
@ExcelAttribute(name = "审核人姓名", maxLength = 20)
@Schema(description = "审核人姓名")
@ExcelProperty("审核人姓名")
private String auditName;
/**
* 审核时间
*/
@ExcelAttribute(name = "审核时间", isDate = true)
@Schema(description = "审核时间")
@ExcelProperty("审核时间")
private Date auditTime;
/**
* 创建者
*/
@Length(max = 64, message = "创建者 不能超过64 个字符")
@ExcelAttribute(name = "创建者", maxLength = 64)
@Schema(description = "创建者")
@ExcelProperty("创建者")
private String createBy;
/**
* 更新人
*/
@Length(max = 64, message = "更新人 不能超过64 个字符")
@ExcelAttribute(name = "更新人", maxLength = 64)
@Schema(description = "更新人")
@ExcelProperty("更新人")
private String updateBy;
/**
* 创建人姓名
*/
@Length(max = 32, message = "创建人姓名 不能超过32 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 32)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private Date createTime;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间", isDate = true)
@Schema(description = "更新时间")
@ExcelProperty("更新时间")
private Date updateTime;
/**
* 结算主体ID
*/
@Length(max = 32, message = "结算主体ID 不能超过32 个字符")
@ExcelAttribute(name = "结算主体ID", maxLength = 32)
@Schema(description = "结算主体ID")
@ExcelProperty("结算主体ID")
private String settleDomain;
@ExcelAttribute(name = "档案所在地省", isArea = true)
@ExcelProperty("档案所在地省")
private String fileProvince;
@ExcelAttribute(name = "档案所在地市", isArea = true)
@ExcelProperty("档案所在地市")
private String fileCity;
@ExcelAttribute(name = "档案所在地县", isArea = true)
@ExcelProperty("档案所在地县")
private String fileTown;
}
......@@ -67,6 +67,24 @@ public class FileUploadController {
return fileUploadService.uploadImg(file,filePath,type,domain);
}
/**
* @Author fxj
* @Description
* @Date 13:49 2022/6/17
* @Param
* @return
**/
@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.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同;5收入证明)\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/uploadFileReturnAtta")
public R<TAttaInfo> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domain) throws IOException {
return fileUploadService.uploadFileReturnAtta(file,filePath,type,domain);
}
/**
* @Author fxj
......
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.TCompleteMonitor;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tcompletemonitor" )
@Tag(name = "档案完整度监控管理")
public class TCompleteMonitorController {
private final TCompleteMonitorService tCompleteMonitorService;
/**
* 简单分页查询
* @param page 分页对象
* @param tCompleteMonitor 档案完整度监控
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TCompleteMonitor>> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitor tCompleteMonitor) {
return new R<>(tCompleteMonitorService.getTCompleteMonitorPage(page,tCompleteMonitor));
}
/**
* 查询人员明细
* @param page 分页对象
* @param deptNo 查询人员明细
* @return
*/
@Operation(description = "根据项目查询人员明细")
@GetMapping("/empPage")
public R<IPage<TCompleteMonitorInfoVo>> getMonitorEmpInfoListPage(Page<TCompleteMonitorInfoVo> page, String deptNo) {
return new R<>(tCompleteMonitorService.getMonitorEmpInfoListPage(page,deptNo));
}
/**
* 通过id查询档案完整度监控
* @param id id
* @return R
*/
@Operation(summary = "查看详情", description = "查看详情")
@GetMapping("/{id}" )
public R<TCompleteMonitor> getById(@PathVariable("id") String id) {
return R.ok(tCompleteMonitorService.getById(id));
}
/**
* 修改档案完整度监控
* @param tCompleteMonitor 档案完整度监控
* @return R
*/
@Operation(summary = "修改档案完整度监控", description = "修改档案完整度监控:hasPermission('archves_tcompletemonitor_edit')")
@SysLog("修改档案完整度监控" )
@PutMapping
@PreAuthorize("@pms.hasPermission('archves_tcompletemonitor_edit')" )
public R<Boolean> updateById(@RequestBody TCompleteMonitor tCompleteMonitor) {
return R.ok(tCompleteMonitorService.updateById(tCompleteMonitor));
}
/**
* 通过id删除档案完整度监控
* @param id id
* @return R
*/
@Operation(summary = "通过id删除档案完整度监控", description = "通过id删除档案完整度监控:hasPermission('archves_tcompletemonitor_del')")
@SysLog("通过id删除档案完整度监控" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archves_tcompletemonitor_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tCompleteMonitorService.removeById(id));
}
/**
* 档案完整度监控 批量导出
* @author huyc
* @date 2024-06-17 16:08:58
**/
@Operation(description = "导出档案完整度监控 hasPermission('archves_tcompletemonitor-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('archves_tcompletemonitor-export')")
public void export(HttpServletResponse response, @RequestBody TCompleteMonitorSearchVo searchVo) {
tCompleteMonitorService.listExport(response,searchVo);
}
/**
* 档案完整度监控 批量生成
* @author huyc
* @date 2024-06-17 16:08:58
**/
@Operation(description = "生成档案完整度监控")
@Inner
@PostMapping("/inner/createComlpeteMonitor")
public void createComlpeteMonitor() throws IllegalAccessException{
tCompleteMonitorService.createComlpeteMonitor();
}
/**
* 档案完整度监控 批量生成
* @author huyc
* @date 2024-06-17 16:08:58
**/
@Operation(description = "根据项目编码刷新项目完整度状态")
@PostMapping("/updateProjectStatusByDeptNo")
public R updateProjectStatusByDeptNo(@RequestParam String deptNo) throws IllegalAccessException {
tCompleteMonitorService.updateProjectStatusByDeptNo(deptNo);
return R.ok();
}
}
......@@ -20,6 +20,7 @@ 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.TPreEmpMain;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpMainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo;
......@@ -33,6 +34,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -85,6 +87,18 @@ public class TPreEmpMainController {
return R.ok(tPreEmpMainService.noPageDiy(tPreEmpMain));
}
/**
* @Description: 根据身份证与项目id获取信息
* @Author: hgw
* @Date: 2024/6/20 17:23
* @return:
**/
@Operation(summary = "根据身份证与项目id获取信息", description = "根据身份证与项目id获取信息")
@GetMapping("/getByCardAndDeptId")
public R<PreEmpMainDetailVo> getByCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId) {
return tPreEmpMainService.getByCardAndDeptId(empIdCard, deptId);
}
/**
* 通过id查询预入职-主表
*
......@@ -98,6 +112,32 @@ public class TPreEmpMainController {
return tPreEmpMainService.getInfoById(id);
}
/**
* 预入职单个完善信息
* hgw
* 2024-6-21 11:49:35
*/
@Operation(summary = "预入职单个完善信息", description = "预入职单个完善信息")
@SysLog("预入职单个完善信息")
@PostMapping("/doImproveInformation")
public R<String> doImproveInformation(@RequestBody PreEmpMainDetailVo vo) {
return tPreEmpMainService.doImproveInformation(vo);
}
/**
* 预入职批量完善信息
* @author hgw
* @date 2024-6-21 15:25:20
**/
@SneakyThrows
@Operation(description = "预入职批量完善信息hasPermission('archives_tpreempmain-batch-import')")
@SysLog("预入职批量完善信息")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('archives_tpreempmain-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tPreEmpMainService.importDiy(file.getInputStream());
}
/**
* 草稿预入职
* hgw
......@@ -110,6 +150,7 @@ public class TPreEmpMainController {
public R<String> saveDraftPreEmpMain(@RequestBody PreEmpMainDetailVo vo) {
return tPreEmpMainService.saveDraftPreEmpMain(vo);
}
/**
* 保存预入职
* hgw
......@@ -151,21 +192,6 @@ public class TPreEmpMainController {
return R.ok(tPreEmpMainService.removeById(id));
}
/**
* 预入职-主表 批量导入
*
* @author hgw
* @date 2024-06-17 11:31:08
**/
@SneakyThrows
@Operation(description = "批量新增预入职-主表 hasPermission('archives_tpreempmain-batch-import')")
@SysLog("批量新增预入职-主表")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('archives_tpreempmain-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tPreEmpMainService.importDiy(file.getInputStream());
}
/**
* 预入职-主表 批量导出
*
......
......@@ -43,4 +43,6 @@ public interface TAttaInfoMapper extends BaseMapper<TAttaInfo> {
int updateDomainId(@Param("domainId")String domainId, @Param("ids")List<String> ids);
List<TAttaInfo> getAttaByApplyId(@Param("applyId")String applyId);
void deleteByDomainId(@Param("domainId") String domainId);
}
/*
* 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.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorFlagVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Mapper
public interface TCompleteMonitorMapper extends BaseMapper<TCompleteMonitor> {
/**
* 档案完整度监控简单分页查询
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, @Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
/**
* 档案完整度监控简单分页查询
* @param tCompleteMonitor 档案完整度监控
* @return
*/
long getExportCount(@Param("tCompleteMonitor") TCompleteMonitorSearchVo tCompleteMonitor);
/**
* 档案完整度监控批量导出
* @param tCompleteMonitor 档案完整度监控
* @return
*/
List<TCompleteMonitorVo> getTCompleteMonitorExportList(@Param("tCompleteMonitor") TCompleteMonitorSearchVo tCompleteMonitor);
/**
* 查询人员明细
* @param deptNo 项目编码
* @return
*/
IPage<TCompleteMonitorInfoVo> getMonitorEmpInfoList(Page<TCompleteMonitorInfoVo> page,@Param("deptNo") String deptNo);
/**
* 获取所有监控数据
* @return
*/
List<TCompleteMonitor> getAllMonitorEmpList(@Param("deptNo") String deptNo);
/**
* 删除所有监控数据
* @return
*/
void deleteAllMonitorInfo();
/**
* 判断项目档案的完整状态
* @return
*/
List<TCompleteMonitorFlagVo> checkEmpProjectCompleteFlag(@Param("deptNo") String deptNo);
/**
* 根据项目编码删除监控数据
* @return
*/
void deleteMonitorInfoByDeptNo(@Param("deptNo") String deptNo);
}
......@@ -118,4 +118,11 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
void updateContractStatus(@Param("empId") String empId, @Param("deptId") String deptId, @Param("status")int status);
int updatePostByEmpDeptNo(@Param("deptNo")String deptNo, @Param("post")String post,@Param("empIdcard")String empIdcard);
/**
* 批量刷新项目档案的是否完整状态
* @return
*/
void batchUpdateEmpProjectCompleteStatus(@Param("idList") List<String> idList);
}
......@@ -39,4 +39,9 @@ public interface TPreEmpMainMapper extends BaseMapper<TPreEmpMain> {
* @return
*/
IPage<TPreEmpMain> getTPreEmpMainPage(Page<TPreEmpMain> page, @Param("tPreEmpMain") TPreEmpMain tPreEmpMain);
TPreEmpMain getTPreEmpMainByCardAndDept(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
TPreEmpMain getTPreEmpMainByCardAndDeptNo(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo);
}
......@@ -17,5 +17,7 @@ public interface FileUploadService {
R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<FileVo> createQrCode(String domainId, String url, String name);
}
......@@ -70,4 +70,13 @@ public interface TAttaInfoService extends IService<TAttaInfo> {
**/
R<List<TAttaInfo>> getAttaByApplyId(String applyId);
/**
* @param domainId 关联id
* @Description: 删除附件
* @Author: hgw
* @Date: 2024/6/20 14:50
* @return: void
**/
void deleteByDomainId(String domainId);
}
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.TCompleteMonitor;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo;
import javax.servlet.http.HttpServletResponse;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
public interface TCompleteMonitorService extends IService<TCompleteMonitor> {
/**
* 档案完整度监控简单分页查询
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitor tCompleteMonitor);
/**
* 档案完整度监控导出
* @param searchVo 档案完整度监控
* @return
*/
void listExport(HttpServletResponse response, TCompleteMonitorSearchVo searchVo);
/**
* 档案完整度监控生成
* @return
*/
void createComlpeteMonitor() throws IllegalAccessException;
/**
* 根据项目编码刷新项目完整度状态
* @return
*/
void updateProjectStatusByDeptNo(String deptNo) throws IllegalAccessException;
/**
* 档案完整度监控简单分页查询
* @param deptNo 项目编码
* @return
*/
IPage<TCompleteMonitorInfoVo> getMonitorEmpInfoListPage(Page<TCompleteMonitorInfoVo> page, String deptNo);
}
......@@ -46,4 +46,14 @@ public interface TEmpBadRecordService extends IService<TEmpBadRecord> {
IPage<TEmpBadRecord> pageDiy(Page page, EmpBadRecordSearchVo tEmpBadRecord);
List<TEmpBadRecord> noPageDiy(EmpBadRecordSearchVo tEmpBadRecord);
/**
* @param empId
* @Description: 预入职使用
* @Author: hgw
* @Date: 2024/6/21 9:53
* @return: com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord
**/
TEmpBadRecord getByEmpId(String empId);
}
......@@ -17,13 +17,14 @@
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo;
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.TEmpContactInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpContactInfoSearchVo;
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.archives.vo.TEmpContactInfoSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
......@@ -47,4 +48,6 @@ public interface TEmpContactInfoService extends IService<TEmpContactInfo> {
void listExport(HttpServletResponse response, TEmpContactInfoSearchVo searchVo);
List<TEmpContactInfo> noPageDiy(TEmpContactInfoSearchVo searchVo);
TEmpContactInfo getByEmpId(String empId);
}
......@@ -48,4 +48,7 @@ public interface TEmpDisabilityInfoService extends IService<TEmpDisabilityInfo>
R<Boolean> updateByIdDiy(TEmpDisabilityInfo tEmpDisabilityInfo);
R<List<ErrorMessage>> importTmpDisabilityDiy(InputStream inputStream);
TEmpDisabilityInfo getByEmpId(String empId);
}
......@@ -61,11 +61,20 @@ public interface TEmpEducationService extends IService<TEmpEducation> {
/**
* @param empIdcard
* @Description: 将所有的最高学历改为最高
* @Description: 将所有的最高学历改为最高
* @Author: hgw
* @Date: 2024/6/19 18:03
* @return: void
**/
void updateEducationToNoByIdCard(String empIdcard);
/**
* @param empId
* @Description: 获取信息,预入职使用
* @Author: hgw
* @Date: 2024/6/21 9:52
* @return: com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation
**/
TEmpEducation getByEmpId(String empId);
}
......@@ -58,4 +58,7 @@ public interface TEmpFamilyService extends IService<TEmpFamily> {
* @return: void
**/
void deleteByEmpIdAndTable(String empId, String tableName);
List<TEmpFamily> getListByEmpId(String empId);
}
......@@ -48,4 +48,14 @@ public interface TEmpProfessionalQualificationService extends IService<TEmpProfe
R<List<ErrorMessage>> importEmpCertificateDiy(InputStream inputStream);
R<Boolean> updateByIdDiy(TEmpProfessionalQualification tEmpProfessionalQualification);
/**
* @param empId
* @Description: 获取list,预入职使用
* @Author: hgw
* @Date: 2024/6/21 9:51
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification>
**/
List<TEmpProfessionalQualification> getListByEmpId(String empId);
}
......@@ -48,4 +48,14 @@ public interface TEmpWorkRecordingService extends IService<TEmpWorkRecording> {
List<TEmpWorkRecording> getTEmpWorkRecordingNoPage(WorkRecordSearchVO searchVo);
R<List<ErrorMessage>> importEmpWorkRecordDiy(InputStream inputStream);
/**
* @param empId
* @Description: 预入职使用
* @Author: hgw
* @Date: 2024/6/21 9:59
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording>
**/
List<TEmpWorkRecording> getListByEmpId(String empId);
}
......@@ -21,6 +21,7 @@ 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.TPreEmpMain;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
......@@ -53,11 +54,22 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
**/
R<PreEmpMainDetailVo> getInfoById(String id);
/**
* @Description:根据身份证与项目id获取信息
* @Author: hgw
* @Date: 2024/6/20 17:26
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo>
**/
R<PreEmpMainDetailVo> getByCardAndDeptId(String empIdCard, String deptId);
// 单个完善信息
R<String> doImproveInformation(PreEmpMainDetailVo vo);
// 草稿
R<String> saveDraftPreEmpMain(PreEmpMainDetailVo vo);
// 保存
R<String> savePreEmpMain(PreEmpMainDetailVo vo);
// 批量完善信息
R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TPreEmpMainSearchVo searchVo);
......
......@@ -32,6 +32,52 @@ public class FileUploadServiceImpl implements FileUploadService {
private final QrCodeUtil codeUtil;
@Override
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
String fileName = file.getOriginalFilename();
if (fileName == null || Common.isEmpty(fileName)) {
return R.failed("文件名不能为空!!");
}
if (fileName.length() > 100) {
return R.failed("文件名不能超过100个字符!");
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = "";
if (Common.isNotNull(filePath)) {
key = filePath + "/" + System.currentTimeMillis() + fileName;
} else {
key = System.currentTimeMillis() + fileName;
}
if (!Common.checkFile(key)) {
return R.failed("非法上传类型!");
}
boolean flag = ossUtil.uploadFileByStream(file.getInputStream(), key, null);
TAttaInfo attaInfo;
URL url;
if (flag) {
log.info("文件:" + fileName + "上传到存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domain);
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("上传异常:" + e.getMessage());
}
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
attaInfo.setAttaUrl(String.valueOf(url));
return R.ok(attaInfo);
} else {
return R.failed("fail:上传异常");
}
}
@Override
public R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
if (null == file) {
......
......@@ -128,4 +128,9 @@ public class TAttaInfoServiceImpl extends ServiceImpl<TAttaInfoMapper, TAttaInfo
return R.failed("没有附件");
}
}
@Override
public void deleteByDomainId(String domainId) {
baseMapper.deleteByDomainId(domainId);
}
}
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorFlagVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorVo;
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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.Field;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* 档案完整度监控
*
* @author huyc
* @date 2024-06-17 16:08:58
*/
@Log4j2
@Service
@RequiredArgsConstructor
public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMapper, TCompleteMonitor> implements TCompleteMonitorService {
private final TEmployeeProjectMapper projectMapper;
/**
* 档案完整度监控简单分页查询
* @param tCompleteMonitor 档案完整度监控
* @return
*/
@Override
public IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitor tCompleteMonitor){
return baseMapper.getTCompleteMonitorPage(page,tCompleteMonitor);
}
/**
* 档案完整度监控批量导出
* @param searchVo 档案完整度监控
* @return
*/
@Override
public void listExport(HttpServletResponse response, TCompleteMonitorSearchVo searchVo){
String fileName = "档案完整度监控批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TCompleteMonitorVo> list = new ArrayList<>();
long count = baseMapper.getExportCount(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TCompleteMonitorVo.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 = baseMapper.getTCompleteMonitorExportList(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<TCompleteMonitorVo> util = new ExcelUtil<>(TCompleteMonitorVo.class);
for (TCompleteMonitorVo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("档案完整度监控"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("档案完整度监控"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
out.flush();
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
@Override
public void createComlpeteMonitor() throws IllegalAccessException {
//先删除所有的档案监控数据
baseMapper.deleteAllMonitorInfo();
//批量查询项目档案的是否完整状态
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(null);
if (!flagList.isEmpty()) {
List<String> projectIdList = new ArrayList<>();
String projectId;
for(TCompleteMonitorFlagVo flagVo : flagList) {
boolean flag = checkObjFieldIsNull(flagVo);
if(!flag){
projectId = flagVo.getEmpProjectId();
projectIdList.add(projectId);
}
}
//批量更新
if (!projectIdList.isEmpty())
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList);
}
//查询项目维度的信息
List<TCompleteMonitor> list = baseMapper.getAllMonitorEmpList(null);
//查询当天新增的项目档案数据来筛选需要刷新的数据
this.saveBatch(list);
}
/**
* 档案完整度监控简单分页查询
* @param deptNo 项目编码
* @return
*/
@Override
public IPage<TCompleteMonitorInfoVo> getMonitorEmpInfoListPage(Page<TCompleteMonitorInfoVo> page, String deptNo){
return baseMapper.getMonitorEmpInfoList(page,deptNo);
}
@Override
public void updateProjectStatusByDeptNo(String deptNo) throws IllegalAccessException{
//批量查询项目档案的是否完整状态
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(deptNo);
if (!flagList.isEmpty()) {
List<String> projectIdList = new ArrayList<>();
String projectId;
for(TCompleteMonitorFlagVo flagVo : flagList) {
boolean flag = checkObjFieldIsNull(flagVo);
if(!flag){
projectId = flagVo.getEmpProjectId();
projectIdList.add(projectId);
}
}
//批量更新
if (!projectIdList.isEmpty())
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList);
}
//删除项目监控表数据
baseMapper.deleteMonitorInfoByDeptNo(deptNo);
//查询项目维度的信息
List<TCompleteMonitor> list = baseMapper.getAllMonitorEmpList(deptNo);
//查询当天新增的项目档案数据来筛选需要刷新的数据
this.saveBatch(list);
}
/**
*
* @param obj 对象
// * @param checkField 要检查的属性集合
* @return true 指定属性有为空的 false 所有属性值都不为空
* @throws IllegalAccessException
*/
public boolean checkObjFieldIsNull(Object obj) throws IllegalAccessException {
//获取对象的类
Class<?> aClass = obj.getClass();
Field[] declaredFields = aClass.getDeclaredFields();
//筛选出包含在要检查的list 并且 属性为null的字段
for(Field field : declaredFields){
if (null == field.get(obj)) {
return true;
}
}
return false;
}
}
......@@ -271,6 +271,11 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
return baseMapper.selectPage(page,wrapper);
}
@Override
public TEmpBadRecord getByEmpId(String empId) {
return baseMapper.selectOne(Wrappers.<TEmpBadRecord>query().lambda().eq(TEmpBadRecord::getEmpId, empId).last(CommonConstants.LAST_ONE_SQL));
}
@Override
public List<TEmpBadRecord> noPageDiy(EmpBadRecordSearchVo tEmpBadRecord) {
LambdaQueryWrapper<TEmpBadRecord> wrapper = buildQueryWrapper(tEmpBadRecord);
......
......@@ -249,4 +249,10 @@ public class TEmpContactInfoServiceImpl extends ServiceImpl<TEmpContactInfoMappe
BeanUtil.copyProperties(excel, insert);
this.save(insert);
}
@Override
public TEmpContactInfo getByEmpId(String empId) {
return baseMapper.selectOne(Wrappers.<TEmpContactInfo>query().lambda().eq(TEmpContactInfo::getEmpId, empId).last(CommonConstants.LAST_ONE_SQL));
}
}
......@@ -28,6 +28,7 @@ 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.entity.TEmpBadRecord;
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.mapper.TAttaInfoMapper;
......@@ -302,4 +303,10 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
insert.setSettleDomain(emp.getDeptId());
this.save(insert);
}
@Override
public TEmpDisabilityInfo getByEmpId(String empId) {
return baseMapper.selectOne(Wrappers.<TEmpDisabilityInfo>query().lambda().eq(TEmpDisabilityInfo::getEmpId, empId).last(CommonConstants.LAST_ONE_SQL));
}
}
......@@ -542,4 +542,10 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
return baseMapper.noPageCountDiy(searchVo,idList);
}
@Override
public TEmpEducation getByEmpId(String empId) {
return baseMapper.selectOne(Wrappers.<TEmpEducation>query().lambda().eq(TEmpEducation::getEmpId, empId)
.eq(TEmpEducation::getDeleteFlag, CommonConstants.STATUS_NORMAL).last(CommonConstants.LAST_ONE_SQL));
}
}
......@@ -272,4 +272,10 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
insert.setSettleDomain(emp.getDeptId());
this.save(insert);
}
@Override
public List<TEmpFamily> getListByEmpId(String empId) {
return baseMapper.selectList(Wrappers.<TEmpFamily>query().lambda().eq(TEmpFamily::getEmpId, empId).eq(TEmpFamily::getDeleteFlag, CommonConstants.ZERO_STRING));
}
}
......@@ -282,4 +282,10 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
}
return wrapper;
}
@Override
public List<TEmpProfessionalQualification> getListByEmpId(String empId) {
return baseMapper.selectList(Wrappers.<TEmpProfessionalQualification>query().lambda().eq(TEmpProfessionalQualification::getEmpId, empId).eq(TEmpProfessionalQualification::getDeleteFlag, CommonConstants.ZERO_STRING));
}
}
......@@ -291,4 +291,9 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
return wrapper;
}
@Override
public List<TEmpWorkRecording> getListByEmpId(String empId) {
return baseMapper.selectList(Wrappers.<TEmpWorkRecording>query().lambda().eq(TEmpWorkRecording::getEmpId, empId).eq(TEmpWorkRecording::getDeleteFlag, CommonConstants.ZERO_STRING));
}
}
......@@ -49,6 +49,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
......@@ -111,6 +112,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 项目
private final TSettleDomainService tSettleDomainService;
private final OSSUtil ossUtil;
/**
* 预入职-主表简单分页查询
*
......@@ -122,6 +125,281 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
return baseMapper.getTPreEmpMainPage(page, tPreEmpMain);
}
/**
* @Description: 详情
* @Author: hgw
* @Date: 2024/6/17 17:19
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo>
**/
@Override
public R<PreEmpMainDetailVo> getByCardAndDeptId(String empIdCard, String deptId) {
TSettleDomain dept = tSettleDomainService.getById(deptId);
if (dept == null) {
return R.failed("未找到项目信息!");
}
TPreEmpMain main = baseMapper.getTPreEmpMainByCardAndDept(empIdCard, deptId);
// 是否为新建
boolean isNew = false;
TEmployeeInfo employee = null;
String empId = null;
TEmployeeProject project = null;
PreEmpMainDetailVo vo = new PreEmpMainDetailVo();
if (main != null) {
if (CommonConstants.FOUR_STRING.equals(main.getStatus())) {
return R.failed("信息已填写,请勿重复操作!");
}
} else {
isNew = true;
main = new TPreEmpMain();
main.setEmpIdcard(empIdCard);
main.setDeptId(dept.getId());
main.setDeptName(dept.getDepartName());
main.setDeptNo(dept.getDepartNo());
main.setUnitId(dept.getCustomerId());
main.setUnitName(dept.getCustomerName());
main.setUnitNo(dept.getCustomerNo());
main.setBusinessPrimaryType(dept.getBusinessPrimaryType());
main.setBusinessSecondType(dept.getBusinessSecondType());
main.setBusinessThirdType(dept.getBusinessThirdType());
main.setStatus(CommonConstants.FIVE_STRING);
// 预入职-员工申明
TPreEmpDeclaration tPreEmpDeclaration;
if (Common.isNotNull(main.getDeclarationId())) {
tPreEmpDeclaration = tPreEmpDeclarationService.getById(main.getDeclarationId());
} else {
tPreEmpDeclaration = tPreEmpDeclarationService.getTPreEmpDeclarationList();
}
vo.setTPreEmpDeclaration(tPreEmpDeclaration);
main.setDeclarationId(tPreEmpDeclaration.getId());
this.save(main);
// 查询档案信息
employee = tEmployeeInfoService.getInfoByIdcard(empIdCard);
if (employee != null) {
empId = employee.getId();
TPreEmployeeInfo tPreEmployeeInfo = new TPreEmployeeInfo();
BeanUtil.copyProperties(employee, tPreEmployeeInfo);
tPreEmployeeInfo.setOldId(employee.getId());
vo.setTPreEmployeeInfo(tPreEmployeeInfo);
project = tEmployeeProjectService.getByEmpIdAndDeptId(empIdCard, deptId);
if (project != null) {
TPreEmployeeProject tPreEmployeeProject = new TPreEmployeeProject();
BeanUtil.copyProperties(project, tPreEmployeeProject);
tPreEmployeeProject.setOldId(project.getId());
vo.setTPreEmployeeProject(tPreEmployeeProject);
}
}
}
String id = main.getId();
vo.setMain(main);
// 预入职-员工不良记录表
TPreEmpBadRecord tPreEmpBadRecord = tPreEmpBadRecordService.getTPreEmpBadRecordList(id);
if (tPreEmpBadRecord == null) {
tPreEmpBadRecord = new TPreEmpBadRecord();
if (Common.isNotNull(empId)) {
TEmpBadRecord info = tEmpBadRecordService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpBadRecord);
tPreEmpBadRecord.setOldId(info.getId());
}
}
tPreEmpBadRecord.setPreMainId(id);
tPreEmpBadRecord.setSettleDomain(deptId);
tPreEmpBadRecord.setProject(dept.getDepartName());
tPreEmpBadRecord.setProjectCode(dept.getDepartNo());
tPreEmpBadRecord.setEmpIdcard(empIdCard);
tPreEmpBadRecordService.save(tPreEmpBadRecord);
}
vo.setTPreEmpBadRecord(tPreEmpBadRecord);
// 预入职-紧急联络人
TPreEmpContactInfo tPreEmpContactInfo = tPreEmpContactInfoService.getTPreEmpContactInfoList(id);
if (tPreEmpContactInfo == null) {
tPreEmpContactInfo = new TPreEmpContactInfo();
if (Common.isNotNull(empId)) {
TEmpContactInfo info = tEmpContactInfoService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpContactInfo);
tPreEmpContactInfo.setOldId(info.getId());
}
}
tPreEmpContactInfo.setPreMainId(id);
if (employee != null) {
tPreEmpContactInfo.setEmpName(employee.getEmpName());
}
tPreEmpContactInfo.setEmpIdcard(empIdCard);
tPreEmpContactInfoService.save(tPreEmpContactInfo);
}
vo.setTPreEmpContactInfo(tPreEmpContactInfo);
// 预入职-员工伤残信息表
TPreEmpDisabilityInfo tPreEmpDisabilityInfo = tPreEmpDisabilityInfoService.getTPreEmpDisabilityInfoList(id);
if (tPreEmpDisabilityInfo == null) {
tPreEmpDisabilityInfo = new TPreEmpDisabilityInfo();
if (Common.isNotNull(empId)) {
TEmpDisabilityInfo info = tEmpDisabilityInfoService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpDisabilityInfo);
tPreEmpDisabilityInfo.setOldId(info.getId());
}
}
tPreEmpDisabilityInfo.setPreMainId(id);
tPreEmpDisabilityInfo.setSettleDomain(deptId);
if (employee != null) {
tPreEmpDisabilityInfo.setEmpId(employee.getId());
tPreEmpDisabilityInfo.setEmpName(employee.getEmpName());
tPreEmpDisabilityInfo.setEmpCode(employee.getEmpCode());
}
tPreEmpDisabilityInfo.setEmpIdcard(empIdCard);
tPreEmpDisabilityInfoService.save(tPreEmpDisabilityInfo);
}
vo.setTPreEmpDisabilityInfo(tPreEmpDisabilityInfo);
// 预入职-员工学历信息表
TPreEmpEducation tPreEmpEducation = tPreEmpEducationService.getTPreEmpEducationList(id);
if (tPreEmpEducation == null) {
tPreEmpEducation = new TPreEmpEducation();
if (Common.isNotNull(empId)) {
TEmpEducation info = tEmpEducationService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpEducation);
tPreEmpEducation.setOldId(info.getId());
// 附件
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
tPreEmpEducation.setAttaList(attaInfoList);
}
}
tPreEmpEducation.setPreMainId(id);
tPreEmpEducation.setSettleDomain(deptId);
if (employee != null) {
tPreEmpEducation.setEmpId(employee.getId());
tPreEmpEducation.setEmpName(employee.getEmpName());
tPreEmpEducation.setEmpCode(employee.getEmpCode());
}
tPreEmpEducation.setEmpIdcard(empIdCard);
tPreEmpEducationService.save(tPreEmpEducation);
}
vo.setTPreEmpEducation(tPreEmpEducation);
// 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamilyList = tPreEmpFamilyService.getTPreEmpFamilyList(id);
if (tPreEmpFamilyList == null) {
tPreEmpFamilyList = new ArrayList<>();
if (Common.isNotNull(empId)) {
List<TEmpFamily> infoList = tEmpFamilyService.getListByEmpId(empId);
if (infoList != null && !infoList.isEmpty()) {
TPreEmpFamily record;
for (TEmpFamily info : infoList) {
record = new TPreEmpFamily();
BeanUtil.copyProperties(info, record);
record.setOldId(info.getId());
record.setSettleDomain(deptId);
if (employee != null) {
record.setEmpId(employee.getId());
record.setEmpName(employee.getEmpName());
record.setEmpCode(employee.getEmpCode());
}
record.setEmpIdcard(empIdCard);
tPreEmpFamilyList.add(record);
}
tPreEmpFamilyService.saveBatch(tPreEmpFamilyList);
}
}
}
vo.setTPreEmpFamilyList(tPreEmpFamilyList);
// 预入职-人员档案表
if (vo.getTPreEmployeeInfo() == null) {
TPreEmployeeInfo tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(id);
vo.setTPreEmployeeInfo(tPreEmployeeInfo);
}
// 预入职-项目档案表
if (vo.getTPreEmployeeProject() == null) {
TPreEmployeeProject tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(id);
vo.setTPreEmployeeProject(tPreEmployeeProject);
}
// 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualificationList = tPreEmpProfessionalQualificationService.getTPreEmpProfessionalQualificationList(id);
if (tPreEmpProfessionalQualificationList == null) {
tPreEmpProfessionalQualificationList = new ArrayList<>();
if (Common.isNotNull(empId)) {
List<TEmpProfessionalQualification> infoList = tEmpProfessionalQualificationService.getListByEmpId(empId);
if (infoList != null && !infoList.isEmpty()) {
TPreEmpProfessionalQualification record;
for (TEmpProfessionalQualification info : infoList) {
record = new TPreEmpProfessionalQualification();
BeanUtil.copyProperties(info, record);
record.setOldId(info.getId());
record.setSettleDomain(deptId);
if (employee != null) {
record.setEmpId(employee.getId());
record.setEmpName(employee.getEmpName());
record.setEmpCode(employee.getEmpCode());
}
// 附件
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
record.setAttaList(attaInfoList);
record.setEmpIdcard(empIdCard);
tPreEmpProfessionalQualificationList.add(record);
}
tPreEmpProfessionalQualificationService.saveBatch(tPreEmpProfessionalQualificationList);
}
}
}
vo.setTPreEmpProfessionalQualificationList(tPreEmpProfessionalQualificationList);
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecordingList = tPreEmpWorkRecordingService.getTPreEmpWorkRecordingList(id);
if (tPreEmpWorkRecordingList == null) {
tPreEmpWorkRecordingList = new ArrayList<>();
if (Common.isNotNull(empId)) {
List<TEmpWorkRecording> infoList = tEmpWorkRecordingService.getListByEmpId(empId);
if (infoList != null && !infoList.isEmpty()) {
TPreEmpWorkRecording record;
for (TEmpWorkRecording info : infoList) {
record = new TPreEmpWorkRecording();
BeanUtil.copyProperties(info, record);
record.setOldId(info.getId());
record.setSettleDomain(deptId);
if (employee != null) {
record.setEmpId(employee.getId());
record.setEmpName(employee.getEmpName());
record.setEmpCode(employee.getEmpCode());
}
record.setEmpIdcard(empIdCard);
tPreEmpWorkRecordingList.add(record);
}
tPreEmpWorkRecordingService.saveBatch(tPreEmpWorkRecordingList);
}
}
}
vo.setTPreEmpWorkRecordingList(tPreEmpWorkRecordingList);
// 预入职-附件 9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(id);
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
vo.setAttaInfoList(attaInfoList);
return R.ok(vo);
}
/**
* @Description: 详情
* @Author: hgw
......@@ -153,10 +431,21 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
vo.setTPreEmpDisabilityInfo(tPreEmpDisabilityInfo);
// 预入职-员工学历信息表
TPreEmpEducation tPreEmpEducation = tPreEmpEducationService.getTPreEmpEducationList(id);
if (tPreEmpEducation != null) {
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(tPreEmpEducation.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
tPreEmpEducation.setAttaList(attaInfoList);
}
vo.setTPreEmpEducation(tPreEmpEducation);
// 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamily = tPreEmpFamilyService.getTPreEmpFamilyList(id);
vo.setTPreEmpFamily(tPreEmpFamily);
vo.setTPreEmpFamilyList(tPreEmpFamily);
// 预入职-人员档案表
TPreEmployeeInfo tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(id);
vo.setTPreEmployeeInfo(tPreEmployeeInfo);
......@@ -164,14 +453,37 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TPreEmployeeProject tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(id);
vo.setTPreEmployeeProject(tPreEmployeeProject);
// 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = tPreEmpProfessionalQualificationService.getTPreEmpProfessionalQualificationList(id);
vo.setTPreEmpProfessionalQualification(tPreEmpProfessionalQualification);
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualificationList = tPreEmpProfessionalQualificationService.getTPreEmpProfessionalQualificationList(id);
if (tPreEmpProfessionalQualificationList != null) {
List<TAttaInfo> attaInfoList;
for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualificationList) {
attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
info.setAttaList(attaInfoList);
}
}
}
vo.setTPreEmpProfessionalQualificationList(tPreEmpProfessionalQualificationList);
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecording = tPreEmpWorkRecordingService.getTPreEmpWorkRecordingList(id);
vo.setTPreEmpWorkRecording(tPreEmpWorkRecording);
vo.setTPreEmpWorkRecordingList(tPreEmpWorkRecording);
// 预入职-附件 9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(id);
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
vo.setAttaInfoList(attaInfoList);
return R.ok(vo);
} else {
......@@ -179,6 +491,45 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
/**
* @Description: 单个完善信息
* @Author: hgw
* @Date: 2024/6/17 17:42
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Override
public R<String> doImproveInformation(PreEmpMainDetailVo vo) {
TPreEmpMain preMain = vo.getMain();
TPreEmployeeInfo tPreEmployee = vo.getTPreEmployeeInfo();
TPreEmployeeProject project = vo.getTPreEmployeeProject();
if (preMain == null || tPreEmployee == null || project == null ||
Common.isEmpty(preMain.getId()) || Common.isEmpty(tPreEmployee.getId()) || Common.isEmpty(project.getId())) {
return R.failed("请传主表ID与人员ID与项目ID");
}
TPreEmpMain main = this.getById(preMain.getId());
if (!CommonConstants.ONE_STRING.equals(main.getStatus())) {
return R.failed("状态不为待完善,不可编辑!");
}
String errorInfo = null;
if (Common.isEmpty(tPreEmployee.getEmpNatrue())) {
errorInfo = "【员工类型】";
}
if (Common.isEmpty(tPreEmployee.getFileProvince())) {
errorInfo += "【档案地省】";
}
if (Common.isNotNull(errorInfo)) {
return R.failed(errorInfo + "不可为空!");
}
tPreEmployeeInfoService.updateById(tPreEmployee);
project.setEmpNatrue(tPreEmployee.getEmpNatrue());
tPreEmployeeProjectService.updateById(project);
main.setEmpNatrue(tPreEmployee.getEmpNatrue());
main.setStatus(CommonConstants.TWO_STRING);
this.updateById(main);
return R.ok("已完善!");
}
/**
* @param vo
* @Description: 草稿
......@@ -250,9 +601,20 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (tPreEmpEducation != null) {
tPreEmpEducation.setPreMainId(mainId);
tPreEmpEducationService.saveOrUpdate(tPreEmpEducation);
// 附件
if (tPreEmpEducation.getAttaList() != null && !tPreEmpEducation.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = tPreEmpEducation.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainId(tPreEmpEducation.getId());
for (TAttaInfo atta : attaList) {
atta.setDomainId(tPreEmpEducation.getId());
}
tAttaInfoService.saveOrUpdateBatch(attaList);
}
}
}
// 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamily = vo.getTPreEmpFamily();
List<TPreEmpFamily> tPreEmpFamily = vo.getTPreEmpFamilyList();
if (tPreEmpFamily != null) {
for (TPreEmpFamily info : tPreEmpFamily) {
info.setPreMainId(mainId);
......@@ -264,10 +626,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (tPreEmployeeInfo != null) {
if (tPreEmpEducation != null) {
if (Common.isNotNull(tPreEmpEducation.getEducationName())) {
// 5大专
// 6本科
// 7硕士
// 8博士
// 5大专 6本科 7硕士 8博士
if ("5".equals(tPreEmpEducation.getEducationName())
|| "6".equals(tPreEmpEducation.getEducationName())
|| "7".equals(tPreEmpEducation.getEducationName())
......@@ -289,15 +648,26 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeProjectService.saveOrUpdate(tPreEmployeeProject);
}
// 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = vo.getTPreEmpProfessionalQualification();
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = vo.getTPreEmpProfessionalQualificationList();
if (tPreEmpProfessionalQualification != null) {
for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualification) {
info.setPreMainId(mainId);
tPreEmpProfessionalQualificationService.saveOrUpdate(info);
// 附件
if (info.getAttaList() != null && !info.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = info.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainId(info.getId());
for (TAttaInfo atta : attaList) {
atta.setDomainId(info.getId());
}
tAttaInfoService.saveOrUpdateBatch(attaList);
}
}
}
tPreEmpProfessionalQualificationService.saveOrUpdateBatch(tPreEmpProfessionalQualification);
}
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecording = vo.getTPreEmpWorkRecording();
List<TPreEmpWorkRecording> tPreEmpWorkRecording = vo.getTPreEmpWorkRecordingList();
if (tPreEmpWorkRecording != null) {
for (TPreEmpWorkRecording info : tPreEmpWorkRecording) {
info.setPreMainId(mainId);
......@@ -328,6 +698,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 如果档案项目id都没有,则新增。newFlag是true:
boolean newFlag = true;
String empId = null;
String empProjectId = null;
String empIdCard = null;
// 1人员档案
TEmployeeInfo emp = null;
......@@ -360,6 +731,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} else {
project = this.saveTEmployeeProject(project, user, tPreEmployeeProject, emp, dept);
}
if (Common.isNotNull(project)) {
empProjectId = project.getId();
}
} else {
// 新建档案、项目档案,将档案id赋值,给其他附属信息
if (tPreEmployeeInfo != null) {
......@@ -384,8 +758,14 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
empIdCard = emp.getEmpIdcard();
// 2项目档案
project = this.saveTEmployeeProject(project, user, tPreEmployeeProject, emp, dept);
if (Common.isNotNull(project)) {
empProjectId = project.getId();
}
}
}
if (emp == null) {
return R.failed("新建员工失败!");
}
// 3:其他附属信息
......@@ -420,6 +800,23 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tEmpEducationService.updateEducationToNoByIdCard(empIdCard);
}
tEmpEducationService.saveOrUpdate(tEmpEducation);
if (tPreEmpEducation.getAttaList() != null && !tPreEmpEducation.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = tPreEmpEducation.getAttaList();
if (attaList != null) {
String attaId = tPreEmpEducation.getOldId();
if (!newFlag) {
tAttaInfoService.deleteByDomainId(attaId);
}
TAttaInfo newEmpAtta;
for (TAttaInfo atta : attaList) {
newEmpAtta = new TAttaInfo();
BeanUtil.copyProperties(atta, newEmpAtta, "id");
newEmpAtta.setDomainId(tEmpEducation.getId());
tAttaInfoService.saveOrUpdate(newEmpAtta);
}
}
}
}
// 预入职-员工不良记录表
TPreEmpBadRecord tPreEmpBadRecord = vo.getTPreEmpBadRecord();
......@@ -431,7 +828,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (tEmpBadRecord == null) {
tEmpBadRecord = new TEmpBadRecord();
}
BeanUtil.copyProperties(tPreEmpEducation, tEmpBadRecord);
BeanUtil.copyProperties(tPreEmpBadRecord, tEmpBadRecord);
tEmpBadRecordService.saveOrUpdate(tEmpBadRecord);
}
// 预入职-紧急联络人
......@@ -457,12 +854,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (tEmpDisabilityInfo == null) {
tEmpDisabilityInfo = new TEmpDisabilityInfo();
}
BeanUtil.copyProperties(tPreEmpContactInfo, tEmpDisabilityInfo);
BeanUtil.copyProperties(tPreEmpDisabilityInfo, tEmpDisabilityInfo);
tEmpDisabilityInfoService.saveOrUpdate(tEmpDisabilityInfo);
}
// 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamilyList = vo.getTPreEmpFamily();
List<TPreEmpFamily> tPreEmpFamilyList = vo.getTPreEmpFamilyList();
if (tPreEmpFamilyList != null) {
// 先删除其他信息
tEmpFamilyService.deleteByEmpIdAndTable(empId, "t_emp_family");
......@@ -470,7 +867,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpFamily tEmpFamily;
for (TPreEmpFamily tPreEmpFamily : tPreEmpFamilyList) {
tEmpFamily = new TEmpFamily();
BeanUtil.copyProperties(tPreEmpContactInfo, tEmpFamily);
BeanUtil.copyProperties(tPreEmpFamily, tEmpFamily);
if (Common.isNotNull(tPreEmpFamily.getOldId())) {
tEmpFamily.setId(tPreEmpFamily.getOldId());
}
......@@ -479,24 +876,38 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tEmpFamilyService.saveOrUpdateBatch(tEmpFamilyList);
}
// 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualificationList = vo.getTPreEmpProfessionalQualification();
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualificationList = vo.getTPreEmpProfessionalQualificationList();
if (tPreEmpProfessionalQualificationList != null) {
// 先删除其他信息
tEmpFamilyService.deleteByEmpIdAndTable(empId, "t_pre_emp_professional_qualification");
List<TEmpProfessionalQualification> tEmpProfessionalQualificationList = new ArrayList<>();
TEmpProfessionalQualification info;
for (TPreEmpProfessionalQualification preInfo : tPreEmpProfessionalQualificationList) {
info = new TEmpProfessionalQualification();
BeanUtil.copyProperties(tPreEmpContactInfo, info);
BeanUtil.copyProperties(preInfo, info);
if (Common.isNotNull(preInfo.getOldId())) {
info.setId(preInfo.getOldId());
}
tEmpProfessionalQualificationList.add(info);
tEmpProfessionalQualificationService.saveOrUpdate(info);
if (preInfo.getAttaList() != null && !preInfo.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = preInfo.getAttaList();
if (attaList != null) {
String attaId = preInfo.getOldId();
if (!newFlag) {
tAttaInfoService.deleteByDomainId(attaId);
}
TAttaInfo newEmpAtta;
for (TAttaInfo atta : attaList) {
newEmpAtta = new TAttaInfo();
BeanUtil.copyProperties(atta, newEmpAtta, "id");
newEmpAtta.setDomainId(info.getId());
tAttaInfoService.saveOrUpdate(newEmpAtta);
}
}
}
}
tEmpProfessionalQualificationService.saveOrUpdateBatch(tEmpProfessionalQualificationList);
}
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecordingList = vo.getTPreEmpWorkRecording();
List<TPreEmpWorkRecording> tPreEmpWorkRecordingList = vo.getTPreEmpWorkRecordingList();
if (tPreEmpWorkRecordingList != null) {
// 先删除其他信息
tEmpFamilyService.deleteByEmpIdAndTable(empId, "t_pre_emp_work_recording");
......@@ -504,7 +915,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpWorkRecording info;
for (TPreEmpWorkRecording preInfo : tPreEmpWorkRecordingList) {
info = new TEmpWorkRecording();
BeanUtil.copyProperties(tPreEmpContactInfo, info);
BeanUtil.copyProperties(preInfo, info);
if (Common.isNotNull(preInfo.getOldId())) {
info.setId(preInfo.getOldId());
}
......@@ -512,6 +923,18 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
tEmpWorkRecordingService.saveOrUpdateBatch(tEmpWorkRecordingList);
}
// 预入职-附件
List<TAttaInfo> attaList = vo.getAttaInfoList();
if (attaList != null) {
// 先删除其他信息
tAttaInfoService.deleteByDomainId(empProjectId);
for (TAttaInfo atta : attaList) {
if (Common.isEmpty(atta.getDomainId())) {
atta.setDomainId(empProjectId);
}
}
tAttaInfoService.saveOrUpdateBatch(attaList);
}
return R.ok("保存档案成功!");
}
......@@ -757,11 +1180,16 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
return wrapper;
}
/**
* @Description: 批量完善信息
* @Author: hgw
* @Date: 2024/6/21 15:26
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage>>
**/
@Override
public R<List<ErrorMessage>> importDiy(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TPreEmpMainVo> util1 = new ExcelUtil<>(TPreEmpMainVo.class);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
......@@ -812,29 +1240,71 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
if (errorMessageList.isEmpty()) {
return R.ok();
} else {
return R.failed(errorMessageList);
}
}
private void importTPreEmpMain(List<TPreEmpMainVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
ErrorMessage errorMsg;
TPreEmpMain main;
TPreEmployeeInfo employee;
TPreEmployeeProject project;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
TPreEmpMainVo excel = excelVOList.get(i);
// 数据合法情况 TODO
if (Common.isEmpty(excel.getDeptNo()) || Common.isEmpty(excel.getEmpIdcard()) || Common.isEmpty(excel.getEmpNatrue()) || Common.isEmpty(excel.getFileProvince())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "完善信息不可为空!"));
} else {
// 插入
insertExcel(excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
main = baseMapper.getTPreEmpMainByCardAndDeptNo(excel.getEmpIdcard(), excel.getDeptNo());
if (main == null || Common.isEmpty(main.getId()) || Common.isEmpty(main.getStatus())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到预入职主表!"));
} else {
if (!CommonConstants.ONE_STRING.equals(main.getStatus())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "状态不为待完善,不可编辑!"));
} else {
employee = tPreEmployeeInfoService.getTPreEmployeeInfoList(main.getId());
if (employee == null || Common.isEmpty(employee.getId())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到预入职人员表!"));
} else {
project = tPreEmployeeProjectService.getTPreEmployeeProjectList(main.getId());
if (project == null || Common.isEmpty(project.getId())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到预入职项目档案表!"));
} else {
employee.setEmpNatrue(excel.getEmpNatrue());
project.setEmpNatrue(excel.getEmpNatrue());
employee.setFileProvince(Integer.parseInt(excel.getFileProvince()));
if (Common.isEmpty(excel.getFileCity())) {
employee.setFileCity(CommonConstants.ZERO_INT);
} else {
try {
employee.setFileCity(Integer.parseInt(excel.getFileCity()));
} catch (Exception e) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到市!"));
}
}
if (Common.isEmpty(excel.getFileTown())) {
employee.setFileTown(CommonConstants.ZERO_INT);
} else {
try {
employee.setFileTown(Integer.parseInt(excel.getFileTown()));
} catch (Exception e) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到县!"));
}
}
tPreEmployeeInfoService.updateById(employee);
tPreEmployeeProjectService.updateById(project);
main.setEmpNatrue(excel.getEmpNatrue());
main.setStatus(CommonConstants.TWO_STRING);
this.updateById(main);
}
}
/**
* 插入excel bad record
*/
private void insertExcel(TPreEmpMainVo excel) {
TPreEmpMain insert = new TPreEmpMain();
BeanUtil.copyProperties(excel, insert);
this.save(insert);
}
}
}
}
}
}
......@@ -123,4 +123,8 @@
where EXISTS (select 1 from m_salary_prova_atta b where b.SALARY_PROVA_ID = #{applyId} and a.id = b.ATTA_ID);
</select>
<delete id="deleteByDomainId">
delete from t_atta_info where domain_id=#{domainId}
</delete>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!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.TCompleteMonitorMapper">
<resultMap id="tCompleteMonitorMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor">
<id property="id" column="ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="businessPrimaryType" column="BUSINESS_PRIMARY_TYPE"/>
<result property="businessSecondType" column="BUSINESS_SECOND_TYPE"/>
<result property="businessThirdType" column="BUSINESS_THIRD_TYPE"/>
<result property="inusePersonNum" column="INUSE_PERSON_NUM"/>
<result property="isComplete" column="IS_COMPLETE"/>
<result property="incompleteNum" column="INCOMPLETE_NUM"/>
<result property="completePer" column="COMPLETE_PER"/>
<result property="afterEmployment" column="AFTER_EMPLOYMENT"/>
<result property="afterIsComplete" column="AFTER_IS_COMPLETE"/>
<result property="afterIncompleteNum" column="AFTER_INCOMPLETE_NUM"/>
<result property="alertUser" column="ALERT_USER"/>
</resultMap>
<resultMap id="tCompleteMonitorExport" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorVo">
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="businessPrimaryType" column="BUSINESS_PRIMARY_TYPE"/>
<result property="inusePersonNum" column="INUSE_PERSON_NUM"/>
<result property="isComplete" column="IS_COMPLETE"/>
<result property="incompleteNum" column="INCOMPLETE_NUM"/>
<result property="completePer" column="COMPLETE_PER"/>
<result property="afterEmployment" column="AFTER_EMPLOYMENT"/>
<result property="afterIsComplete" column="AFTER_IS_COMPLETE"/>
<result property="afterIncompleteNum" column="AFTER_INCOMPLETE_NUM"/>
<result property="alertUser" column="ALERT_USER"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.UNIT_NAME,
a.UNIT_NO,
a.DEPT_NAME,
a.DEPT_NO,
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.INUSE_PERSON_NUM,
a.IS_COMPLETE,
a.INCOMPLETE_NUM,
a.COMPLETE_PER,
a.AFTER_EMPLOYMENT,
a.AFTER_IS_COMPLETE,
a.AFTER_INCOMPLETE_NUM,
a.ALERT_USER
</sql>
<sql id="tCompleteMonitor_where">
<if test="tCompleteMonitor != null">
<if test="tCompleteMonitor.id != null and tCompleteMonitor.id.trim() != ''">
AND a.ID = #{tCompleteMonitor.id}
</if>
<if test="tCompleteMonitor.unitName != null and tCompleteMonitor.unitName.trim() != ''">
AND a.UNIT_NAME like concat('%',#{tCompleteMonitor.unitName},'%')
</if>
<if test="tCompleteMonitor.unitNo != null and tCompleteMonitor.unitNo.trim() != ''">
AND a.UNIT_NO = #{tCompleteMonitor.unitNo}
</if>
<if test="tCompleteMonitor.deptName != null and tCompleteMonitor.deptName.trim() != ''">
AND a.DEPT_NAME like concat('%',#{tCompleteMonitor.deptName},'%')
</if>
<if test="tCompleteMonitor.deptNo != null and tCompleteMonitor.deptNo.trim() != ''">
AND a.DEPT_NO = #{tCompleteMonitor.deptNo}
</if>
<if test="tCompleteMonitor.businessThirdType != null and tCompleteMonitor.businessThirdType.trim() != ''">
AND a.BUSINESS_THIRD_TYPE like concat('%',#{tCompleteMonitor.businessThirdType},'%')
</if>
<if test="tCompleteMonitor.isComplete != null and tCompleteMonitor.isComplete.trim() != ''">
AND a.IS_COMPLETE = #{tCompleteMonitor.isComplete}
</if>
<if test="tCompleteMonitor.afterIsComplete != null and tCompleteMonitor.afterIsComplete.trim() != ''">
AND a.AFTER_IS_COMPLETE = #{tCompleteMonitor.afterIsComplete}
</if>
</if>
</sql>
<!--tCompleteMonitor简单分页查询-->
<select id="getTCompleteMonitorPage" resultMap="tCompleteMonitorMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_complete_monitor a
<where>
1=1
<include refid="tCompleteMonitor_where"/>
</where>
</select>
<!--tCompleteMonitor简单分页查询-->
<select id="getExportCount" resultType="java.lang.Long">
SELECT
count(1)
FROM t_complete_monitor a
<where>
1=1
<include refid="tCompleteMonitor_where"/>
</where>
</select>
<!--tCompleteMonitor简单分页查询-->
<select id="getTCompleteMonitorExportList" resultMap="tCompleteMonitorExport">
SELECT
a.UNIT_NAME,
a.UNIT_NO,
a.DEPT_NAME,
a.DEPT_NO,
concat(BUSINESS_PRIMARY_TYPE,'-',BUSINESS_SECOND_TYPE,'-',BUSINESS_THIRD_TYPE) as BUSINESS_PRIMARY_TYPE,
a.INUSE_PERSON_NUM,
a.IS_COMPLETE,
a.INCOMPLETE_NUM,
a.COMPLETE_PER,
a.AFTER_EMPLOYMENT,
a.AFTER_IS_COMPLETE,
a.AFTER_INCOMPLETE_NUM,
a.ALERT_USER
FROM t_complete_monitor a
<where>
1=1
<include refid="tCompleteMonitor_where"/>
</where>
<if test="tCompleteMonitor.limitStart != null">
limit #{tCompleteMonitor.limitStart},#{tCompleteMonitor.limitEnd}
</if>
</select>
<!--获取详情人员列表-->
<select id="getMonitorEmpInfoList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorInfoVo">
select
a.EMP_NAME empName,
a.EMP_IDCARD empIdCard,
b.EMP_PHONE phone,
a.CREATE_TIME inTime,
if(a.IS_COMPLETE = '0','是','否') isComplete,
a.EMP_ID empInfoId,
from
t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
where a.DELETE_FLAG = '0' and a.dept_no = #{deptNo}
</select>
<!--生成数据封装-->
<select id="getAllMonitorEmpList" resultMap="tCompleteMonitorMap">
select
a.UNIT_NAME,
a.UNIT_NO,
a.DEPT_NAME,
a.DEPT_NO,
a.BUSINESS_PRIMARY_TYPE,
,a.BUSINESS_SECOND_TYPE,
,a.BUSINESS_THIRD_TYPE,
count(a.EMP_IDCARD) as INUSE_PERSON_NUM,
if(sum(if(a.PROJECT_STATUS = 0 and a.IS_COMPLETE = '0',0,1)) > 0,1,0) as IS_COMPLETE,
sum(if(a.IS_COMPLETE = '0',0,1)) as INCOMPLETE_NUM,
concat(ROUND((count(a.EMP_IDCARD) - sum(if(a.IS_COMPLETE = '0',0,1)))/count(a.EMP_IDCARD)),'%') as COMPLETE_PER,
sum(if(a.PROJECT_STATUS = 0 and DATE_FORMAT(a.CREATE_TIME,'%Y-%m-%d') >= '2024-06-01',1,0)) as AFTER_EMPLOYMENT,
if(sum(if(a.PROJECT_STATUS = 0 and DATE_FORMAT(a.CREATE_TIME,'%Y-%m-%d') >= '2024-06-01' and a.IS_COMPLETE = '0',0,1)) > 0,1,0) AFTER_IS_COMPLETE,
sum(if(a.PROJECT_STATUS = 0 and DATE_FORMAT(a.CREATE_TIME,'%Y-%m-%d') >= '2024-06-01' and a.IS_COMPLETE = '0',0,1)) as AFTER_INCOMPLETE_NUM,
a.CREATE_NAME as ALERT_USER
from
t_employee_project a
where DELETE_FLAG = '0'
<if test="deptNo != null and deptNo.trim() != ''">
and a.DEPT_NO = #{deptNo}
</if>
group by a.DEPT_NO
</select>
<!--判断项目档案的完整状态-->
<select id="checkEmpProjectCompleteFlag" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorFlagVo">
select
e.EMP_SEX empSex,
e.VALIDITY_START validityStart,
e.VALIDITY_END validityEnd,
e.EMP_BIRTHDAY empBirthday,
e.EMP_AGE empAge,
e.EMP_MARRI_STATUS empMarriStatus,
e.EMP_NATIONAL empNational,
e.POLITICAL_STATUS politicalStatus,
e.EMP_PHONE empPhone,
e.EMP_REGIS_TYPE empRegisType,
e.FILE_PROVINCE fileProvince,
e.FILE_CITY fileCity,
e.IS_COLLEGE isCollege,
e.HIGN_EDUCATION hignEducation,
e.SCHOOL,
e.MAJOR,
e.ADMISSION_DATE admissionDate,
e.GRADUTION_DATE gradutionDate,
e.CONTACT_ADDRESS contactAddress,
e.FIRST_WORK_FLAG firstWorkFlag,
e.HAVE_QUALIFICATION haveQualification,
a.DEPT_NAME deptName,
a.UNIT_NAME unitName,
a.BUSINESS_PRIMARY_TYPE businessPrimaryType,
a.BUSINESS_SECOND_TYPE businessSecondType,
a.BUSINESS_THIRD_TYPE businessThirdType,
a.WORKING_HOURS workingHours,
a.TRY_PERIOD tryPeriod,
a.ENJOIN_DATE enjoinDate,
a.POST,
a.id as empProjectId,
d.id as contactInfoId,
if(ifnull(f.OCCUPATIONAL_DISEASE_FLAG,1) != 1 and ifnull(f.INFECTIOUS_DISEASE_FLAG,1) != 1 and ifnull(f.DISABILITY_FLAG,1) != 1 and ifnull(f.OTHER_FLAG,1) != 1,'1',null) as disabilityFlag,
if(ifnull(b.REMARK,1) != 1,'1',null) as badRecordFlag,
if(c.count >0,'1',null) as educationFlag,
if(g.count >0,'1',null) as familyFlag
from
t_employee_project a
left join (
select
ee.ID,
ee.EMP_SEX,
ee.VALIDITY_START,
ee.VALIDITY_END,
ee.EMP_BIRTHDAY,
ee.EMP_AGE,
ee.EMP_MARRI_STATUS,
ee.EMP_NATIONAL,
ee.POLITICAL_STATUS,
ee.EMP_PHONE,
ee.EMP_REGIS_TYPE,
ee.FILE_PROVINCE,
ee.FILE_CITY,
ee.IS_COLLEGE,
ee.HIGN_EDUCATION,
ee.SCHOOL,
ee.MAJOR,
ee.ADMISSION_DATE,
ee.GRADUTION_DATE,
ee.CONTACT_ADDRESS,
ee.FIRST_WORK_FLAG,
ee.HAVE_QUALIFICATION
from t_employee_info ee
left join t_atta_info tt on ee.id = tt.DOMAIN_ID and tt.RELATION_TYPE = '9'
left join t_atta_info yy on ee.id = yy.DOMAIN_ID and yy.RELATION_TYPE = '10'
where ee.DELETE_FLAG = '0' and ee.FILE_STATUS = 0 and tt.id is not null and yy.id is not null
group by ee.ID
) e on a.EMP_ID = e.ID
left join t_emp_bad_record b on a.EMP_IDCARD = b.EMP_IDCARD
left join (select EMP_ID,sum(if(ifnull(HIGH_IDENTIFICATION,-1) != -1 and ifnull(SCHOOL,-1) != -1 and ifnull(MAJOR,-1) != -1 and ifnull(TYPE,-1) != -1 and ifnull(ENTRY_DATE,-1) != -1 and ifnull(GRADUTION_DATE,-1) != -1,1,0)) as count from t_emp_education a left join t_atta_info b on a.id = b.domain_id where a.DELETE_FLAG = '0' and b.RELATION_TYPE = '0' group by a.EMP_ID) c on a.EMP_ID = c.EMP_ID
left join t_emp_contact_info d on a.EMP_IDCARD = d.EMP_IDCARD
left join t_emp_disability_info f on a.EMP_ID = f.EMP_ID and f.DELETE_FLAG = '1'
left join (select EMP_ID,sum(if(ifnull(RELATIONSHIP_SELF,-1) != -1 and ifnull(FAMILY_NAME,-1) != -1 and ifnull(CONTRACT_TEL,-1) != -1,1,0)) as count from t_emp_family where DELETE_FLAG = '1' group by EMP_ID) g on a.EMP_ID = g.EMP_ID
where a.DELETE_FLAG = '0' and a.PROJECT_STATUS = 0
<if test="deptNo != null and deptNo.trim() != ''">
and a.DEPT_NO = #{deptNo}
</if>
group by a.ID
</select>
<!--删除所有监控数据-->
<update id="deleteAllMonitorInfo">
TRUNCATE t_complete_monitor
</update>
<!--根据项目编码删除监控数据-->
<delete id="deleteMonitorInfoByDeptNo">
delete from t_complete_monitor WHERE DEPT_NO = #{deptNo}
</delete>
</mapper>
......@@ -1086,4 +1086,12 @@
set a.POST = #{post}
WHERE a.DEPT_NO=#{deptNo} and a.EMP_IDCARD=#{empIdcard} and a.DELETE_FLAG ='0'
</update>
<!-- 批量刷新项目档案的是否完整状态 -->
<update id="batchUpdateEmpProjectCompleteStatus">
update t_employee_project a set a.IS_COMPLETE = '0' where a.id in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
......@@ -36,14 +36,19 @@
<result property="startTime" column="START_TIME"/>
<result property="endTime" column="END_TIME"/>
<result property="occupationalDisease" column="OCCUPATIONAL_DISEASE"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<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"/>
<result property="remark" column="REMARK"/>
<result property="occupationalDiseaseFlag" column="OCCUPATIONAL_DISEASE_FLAG"/>
<result property="infectiousDiseaseFlag" column="INFECTIOUS_DISEASE_FLAG"/>
<result property="infectiousName" column="INFECTIOUS_NAME"/>
<result property="disabilityFlag" column="DISABILITY_FLAG"/>
<result property="otherFlag" column="OTHER_FLAG"/>
<result property="oldId" column="OLD_ID"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -66,8 +71,13 @@
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME,
a.OLD_ID,
a.REMARK
a.REMARK,
a.OCCUPATIONAL_DISEASE_FLAG,
a.INFECTIOUS_DISEASE_FLAG,
a.INFECTIOUS_NAME,
a.DISABILITY_FLAG,
a.OTHER_FLAG,
a.OLD_ID
</sql>
<sql id="tPreEmpDisabilityInfo_where">
<if test="tPreEmpDisabilityInfo != null">
......
......@@ -169,7 +169,7 @@
<include refid="Base_Column_List"/>
FROM t_pre_emp_main a
<where>
1=1
a.STATUS != '5'
<include refid="tPreEmpMain_where"/>
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.authSql != null and tPreEmpMain.authSql.trim() != ''">
......@@ -178,4 +178,22 @@
</if>
</where>
</select>
<!--tPreEmpMain简单分页查询-->
<select id="getTPreEmpMainByCardAndDept" resultMap="tPreEmpMainMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_pre_emp_main a
where a.EMP_IDCARD = #{empIdCard} AND a.DEPT_ID = #{deptId}
limit 1
</select>
<!--tPreEmpMain简单分页查询-->
<select id="getTPreEmpMainByCardAndDeptNo" resultMap="tPreEmpMainMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_pre_emp_main a
where a.EMP_IDCARD = #{empIdCard} AND a.DEPT_NO = #{deptNo}
limit 1
</select>
</mapper>
......@@ -68,4 +68,12 @@ public class ArchiveTask {
SecurityConstants.FROM_IN);
log.info("-------------每月26号更新人员花名册-定时任务开始------------");
}
public void everyDayCreateComlpeteMonitor() {
log.info("-------------每月刷新档案完整监控数据------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/tcompletemonitor/inner/createComlpeteMonitor", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每月刷新档案完整监控数据-定时任务开始------------");
}
}
\ No newline at end of file
......@@ -53,4 +53,6 @@ public interface TAutoPaymentDetailMapper extends BaseMapper<TAutoPaymentDetail>
List<TAutoPaymentDetail> getListByParentId(@Param("parentId") String parentId);
int getCountByParentId(@Param("parentId") String parentId);
}
......@@ -116,10 +116,10 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> {
**/
List<SocialSoldierPaymentSelectThreeVo> getSoldierPaymentSelectThreeList();
void getSoldierPaymentErrorInfoOne(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwo(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOne(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwo(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOneByRe(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwoByRe(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOneByRe(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwoByRe(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
}
......@@ -68,4 +68,13 @@ public interface TAutoPaymentDetailService extends IService<TAutoPaymentDetail>
**/
List<TAutoPaymentDetail> getListByParentId(String parentId);
/**
* @param parentId
* @Description: 获取被打标的条数,用作拦截重新办理
* @Author: hgw
* @Date: 2024/6/21 11:21
* @return: int
**/
int getCountByParentId(String parentId);
}
......@@ -186,6 +186,10 @@ public class TAutoPaymentDetailServiceImpl extends ServiceImpl<TAutoPaymentDetai
public List<TAutoPaymentDetail> getListByParentId(String parentId) {
return baseMapper.getListByParentId(parentId);
}
@Override
public int getCountByParentId(String parentId) {
return baseMapper.getCountByParentId(parentId);
}
private Long noPageCountDiy(TAutoPaymentDetailSearchVo searchVo) {
LambdaQueryWrapper<TAutoPaymentDetail> wrapper = buildQueryWrapper(searchVo);
......
......@@ -61,6 +61,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
private final TSocialSoldierShenBaoTaskService tSocialSoldierShenBaoTaskService;
private final TAutoPaymentInfoService tAutoPaymentInfoService;
private final TAutoPaymentErrorService tAutoPaymentErrorService;
private final TAutoPaymentDetailService tAutoPaymentDetailService;
/**
* @param socialList
......@@ -430,14 +431,19 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
// 先删除推送任务
int type = 3;
if (isReHandle) {
int count = tAutoPaymentDetailService.getCountByParentId(parentId);
if (count == 0) {
return R.failed("请先标记!");
}
type = 7;
List<TSocialSoldierShenBaoTask> taskList = tSocialSoldierShenBaoTaskService.getTSocialSoldierTaskListByRe();
boolean canReTask = false;
if (taskList != null) {
if (taskList != null && !taskList.isEmpty()) {
for (TSocialSoldierShenBaoTask task : taskList) {
// 表示已经有过反馈了
if (CommonConstants.ONE_STRING.equals(task.getDataStatus())) {
canReTask = true;
break;
}
}
if (!canReTask) {
......@@ -450,6 +456,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
}
}
} else {
if (Common.isNotNull(parentId)) {
tAutoPaymentErrorService.deleteByParentId(parentId);
}
tSocialSoldierShenBaoTaskService.deleteByRePayment();
}
} else {
......
......@@ -152,16 +152,16 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
Map<String, TAutoPaymentDetail> fourMap = new HashMap<>();
for (TAutoPaymentDetail detail : detailList) {
if (CommonConstants.ONE_STRING.equals(detail.getSourceType())) {
oneMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType(), detail);
oneMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType() + CommonConstants.DOWN_LINE_STRING + detail.getPayMonth(), detail);
}
if (CommonConstants.TWO_STRING.equals(detail.getSourceType())) {
twoMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType(), detail);
twoMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType() + CommonConstants.DOWN_LINE_STRING + detail.getPayMonth(), detail);
}
if (CommonConstants.THREE_STRING.equals(detail.getSourceType())) {
threeMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType(), detail);
threeMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType() + CommonConstants.DOWN_LINE_STRING + detail.getPayMonth(), detail);
}
if (CommonConstants.FOUR_STRING.equals(detail.getSourceType())) {
fourMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType(), detail);
fourMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType() + CommonConstants.DOWN_LINE_STRING + detail.getPayMonth(), detail);
}
}
try {
......@@ -289,11 +289,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
|| detailListThree != null && !detailListThree.isEmpty()
|| detailListFour != null && !detailListFour.isEmpty()
) {
String paymentTableName = DateUtil.getYear(new Date());
// 复核-核验1:
baseMapper.getSoldierPaymentErrorInfoOneByRe(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoOneByRe(paymentTableName, mainAuto.getId());
// 复核-核验2:
baseMapper.getSoldierPaymentErrorInfoTwoByRe(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoTwoByRe(paymentTableName, mainAuto.getId());
// 重新复核状态
TimeUnit.SECONDS.sleep(10);
......@@ -534,10 +534,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
|| detailListThree != null && !detailListThree.isEmpty()
|| detailListFour != null && !detailListFour.isEmpty()
) {
String paymentTableName = DateUtil.getYear(new Date());
// 核验1:
baseMapper.getSoldierPaymentErrorInfoOne(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoOne(paymentTableName, mainAuto.getId());
// 核验2:
baseMapper.getSoldierPaymentErrorInfoTwo(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoTwo(paymentTableName, mainAuto.getId());
TimeUnit.SECONDS.sleep(10);
long count = tAutoPaymentErrorService.getCountByParentId(mainAuto.getId());
if (count > 0) {
......@@ -946,7 +947,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
personZhiNaJinNum = cellNum;
} else if ("险种".equals(cellValue) || "参保险种".equals(cellValue) || "险种类型".equals(cellValue)) {
insuranceTypeNum = cellNum;
} else if ("单位名称".equals(cellValue)) {
} else if ("单位名称".equals(cellValue) || "企业名称".equals(cellValue)) {
socialSecurityAccountNum = cellNum;
} else if ("费款所属期".equals(cellValue) || "缴费年月".equals(cellValue) || "起始费款所属期".equals(cellValue)) {
payMonthNum = cellNum;
......@@ -1047,6 +1048,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
}
detail.setPayLimit(money);
}
if (insuranceType.contains("【")) {
insuranceType = insuranceType.split("【")[0];
}
detail.setInsuranceType(insuranceType);
insuranceTypeUnit = "单位" + insuranceType;
insuranceTypePerson = "个人" + insuranceType;
......@@ -1074,7 +1078,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 复核使用的
oldDetail = oldMap.get(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING
+ detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING
+ detail.getInsuranceType());
+ detail.getInsuranceType() + CommonConstants.DOWN_LINE_STRING
+ detail.getPayMonth());
if (oldDetail != null) {
detail.setId(oldDetail.getId());
voList.add(detail);
......
......@@ -163,4 +163,12 @@
order by a.SOURCE_TYPE,a.CERT_NUM
</select>
<!--tAutoPaymentDetail简单分页查询-->
<select id="getCountByParentId" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_auto_payment_detail a
where PARENT_ID = #{parentId} and REPEAT_HANDLE_FLAG = '0'
</select>
</mapper>
......@@ -314,7 +314,7 @@
insert into t_auto_payment_error
select concat(d.id,'_1_',#{parentId}) id,#{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该员工的姓名、社保户与派单不一致' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT
and p.EMP_NAME = d.EMP_NAME
and p.EMP_IDCARD = d.CERT_NUM
......@@ -345,7 +345,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '职工基本养老保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_PENSION_MONEY > 0
)
......@@ -367,7 +367,7 @@
select concat(d.id,'_3_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '职工基本养老保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_PENSION_MONEY > 0
)
......@@ -389,7 +389,7 @@
select concat(d.id,'_4_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '失业保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_UNEMPLOYMENT_MONEY > 0
)
......@@ -411,7 +411,7 @@
select concat(d.id,'_5_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '失业保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_UNEMPLOYMENT_MONEY > 0
)
......@@ -433,7 +433,7 @@
select concat(d.id,'_6_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '职工基本医疗保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_MEDICAL_MONEY > 0
)
......@@ -455,7 +455,7 @@
select concat(d.id,'_7_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '职工基本医疗保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_MEDICAL_MONEY > 0
)
......@@ -477,7 +477,7 @@
select concat(d.id,'_8_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '工伤保险'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_INJURY_MONEY > 0
)
......@@ -499,7 +499,7 @@
select concat(d.id,'_9_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '单位大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIGMAILMENT_MONEY > 0
)
......@@ -521,7 +521,7 @@
select concat(d.id,'_10_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '个人大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_BIGMAILMENT_MONEY > 0
)
......@@ -544,7 +544,7 @@
select concat(d.id,'_11_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
and d.INSURANCE_TYPE = '单位生育'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIRTH_MONEY > 0
)
......@@ -566,6 +566,44 @@
</insert>
<sql id="get_t_payment_info_" >
<if test="paymentTableName == 2024">
t_payment_info_2024
</if>
<if test="paymentTableName == 2025">
t_payment_info_2025
</if>
<if test="paymentTableName == 2026">
t_payment_info_2026
</if>
<if test="paymentTableName == 2027">
t_payment_info_2027
</if>
<if test="paymentTableName == 2028">
t_payment_info_2028
</if>
<if test="paymentTableName == 2029">
t_payment_info_2029
</if>
<if test="paymentTableName == 2030">
t_payment_info_2030
</if>
<if test="paymentTableName == 2031">
t_payment_info_2031
</if>
<if test="paymentTableName == 2032">
t_payment_info_2032
</if>
<if test="paymentTableName == 2033">
t_payment_info_2033
</if>
<if test="paymentTableName == 2034">
t_payment_info_2034
</if>
<if test="paymentTableName == 2035">
t_payment_info_2035
</if>
</sql>
<!-- 复核-核验1户 -->
<insert id="getSoldierPaymentErrorInfoOneByRe">
......@@ -573,7 +611,7 @@
select concat(d.id,'_1_',#{parentId}) id,#{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该员工的姓名、社保户与派单不一致' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT
and p.EMP_NAME = d.EMP_NAME
and p.EMP_IDCARD = d.CERT_NUM
......@@ -604,7 +642,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本养老保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_PENSION_MONEY > 0
)
......@@ -627,7 +665,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本养老保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_PENSION_MONEY > 0
)
......@@ -650,7 +688,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '失业保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_UNEMPLOYMENT_MONEY > 0
)
......@@ -673,7 +711,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '失业保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_UNEMPLOYMENT_MONEY > 0
)
......@@ -696,7 +734,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本医疗保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_MEDICAL_MONEY > 0
)
......@@ -719,7 +757,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本医疗保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_MEDICAL_MONEY > 0
)
......@@ -742,7 +780,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '工伤保险'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_INJURY_MONEY > 0
)
......@@ -765,7 +803,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '单位大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIGMAILMENT_MONEY > 0
)
......@@ -788,7 +826,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '个人大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_BIGMAILMENT_MONEY > 0
)
......@@ -812,7 +850,7 @@
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '单位生育'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
select 1 from <include refid="get_t_payment_info_"/> p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIRTH_MONEY > 0
)
......
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