Commit 11468c34 authored by hongguangwu's avatar hongguangwu

MVP1.6.6-预入职保存等

parent 553ffc82
...@@ -274,7 +274,7 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -274,7 +274,7 @@ public class TEmployeeInfo extends BaseEntity {
* 人员档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬、6电子签) * 人员档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬、6电子签)
* 1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入,6=电子签 * 1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入,6=电子签
*/ */
@Schema(description = "人员档案来源(字典:1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入、6电子签)") @Schema(description = "人员档案来源(字典:1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入、6电子签,7:预入职)")
private String fileSource; private String fileSource;
/** /**
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -51,6 +52,13 @@ public class TPreEmpBadRecord extends BaseEntity { ...@@ -51,6 +52,13 @@ public class TPreEmpBadRecord extends BaseEntity {
@ExcelProperty("主键") @ExcelProperty("主键")
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 原ID——用来判断是否从档案查询带出的
*/
@Schema(description = "原ID——用来判断是否从档案查询带出的")
@ExcelIgnore
private String oldId;
/** /**
* 预入职主表ID * 预入职主表ID
*/ */
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -49,6 +50,13 @@ public class TPreEmpContactInfo extends BaseEntity { ...@@ -49,6 +50,13 @@ public class TPreEmpContactInfo extends BaseEntity {
@ExcelProperty("id") @ExcelProperty("id")
@Schema(description = "id") @Schema(description = "id")
private String id; private String id;
/**
* 原ID——用来判断是否从档案查询带出的
*/
@Schema(description = "原ID——用来判断是否从档案查询带出的")
@ExcelIgnore
private String oldId;
/** /**
* 预入职主表ID * 预入职主表ID
*/ */
......
...@@ -18,14 +18,17 @@ ...@@ -18,14 +18,17 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
/** /**
* 预入职-员工申明 * 预入职-员工申明
* *
...@@ -61,4 +64,14 @@ public class TPreEmpDeclaration { ...@@ -61,4 +64,14 @@ public class TPreEmpDeclaration {
@Schema(description = "员工确认") @Schema(description = "员工确认")
private String contentTwo; private String contentTwo;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -50,6 +51,13 @@ public class TPreEmpDisabilityInfo extends BaseEntity { ...@@ -50,6 +51,13 @@ public class TPreEmpDisabilityInfo extends BaseEntity {
@ExcelProperty("主键") @ExcelProperty("主键")
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 原ID——用来判断是否从档案查询带出的
*/
@Schema(description = "原ID——用来判断是否从档案查询带出的")
@ExcelIgnore
private String oldId;
/** /**
* 预入职主表ID * 预入职主表ID
*/ */
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -50,6 +51,13 @@ public class TPreEmpEducation extends BaseEntity { ...@@ -50,6 +51,13 @@ public class TPreEmpEducation extends BaseEntity {
@ExcelProperty("主键") @ExcelProperty("主键")
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 原ID——用来判断是否从档案查询带出的
*/
@Schema(description = "原ID——用来判断是否从档案查询带出的")
@ExcelIgnore
private String oldId;
/** /**
* 预入职主表ID * 预入职主表ID
*/ */
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -50,6 +51,13 @@ public class TPreEmpFamily extends BaseEntity { ...@@ -50,6 +51,13 @@ public class TPreEmpFamily extends BaseEntity {
@ExcelProperty("主键") @ExcelProperty("主键")
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 原ID——用来判断是否从档案查询带出的
*/
@Schema(description = "原ID——用来判断是否从档案查询带出的")
@ExcelIgnore
private String oldId;
/** /**
* 预入职主表ID * 预入职主表ID
*/ */
......
...@@ -212,5 +212,13 @@ public class TPreEmpMain extends BaseEntity { ...@@ -212,5 +212,13 @@ public class TPreEmpMain extends BaseEntity {
@ExcelProperty("结算主体ID") @ExcelProperty("结算主体ID")
@Schema(description = "结算主体ID") @Schema(description = "结算主体ID")
private String settleDomain; private String settleDomain;
/**
* 员工申明表ID,新申明要加一条新数据,关联这个主表
*/
@ExcelAttribute(name = "员工申明表ID", maxLength = 32)
@Length(max = 32, message = "员工申明表ID不能超过32个字符")
@ExcelProperty("员工申明表ID")
@Schema(description = "员工申明表ID,新申明要加一条新数据,关联这个主表")
private String declarationId;
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -49,6 +50,13 @@ public class TPreEmpProfessionalQualification extends BaseEntity { ...@@ -49,6 +50,13 @@ public class TPreEmpProfessionalQualification extends BaseEntity {
@ExcelProperty("主键") @ExcelProperty("主键")
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 原ID——用来判断是否从档案查询带出的
*/
@Schema(description = "原ID——用来判断是否从档案查询带出的")
@ExcelIgnore
private String oldId;
/** /**
* 预入职主表ID * 预入职主表ID
*/ */
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -50,6 +51,13 @@ public class TPreEmpWorkRecording extends BaseEntity { ...@@ -50,6 +51,13 @@ public class TPreEmpWorkRecording extends BaseEntity {
@ExcelProperty("主键") @ExcelProperty("主键")
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 原ID——用来判断是否从档案查询带出的
*/
@Schema(description = "原ID——用来判断是否从档案查询带出的")
@ExcelIgnore
private String oldId;
/** /**
* 预入职主表ID * 预入职主表ID
*/ */
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -50,6 +51,13 @@ public class TPreEmployeeInfo extends BaseEntity { ...@@ -50,6 +51,13 @@ public class TPreEmployeeInfo extends BaseEntity {
@ExcelProperty("主键") @ExcelProperty("主键")
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 原ID——用来判断是否从档案查询带出的
*/
@Schema(description = "原ID——用来判断是否从档案查询带出的")
@ExcelIgnore
private String oldId;
/** /**
* 预入职主表ID * 预入职主表ID
*/ */
...@@ -397,4 +405,18 @@ public class TPreEmployeeInfo extends BaseEntity { ...@@ -397,4 +405,18 @@ public class TPreEmployeeInfo extends BaseEntity {
@Schema(description = "通信地址") @Schema(description = "通信地址")
private String contactAddress; private String contactAddress;
/**
* 是否为首份工作 0是/1否
*/
@Schema(description ="是否为首份工作 0是/1否")
private String firstWorkFlag;
/**
* 是否有职业资格证书:0 是 1 否
*/
@ExcelAttribute(name = "是否有职业资格证书",isNotEmpty = true,isDataId = true, readConverterExp = "0=是,1=否")
@Schema(description ="是否有职业资格证书:0 是 1 否")
private String haveQualification;
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -50,6 +51,12 @@ public class TPreEmployeeProject extends BaseEntity { ...@@ -50,6 +51,12 @@ public class TPreEmployeeProject extends BaseEntity {
@ExcelProperty("主键") @ExcelProperty("主键")
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 原ID——用来判断是否从档案查询带出的
*/
@Schema(description = "原ID——用来判断是否从档案查询带出的")
@ExcelIgnore
private String oldId;
/** /**
* 预入职主表ID * 预入职主表ID
*/ */
......
...@@ -171,7 +171,7 @@ public class EmployeeExportVO extends BaseEntity { ...@@ -171,7 +171,7 @@ public class EmployeeExportVO extends BaseEntity {
* 人员档案来源(字典:4档案新增、5项目档案新建、1社保/公积金、3商险、2薪酬) * 人员档案来源(字典:4档案新增、5项目档案新建、1社保/公积金、3商险、2薪酬)
* 档案新建、批量导入、社保/公积金派单、商险派单、人员发薪 * 档案新建、批量导入、社保/公积金派单、商险派单、人员发薪
*/ */
@ExcelAttribute(name = "人员档案来源", readConverterExp = "1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入") @ExcelAttribute(name = "人员档案来源", readConverterExp = "1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入,6=电子签,7=预入职")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "人员档案来源") @ExcelProperty(value = "人员档案来源")
private String fileSource; private String fileSource;
......
...@@ -36,26 +36,26 @@ public class PreEmpMainDetailVo implements Serializable { ...@@ -36,26 +36,26 @@ public class PreEmpMainDetailVo implements Serializable {
// 主表 // 主表
private TPreEmpMain main; private TPreEmpMain main;
// 预入职-员工不良记录表 // 预入职-员工不良记录表
private List<TPreEmpBadRecord> tPreEmpBadRecord; private TPreEmpBadRecord tPreEmpBadRecord;
// 预入职-紧急联络人 // 预入职-紧急联络人
private List<TPreEmpContactInfo> tPreEmpContactInfo; private TPreEmpContactInfo tPreEmpContactInfo;
// 预入职-员工申明 // 预入职-员工申明
private TPreEmpDeclaration tPreEmpDeclaration; private TPreEmpDeclaration tPreEmpDeclaration;
// 预入职-员工伤残信息表 // 预入职-员工伤残信息表
private List<TPreEmpDisabilityInfo> tPreEmpDisabilityInfo; private TPreEmpDisabilityInfo tPreEmpDisabilityInfo;
// 预入职-员工学历信息表 // 预入职-员工学历信息表
private List<TPreEmpEducation> tPreEmpEducation; private TPreEmpEducation tPreEmpEducation;
// 预入职-员工家庭信息表 // 预入职-员工家庭信息表
private List<TPreEmpFamily> tPreEmpFamily; private List<TPreEmpFamily> tPreEmpFamily;
// 预入职-人员档案表 // 预入职-人员档案表
private List<TPreEmployeeInfo> tPreEmployeeInfo; private TPreEmployeeInfo tPreEmployeeInfo;
// 预入职-项目档案表 // 预入职-项目档案表
private List<TPreEmployeeProject> tPreEmployeeProject; private TPreEmployeeProject tPreEmployeeProject;
// 预入职-员工职业资格信息表 // 预入职-员工职业资格信息表
private List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification; private List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification;
// 预入职-员工工作履历信息表 // 预入职-员工工作履历信息表
private List<TPreEmpWorkRecording> tPreEmpWorkRecording; private List<TPreEmpWorkRecording> tPreEmpWorkRecording;
// 预入职-附件 21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件) // 预入职-9身份证 10 户口本;附件 21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
private List<TAttaInfo> attaInfoList; private List<TAttaInfo> attaInfoList;
} }
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 员工家庭信息表 * 员工家庭信息表
...@@ -29,5 +30,5 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -29,5 +30,5 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface TEmpFamilyMapper extends BaseMapper<TEmpFamily> { public interface TEmpFamilyMapper extends BaseMapper<TEmpFamily> {
void deleteByEmpId(@Param("empId") String empId, @Param("tableName") String tableName);
} }
...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpBadRecord; ...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpBadRecord;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 预入职-员工不良记录表 * 预入职-员工不良记录表
* *
...@@ -34,8 +32,7 @@ import java.util.List; ...@@ -34,8 +32,7 @@ import java.util.List;
public interface TPreEmpBadRecordMapper extends BaseMapper<TPreEmpBadRecord> { public interface TPreEmpBadRecordMapper extends BaseMapper<TPreEmpBadRecord> {
/** /**
* 预入职-员工不良记录表简单分页查询 * 预入职-员工不良记录表简单分页查询
* @param tPreEmpBadRecord 预入职-员工不良记录表 * @return
* @return
*/ */
List<TPreEmpBadRecord> getTPreEmpBadRecordList(@Param("preMainId") String preMainId); TPreEmpBadRecord getTPreEmpBadRecordList(@Param("preMainId") String preMainId);
} }
...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpContactInfo; ...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpContactInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 预入职-紧急联络人 * 预入职-紧急联络人
* *
...@@ -35,8 +33,7 @@ public interface TPreEmpContactInfoMapper extends BaseMapper<TPreEmpContactInfo> ...@@ -35,8 +33,7 @@ public interface TPreEmpContactInfoMapper extends BaseMapper<TPreEmpContactInfo>
/** /**
* 预入职-紧急联络人简单分页查询 * 预入职-紧急联络人简单分页查询
* *
* @param tPreEmpContactInfo 预入职-紧急联络人
* @return * @return
*/ */
List<TPreEmpContactInfo> getTPreEmpContactInfoList(@Param("preMainId") String preMainId); TPreEmpContactInfo getTPreEmpContactInfoList(@Param("preMainId") String preMainId);
} }
...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpDisabilityInfo; ...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpDisabilityInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 预入职-员工伤残信息表 * 预入职-员工伤残信息表
* *
...@@ -35,8 +33,7 @@ public interface TPreEmpDisabilityInfoMapper extends BaseMapper<TPreEmpDisabilit ...@@ -35,8 +33,7 @@ public interface TPreEmpDisabilityInfoMapper extends BaseMapper<TPreEmpDisabilit
/** /**
* 预入职-员工伤残信息表简单分页查询 * 预入职-员工伤残信息表简单分页查询
* *
* @param tPreEmpDisabilityInfo 预入职-员工伤残信息表
* @return * @return
*/ */
List<TPreEmpDisabilityInfo> getTPreEmpDisabilityInfoList(@Param("preMainId") String preMainId); TPreEmpDisabilityInfo getTPreEmpDisabilityInfoList(@Param("preMainId") String preMainId);
} }
...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpEducation; ...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpEducation;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 预入职-员工学历信息表 * 预入职-员工学历信息表
* *
...@@ -35,8 +33,7 @@ public interface TPreEmpEducationMapper extends BaseMapper<TPreEmpEducation> { ...@@ -35,8 +33,7 @@ public interface TPreEmpEducationMapper extends BaseMapper<TPreEmpEducation> {
/** /**
* 预入职-员工学历信息表简单分页查询 * 预入职-员工学历信息表简单分页查询
* *
* @param tPreEmpEducation 预入职-员工学历信息表
* @return * @return
*/ */
List<TPreEmpEducation> getTPreEmpEducationList(@Param("preMainId") String preMainId); TPreEmpEducation getTPreEmpEducationList(@Param("preMainId") String preMainId);
} }
...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeInfo; ...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 预入职-人员档案表 * 预入职-人员档案表
* *
...@@ -35,8 +33,7 @@ public interface TPreEmployeeInfoMapper extends BaseMapper<TPreEmployeeInfo> { ...@@ -35,8 +33,7 @@ public interface TPreEmployeeInfoMapper extends BaseMapper<TPreEmployeeInfo> {
/** /**
* 预入职-人员档案表简单分页查询 * 预入职-人员档案表简单分页查询
* *
* @param tPreEmployeeInfo 预入职-人员档案表
* @return * @return
*/ */
List<TPreEmployeeInfo> getTPreEmployeeInfoList(@Param("preMainId") String preMainId); TPreEmployeeInfo getTPreEmployeeInfoList(@Param("preMainId") String preMainId);
} }
...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeProject; ...@@ -22,8 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeProject;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 预入职-项目档案表 * 预入职-项目档案表
* *
...@@ -35,8 +33,7 @@ public interface TPreEmployeeProjectMapper extends BaseMapper<TPreEmployeeProjec ...@@ -35,8 +33,7 @@ public interface TPreEmployeeProjectMapper extends BaseMapper<TPreEmployeeProjec
/** /**
* 预入职-项目档案表简单分页查询 * 预入职-项目档案表简单分页查询
* *
* @param tPreEmployeeProject 预入职-项目档案表
* @return * @return
*/ */
List<TPreEmployeeProject> getTPreEmployeeProjectList(@Param("preMainId") String preMainId); TPreEmployeeProject getTPreEmployeeProjectList(@Param("preMainId") String preMainId);
} }
...@@ -58,4 +58,14 @@ public interface TEmpEducationService extends IService<TEmpEducation> { ...@@ -58,4 +58,14 @@ public interface TEmpEducationService extends IService<TEmpEducation> {
R<List<ErrorMessage>> importEmpEducationUpdateDiy(InputStream inputStream); R<List<ErrorMessage>> importEmpEducationUpdateDiy(InputStream inputStream);
void exportEmpEducation(EducationSearchVo searchVo, HttpServletResponse response); void exportEmpEducation(EducationSearchVo searchVo, HttpServletResponse response);
/**
* @param empIdcard
* @Description: 将所有的最高学历改为费最高
* @Author: hgw
* @Date: 2024/6/19 18:03
* @return: void
**/
void updateEducationToNoByIdCard(String empIdcard);
} }
...@@ -48,4 +48,14 @@ public interface TEmpFamilyService extends IService<TEmpFamily> { ...@@ -48,4 +48,14 @@ public interface TEmpFamilyService extends IService<TEmpFamily> {
List<TEmpFamily> getTEmpFamilyNoPage(FamilySearchVO family); List<TEmpFamily> getTEmpFamilyNoPage(FamilySearchVO family);
R<List<ErrorMessage>> importEmpFamilyDiy(InputStream fileInputStream); R<List<ErrorMessage>> importEmpFamilyDiy(InputStream fileInputStream);
/**
* @param empId
* @param tableName
* @Description: 删除档案附属表信息(预入职清空附属信息专用,其余的请慎用)
* @Author: hgw
* @Date: 2024/6/19 18:27
* @return: void
**/
void deleteByEmpIdAndTable(String empId, String tableName);
} }
...@@ -74,6 +74,14 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -74,6 +74,14 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
**/ **/
R<TEmployeeInfo> checkIdCard(TEmployeeInfo employeeInfo); R<TEmployeeInfo> checkIdCard(TEmployeeInfo employeeInfo);
/**
* @Description: 获取员工主码
* @Author: hgw
* @Date: 2024/6/19 15:11
* @return: java.lang.String
**/
String getCode();
/** /**
* @param employeeInfo * @param employeeInfo
* @Description: 新增档案,附带新增项目档案、学历信息 * @Description: 新增档案,附带新增项目档案、学历信息
...@@ -187,8 +195,12 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -187,8 +195,12 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
Boolean checkMobile(String mobile); Boolean checkMobile(String mobile);
// 未删除的档案
TEmployeeInfo getInfoByIdcard(String idcard); TEmployeeInfo getInfoByIdcard(String idcard);
// 已删除的档案
TEmployeeInfo getInfoByDelete(String idcard);
/** /**
* @Description: 更新人员档案的商险状态 * @Description: 更新人员档案的商险状态
* @Author: hgw * @Author: hgw
......
...@@ -182,6 +182,14 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> { ...@@ -182,6 +182,14 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
**/ **/
TEmployeeProject getByEmpIdAndDeptId(String empId, String deptId); TEmployeeProject getByEmpIdAndDeptId(String empId, String deptId);
/**
* @Description: 获取已减项或已删除的项目档案信息
* @Author: hgw
* @Date: 2024/6/19 15:00
* @return: com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
**/
TEmployeeProject getByEmpIdAndDeptIdAndDelete(String empId, String deptId);
R<Map<String, String>> getProjectByIdCard(String empIdCard); R<Map<String, String>> getProjectByIdCard(String empIdCard);
//获取员工编码 //获取员工编码
......
...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service; ...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpBadRecord; import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpBadRecord;
import java.util.List;
/** /**
* 预入职-员工不良记录表 * 预入职-员工不良记录表
* *
...@@ -34,5 +32,5 @@ public interface TPreEmpBadRecordService extends IService<TPreEmpBadRecord> { ...@@ -34,5 +32,5 @@ public interface TPreEmpBadRecordService extends IService<TPreEmpBadRecord> {
* *
* @return * @return
*/ */
List<TPreEmpBadRecord> getTPreEmpBadRecordList(String preMainId); TPreEmpBadRecord getTPreEmpBadRecordList(String preMainId);
} }
...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service; ...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpContactInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpContactInfo;
import java.util.List;
/** /**
* 预入职-紧急联络人 * 预入职-紧急联络人
* *
...@@ -34,5 +32,5 @@ public interface TPreEmpContactInfoService extends IService<TPreEmpContactInfo> ...@@ -34,5 +32,5 @@ public interface TPreEmpContactInfoService extends IService<TPreEmpContactInfo>
* *
* @return * @return
*/ */
List<TPreEmpContactInfo> getTPreEmpContactInfoList(String preMainId); TPreEmpContactInfo getTPreEmpContactInfoList(String preMainId);
} }
...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service; ...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpDisabilityInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpDisabilityInfo;
import java.util.List;
/** /**
* 预入职-员工伤残信息表 * 预入职-员工伤残信息表
* *
...@@ -34,5 +32,5 @@ public interface TPreEmpDisabilityInfoService extends IService<TPreEmpDisability ...@@ -34,5 +32,5 @@ public interface TPreEmpDisabilityInfoService extends IService<TPreEmpDisability
* *
* @return * @return
*/ */
List<TPreEmpDisabilityInfo> getTPreEmpDisabilityInfoList(String preMainId); TPreEmpDisabilityInfo getTPreEmpDisabilityInfoList(String preMainId);
} }
...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service; ...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpEducation; import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpEducation;
import java.util.List;
/** /**
* 预入职-员工学历信息表 * 预入职-员工学历信息表
* *
...@@ -34,5 +32,5 @@ public interface TPreEmpEducationService extends IService<TPreEmpEducation> { ...@@ -34,5 +32,5 @@ public interface TPreEmpEducationService extends IService<TPreEmpEducation> {
* *
* @return * @return
*/ */
List<TPreEmpEducation> getTPreEmpEducationList(String preMainId); TPreEmpEducation getTPreEmpEducationList(String preMainId);
} }
...@@ -34,5 +34,5 @@ public interface TPreEmployeeInfoService extends IService<TPreEmployeeInfo> { ...@@ -34,5 +34,5 @@ public interface TPreEmployeeInfoService extends IService<TPreEmployeeInfo> {
* *
* @return * @return
*/ */
List<TPreEmployeeInfo> getTPreEmployeeInfoList(String preMainId); TPreEmployeeInfo getTPreEmployeeInfoList(String preMainId);
} }
...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service; ...@@ -20,8 +20,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeProject;
import java.util.List;
/** /**
* 预入职-项目档案表 * 预入职-项目档案表
* *
...@@ -34,5 +32,5 @@ public interface TPreEmployeeProjectService extends IService<TPreEmployeeProject ...@@ -34,5 +32,5 @@ public interface TPreEmployeeProjectService extends IService<TPreEmployeeProject
* *
* @return * @return
*/ */
List<TPreEmployeeProject> getTPreEmployeeProjectList(String preMainId); TPreEmployeeProject getTPreEmployeeProjectList(String preMainId);
} }
...@@ -254,6 +254,11 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T ...@@ -254,6 +254,11 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
} }
} }
@Override
public void updateEducationToNoByIdCard(String empIdcard) {
baseMapper.updateHighIdentification(empIdcard);
}
/** /**
* 插入excel education * 插入excel education
*/ */
......
...@@ -235,6 +235,11 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam ...@@ -235,6 +235,11 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
return R.ok(errorMessageList); return R.ok(errorMessageList);
} }
@Override
public void deleteByEmpIdAndTable(String empId, String tableName) {
baseMapper.deleteByEmpId(empId, tableName);
}
private LambdaQueryWrapper buildQueryWrapper(FamilySearchVO entity){ private LambdaQueryWrapper buildQueryWrapper(FamilySearchVO entity){
LambdaQueryWrapper<TEmpFamily> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<TEmpFamily> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TEmpFamily::getDeleteFlag,CommonConstants.ZERO_STRING); wrapper.eq(TEmpFamily::getDeleteFlag,CommonConstants.ZERO_STRING);
......
...@@ -1436,7 +1436,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -1436,7 +1436,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
* @return: java.lang.String * @return: java.lang.String
**/ **/
@Lock4j(expire = 60000, acquireTimeout = 1000) @Lock4j(expire = 60000, acquireTimeout = 1000)
private String getCode() { @Override
public String getCode() {
String nowDay = DateUtil.getThisDay(); String nowDay = DateUtil.getThisDay();
Cache cache = cacheManager.getCache(CacheConstants.EVERYDAY_EMP_CODE); Cache cache = cacheManager.getCache(CacheConstants.EVERYDAY_EMP_CODE);
Object nowNumObj = cache.get(nowDay); Object nowNumObj = cache.get(nowDay);
...@@ -2292,6 +2293,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2292,6 +2293,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
} }
@Override
public TEmployeeInfo getInfoByDelete(String idcard) {
return baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, idcard)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ONE_STRING)
.last(CommonConstants.LAST_ONE_SQL));
}
private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap, private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap,
Map<String, EmpContractDispatchVo> contractsMap, Map<String, EmpContractDispatchVo> contractsMap,
Map<String, EmpAddDispatchVo> empAddsMap) { Map<String, EmpAddDispatchVo> empAddsMap) {
......
...@@ -1339,6 +1339,25 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1339,6 +1339,25 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return employeeProject; return employeeProject;
} }
@Override
public TEmployeeProject getByEmpIdAndDeptIdAndDelete(String empId, String deptId) {
TEmployeeProject employeeProject = null;
if (Common.isNotNull(empId) && Common.isNotNull(deptId)) {
employeeProject = this.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpId, empId)
.eq(TEmployeeProject::getDeptId, deptId)
.ne(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING).last(CommonConstants.LAST_ONE_SQL));
if (employeeProject == null) {
employeeProject = this.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpId, empId)
.eq(TEmployeeProject::getDeptId, deptId)
.last(CommonConstants.LAST_ONE_SQL));
}
}
return employeeProject;
}
@Override @Override
public R<Map<String, String>> getProjectByIdCard(String empIdCard) { public R<Map<String, String>> getProjectByIdCard(String empIdCard) {
List<TEmployeeProject> projects = baseMapper.selectList(Wrappers.<TEmployeeProject>query().lambda() List<TEmployeeProject> projects = baseMapper.selectList(Wrappers.<TEmployeeProject>query().lambda()
......
...@@ -23,8 +23,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpBadRecordService; ...@@ -23,8 +23,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpBadRecordService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 预入职-员工不良记录表 * 预入职-员工不良记录表
* *
...@@ -40,7 +38,7 @@ public class TPreEmpBadRecordServiceImpl extends ServiceImpl<TPreEmpBadRecordMap ...@@ -40,7 +38,7 @@ public class TPreEmpBadRecordServiceImpl extends ServiceImpl<TPreEmpBadRecordMap
* @return * @return
*/ */
@Override @Override
public List<TPreEmpBadRecord> getTPreEmpBadRecordList(String preMainId) { public TPreEmpBadRecord getTPreEmpBadRecordList(String preMainId) {
return baseMapper.getTPreEmpBadRecordList(preMainId); return baseMapper.getTPreEmpBadRecordList(preMainId);
} }
......
...@@ -23,8 +23,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpContactInfoService; ...@@ -23,8 +23,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpContactInfoService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 预入职-紧急联络人 * 预入职-紧急联络人
* *
...@@ -40,7 +38,7 @@ public class TPreEmpContactInfoServiceImpl extends ServiceImpl<TPreEmpContactInf ...@@ -40,7 +38,7 @@ public class TPreEmpContactInfoServiceImpl extends ServiceImpl<TPreEmpContactInf
* @return * @return
*/ */
@Override @Override
public List<TPreEmpContactInfo> getTPreEmpContactInfoList(String preMainId) { public TPreEmpContactInfo getTPreEmpContactInfoList(String preMainId) {
return baseMapper.getTPreEmpContactInfoList(preMainId); return baseMapper.getTPreEmpContactInfoList(preMainId);
} }
} }
...@@ -22,33 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpDisabilityInfoMapper; ...@@ -22,33 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpDisabilityInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpDisabilityInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpDisabilityInfoService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import javax.servlet.ServletOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/** /**
* 预入职-员工伤残信息表 * 预入职-员工伤残信息表
* *
...@@ -63,7 +36,7 @@ public class TPreEmpDisabilityInfoServiceImpl extends ServiceImpl<TPreEmpDisabil ...@@ -63,7 +36,7 @@ public class TPreEmpDisabilityInfoServiceImpl extends ServiceImpl<TPreEmpDisabil
* @return * @return
*/ */
@Override @Override
public List<TPreEmpDisabilityInfo> getTPreEmpDisabilityInfoList(String preMainId){ public TPreEmpDisabilityInfo getTPreEmpDisabilityInfoList(String preMainId){
return baseMapper.getTPreEmpDisabilityInfoList(preMainId); return baseMapper.getTPreEmpDisabilityInfoList(preMainId);
} }
......
...@@ -22,33 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpEducationMapper; ...@@ -22,33 +22,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpEducationMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpEducationService; import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpEducationService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import javax.servlet.ServletOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/** /**
* 预入职-员工学历信息表 * 预入职-员工学历信息表
* *
...@@ -63,7 +36,7 @@ public class TPreEmpEducationServiceImpl extends ServiceImpl<TPreEmpEducationMap ...@@ -63,7 +36,7 @@ public class TPreEmpEducationServiceImpl extends ServiceImpl<TPreEmpEducationMap
* @return * @return
*/ */
@Override @Override
public List<TPreEmpEducation> getTPreEmpEducationList(String preMainId){ public TPreEmpEducation getTPreEmpEducationList(String preMainId){
return baseMapper.getTPreEmpEducationList(preMainId); return baseMapper.getTPreEmpEducationList(preMainId);
} }
......
...@@ -38,7 +38,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo; ...@@ -38,7 +38,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -48,8 +50,11 @@ import javax.servlet.http.HttpServletResponse; ...@@ -48,8 +50,11 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID;
/** /**
* 预入职-主表 * 预入职-主表
...@@ -84,6 +89,28 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -84,6 +89,28 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 附件21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件) // 附件21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
private final TAttaInfoService tAttaInfoService; private final TAttaInfoService tAttaInfoService;
// 档案相关服务:
// 预入职-员工不良记录表
private final TEmpBadRecordService tEmpBadRecordService;
// 预入职-员工工作履历信息表
private final TEmpWorkRecordingService tEmpWorkRecordingService;
// 预入职-紧急联络人
private final TEmpContactInfoService tEmpContactInfoService;
// 预入职-员工伤残信息表
private final TEmpDisabilityInfoService tEmpDisabilityInfoService;
// 预入职-员工学历信息表
private final TEmpEducationService tEmpEducationService;
// 预入职-员工家庭信息表
private final TEmpFamilyService tEmpFamilyService;
// 预入职-人员档案表
private final TEmployeeInfoService tEmployeeInfoService;
// 预入职-项目档案表
private final TEmployeeProjectService tEmployeeProjectService;
// 预入职-员工职业资格信息表
private final TEmpProfessionalQualificationService tEmpProfessionalQualificationService;
// 项目
private final TSettleDomainService tSettleDomainService;
/** /**
* 预入职-主表简单分页查询 * 预入职-主表简单分页查询
* *
...@@ -108,28 +135,33 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -108,28 +135,33 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (main != null && main.getId() != null) { if (main != null && main.getId() != null) {
vo.setMain(main); vo.setMain(main);
// 预入职-员工不良记录表 // 预入职-员工不良记录表
List<TPreEmpBadRecord> tPreEmpBadRecord = tPreEmpBadRecordService.getTPreEmpBadRecordList(id); TPreEmpBadRecord tPreEmpBadRecord = tPreEmpBadRecordService.getTPreEmpBadRecordList(id);
vo.setTPreEmpBadRecord(tPreEmpBadRecord); vo.setTPreEmpBadRecord(tPreEmpBadRecord);
// 预入职-紧急联络人 // 预入职-紧急联络人
List<TPreEmpContactInfo> tPreEmpContactInfo = tPreEmpContactInfoService.getTPreEmpContactInfoList(id); TPreEmpContactInfo tPreEmpContactInfo = tPreEmpContactInfoService.getTPreEmpContactInfoList(id);
vo.setTPreEmpContactInfo(tPreEmpContactInfo); vo.setTPreEmpContactInfo(tPreEmpContactInfo);
// 预入职-员工申明 // 预入职-员工申明
TPreEmpDeclaration tPreEmpDeclaration = tPreEmpDeclarationService.getTPreEmpDeclarationList(); TPreEmpDeclaration tPreEmpDeclaration;
if (Common.isNotNull(main.getDeclarationId())) {
tPreEmpDeclaration = tPreEmpDeclarationService.getById(main.getDeclarationId());
} else {
tPreEmpDeclaration = tPreEmpDeclarationService.getTPreEmpDeclarationList();
}
vo.setTPreEmpDeclaration(tPreEmpDeclaration); vo.setTPreEmpDeclaration(tPreEmpDeclaration);
// 预入职-员工伤残信息表 // 预入职-员工伤残信息表
List<TPreEmpDisabilityInfo> tPreEmpDisabilityInfo = tPreEmpDisabilityInfoService.getTPreEmpDisabilityInfoList(id); TPreEmpDisabilityInfo tPreEmpDisabilityInfo = tPreEmpDisabilityInfoService.getTPreEmpDisabilityInfoList(id);
vo.setTPreEmpDisabilityInfo(tPreEmpDisabilityInfo); vo.setTPreEmpDisabilityInfo(tPreEmpDisabilityInfo);
// 预入职-员工学历信息表 // 预入职-员工学历信息表
List<TPreEmpEducation> tPreEmpEducation = tPreEmpEducationService.getTPreEmpEducationList(id); TPreEmpEducation tPreEmpEducation = tPreEmpEducationService.getTPreEmpEducationList(id);
vo.setTPreEmpEducation(tPreEmpEducation); vo.setTPreEmpEducation(tPreEmpEducation);
// 预入职-员工家庭信息表 // 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamily = tPreEmpFamilyService.getTPreEmpFamilyList(id); List<TPreEmpFamily> tPreEmpFamily = tPreEmpFamilyService.getTPreEmpFamilyList(id);
vo.setTPreEmpFamily(tPreEmpFamily); vo.setTPreEmpFamily(tPreEmpFamily);
// 预入职-人员档案表 // 预入职-人员档案表
List<TPreEmployeeInfo> tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(id); TPreEmployeeInfo tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(id);
vo.setTPreEmployeeInfo(tPreEmployeeInfo); vo.setTPreEmployeeInfo(tPreEmployeeInfo);
// 预入职-项目档案表 // 预入职-项目档案表
List<TPreEmployeeProject> tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(id); TPreEmployeeProject tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(id);
vo.setTPreEmployeeProject(tPreEmployeeProject); vo.setTPreEmployeeProject(tPreEmployeeProject);
// 预入职-员工职业资格信息表 // 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = tPreEmpProfessionalQualificationService.getTPreEmpProfessionalQualificationList(id); List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = tPreEmpProfessionalQualificationService.getTPreEmpProfessionalQualificationList(id);
...@@ -138,7 +170,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -138,7 +170,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
List<TPreEmpWorkRecording> tPreEmpWorkRecording = tPreEmpWorkRecordingService.getTPreEmpWorkRecordingList(id); List<TPreEmpWorkRecording> tPreEmpWorkRecording = tPreEmpWorkRecordingService.getTPreEmpWorkRecordingList(id);
vo.setTPreEmpWorkRecording(tPreEmpWorkRecording); vo.setTPreEmpWorkRecording(tPreEmpWorkRecording);
// 预入职-附件 21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件) // 预入职-附件 9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(id); List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(id);
vo.setAttaInfoList(attaInfoList); vo.setAttaInfoList(attaInfoList);
return R.ok(vo); return R.ok(vo);
...@@ -180,85 +212,448 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -180,85 +212,448 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
private R<String> saveBase(PreEmpMainDetailVo vo, String status) { private R<String> saveBase(PreEmpMainDetailVo vo, String status) {
TPreEmpMain main = vo.getMain(); TPreEmpMain main = vo.getMain();
if (main != null && Common.isNotNull(main.getEmpIdcard())) { if (main != null && Common.isNotNull(main.getEmpIdcard())) {
main.setStatus(status); TPreEmployeeProject tPreEmployeeProject = vo.getTPreEmployeeProject();
this.saveOrUpdate(main); if (tPreEmployeeProject != null && Common.isNotNull(tPreEmployeeProject.getOldId())) {
String mainId = main.getId(); // 预入职-人员档案表
TPreEmployeeInfo tPreEmployeeInfo = vo.getTPreEmployeeInfo();
if (tPreEmployeeInfo != null && Common.isNotNull(tPreEmployeeInfo.getOldId())) {
// 转到更新档案去
return updateToEmployeeByPre(vo);
} else {
return R.failed("档案原ID不可为空!");
}
} else {
main.setStatus(status);
this.saveOrUpdate(main);
String mainId = main.getId();
// 预入职-员工不良记录表 // 预入职-员工不良记录表
List<TPreEmpBadRecord> tPreEmpBadRecord = vo.getTPreEmpBadRecord(); TPreEmpBadRecord tPreEmpBadRecord = vo.getTPreEmpBadRecord();
if (tPreEmpBadRecord != null) { if (tPreEmpBadRecord != null) {
for (TPreEmpBadRecord info : tPreEmpBadRecord) { tPreEmpBadRecord.setPreMainId(mainId);
info.setPreMainId(mainId); tPreEmpBadRecordService.saveOrUpdate(tPreEmpBadRecord);
} }
tPreEmpBadRecordService.saveOrUpdateBatch(tPreEmpBadRecord); // 预入职-紧急联络人
} TPreEmpContactInfo tPreEmpContactInfo = vo.getTPreEmpContactInfo();
// 预入职-紧急联络人 if (tPreEmpContactInfo != null) {
List<TPreEmpContactInfo> tPreEmpContactInfo = vo.getTPreEmpContactInfo(); tPreEmpContactInfo.setPreMainId(mainId);
if (tPreEmpContactInfo != null) { tPreEmpContactInfoService.saveOrUpdate(tPreEmpContactInfo);
for (TPreEmpContactInfo info : tPreEmpContactInfo) { }
info.setPreMainId(mainId); // 预入职-员工伤残信息表
TPreEmpDisabilityInfo tPreEmpDisabilityInfo = vo.getTPreEmpDisabilityInfo();
if (tPreEmpDisabilityInfo != null) {
tPreEmpDisabilityInfo.setPreMainId(mainId);
tPreEmpDisabilityInfoService.saveOrUpdate(tPreEmpDisabilityInfo);
}
// 预入职-员工学历信息表
TPreEmpEducation tPreEmpEducation = vo.getTPreEmpEducation();
if (tPreEmpEducation != null) {
tPreEmpEducation.setPreMainId(mainId);
tPreEmpEducationService.saveOrUpdate(tPreEmpEducation);
}
// 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamily = vo.getTPreEmpFamily();
if (tPreEmpFamily != null) {
for (TPreEmpFamily info : tPreEmpFamily) {
info.setPreMainId(mainId);
}
tPreEmpFamilyService.saveOrUpdateBatch(tPreEmpFamily);
}
// 预入职-人员档案表
TPreEmployeeInfo tPreEmployeeInfo = vo.getTPreEmployeeInfo();
if (tPreEmployeeInfo != null) {
if (tPreEmpEducation != null) {
if (Common.isNotNull(tPreEmpEducation.getEducationName())) {
// 5大专
// 6本科
// 7硕士
// 8博士
if ("5".equals(tPreEmpEducation.getEducationName())
|| "6".equals(tPreEmpEducation.getEducationName())
|| "7".equals(tPreEmpEducation.getEducationName())
|| "8".equals(tPreEmpEducation.getEducationName())) {
tPreEmployeeInfo.setIsCollege(CommonConstants.ONE_INT);
} else {
tPreEmployeeInfo.setIsCollege(CommonConstants.ZERO_INT);
}
}
}
// 生成性别年龄等:
this.setBaseSexInfo(tPreEmployeeInfo);
tPreEmployeeInfo.setPreMainId(mainId);
tPreEmployeeInfoService.saveOrUpdate(tPreEmployeeInfo);
}
// 预入职-项目档案表
if (tPreEmployeeProject != null) {
tPreEmployeeProject.setPreMainId(mainId);
tPreEmployeeProjectService.saveOrUpdate(tPreEmployeeProject);
}
// 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = vo.getTPreEmpProfessionalQualification();
if (tPreEmpProfessionalQualification != null) {
for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualification) {
info.setPreMainId(mainId);
}
tPreEmpProfessionalQualificationService.saveOrUpdateBatch(tPreEmpProfessionalQualification);
}
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecording = vo.getTPreEmpWorkRecording();
if (tPreEmpWorkRecording != null) {
for (TPreEmpWorkRecording info : tPreEmpWorkRecording) {
info.setPreMainId(mainId);
}
tPreEmpWorkRecordingService.saveOrUpdateBatch(tPreEmpWorkRecording);
} }
tPreEmpContactInfoService.saveOrUpdateBatch(tPreEmpContactInfo);
} }
// 预入职-员工伤残信息表 return R.ok("成功");
List<TPreEmpDisabilityInfo> tPreEmpDisabilityInfo = vo.getTPreEmpDisabilityInfo(); } else {
if (tPreEmpDisabilityInfo != null) { return R.failed("身份证不可为空!");
for (TPreEmpDisabilityInfo info : tPreEmpDisabilityInfo) { }
info.setPreMainId(mainId); }
/**
* @Description: 执行复制到档案的操作
* @Author: hgw
* @Date: 2024/6/18 19:35
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private R<String> updateToEmployeeByPre(PreEmpMainDetailVo vo) {
YifuUser user = SecurityUtils.getUser();
// 预入职-人员档案表
TPreEmployeeInfo tPreEmployeeInfo = vo.getTPreEmployeeInfo();
// 预入职-项目档案表
TPreEmployeeProject tPreEmployeeProject = vo.getTPreEmployeeProject();
// 预入职-员工学历信息表
TPreEmpEducation tPreEmpEducation = vo.getTPreEmpEducation();
// 如果档案项目id都没有,则新增。newFlag是true:
boolean newFlag = true;
String empId = null;
String empIdCard = null;
// 1人员档案
TEmployeeInfo emp = null;
// 2项目档案
TEmployeeProject project = null;
TSettleDomain dept = null;
if (tPreEmployeeProject != null && Common.isNotNull(tPreEmployeeProject.getDeptId())) {
dept = tSettleDomainService.getById(tPreEmployeeProject.getDeptId());
}
if (dept == null) {
return R.failed("根据项目id,未找到项目!");
}
if (tPreEmployeeInfo != null && Common.isNotNull(tPreEmployeeInfo.getOldId())
&& Common.isNotNull(tPreEmployeeProject.getOldId())) {
newFlag = false;
empId = tPreEmployeeInfo.getOldId();
emp = tEmployeeInfoService.getById(empId);
if (emp != null) {
BeanUtil.copyProperties(tPreEmployeeInfo, emp);
tEmployeeInfoService.updateById(emp);
} else {
emp = this.saveTEmployeeInfo(user, tPreEmployeeInfo);
empId = emp.getId();
}
empIdCard = emp.getEmpIdcard();
project = tEmployeeProjectService.getById(tPreEmployeeProject.getOldId());
if (project != null) {
BeanUtil.copyProperties(tPreEmployeeInfo, project);
tEmployeeInfoService.updateById(emp);
} else {
project = this.saveTEmployeeProject(project, user, tPreEmployeeProject, emp, dept);
}
} else {
// 新建档案、项目档案,将档案id赋值,给其他附属信息
if (tPreEmployeeInfo != null) {
if (tPreEmpEducation != null) {
if (Common.isNotNull(tPreEmpEducation.getEducationName())) {
if ("5".equals(tPreEmpEducation.getEducationName())
|| "6".equals(tPreEmpEducation.getEducationName())
|| "7".equals(tPreEmpEducation.getEducationName())
|| "8".equals(tPreEmpEducation.getEducationName())) {
tPreEmployeeInfo.setIsCollege(CommonConstants.ONE_INT);
} else {
tPreEmployeeInfo.setIsCollege(CommonConstants.ZERO_INT);
}
}
} }
tPreEmpDisabilityInfoService.saveOrUpdateBatch(tPreEmpDisabilityInfo); // 生成性别年龄等:
this.setBaseSexInfo(tPreEmployeeInfo);
// 1人员档案
emp = this.saveTEmployeeInfo(user, tPreEmployeeInfo);
empId = emp.getId();
empIdCard = emp.getEmpIdcard();
// 2项目档案
project = this.saveTEmployeeProject(project, user, tPreEmployeeProject, emp, dept);
} }
// 预入职-员工学历信息表 }
List<TPreEmpEducation> tPreEmpEducation = vo.getTPreEmpEducation();
if (tPreEmpEducation != null) { // 3:其他附属信息
for (TPreEmpEducation info : tPreEmpEducation) {
info.setPreMainId(mainId); // 预入职-员工不良记录表
// 预入职-员工工作履历信息表
// 预入职-紧急联络人
// 预入职-员工伤残信息表
// 预入职-员工学历信息表
// 预入职-员工家庭信息表
// 预入职-人员档案表
// 预入职-项目档案表
// 预入职-员工职业资格信息表
// 最高学历
if (tPreEmpEducation != null) {
TEmpEducation tEmpEducation = null;
if (Common.isNotNull(tPreEmpEducation.getOldId())) {
tEmpEducation = tEmpEducationService.getById(tPreEmpEducation.getOldId());
}
if (tEmpEducation == null) {
tEmpEducation = new TEmpEducation();
} else {
// 已存在的学历信息(如果不一致,要更新档案的最高学历)
if (Common.isEmpty(tEmpEducation.getEducationName())
|| !tEmpEducation.getEducationName().equals(tPreEmpEducation.getEducationName())) {
emp.setHignEducation(tPreEmpEducation.getEducationName());
tEmployeeInfoService.updateById(emp);
} }
tPreEmpEducationService.saveOrUpdateBatch(tPreEmpEducation);
} }
// 预入职-员工家庭信息表 BeanUtil.copyProperties(tPreEmpEducation, tEmpEducation);
List<TPreEmpFamily> tPreEmpFamily = vo.getTPreEmpFamily(); if (Common.isNotNull(empIdCard)) {
if (tPreEmpFamily != null) { tEmpEducationService.updateEducationToNoByIdCard(empIdCard);
for (TPreEmpFamily info : tPreEmpFamily) { }
info.setPreMainId(mainId); tEmpEducationService.saveOrUpdate(tEmpEducation);
}
// 预入职-员工不良记录表
TPreEmpBadRecord tPreEmpBadRecord = vo.getTPreEmpBadRecord();
if (tPreEmpBadRecord != null) {
TEmpBadRecord tEmpBadRecord = null;
if (Common.isNotNull(tPreEmpBadRecord.getOldId())) {
tEmpBadRecord = tEmpBadRecordService.getById(tPreEmpBadRecord.getOldId());
}
if (tEmpBadRecord == null) {
tEmpBadRecord = new TEmpBadRecord();
}
BeanUtil.copyProperties(tPreEmpEducation, tEmpBadRecord);
tEmpBadRecordService.saveOrUpdate(tEmpBadRecord);
}
// 预入职-紧急联络人
TPreEmpContactInfo tPreEmpContactInfo = vo.getTPreEmpContactInfo();
if (tPreEmpContactInfo != null) {
TEmpContactInfo tEmpContactInfo = null;
if (Common.isNotNull(tPreEmpContactInfo.getOldId())) {
tEmpContactInfo = tEmpContactInfoService.getById(tPreEmpContactInfo.getOldId());
}
if (tEmpContactInfo == null) {
tEmpContactInfo = new TEmpContactInfo();
}
BeanUtil.copyProperties(tPreEmpContactInfo, tEmpContactInfo);
tEmpContactInfoService.saveOrUpdate(tEmpContactInfo);
}
// 预入职-员工伤残信息表
TPreEmpDisabilityInfo tPreEmpDisabilityInfo = vo.getTPreEmpDisabilityInfo();
if (tPreEmpDisabilityInfo != null) {
TEmpDisabilityInfo tEmpDisabilityInfo = null;
if (Common.isNotNull(tPreEmpDisabilityInfo.getOldId())) {
tEmpDisabilityInfo = tEmpDisabilityInfoService.getById(tPreEmpDisabilityInfo.getOldId());
}
if (tEmpDisabilityInfo == null) {
tEmpDisabilityInfo = new TEmpDisabilityInfo();
}
BeanUtil.copyProperties(tPreEmpContactInfo, tEmpDisabilityInfo);
tEmpDisabilityInfoService.saveOrUpdate(tEmpDisabilityInfo);
}
// 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamilyList = vo.getTPreEmpFamily();
if (tPreEmpFamilyList != null) {
// 先删除其他信息
tEmpFamilyService.deleteByEmpIdAndTable(empId, "t_emp_family");
List<TEmpFamily> tEmpFamilyList = new ArrayList<>();
TEmpFamily tEmpFamily;
for (TPreEmpFamily tPreEmpFamily : tPreEmpFamilyList) {
tEmpFamily = new TEmpFamily();
BeanUtil.copyProperties(tPreEmpContactInfo, tEmpFamily);
if (Common.isNotNull(tPreEmpFamily.getOldId())) {
tEmpFamily.setId(tPreEmpFamily.getOldId());
} }
tPreEmpFamilyService.saveOrUpdateBatch(tPreEmpFamily); tEmpFamilyList.add(tEmpFamily);
} }
// 预入职-人员档案表 tEmpFamilyService.saveOrUpdateBatch(tEmpFamilyList);
List<TPreEmployeeInfo> tPreEmployeeInfo = vo.getTPreEmployeeInfo(); }
if (tPreEmployeeInfo != null) { // 预入职-员工职业资格信息表
for (TPreEmployeeInfo info : tPreEmployeeInfo) { List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualificationList = vo.getTPreEmpProfessionalQualification();
info.setPreMainId(mainId); 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);
if (Common.isNotNull(preInfo.getOldId())) {
info.setId(preInfo.getOldId());
} }
tPreEmployeeInfoService.saveOrUpdateBatch(tPreEmployeeInfo); tEmpProfessionalQualificationList.add(info);
} }
// 预入职-项目档案表 tEmpProfessionalQualificationService.saveOrUpdateBatch(tEmpProfessionalQualificationList);
List<TPreEmployeeProject> tPreEmployeeProject = vo.getTPreEmployeeProject(); }
if (tPreEmployeeProject != null) { // 预入职-员工工作履历信息表
for (TPreEmployeeProject info : tPreEmployeeProject) { List<TPreEmpWorkRecording> tPreEmpWorkRecordingList = vo.getTPreEmpWorkRecording();
info.setPreMainId(mainId); if (tPreEmpWorkRecordingList != null) {
// 先删除其他信息
tEmpFamilyService.deleteByEmpIdAndTable(empId, "t_pre_emp_work_recording");
List<TEmpWorkRecording> tEmpWorkRecordingList = new ArrayList<>();
TEmpWorkRecording info;
for (TPreEmpWorkRecording preInfo : tPreEmpWorkRecordingList) {
info = new TEmpWorkRecording();
BeanUtil.copyProperties(tPreEmpContactInfo, info);
if (Common.isNotNull(preInfo.getOldId())) {
info.setId(preInfo.getOldId());
} }
tPreEmployeeProjectService.saveOrUpdateBatch(tPreEmployeeProject); tEmpWorkRecordingList.add(info);
} }
// 预入职-员工职业资格信息表 tEmpWorkRecordingService.saveOrUpdateBatch(tEmpWorkRecordingList);
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = vo.getTPreEmpProfessionalQualification(); }
if (tPreEmpProfessionalQualification != null) { return R.ok("保存档案成功!");
for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualification) { }
info.setPreMainId(mainId);
// 2新增或更新项目
private TEmployeeProject saveTEmployeeProject(TEmployeeProject project, YifuUser user, TPreEmployeeProject tPreEmployeeProject, TEmployeeInfo emp, TSettleDomain dept) {
boolean isNew;
if (Common.isNotNull(tPreEmployeeProject.getEmpIdcard()) && Common.isNotNull(tPreEmployeeProject.getDeptId())) {
project = tEmployeeProjectService.getByEmpIdAndDeptId(tPreEmployeeProject.getEmpIdcard(), tPreEmployeeProject.getDeptId());
if (project == null) {
project = tEmployeeProjectService.getByEmpIdAndDeptIdAndDelete(tPreEmployeeProject.getEmpIdcard(), tPreEmployeeProject.getDeptId());
if (project != null) {
project.setProjectStatus(CommonConstants.ZERO_INT);
project.setDeleteFlag(CommonConstants.STATUS_NORMAL);
} }
tPreEmpProfessionalQualificationService.saveOrUpdateBatch(tPreEmpProfessionalQualification);
} }
// 预入职-员工工作履历信息表 isNew = false;
List<TPreEmpWorkRecording> tPreEmpWorkRecording = vo.getTPreEmpWorkRecording(); if (project == null) {
if (tPreEmpWorkRecording != null) { isNew = true;
for (TPreEmpWorkRecording info : tPreEmpWorkRecording) { project = new TEmployeeProject();
info.setPreMainId(mainId); }
BeanUtil.copyProperties(tPreEmployeeProject, project);
if (isNew) {
// 新项目档案塞基本属性
this.setNewEmpProjectBaseData(project, emp, dept, user);
}
tEmployeeProjectService.saveOrUpdate(project);
}
return project;
}
// 1新增档案
private TEmployeeInfo saveTEmployeeInfo(YifuUser user, TPreEmployeeInfo tPreEmployeeInfo) {
TEmployeeInfo emp = tEmployeeInfoService.getInfoByIdcard(tPreEmployeeInfo.getEmpIdcard());
if (emp == null) {
emp = tEmployeeInfoService.getInfoByDelete(tPreEmployeeInfo.getEmpIdcard());
if (emp != null) {
emp.setDeleteFlag(CommonConstants.STATUS_NORMAL);
}
}
boolean isNew = false;
if (emp == null) {
isNew = true;
emp = new TEmployeeInfo();
}
BeanUtil.copyProperties(tPreEmployeeInfo, emp);
if (isNew) {
// 新员工塞基本属性
this.setNewEmpBaseData(emp, user);
}
tEmployeeInfoService.saveOrUpdate(emp);
return emp;
}
/**
* @Description: 新员工塞基本信息
* @Author: hgw
* @Date: 2024/6/19 14:26
* @return: void
**/
private void setNewEmpBaseData(TEmployeeInfo employeeInfo, YifuUser user) {
// 新增档案
employeeInfo.setEmpCode(tEmployeeInfoService.getCode());
employeeInfo.setCreateBy(user.getId());
employeeInfo.setCreateName(user.getNickname());
employeeInfo.setCreateTime(LocalDateTime.now());
employeeInfo.setFileSource(CommonConstants.SEVEN_STRING);
employeeInfo.setStatus(CommonConstants.ZERO_INT);
employeeInfo.setFileStatus(CommonConstants.ZERO_INT);
employeeInfo.setProjectNum(CommonConstants.ONE_INT);
employeeInfo.setDeleteFlag(CommonConstants.STATUS_NORMAL);
employeeInfo.setContractStatus(CommonConstants.ZERO_INT);
employeeInfo.setInsuranceStatus(CommonConstants.ZERO_INT);
employeeInfo.setSocialStatus(CommonConstants.ZERO_INT);
employeeInfo.setFundStatus(CommonConstants.ZERO_INT);
employeeInfo.setSalaryStatus(CommonConstants.ZERO_INT);
}
/**
* @Description: 新员工塞基本项目档案信息
* @Author: hgw
* @Date: 2024/6/19 14:26
* @return: void
**/
private void setNewEmpProjectBaseData(TEmployeeProject insTEmployeePro, TEmployeeInfo tEmployeeInfo, TSettleDomain tSettleDomain, YifuUser user) {
// 新增档案
insTEmployeePro.setId(String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
insTEmployeePro.setDeleteFlag(CommonConstants.STATUS_NORMAL);
insTEmployeePro.setStatus(CommonConstants.ZERO_INT);
//获取项目和单位信息
if (Common.isNotNull(tSettleDomain)) {
insTEmployeePro.setDeptId(tSettleDomain.getId());
insTEmployeePro.setDeptName(tSettleDomain.getDepartName());
insTEmployeePro.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
insTEmployeePro.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
insTEmployeePro.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
insTEmployeePro.setUnitId(tSettleDomain.getCustomerId());
insTEmployeePro.setUnitNo(tSettleDomain.getCustomerNo());
insTEmployeePro.setUnitName(tSettleDomain.getCustomerName());
String empNO = tEmployeeProjectService.getEmpNo(insTEmployeePro.getDeptNo());
insTEmployeePro.setEmpNo(empNO);
}
//员工编码生成规则
insTEmployeePro.setEmpCode(tEmployeeInfo.getEmpCode());
insTEmployeePro.setCreateBy(user.getId());
insTEmployeePro.setEmpName(tEmployeeInfo.getEmpName());
insTEmployeePro.setCreateName(user.getNickname());
insTEmployeePro.setProjectSource(CommonConstants.SIX_STRING);
insTEmployeePro.setEmpId(tEmployeeInfo.getId());
}
/**
* @param employeeInfo
* @Description: 生成基础性别等信息
* @Author: hgw
* @Date: 2022/6/24 16:51
* @return: void
**/
private void setBaseSexInfo(TPreEmployeeInfo employeeInfo) {
String idCard = employeeInfo.getEmpIdcard();
if (Common.isNotNull(idCard) && Common.isEmpty(employeeInfo.getEmpSex()) && idCard.length() > 14) {
// 出生日期
String idCardDate = idCard.substring(6, 14);
Date empBirthday = DateUtil.stringToDateByPatten(idCardDate, "yyyyMMdd");
employeeInfo.setEmpBirthday(empBirthday);
// 性别
if (idCard.length() > 17) {
if (Integer.parseInt(idCard.substring(16, 17)) % 2 == 1) {
employeeInfo.setEmpSex(CommonConstants.SEX_MAN);
} else {
employeeInfo.setEmpSex(CommonConstants.SEX_WONMAN);
} }
tPreEmpWorkRecordingService.saveOrUpdateBatch(tPreEmpWorkRecording);
} }
return R.ok("成功");
} else { // 年龄
return R.failed("身份证不可为空!"); int idCardYear = Integer.parseInt(idCard.substring(6, 10));
employeeInfo.setEmpAge(DateUtil.getAge(idCardYear));
} }
} }
......
...@@ -63,7 +63,7 @@ public class TPreEmployeeInfoServiceImpl extends ServiceImpl<TPreEmployeeInfoMap ...@@ -63,7 +63,7 @@ public class TPreEmployeeInfoServiceImpl extends ServiceImpl<TPreEmployeeInfoMap
* @return * @return
*/ */
@Override @Override
public List<TPreEmployeeInfo> getTPreEmployeeInfoList(String preMainId){ public TPreEmployeeInfo getTPreEmployeeInfoList(String preMainId){
return baseMapper.getTPreEmployeeInfoList(preMainId); return baseMapper.getTPreEmployeeInfoList(preMainId);
} }
......
...@@ -22,33 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmployeeProjectMapper; ...@@ -22,33 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmployeeProjectMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmployeeProjectService; import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmployeeProjectService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import javax.servlet.ServletOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/** /**
* 预入职-项目档案表 * 预入职-项目档案表
* *
...@@ -58,13 +32,14 @@ import java.util.List; ...@@ -58,13 +32,14 @@ import java.util.List;
@Log4j2 @Log4j2
@Service @Service
public class TPreEmployeeProjectServiceImpl extends ServiceImpl<TPreEmployeeProjectMapper, TPreEmployeeProject> implements TPreEmployeeProjectService { public class TPreEmployeeProjectServiceImpl extends ServiceImpl<TPreEmployeeProjectMapper, TPreEmployeeProject> implements TPreEmployeeProjectService {
/** /**
* 预入职-项目档案表简单分页查询 * 预入职-项目档案表简单分页查询
* @return *
*/ * @return
@Override */
public List<TPreEmployeeProject> getTPreEmployeeProjectList(String preMainId){ @Override
return baseMapper.getTPreEmployeeProjectList(preMainId); public TPreEmployeeProject getTPreEmployeeProjectList(String preMainId) {
} return baseMapper.getTPreEmployeeProjectList(preMainId);
}
} }
...@@ -43,4 +43,8 @@ ...@@ -43,4 +43,8 @@
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/> <result property="remark" column="REMARK"/>
</resultMap> </resultMap>
<delete id="deleteByEmpId">
delete from #{tableName} where EMP_ID = #{empId}
</delete>
</mapper> </mapper>
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="settleDomain" column="SETTLE_DOMAIN"/> <result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="oldId" column="OLD_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -59,6 +60,7 @@ ...@@ -59,6 +60,7 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_TIME, a.UPDATE_TIME,
a.OLD_ID,
a.SETTLE_DOMAIN a.SETTLE_DOMAIN
</sql> </sql>
<sql id="tPreEmpBadRecord_where"> <sql id="tPreEmpBadRecord_where">
...@@ -125,5 +127,6 @@ ...@@ -125,5 +127,6 @@
1=1 1=1
<include refid="tPreEmpBadRecord_where"/> <include refid="tPreEmpBadRecord_where"/>
</where> </where>
limit 1
</select> </select>
</mapper> </mapper>
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="oldId" column="OLD_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
a.UPDATE_BY, a.UPDATE_BY,
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.OLD_ID,
a.UPDATE_TIME a.UPDATE_TIME
</sql> </sql>
<sql id="tPreEmpContactInfo_where"> <sql id="tPreEmpContactInfo_where">
...@@ -97,5 +99,6 @@ ...@@ -97,5 +99,6 @@
1=1 1=1
<include refid="tPreEmpContactInfo_where"/> <include refid="tPreEmpContactInfo_where"/>
</where> </where>
limit 1
</select> </select>
</mapper> </mapper>
...@@ -27,17 +27,20 @@ ...@@ -27,17 +27,20 @@
<id property="id" column="ID"/> <id property="id" column="ID"/>
<result property="contentOne" column="CONTENT_ONE"/> <result property="contentOne" column="CONTENT_ONE"/>
<result property="contentTwo" column="CONTENT_TWO"/> <result property="contentTwo" column="CONTENT_TWO"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
a.CONTENT_ONE, a.CONTENT_ONE,
a.CONTENT_TWO a.CONTENT_TWO,
a.CREATE_TIME
</sql> </sql>
<!--tPreEmpDeclaration简单分页查询--> <!--tPreEmpDeclaration简单分页查询-->
<select id="getTPreEmpDeclarationList" resultMap="tPreEmpDeclarationMap"> <select id="getTPreEmpDeclarationList" resultMap="tPreEmpDeclarationMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_pre_emp_declaration a FROM t_pre_emp_declaration a
order by a.CREATE_TIME desc
limit 1 limit 1
</select> </select>
</mapper> </mapper>
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/> <result property="remark" column="REMARK"/>
<result property="oldId" column="OLD_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -65,6 +66,7 @@ ...@@ -65,6 +66,7 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_TIME, a.UPDATE_TIME,
a.OLD_ID,
a.REMARK a.REMARK
</sql> </sql>
<sql id="tPreEmpDisabilityInfo_where"> <sql id="tPreEmpDisabilityInfo_where">
...@@ -140,5 +142,6 @@ ...@@ -140,5 +142,6 @@
1=1 1=1
<include refid="tPreEmpDisabilityInfo_where"/> <include refid="tPreEmpDisabilityInfo_where"/>
</where> </where>
limit 1
</select> </select>
</mapper> </mapper>
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<result property="remark" column="REMARK"/> <result property="remark" column="REMARK"/>
<result property="certificationName" column="CERTIFICATION_NAME"/> <result property="certificationName" column="CERTIFICATION_NAME"/>
<result property="major" column="MAJOR"/> <result property="major" column="MAJOR"/>
<result property="oldId" column="OLD_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -75,6 +76,7 @@ ...@@ -75,6 +76,7 @@
a.UPDATE_TIME, a.UPDATE_TIME,
a.REMARK, a.REMARK,
a.CERTIFICATION_NAME, a.CERTIFICATION_NAME,
a.OLD_ID,
a.MAJOR a.MAJOR
</sql> </sql>
<sql id="tPreEmpEducation_where"> <sql id="tPreEmpEducation_where">
...@@ -165,5 +167,6 @@ ...@@ -165,5 +167,6 @@
1=1 1=1
<include refid="tPreEmpEducation_where"/> <include refid="tPreEmpEducation_where"/>
</where> </where>
limit 1
</select> </select>
</mapper> </mapper>
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/> <result property="remark" column="REMARK"/>
<result property="oldId" column="OLD_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_TIME, a.UPDATE_TIME,
a.OLD_ID,
a.REMARK a.REMARK
</sql> </sql>
<sql id="tPreEmpFamily_where"> <sql id="tPreEmpFamily_where">
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="settleDomain" column="SETTLE_DOMAIN"/> <result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="declarationId" column="DECLARATION_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -77,7 +78,8 @@ ...@@ -77,7 +78,8 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_TIME, a.UPDATE_TIME,
a.SETTLE_DOMAIN a.SETTLE_DOMAIN,
a.DECLARATION_ID
</sql> </sql>
<sql id="tPreEmpMain_where"> <sql id="tPreEmpMain_where">
<if test="tPreEmpMain != null"> <if test="tPreEmpMain != null">
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/> <result property="remark" column="REMARK"/>
<result property="oldId" column="OLD_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -67,6 +68,7 @@ ...@@ -67,6 +68,7 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_TIME, a.UPDATE_TIME,
a.OLD_ID,
a.REMARK a.REMARK
</sql> </sql>
<sql id="tPreEmpProfessionalQualification_where"> <sql id="tPreEmpProfessionalQualification_where">
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/> <result property="remark" column="REMARK"/>
<result property="oldId" column="OLD_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -67,6 +68,7 @@ ...@@ -67,6 +68,7 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_TIME, a.UPDATE_TIME,
a.OLD_ID,
a.REMARK a.REMARK
</sql> </sql>
<sql id="tPreEmpWorkRecording_where"> <sql id="tPreEmpWorkRecording_where">
......
...@@ -75,6 +75,9 @@ ...@@ -75,6 +75,9 @@
<result property="leaveReason" column="LEAVE_REASON"/> <result property="leaveReason" column="LEAVE_REASON"/>
<result property="leaveRemark" column="LEAVE_REMARK"/> <result property="leaveRemark" column="LEAVE_REMARK"/>
<result property="contactAddress" column="CONTACT_ADDRESS"/> <result property="contactAddress" column="CONTACT_ADDRESS"/>
<result property="firstWorkFlag" column="FIRST_WORK_FLAG"/>
<result property="haveQualification" column="HAVE_QUALIFICATION"/>
<result property="oldId" column="OLD_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -127,7 +130,10 @@ ...@@ -127,7 +130,10 @@
a.LEAVE_TIME, a.LEAVE_TIME,
a.LEAVE_REASON, a.LEAVE_REASON,
a.LEAVE_REMARK, a.LEAVE_REMARK,
a.CONTACT_ADDRESS a.CONTACT_ADDRESS,
a.FIRST_WORK_FLAG,
a.OLD_ID,
a.HAVE_QUALIFICATION
</sql> </sql>
<sql id="tPreEmployeeInfo_where"> <sql id="tPreEmployeeInfo_where">
<if test="tPreEmployeeInfo != null"> <if test="tPreEmployeeInfo != null">
...@@ -295,5 +301,6 @@ ...@@ -295,5 +301,6 @@
1=1 1=1
<include refid="tPreEmployeeInfo_where"/> <include refid="tPreEmployeeInfo_where"/>
</where> </where>
limit 1
</select> </select>
</mapper> </mapper>
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
<result property="socialCity" column="SOCIAL_CITY"/> <result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/> <result property="socialTown" column="SOCIAL_TOWN"/>
<result property="empLabel" column="EMP_LABEL"/> <result property="empLabel" column="EMP_LABEL"/>
<result property="oldId" column="OLD_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -125,6 +126,7 @@ ...@@ -125,6 +126,7 @@
a.SOCIAL_PROVINCE, a.SOCIAL_PROVINCE,
a.SOCIAL_CITY, a.SOCIAL_CITY,
a.SOCIAL_TOWN, a.SOCIAL_TOWN,
a.OLD_ID,
a.EMP_LABEL a.EMP_LABEL
</sql> </sql>
<sql id="tPreEmployeeProject_where"> <sql id="tPreEmployeeProject_where">
...@@ -290,5 +292,6 @@ ...@@ -290,5 +292,6 @@
1=1 1=1
<include refid="tPreEmployeeProject_where"/> <include refid="tPreEmployeeProject_where"/>
</where> </where>
limit 1
</select> </select>
</mapper> </mapper>
...@@ -47,4 +47,13 @@ public interface TAutoPaymentErrorService extends IService<TAutoPaymentError> { ...@@ -47,4 +47,13 @@ public interface TAutoPaymentErrorService extends IService<TAutoPaymentError> {
void deleteByParentId(String parentId); void deleteByParentId(String parentId);
/**
* @param parentId
* @Description: 根据主表id获取条数
* @Author: hgw
* @Date: 2024/6/19 16:32
* @return: long
**/
long getCountByParentId(String parentId);
} }
...@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
...@@ -132,6 +133,12 @@ public class TAutoPaymentErrorServiceImpl extends ServiceImpl<TAutoPaymentErrorM ...@@ -132,6 +133,12 @@ public class TAutoPaymentErrorServiceImpl extends ServiceImpl<TAutoPaymentErrorM
baseMapper.deleteByParentId(parentId); baseMapper.deleteByParentId(parentId);
} }
@Override
public long getCountByParentId(String parentId) {
return this.count(Wrappers.<TAutoPaymentError>query().lambda()
.eq(TAutoPaymentError::getParentId, parentId));
}
@Override @Override
public List<TAutoPaymentError> noPageDiy(TAutoPaymentErrorSearchVo searchVo) { public List<TAutoPaymentError> noPageDiy(TAutoPaymentErrorSearchVo searchVo) {
LambdaQueryWrapper<TAutoPaymentError> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TAutoPaymentError> wrapper = buildQueryWrapper(searchVo);
......
...@@ -56,6 +56,7 @@ import java.net.URLEncoder; ...@@ -56,6 +56,7 @@ import java.net.URLEncoder;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream; import java.util.zip.ZipInputStream;
...@@ -80,6 +81,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -80,6 +81,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
private final TSocialSoldierShenBaoTaskService tSocialSoldierShenBaoTaskService; private final TSocialSoldierShenBaoTaskService tSocialSoldierShenBaoTaskService;
private final TAutoPaymentInfoService tAutoPaymentInfoService; private final TAutoPaymentInfoService tAutoPaymentInfoService;
private final TAutoPaymentDetailService tAutoPaymentDetailService; private final TAutoPaymentDetailService tAutoPaymentDetailService;
private final TAutoPaymentErrorService tAutoPaymentErrorService;
private final OSSUtil ossUtil; private final OSSUtil ossUtil;
// 附件 // 附件
...@@ -98,7 +100,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -98,7 +100,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
if (mainAuto == null || Common.isEmpty(mainAuto.getId())) { if (mainAuto == null || Common.isEmpty(mainAuto.getId())) {
return R.failed("未找到主表"); return R.failed("未找到主表");
} else { } else {
mainAuto.setRepeatReviewFlag(CommonConstants.ZERO_STRING); mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
tAutoPaymentInfoService.updateById(mainAuto); tAutoPaymentInfoService.updateById(mainAuto);
} }
// 3:实缴1日常申报导出;4:实缴2单位个人缴费信息查询;5:实缴3单位缴费明细查询 // 3:实缴1日常申报导出;4:实缴2单位个人缴费信息查询;5:实缴3单位缴费明细查询
...@@ -193,7 +195,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -193,7 +195,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
tAutoPaymentDetailService.updateBatchById(detailListOne); tAutoPaymentDetailService.updateBatchById(detailListOne);
} }
} }
mainAuto.setRepeatReviewFlag(CommonConstants.TWO_STRING); mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
addIdOneTask.setDataStatus(CommonConstants.ONE_STRING); addIdOneTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdOneTask); tSocialSoldierShenBaoTaskService.updateById(addIdOneTask);
} }
...@@ -220,7 +222,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -220,7 +222,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
tAutoPaymentDetailService.updateBatchById(detailListTwo); tAutoPaymentDetailService.updateBatchById(detailListTwo);
} }
} }
mainAuto.setRepeatReviewFlag(CommonConstants.TWO_STRING); mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
addIdTwoTask.setDataStatus(CommonConstants.ONE_STRING); addIdTwoTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdTwoTask); tSocialSoldierShenBaoTaskService.updateById(addIdTwoTask);
} }
...@@ -246,7 +248,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -246,7 +248,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
tAutoPaymentDetailService.updateBatchById(detailListThree); tAutoPaymentDetailService.updateBatchById(detailListThree);
} }
} }
mainAuto.setRepeatReviewFlag(CommonConstants.TWO_STRING); mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
addIdThreeTask.setDataStatus(CommonConstants.ONE_STRING); addIdThreeTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdThreeTask); tSocialSoldierShenBaoTaskService.updateById(addIdThreeTask);
} }
...@@ -273,7 +275,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -273,7 +275,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
tAutoPaymentDetailService.updateBatchById(detailListFour); tAutoPaymentDetailService.updateBatchById(detailListFour);
} }
} }
mainAuto.setRepeatReviewFlag(CommonConstants.TWO_STRING); mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
addIdSixTask.setDataStatus(CommonConstants.ONE_STRING); addIdSixTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdSixTask); tSocialSoldierShenBaoTaskService.updateById(addIdSixTask);
...@@ -294,7 +296,13 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -294,7 +296,13 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
baseMapper.getSoldierPaymentErrorInfoTwoByRe(mainAuto.getId()); baseMapper.getSoldierPaymentErrorInfoTwoByRe(mainAuto.getId());
// 重新复核状态 // 重新复核状态
mainAuto.setRepeatReviewFlag(CommonConstants.TWO_STRING); TimeUnit.SECONDS.sleep(10);
long count = tAutoPaymentErrorService.getCountByParentId(mainAuto.getId());
if (count > 0) {
mainAuto.setRepeatReviewFlag(CommonConstants.THREE_STRING);
} else {
mainAuto.setRepeatReviewFlag(CommonConstants.TWO_STRING);
}
tAutoPaymentInfoService.updateById(mainAuto); tAutoPaymentInfoService.updateById(mainAuto);
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -377,7 +385,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -377,7 +385,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
mainAuto.setCreateBy(CommonConstants.ONE_STRING); mainAuto.setCreateBy(CommonConstants.ONE_STRING);
mainAuto.setCreateName("定时任务生成"); mainAuto.setCreateName("定时任务生成");
mainAuto.setCreateTime(LocalDateTime.now()); mainAuto.setCreateTime(LocalDateTime.now());
mainAuto.setSystemReviewFlag(CommonConstants.ZERO_STRING); mainAuto.setSystemReviewFlag(CommonConstants.ONE_STRING);
mainAuto.setRepeatReviewFlag(CommonConstants.ZERO_STRING); mainAuto.setRepeatReviewFlag(CommonConstants.ZERO_STRING);
mainAuto.setCreateMonth(DateUtil.getThisMonth()); mainAuto.setCreateMonth(DateUtil.getThisMonth());
mainAuto.setDataOneFlag(CommonConstants.ZERO_STRING); mainAuto.setDataOneFlag(CommonConstants.ZERO_STRING);
...@@ -530,7 +538,13 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -530,7 +538,13 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
baseMapper.getSoldierPaymentErrorInfoOne(mainAuto.getId()); baseMapper.getSoldierPaymentErrorInfoOne(mainAuto.getId());
// 核验2: // 核验2:
baseMapper.getSoldierPaymentErrorInfoTwo(mainAuto.getId()); baseMapper.getSoldierPaymentErrorInfoTwo(mainAuto.getId());
mainAuto.setSystemReviewFlag(CommonConstants.TWO_STRING); TimeUnit.SECONDS.sleep(10);
long count = tAutoPaymentErrorService.getCountByParentId(mainAuto.getId());
if (count > 0) {
mainAuto.setSystemReviewFlag(CommonConstants.THREE_STRING);
} else {
mainAuto.setSystemReviewFlag(CommonConstants.TWO_STRING);
}
tAutoPaymentInfoService.updateById(mainAuto); tAutoPaymentInfoService.updateById(mainAuto);
} }
} catch (Exception e) { } catch (Exception e) {
......
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