Commit 85dfac6a authored by hongguangwu's avatar hongguangwu

Merge branch 'develop'

# Conflicts:
#	yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
parents e62ac71a e2053380
......@@ -58,7 +58,8 @@ public class TAttaInfo extends BaseEntity {
private String attaType;
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件
*/
@NotBlank(message = "关系类型不能为空")
@Length(max = 2, message = "关系类型不能超过2个字符")
......
......@@ -18,6 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -103,4 +104,26 @@ public class TEmpContactInfo extends BaseEntity {
@Schema(description = "联系电话")
private String tel;
/**
* 联系地址省
*/
@ExcelAttribute(name = "联系地址省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址省")
private String relationProvince;
/**
* 联系地址市
*/
@ExcelAttribute(name = "联系地址市",isArea = true,parentField = "relationProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址市")
private String relationCity;
/**
* 联系地址县
*/
@ExcelAttribute(name = "联系地址县",isArea = true,parentField = "relationCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址县")
private String relationTown;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
import java.util.List;
/**
* 档案-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:33
*/
@Data
@TableName("t_emp_other_file")
@Schema(description = "档案-其他附件主表")
public class TEmpOtherFile {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 员工主键
*/
@ExcelAttribute(name = "员工主键", maxLength = 32)
@Length(max = 32, message = "员工主键不能超过32个字符")
@ExcelProperty("员工主键")
@Schema(description = "员工主键")
private String empId;
/**
* 附件名称
*/
@ExcelAttribute(name = "附件名称", maxLength = 32)
@Length(max = 32, message = "附件名称不能超过32个字符")
@ExcelProperty("附件名称")
@Schema(description = "附件名称")
private String attaName;
/**
* 创建时间
*/
@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;
// 附件
@TableField(exist = false)
private List<TAttaInfo> attaList;
}
......@@ -16,7 +16,9 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -25,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
......@@ -442,6 +445,82 @@ public class TEmployeeInfo extends BaseEntity {
@TableField(exist = false)
private String leaveTimeEnd;
/**
* 开户行总行
*/
@ExcelAttribute(name = "开户行总行", maxLength = 50)
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
private String bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
private String bankCity;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
private String bankSubName;
/**
* 银行卡号
*/
@ExcelAttribute(name = "银行卡号", maxLength = 50)
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
private String bankNo;
/**
* 计税月份
*/
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
private String taxMonth;
/**
* 通信地址省
*/
@ExcelAttribute(name = "通信地址省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址省")
private String contactProvince;
/**
* 通信地址市
*/
@ExcelAttribute(name = "通信地址市",isArea = true,parentField = "contactProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址市")
private String contactCity;
/**
* 通信地址县
*/
@ExcelAttribute(name = "通信地址县",isArea = true,parentField = "contactCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址县")
private String contactTown;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("封面抬头")
private String invoiceTitle;
@Schema(description = "社保状态多个")
@TableField(exist = false)
private String[] socialStatusArray;
......
......@@ -19,6 +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.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -120,5 +121,27 @@ public class TPreEmpContactInfo extends BaseEntity {
@Schema(description = "联系电话")
private String tel;
/**
* 联系地址省
*/
@ExcelAttribute(name = "联系地址省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址省")
private String relationProvince;
/**
* 联系地址市
*/
@ExcelAttribute(name = "联系地址市",isArea = true,parentField = "relationProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址市")
private String relationCity;
/**
* 联系地址县
*/
@ExcelAttribute(name = "联系地址县",isArea = true,parentField = "relationCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("联系地址县")
private String relationTown;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.List;
/**
* 预入职-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:34
*/
@Data
@TableName("t_pre_emp_other_file")
@Schema(description = "预入职-其他附件主表")
public class TPreEmpOtherFile {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 预入职主表ID
*/
@ExcelAttribute(name = "预入职主表ID", isNotEmpty = true, errorInfo = "预入职主表ID不能为空", maxLength = 32)
@NotBlank(message = "预入职主表ID不能为空")
@Length(max = 32, message = "预入职主表ID不能超过32个字符")
@ExcelProperty("预入职主表ID")
@Schema(description = "预入职主表ID")
private String preMainId;
/**
* 员工主键
*/
@ExcelAttribute(name = "员工主键", maxLength = 32)
@Length(max = 32, message = "员工主键不能超过32个字符")
@ExcelProperty("员工主键")
@Schema(description = "员工主键")
private String empId;
/**
* 附件名称
*/
@ExcelAttribute(name = "附件名称", maxLength = 32)
@Length(max = 32, message = "附件名称不能超过32个字符")
@ExcelProperty("附件名称")
@Schema(description = "附件名称")
private String attaName;
/**
* 原ID
*/
@ExcelAttribute(name = "原ID", maxLength = 32)
@Length(max = 32, message = "原ID不能超过32个字符")
@ExcelProperty("原ID")
@Schema(description = "原ID")
private String oldId;
/**
* 创建时间
*/
@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;
/**
* @Description: 其他附件
* @Author: hgw
* @Date: 2024/7/17 15:11
* @return:
**/
@TableField(exist = false)
private List<TAttaInfo> attaList;
}
......@@ -19,9 +19,8 @@ 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.alibaba.excel.annotation.write.style.HeadFontStyle;
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;
......@@ -405,6 +404,92 @@ public class TPreEmployeeInfo extends BaseEntity {
@Schema(description = "通信地址")
private String contactAddress;
/**
* 开户行总行
*/
@ExcelAttribute(name = "开户行总行", maxLength = 50)
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
private String bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
private String bankCity;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
private String bankSubName;
/**
* 银行卡号
*/
@ExcelAttribute(name = "银行卡号", maxLength = 50)
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
private String bankNo;
/**
* 计税月份
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
private String taxMonth;
/**
* 计税月份是否可编辑:0否;1是(默认是)
*/
@ExcelAttribute(name = "计税月份是否可编辑", maxLength = 1)
@Length(max = 1, message = "计税月份是否可编辑不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份是否可编辑")
private String taxMonthFlag;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("封面抬头")
private String invoiceTitle;
/**
* 通信地址省
*/
@ExcelAttribute(name = "通信地址省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址省")
private String contactProvince;
/**
* 通信地址市
*/
@ExcelAttribute(name = "通信地址市",isArea = true,parentField = "contactProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址市")
private String contactCity;
/**
* 通信地址县
*/
@ExcelAttribute(name = "通信地址县",isArea = true,parentField = "contactCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址县")
private String contactTown;
/**
* 是否为首份工作 0是/1否
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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 javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
/**
* 项目档案表excel对应的实体
*
* @author huyc
* @date 2022-06-20 17:54:40
*/
@Data
@ColumnWidth(30)
public class EmployeeInsertVO extends RowIndex implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工类型")
private String empNatrue;
/**
* 员工姓名
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工姓名")
@ExcelAttribute(name = "员工姓名", isNotEmpty = true, maxLength = 20, needExport = true, errorInfo = "员工姓名必填且不可超过20位")
@Size(max = 20, message = "员工姓名不可超过20位")
private String empName;
/**
* 身份证号
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "身份证号")
@ExcelAttribute(name = "身份证号", isNotEmpty = true, maxLength = 20, needExport = true, errorInfo = "身份证号必填且不可超过20位")
@Size(max = 20, message = "身份证号不可超过20位")
private String empIdcard;
/**
* 项目编码
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "项目编码")
@ExcelAttribute(name = "项目编码", maxLength = 32, needExport = true, errorInfo = "项目编码必填且不可超过20位")
@Size(max = 32, message = "项目编码不可超过32位")
private String deptNo;
/**
* 就职岗位
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "就职岗位")
@Size(max = 50, message = "就职岗位不可超过50位")
private String post;
/**
* 身份证有效期起
*/
@DateTimeFormat("yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "身份证开始日期")
private Date validityStart;
/**
* 身份证有效期止
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "身份证截止日期")
@ExcelAttribute(name = "身份证截止日期")
private String validityEnd;
/**
* 婚姻状况
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "婚姻状况")
@Size(max = 32, message = "婚姻状况不可超过32位")
private String empMarriStatus;
/**
* 民族
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "民族")
@Size(max = 32, message = "民族不可超过32位")
private String empNational;
/**
* 政治面貌
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "政治面貌")
@Size(max = 32, message = "政治面貌不可超过32位")
private String politicalStatus;
/**
* 手机号码
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "手机号码")
@Size(max = 11, message = "手机号码不可超过11位")
private String empPhone;
/**
* 邮箱
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "邮箱")
@Size(max = 32, message = "邮箱不可超过32位")
private String empEmail;
/**
* 身份证-省
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在省")
private String idProvince;
/**
* 身份证-市
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在市")
private String idCity;
/**
* 身份证-县
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在县")
private String idTown;
/**
* 户口性质
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户口性质")
private String empRegisType;
/**
* 档案-省
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在省")
private String fileProvince;
/**
* 档案-市
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在市")
private String fileCity;
/**
* 档案-县
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在县")
private String fileTown;
/**
* 是否大专及以上(0否1是)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "是否大专及以上")
private String isCollege;
/**
* 最高学历(字典值)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "最高学历")
private String hignEducation;
/**
* 学校
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "学校")
private String school;
/**
* 专业
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "专业")
private String major;
/**
* 入学时间
*/
@DateTimeFormat("yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "入学时间")
private Date admissionDate;
/**
* 毕业时间
*/
@DateTimeFormat("yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "毕业时间")
private Date gradutionDate;
/**
* 备注
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "备注")
private String remark;
/**
* 通信地址
*/
@Schema(description = "通信地址")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "通信地址")
private String contactAddress;
}
......@@ -57,5 +57,7 @@ public class PreEmpMainDetailVo implements Serializable {
private List<TPreEmpWorkRecording> tpreEmpWorkRecordingList;
// 预入职-9身份证 10 户口本;附件 21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
private List<TAttaInfo> attaInfoList;
// 预入职-其他附件(因为含有与附件无关的 名称,因此需要用子表来保存它)
private List<TPreEmpOtherFile> tpreEmpOtherFileList;
}
......@@ -85,4 +85,22 @@ public class TCompleteMonitorFlagVo implements Serializable {
public String familyFlag;
/**
* 开户行总行
*/
public String bankName;
/**
* 银行卡号
*/
public String bankNo;
/**
* 开户行省
*/
public String bankProvince;
/**
* 开户行市
*/
public String bankCity;
}
......@@ -57,5 +57,8 @@ public class TPreEmpMainVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "档案所在地县", isArea = true, parentField = "fileCity")
@ExcelProperty("档案所在地县")
private String fileTown;
@ExcelAttribute(name = "计税月份")
@ExcelProperty("计税月份")
private String taxMonth;
}
......@@ -11,6 +11,7 @@ public class EmployeeConstants {
public static final String DEPT_NO_LENGTH = "项目编码长度超过20";
public static final String VALIDITY_START = "身份证开始日期必填";
public static final String VALIDITY_END = "身份证截止日期必填";
public static final String VALIDITY_END_FORMAT = "身份证截止日期只能为日期格式:yyyy-MM-dd或者固定值:长期";
public static final String EMP_NATIONAL = "民族必填";
public static final String ID_PROVINCE = "户籍所在地必填";
public static final String FILE_PROVINCE = "档案所在地必填";
......
......@@ -69,7 +69,7 @@ public class FileUploadController {
* @Author hgw
* @Description 改编自ossUploadFile接口,改变了回传信息——专为预入职微信端使用——忽略了token,其余人慎用
* @Date 13:49 2022/6/17
* @Param
* @Param relationTypeSub 预入职其他附件的子类型
* @return
**/
@Operation(description = "OSS文件上传接口" +
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpOtherFile;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpOtherFileService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 档案-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:33
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tempotherfile" )
@Tag(name = "档案-其他附件主表管理")
public class TEmpOtherFileController {
private final TEmpOtherFileService tEmpOtherFileService;
/**
* 获取其他附件list-档案
* @param empId 获取其他附件list-档案
* @return
*/
@Operation(summary = "获取其他附件list-档案", description = "获取其他附件list-档案")
@GetMapping("/getTEmpOtherFileListAndFile" )
public R<List<TEmpOtherFile>> getTEmpOtherFileListAndFile(@RequestParam String empId) {
return R.ok(tEmpOtherFileService.getTEmpOtherFileListAndFile(empId));
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpOtherFile;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpOtherFileService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 预入职-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:34
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tpreempotherfile" )
@Tag(name = "预入职-其他附件主表管理")
public class TPreEmpOtherFileController {
private final TPreEmpOtherFileService tPreEmpOtherFileService;
/**
* 获取其他附件list-预入职
* @param preMainId 预入职主表id
* @return
*/
@Operation(summary = "获取其他附件list-预入职", description = "获取其他附件list-预入职")
@GetMapping("/getTPreEmpOtherFileListAndFile" )
public R<List<TPreEmpOtherFile>> getTPreEmpOtherFileListAndFile(@RequestParam String preMainId) {
return R.ok(tPreEmpOtherFileService.getTPreEmpOtherFileListAndFile(preMainId));
}
}
......@@ -79,6 +79,9 @@ public class TSettleDomainController {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tSettleDomain);
if (Common.isNotNull(tSettleDomain.getAuthSql()) && tSettleDomain.getAuthSql().contains("or a.dept_id")) {
tSettleDomain.setAuthSql(tSettleDomain.getAuthSql().replace("or a.dept_id", "or a.id "));
}
return R.ok(tSettleDomainService.getPage(page, tSettleDomain));
}
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpOtherFile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 档案-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:33
*/
@Mapper
public interface TEmpOtherFileMapper extends BaseMapper<TEmpOtherFile> {
/**
* 档案-其他附件主表简单分页查询
* @return
*/
void deleteOtherByEmpId(@Param("empId") String empId);
}
......@@ -124,5 +124,5 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
* 批量刷新项目档案的是否完整状态
* @return
*/
void batchUpdateEmpProjectCompleteStatus(@Param("idList") List<String> idList);
void batchUpdateEmpProjectCompleteStatus(@Param("idList") List<String> idList, @Param("isComplete") String isComplete);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpOtherFile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 预入职-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:34
*/
@Mapper
public interface TPreEmpOtherFileMapper extends BaseMapper<TPreEmpOtherFile> {
/**
* 预入职-其他附件主表
*
* @return
*/
List<TPreEmpOtherFile> getOtherFileList(@Param("preMainId") String preMainId);
// 删除
void deleteOtherFileByMainId(@Param("preMainId") String preMainId);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpOtherFile;
import java.util.List;
/**
* 档案-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:33
*/
public interface TEmpOtherFileService extends IService<TEmpOtherFile> {
/**
* @param empId
* @Description: 获取list,预入职使用
* @Author: hgw
* @Date: 2024/6/21 9:51
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpOtherFile>
**/
List<TEmpOtherFile> getListByEmpId(String empId);
/**
* @param empId 档案id
* @Description: 给前端使用,查询其他附件
* @Author: hgw
* @Date: 2024/7/17 16:39
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpOtherFile>
**/
List<TEmpOtherFile> getTEmpOtherFileListAndFile(String empId);
/**
* @param empId
* @Description: 删除档案附属表信息(预入职清空附属信息专用,其余的请慎用)
* @Author: hgw
* @Date: 2024/6/19 18:27
* @return: void
**/
void deleteOtherFileByEmpId(String empId);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpOtherFile;
import java.util.List;
/**
* 预入职-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:34
*/
public interface TPreEmpOtherFileService extends IService<TPreEmpOtherFile> {
/**
* 预入职-其他附件主表
*
* @return
*/
List<TPreEmpOtherFile> getTPreEmpOtherFileList(String preMainId);
/**
* 预入职-其他附件主表
*
* @return
*/
List<TPreEmpOtherFile> getTPreEmpOtherFileListAndFile(String preMainId);
/**
* @param preMainId
* @Description: 先删后加
* @Author: hgw
* @Date: 2024-7-17 15:12:27
* @return: void
**/
void deleteOtherFileByMainId(String preMainId);
}
......@@ -14,7 +14,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service;
......
......@@ -148,6 +148,9 @@ public class TAttaInfoServiceImpl extends ServiceImpl<TAttaInfoMapper, TAttaInfo
} else if (relationType == 1) {
// 执业资格证书
baseMapper.deleteByDomainIdAndType(domainId, "2");
} else if (relationType == 2) {
// 其他附件
baseMapper.deleteByDomainIdAndType(domainId, "27");
}
}
......
......@@ -151,17 +151,24 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(null);
if (!flagList.isEmpty()) {
List<String> projectIdList = new ArrayList<>();
List<String> projectNotIdList = new ArrayList<>();
String projectId;
for(TCompleteMonitorFlagVo flagVo : flagList) {
boolean flag = checkObjFieldIsNull(flagVo);
projectId = flagVo.getEmpProjectId();
if(!flag){
projectId = flagVo.getEmpProjectId();
projectIdList.add(projectId);
} else {
projectNotIdList.add(projectId);
}
}
//批量更新
if (!projectIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList);
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList, CommonConstants.ZERO_STRING);
}
//批量更新-不完整
if (!projectIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectNotIdList, CommonConstants.ONE_STRING);
}
}
......@@ -188,17 +195,23 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(deptNo);
if (!flagList.isEmpty()) {
List<String> projectIdList = new ArrayList<>();
List<String> projectNotIdList = new ArrayList<>();
String projectId;
for(TCompleteMonitorFlagVo flagVo : flagList) {
boolean flag = checkObjFieldIsNull(flagVo);
projectId = flagVo.getEmpProjectId();
if(!flag){
projectId = flagVo.getEmpProjectId();
projectIdList.add(projectId);
} else {
projectNotIdList.add(projectId);
}
}
//批量更新
if (!projectIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList);
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList, CommonConstants.ZERO_STRING);
}
if (!projectNotIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectNotIdList, CommonConstants.ONE_STRING);
}
}
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpOtherFile;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpOtherFile;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpOtherFileMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpOtherFileService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.net.URL;
import java.util.List;
/**
* 档案-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:33
*/
@Log4j2
@AllArgsConstructor
@Service
public class TEmpOtherFileServiceImpl extends ServiceImpl<TEmpOtherFileMapper, TEmpOtherFile> implements TEmpOtherFileService {
// 附件21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
private final TAttaInfoService tAttaInfoService;
private final OSSUtil ossUtil;
@Override
public void deleteOtherFileByEmpId(String empId) {
baseMapper.deleteOtherByEmpId(empId);
}
@Override
public List<TEmpOtherFile> getTEmpOtherFileListAndFile(String empId) {
List<TEmpOtherFile> list = baseMapper.selectList(Wrappers.<TEmpOtherFile>query().lambda().eq(TEmpOtherFile::getEmpId, empId).orderByAsc(TEmpOtherFile::getCreateTime));
if (list != null && !list.isEmpty()) {
URL url;
List<TAttaInfo> attaInfoList;
for (TEmpOtherFile info : list) {
// 附件
attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null && !attaInfoList.isEmpty()) {
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
info.setAttaList(attaInfoList);
}
}
return list;
}
@Override
public List<TEmpOtherFile> getListByEmpId(String empId) {
return baseMapper.selectList(Wrappers.<TEmpOtherFile>query().lambda().eq(TEmpOtherFile::getEmpId, empId));
}
}
......@@ -779,7 +779,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return null;
}
private void checkEmployeeVOR(long lineNum, EmployeeVO employeeInfo, Map<Long, ErrorMessage> errorMsgMap, Set<String> errorMsg) {
private void checkEmployeeVOR(long lineNum, EmployeeInsertVO employeeInfo, Map<Long, ErrorMessage> errorMsgMap, Set<String> errorMsg) {
if (Common.isEmpty(employeeInfo.getEmpIdcard())) {
errorMsg.add("身份证号必填");
errorMsgMap.put(lineNum, new ErrorMessage("身份证号必填"));
......@@ -875,18 +875,24 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg.add("就职岗位必填!");
errorMsgMap.put(lineNum, new ErrorMessage("就职岗位必填!"));
}
//MVP1.6.7-huyc-身份证期限截止日期调整-校验日期
if (Common.isNotNull(employeeInfo.getValidityEnd()) && !"长期".equals(employeeInfo.getValidityEnd()) &&
!DateUtil.checkStringToDate(employeeInfo.getValidityEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) {
errorMsg.add(EmployeeConstants.VALIDITY_END_FORMAT);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.VALIDITY_END_FORMAT));
}
}
@Override
public R<List<ErrorMessage>> batchImportEmployee(InputStream inputStream, int isCanAdd) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<EmployeeVO> util1 = new ExcelUtil<>(EmployeeVO.class);
ExcelUtil<EmployeeInsertVO> util1 = new ExcelUtil<>(EmployeeInsertVO.class);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try {
EasyExcel.read(inputStream, EmployeeVO.class, new ReadListener<EmployeeVO>() {
EasyExcel.read(inputStream, EmployeeInsertVO.class, new ReadListener<EmployeeInsertVO>() {
/**
* 单次缓存的数据量
*/
......@@ -894,10 +900,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
/**
*临时存储
*/
private List<EmployeeVO> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
private List<EmployeeInsertVO> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override
public void invoke(EmployeeVO data, AnalysisContext context) {
public void invoke(EmployeeInsertVO data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex + 1);
......@@ -944,7 +950,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
private R<List<ErrorMessage>> batchImportCore(List<EmployeeVO> excelVOList, int isCanAdd, List<ErrorMessage> errorMessageList) {
private R<List<ErrorMessage>> batchImportCore(List<EmployeeInsertVO> excelVOList, int isCanAdd, List<ErrorMessage> errorMessageList) {
if (excelVOList == null || excelVOList.isEmpty()) {
return R.failed(CommonConstants.DATA_CAN_NOT_EMPTY);
}
......@@ -1034,7 +1040,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
EmployeeVO excel;
EmployeeInsertVO excel;
// 已存在的档案信息
TEmployeeInfo existEmp;
// 需要保存的档案信息
......@@ -1292,7 +1298,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
saveEmp.setValidityStart(excel.getValidityStart());
saveEmp.setValidityEnd(excel.getValidityEnd());
if ("长期".equals(excel.getValidityEnd())) {
saveEmp.setValidityEnd(DateUtil.stringToDate("2999-12-31", DateUtil.ISO_EXPANDED_DATE_FORMAT));
} else {
saveEmp.setValidityEnd(DateUtil.stringToDate(excel.getValidityEnd(), DateUtil.ISO_EXPANDED_DATE_FORMAT));
}
// 邮箱
if (Common.isNotNull(excel.getEmpEmail())) {
if (excel.getEmpEmail().contains("@")) {
......@@ -1481,13 +1491,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
@Override
public R<List<ErrorMessage>> batchUpdateEmployee(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<EmployeeVO> util1 = new ExcelUtil<>(EmployeeVO.class);
ExcelUtil<EmployeeInsertVO> util1 = new ExcelUtil<>(EmployeeInsertVO.class);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try {
EasyExcel.read(inputStream, EmployeeVO.class, new ReadListener<EmployeeVO>() {
EasyExcel.read(inputStream, EmployeeInsertVO.class, new ReadListener<EmployeeInsertVO>() {
/**
* 单次缓存的数据量
*/
......@@ -1495,10 +1505,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
/**
*临时存储
*/
private List<EmployeeVO> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
private List<EmployeeInsertVO> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override
public void invoke(EmployeeVO data, AnalysisContext context) {
public void invoke(EmployeeInsertVO data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex + 1);
......@@ -1544,7 +1554,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
private R<List<ErrorMessage>> batchUpdateCore(List<EmployeeVO> excelVOList, List<ErrorMessage> errorMessageList) {
private R<List<ErrorMessage>> batchUpdateCore(List<EmployeeInsertVO> excelVOList, List<ErrorMessage> errorMessageList) {
YifuUser user = SecurityUtils.getUser();
Set<String> errorMsg;
if (user == null || Common.isEmpty(user.getId())) {
......@@ -1601,7 +1611,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 个性化校验逻辑
EmployeeVO excel;
EmployeeInsertVO excel;
// 需要保存的档案信息
TEmployeeInfo saveEmp;
// 原先的档案信息
......@@ -1809,7 +1819,17 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveEmp.setValidityStart(excel.getValidityStart());
}
if (Common.isNotNull(excel.getValidityEnd())) {
saveEmp.setValidityEnd(excel.getValidityEnd());
//MVP1.6.7-huyc-身份证期限截止日期调整-校验日期
if (!"长期".equals(excel.getValidityEnd()) && !DateUtil.checkStringToDate(
excel.getValidityEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_IDCARD_END, excel.getEmpIdcard()));
} else {
if ("长期".equals(excel.getValidityEnd())) {
saveEmp.setValidityEnd(DateUtil.stringToDate("2999-12-31", DateUtil.ISO_EXPANDED_DATE_FORMAT));
} else {
saveEmp.setValidityEnd(DateUtil.stringToDate(excel.getValidityEnd(), DateUtil.ISO_EXPANDED_DATE_FORMAT));
}
}
}
// 邮箱
if (Common.isNotNull(excel.getEmpEmail())) {
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpOtherFile;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpOtherFileMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpOtherFileService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.net.URL;
import java.util.List;
/**
* 预入职-其他附件主表
*
* @author hgw
* @date 2024-07-17 14:56:34
*/
@Log4j2
@AllArgsConstructor
@Service
public class TPreEmpOtherFileServiceImpl extends ServiceImpl<TPreEmpOtherFileMapper, TPreEmpOtherFile> implements TPreEmpOtherFileService {
// 附件21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
private final TAttaInfoService tAttaInfoService;
private final OSSUtil ossUtil;
/**
* 预入职-其他附件主表
*
* @return
*/
@Override
public List<TPreEmpOtherFile> getTPreEmpOtherFileList(String preMainId) {
return baseMapper.getOtherFileList(preMainId);
}
/**
* 预入职-其他附件主表
*
* @return
*/
@Override
public List<TPreEmpOtherFile> getTPreEmpOtherFileListAndFile(String preMainId) {
List<TPreEmpOtherFile> list = baseMapper.getOtherFileList(preMainId);
if (list != null && !list.isEmpty()) {
URL url;
List<TAttaInfo> attaInfoList;
for (TPreEmpOtherFile info : list) {
// 附件
attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null && !attaInfoList.isEmpty()) {
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
info.setAttaList(attaInfoList);
}
}
return list;
}
@Override
public void deleteOtherFileByMainId(String preMainId) {
baseMapper.deleteOtherFileByMainId(preMainId);
}
}
......@@ -132,7 +132,7 @@
</delete>
<delete id="deleteByDomainIdAndOther">
delete from t_atta_info where domain_id=#{domainId} and relation_type not in ('0','2','26')
delete from t_atta_info where domain_id=#{domainId} and relation_type not in ('0','2','26','27')
</delete>
</mapper>
......@@ -235,6 +235,11 @@
if(c.count >0,'1',null) as educationFlag,
if(g.count >0,'1',null) as familyFlag
,if(e.BANK_NAME='',null,e.BANK_NAME) bankName
,if(e.BANK_NO='',null,e.BANK_NO) bankNo
,if(e.BANK_PROVINCE='',null,e.BANK_PROVINCE) bankProvince
,if(e.BANK_CITY='',null,e.BANK_CITY) bankCity
from
t_employee_project a
left join (
......@@ -260,6 +265,10 @@
ee.CONTACT_ADDRESS,
ee.FIRST_WORK_FLAG,
ee.HAVE_QUALIFICATION
,ee.BANK_NAME
,ee.BANK_NO
,ee.BANK_PROVINCE
,ee.BANK_CITY
from t_employee_info ee
left join t_atta_info tt on ee.id = tt.DOMAIN_ID and tt.RELATION_TYPE = '9'
where ee.DELETE_FLAG = '0' and ee.FILE_STATUS = 0 and tt.id is not null
......
......@@ -36,6 +36,10 @@
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="relationProvince" column="RELATION_PROVINCE"/>
<result property="relationCity" column="RELATION_CITY"/>
<result property="relationTown" column="RELATION_TOWN"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -48,7 +52,11 @@
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME
a.UPDATE_TIME,
a.RELATION_PROVINCE,
a.RELATION_CITY,
a.RELATION_TOWN
</sql>
<sql id="tEmpContactInfo_where">
<if test="tEmpContactInfo != null">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpOtherFileMapper">
<resultMap id="tEmpOtherFileMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpOtherFile">
<id property="id" column="ID"/>
<result property="empId" column="EMP_ID"/>
<result property="attaName" column="ATTA_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<!--删除-->
<delete id="deleteOtherByEmpId">
delete from t_emp_other_file where EMP_ID = #{empId}
</delete>
</mapper>
......@@ -77,6 +77,18 @@
<result property="firstWorkFlag" column="FIRST_WORK_FLAG"/>
<result property="haveQualification" column="HAVE_QUALIFICATION"/>
<result property="bankName" column="BANK_NAME"/>
<result property="bankSubName" column="BANK_SUB_NAME"/>
<result property="bankNo" column="BANK_NO"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="contactProvince" column="CONTACT_PROVINCE"/>
<result property="contactCity" column="CONTACT_CITY"/>
<result property="contactTown" column="CONTACT_TOWN"/>
</resultMap>
<resultMap id="tEmployeeExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO">
......@@ -236,7 +248,18 @@
a.LEAVE_REMARK,
a.CONTACT_ADDRESS,
a.FIRST_WORK_FLAG,
a.HAVE_QUALIFICATION
a.HAVE_QUALIFICATION,
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.INVOICE_TITLE,
a.BANK_PROVINCE,
a.BANK_CITY,
a.TAX_MONTH,
a.CONTACT_PROVINCE,
a.CONTACT_CITY,
a.CONTACT_TOWN
</sql>
<sql id="Base_Export_List">
......
......@@ -1089,7 +1089,7 @@
<!-- 批量刷新项目档案的是否完整状态 -->
<update id="batchUpdateEmpProjectCompleteStatus">
update t_employee_project a set a.IS_COMPLETE = '0' where a.id in
update t_employee_project a set a.IS_COMPLETE = #{isComplete} where a.id in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
......
......@@ -38,6 +38,10 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="oldId" column="OLD_ID"/>
<result property="relationProvince" column="RELATION_PROVINCE"/>
<result property="relationCity" column="RELATION_CITY"/>
<result property="relationTown" column="RELATION_TOWN"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -53,7 +57,11 @@
a.CREATE_NAME,
a.CREATE_TIME,
a.OLD_ID,
a.UPDATE_TIME
a.UPDATE_TIME,
a.RELATION_PROVINCE,
a.RELATION_CITY,
a.RELATION_TOWN
</sql>
<sql id="tPreEmpContactInfo_where">
<if test="tPreEmpContactInfo != null">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpOtherFileMapper">
<resultMap id="tPreEmpOtherFileMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpOtherFile">
<id property="id" column="ID"/>
<result property="preMainId" column="PRE_MAIN_ID"/>
<result property="empId" column="EMP_ID"/>
<result property="attaName" column="ATTA_NAME"/>
<result property="oldId" column="OLD_ID"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.PRE_MAIN_ID,
a.EMP_ID,
a.ATTA_NAME,
a.OLD_ID,
a.CREATE_TIME
</sql>
<!--其他附件主表-->
<select id="getOtherFileList" resultMap="tPreEmpOtherFileMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_pre_emp_other_file a
where PRE_MAIN_ID = #{preMainId}
order by a.CREATE_TIME asc
</select>
<delete id="deleteOtherFileByMainId">
delete from t_pre_emp_other_file where PRE_MAIN_ID = #{preMainId}
</delete>
</mapper>
......@@ -78,6 +78,19 @@
<result property="firstWorkFlag" column="FIRST_WORK_FLAG"/>
<result property="haveQualification" column="HAVE_QUALIFICATION"/>
<result property="oldId" column="OLD_ID"/>
<result property="bankName" column="BANK_NAME"/>
<result property="bankSubName" column="BANK_SUB_NAME"/>
<result property="bankNo" column="BANK_NO"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="contactProvince" column="CONTACT_PROVINCE"/>
<result property="contactCity" column="CONTACT_CITY"/>
<result property="contactTown" column="CONTACT_TOWN"/>
<result property="taxMonthFlag" column="TAX_MONTH_FLAG"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -133,7 +146,19 @@
a.CONTACT_ADDRESS,
a.FIRST_WORK_FLAG,
a.OLD_ID,
a.HAVE_QUALIFICATION
a.HAVE_QUALIFICATION,
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.INVOICE_TITLE,
a.BANK_PROVINCE,
a.BANK_CITY,
a.TAX_MONTH,
a.CONTACT_PROVINCE,
a.CONTACT_CITY,
a.CONTACT_TOWN,
a.TAX_MONTH_FLAG
</sql>
<sql id="tPreEmployeeInfo_where">
<if test="tPreEmployeeInfo != null">
......
......@@ -129,6 +129,22 @@ public class TCheckBankNoController {
return tCheckBankNoService.checkBankNoTwo(checkBankNo.getName(),checkBankNo.getBankNo());
}
/**
* @param empName 姓名
* @param bankNo 银行卡号
* @param deptId 项目id
* @Description: C端预入职银行卡号校验
* @Author: hgw
* @Date: 2024/7/16 14:58
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "C端预入职银行卡号校验")
@SysLog("C端预入职银行卡号校验" )
@GetMapping("/checkPreBankNo" )
public R<String> checkPreBankNo(@RequestParam String empName,@RequestParam String bankNo, @RequestParam String deptId) {
return tCheckBankNoService.checkPreBankNo(empName, bankNo, deptId);
}
/**
* @Description: 批量银行卡号校验
* @Author: hgw
......
......@@ -48,6 +48,14 @@ public interface TCheckBankNoService extends IService<TCheckBankNo> {
CheckBankNoVo checkBankNoTwo(String name, String cardNo);
/**
* @Description: C端预入职银行卡号校验
* @Author: hgw
* @Date: 2024/7/16 15:00
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> checkPreBankNo(String empName, String bankNo, String deptId);
/**
* @param list
* @Description:批量校验卡号
......
......@@ -24,10 +24,13 @@ import com.alibaba.excel.util.ListUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.constant.ChecksConstants;
import com.yifu.cloud.plus.v1.check.entity.TCanCheck;
import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo;
import com.yifu.cloud.plus.v1.check.entity.TPreEmpCheckNum;
import com.yifu.cloud.plus.v1.check.mapper.TCheckBankNoMapper;
import com.yifu.cloud.plus.v1.check.service.TCanCheckService;
import com.yifu.cloud.plus.v1.check.service.TCheckBankNoService;
import com.yifu.cloud.plus.v1.check.service.TPreEmpCheckNumService;
import com.yifu.cloud.plus.v1.check.utils.ChecksUtil;
import com.yifu.cloud.plus.v1.check.vo.CheckBankNoThreeVo;
import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo;
......@@ -60,6 +63,7 @@ import java.util.concurrent.*;
public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCheckBankNo> implements TCheckBankNoService {
private final TCanCheckService canCheckService;
private final TPreEmpCheckNumService tPreEmpCheckNumService;
@Override
public R<TCheckBankNo> checkBankNo(String name, String cardNo) {
......@@ -106,6 +110,60 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
return vo;
}
}
@Override
public R<String> checkPreBankNo(String empName, String bankNo, String deptId) {
if (Common.isEmpty(empName) || Common.isEmpty(bankNo)){
return R.failed(MsgUtils.getMessage(ErrorCodes.CHECKS_BANK_NO_REQUEST_PARAM_ERROR));
}
synchronized (this){
TCheckBankNo checkBankNo = baseMapper.selectOne(Wrappers.<TCheckBankNo>query().lambda()
.eq(TCheckBankNo::getBankNo,bankNo)
.eq(TCheckBankNo::getName,empName)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(checkBankNo)){
if (CommonConstants.ZERO_ONE.equals(checkBankNo.getResult())) {
return R.ok();
} else {
return R.failed(checkBankNo.getRemark());
}
}
boolean canCheck = canCheckService.getCanCheck();
String nowDay = DateUtil.getThisDay();
if (canCheck) {
TPreEmpCheckNum nowDayNum = tPreEmpCheckNumService.getTPreEmpCheckNum(deptId, nowDay);
if (nowDayNum == null) {
nowDayNum = new TPreEmpCheckNum();
nowDayNum.setCreateDay(nowDay);
nowDayNum.setDeptId(deptId);
nowDayNum.setCanApiNum(1000);
nowDayNum.setApiNum(1);
tPreEmpCheckNumService.save(nowDayNum);
} else {
if (nowDayNum.getApiNum() >= nowDayNum.getCanApiNum()) {
return R.failed("该项目当日总条数:" + nowDayNum.getCanApiNum() + "已到达上限!");
} else {
nowDayNum.setApiNum(nowDayNum.getApiNum() + 1);
tPreEmpCheckNumService.updateById(nowDayNum);
}
}
}
R<TCheckBankNo> resR = ChecksUtil.checkBankNoTwo(empName,bankNo,canCheckService.getCanCheck());
if (Common.isNotNull(resR) && Common.isNotNull(resR.getData())){
baseMapper.insert(resR.getData());
checkBankNo = resR.getData();
if (CommonConstants.ZERO_ONE.equals(checkBankNo.getResult())) {
return R.ok();
} else {
return R.failed(checkBankNo.getRemark());
}
} else {
return R.failed("校验卡号失败,校验服务未返回结果!");
}
}
}
@Override
public CheckBankNoVo checkBankNoTwo(String name, String cardNo) {
CheckBankNoVo vo = new CheckBankNoVo();
......
......@@ -45,6 +45,7 @@ security:
- /checkBankNo/**
- /tcheckidcard/checkPreEmpIdCard
- /tcheckmobile/checkPrePhone
- /tcheckbankno/checkPreBankNo
spring:
......
......@@ -268,6 +268,7 @@ public interface ErrorCodes {
String ARCHIVES_IMPORT_EMP_HAVE_PROJECT = "archives.import.emp.have.project";
String ARCHIVES_IMPORT_EMP_EMAIL_CHECK = "archives.import.emp.email.check";
String ARCHIVES_IMPORT_EMP_EMAIL_LENGTH = "archives.import.emp.email.length";
String ARCHIVES_IMPORT_EMP_IDCARD_END = "archives.import.emp.idcard.end";
// 减项原因在字典中未找到
String ARCHIVES_IMPORT_EMP_REDUCE_ERROR = "archives.import.emp.reduce.error";
/**
......
......@@ -90,6 +90,7 @@ archives.import.emp.leaveRemark.length=\u51CF\u6863\u5907\u6CE8\u8D85\u8FC7200
archives.import.emp.have.project=\u7981\u6B62\u201C\u51CF\u6863\u201D \u8BE5\u4EBA\u5458\u5B58\u5728\u201C\u6B63\u5E38\u201D\u5B58\u7EED\u7684\u201C\u9879\u76EE\u6863\u6848\u201D
archives.import.emp.email.check=\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u683C\u5F0F
archives.import.emp.email.length=\u90AE\u7BB1\u4E0D\u53EF\u8D85\u8FC750\u5B57
archives.import.emp.idcard.end=\u8EAB\u4EFD\u8BC1\u622A\u6B62\u65E5\u671F\u53EA\u80FD\u4E3A\u65E5\u671F\u683C\u5F0F:yyyy-MM-dd\u6216\u8005\u56FA\u5B9A\u503C:\u957F\u671F
import.file.type.error=\u5BFC\u5165\u7684\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E
......
......@@ -10,7 +10,7 @@ import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.time.LocalDateTime;
/**
* 款项认领差额费导入
......@@ -96,7 +96,7 @@ public class ClaimRebackInfotVO implements Serializable {
@ExcelAttribute(name = "入账日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="入账日期")
private Date claimTime;
private LocalDateTime claimTime;
/**
* 异常说明
......
//package com.yifu.cloud.plus.v1.ekp.controller;
//
//import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.RequiredArgsConstructor;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * 聚富通到账通知交易流水查询
// *
// * @author huyc
// * @date 2024-05-23 10:24:12
// */
//@RestController
//@RequiredArgsConstructor
//@RequestMapping("/icbcQuery" )
//@Tag(name = "聚富通到账通知交易流水查询")
//public class IcbcTransactionFlowQueryController {
//
// private final IcbcTransactionFlowQueryService icbcTransactionFlowQueryService;
//
// /**
// * 交易流水查询
// *
// * @param
// * @return
// */
// @Operation(summary = "交易流水查询", description = "交易流水查询")
// @PostMapping("/page")
// public R getIcbcTransactionFlow() {
// return icbcTransactionFlowQueryService.getIcbcTransactionFlow();
// }
//
// /**
// * 预订单接口
// *
// * @param
// * @return
// */
// @Operation(summary = "预订单接口", description = "预订单接口")
// @PostMapping("/save")
// public R saveIcbcManagerCard() {
// return icbcTransactionFlowQueryService.saveIcbcManagerCard();
// }
//}
package com.yifu.cloud.plus.v1.ekp.controller;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 聚富通到账通知交易流水查询
*
* @author huyc
* @date 2024-05-23 10:24:12
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/icbcQuery" )
@Tag(name = "聚富通到账通知交易流水查询")
public class IcbcTransactionFlowQueryController {
private final IcbcTransactionFlowQueryService icbcTransactionFlowQueryService;
/**
* 交易流水查询
*
* @param
* @return
*/
@Operation(summary = "交易流水查询", description = "交易流水查询")
@PostMapping("/page")
public R getIcbcTransactionFlow() {
return icbcTransactionFlowQueryService.getIcbcTransactionFlow();
}
/**
* 预订单接口
*
* @param
* @return
*/
@Operation(summary = "预订单接口", description = "预订单接口")
@PostMapping("/save")
public R saveIcbcManagerCard() {
return icbcTransactionFlowQueryService.saveIcbcManagerCard();
}
}
//package com.yifu.cloud.plus.v1.ekp.service;
//
//import com.baomidou.mybatisplus.extension.service.IService;
//import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//
///**
// * 聚富通到账通知交易流水查询
// *
// * @author huyc
// * @date 2024-05-23 11:21:56
// */
//public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo> {
//
// R getIcbcTransactionFlow();
//
// R saveIcbcManagerCard();
//
//}
package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
/**
* 聚富通到账通知交易流水查询
*
* @author huyc
* @date 2024-05-23 11:21:56
*/
public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo> {
R getIcbcTransactionFlow();
R saveIcbcManagerCard();
}
......@@ -16,6 +16,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
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.ekp.vo.EkpSalaryParam;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -34,6 +35,7 @@ import java.util.stream.Collectors;
*/
@Log4j2
@Service
@RequiredArgsConstructor
public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, EkpSalaryInfo> implements EkpSalaryInfoService {
/**
......@@ -327,6 +329,7 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
String deptName;
BigDecimal money;
ClaimRebackInfotVO info;
EkpDeptInfoVo deptInfo;
// 执行数据插入操作 组装 PostDto
for (int i = 0; i < excelVOList.size(); i++) {
excel = excelVOList.get(i);
......@@ -334,10 +337,11 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
money = excel.getMoney();
deptName = excel.getDeptName();
ClaimRebackInfotVO backInfo = new ClaimRebackInfotVO();
//先找到彭超创建的款项认领明细
info = baseMapper.getClaimInfoByDeptNo(deptNo,"1");
//
if (money.compareTo(BigDecimal.ZERO) > 0) {
//根据项目编码获取ekp所有项目信息
if (money.compareTo(BigDecimal.ZERO) >= 0) {
//先找到彭超创建的款项认领明细
info = baseMapper.getClaimInfoByDeptNo(deptNo,"1");
//调整金额大于零的先找到彭超创建的款项认领明细直接加
if (Optional.ofNullable(info).isPresent()) {
info.setAdjustMoney(money);
......@@ -362,48 +366,53 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
//调整金额小于零的先找到剩余金额大于零的彭超创建的款项认领明细去扣减
info = baseMapper.getClaimInfoByDeptNo(deptNo,"3");
if (Optional.ofNullable(info).isPresent()) {
if (BigDecimalUtils.safeAdd(info.getSurMoney(),money).compareTo(BigDecimal.ZERO) >=0) {
if (info.getSurMoney().add(money).compareTo(BigDecimal.ZERO) >=0) {
info.setAdjustMoney(money);
info.setAfterAdjustMoney(BigDecimalUtils.safeAdd(info.getSurMoney(),money));
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getErrorInfo(),info));
} else {
this.subSwitch(deptNo,backInfo,errorMessageList,money,deptName,excel);
info.setAdjustMoney(info.getSurMoney().negate());
info.setAfterAdjustMoney(BigDecimal.ZERO);
money = info.getSurMoney().add(money);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getErrorInfo(),info));
this.subSwitch(deptNo,backInfo,errorMessageList,money,info.getDeptName(),excel,"2");
}
} else {
this.subSwitch(deptNo,backInfo,errorMessageList,money,deptName,excel);
this.subSwitch(deptNo,backInfo,errorMessageList,money,deptName,excel,"1");
}
}
}
}
/**
* @Description: 推送ekp时更改日期格式
* @Author: huyc
**/
public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-");
return sb.toString();
}
public void subSwitch(String deptNo,ClaimRebackInfotVO backInfo,List<ErrorMessage>errorMessageList,
BigDecimal money,String deptName,ClaimInfotVO excel) {
BigDecimal money,String deptName,ClaimInfotVO excel,String flag) {
List<ClaimRebackInfotVO> infoList = baseMapper.getClaimBigInfoByDeptNoAndUser(deptNo);
if (Optional.ofNullable(infoList).isPresent()) {
if (Common.isNotNull(infoList)) {
for (ClaimRebackInfotVO subInfo : infoList) {
//分批去减去金额
if (BigDecimalUtils.safeAdd(subInfo.getSurMoney(),money).compareTo(BigDecimal.ZERO) >=0) {
if (subInfo.getSurMoney().add(money).compareTo(BigDecimal.ZERO) >=0) {
subInfo.setAdjustMoney(money);
subInfo.setAfterAdjustMoney(BigDecimalUtils.safeSubtract(subInfo.getSurMoney(),money));
subInfo.setAfterAdjustMoney(BigDecimalUtils.safeAdd(subInfo.getSurMoney(),money));
money = BigDecimal.ZERO;
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), subInfo.getErrorInfo(),subInfo));
break;
} else {
subInfo.setAdjustMoney(subInfo.getSurMoney());
subInfo.setAdjustMoney(subInfo.getSurMoney().negate());
subInfo.setAfterAdjustMoney(BigDecimal.ZERO);
money = BigDecimalUtils.safeAdd(subInfo.getSurMoney(),money);
money = subInfo.getSurMoney().add(money);
deptName = subInfo.getDeptName();
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), subInfo.getErrorInfo(),subInfo));
}
}
} else {
if ("1".equals(flag)) {
backInfo.setDeptName(deptName);
backInfo.setDeptNo(deptNo);
backInfo.setAdjustMoney(money);
backInfo.setErrorInfo("未找到该项目对应的款项认领明细");
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), backInfo.getErrorInfo(), backInfo));
return;
}
}
if (BigDecimal.ZERO.compareTo(money) > 0 ) {
backInfo.setDeptNo(deptNo);
......
......@@ -153,13 +153,13 @@
<!--根据项目编码和申请人查询款项认领明细-->
<select id="getClaimInfoByDeptNo" resultType="com.yifu.cloud.plus.v1.ekp.vo.ClaimRebackInfotVO">
select
fd_3afb4c634ebd08 claimNo,
fd_3afb4689209aa2 deptNo,
fd_3afb468b23b0e2 deptName,
fd_3afb4c634ebd08 claimNo,
fd_3afb46ab98d9a8 claimMoney,
fd_3afb46ac507904 cancelMoney,
fd_3afb46d05d19ec surMoney,
DATE_FORMAT(fd_3b5f41db9fb154,'%Y-%m-%d') claimTime
ifnull(fd_3afb46d05d19ec,0) surMoney,
fd_3b5f41db9fb154 claimTime
from
ekp_94b6cd1535e4b34865c8
where
......@@ -179,18 +179,19 @@
<!--根据项目编码和申请人查询款项认领明细-->
<select id="getClaimBigInfoByDeptNoAndUser" resultType="com.yifu.cloud.plus.v1.ekp.vo.ClaimRebackInfotVO">
select
fd_3afb4c634ebd08 claimNo,
fd_3afb4689209aa2 deptNo,
fd_3afb468b23b0e2 deptName,
fd_3afb4c634ebd08 claimNo,
fd_3afb46ab98d9a8 claimMoney,
fd_3afb46ac507904 cancelMoney,
fd_3afb46d05d19ec surMoney,
DATE_FORMAT(fd_3b5f41db9fb154,'%Y-%m-%d') claimTime
ifnull(fd_3afb46d05d19ec,0) surMoney,
fd_3b5f41db9fb154 claimTime
from
ekp_94b6cd1535e4b34865c8
where
fd_3afb4689209aa2 = #{deptNo}
and fd_3afb46d05d19ec > 0
and fd_3b2a70e26f520a != '1817fbe83899f5f34c1ee9b463bbf9c1'
order by fd_3b5f41db9fb154 asc
</select>
......
......@@ -368,4 +368,36 @@ public class InsuredListVo implements Serializable {
@Schema(description = "被替换人项目名称")
@ExcelIgnore
private String coverProjectNo;
/**
* 替换人姓名
*/
@Schema(description = "替换人姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "替换人姓名")
private String replaceEmpName;
/**
* 替换人身份证号
*/
@Schema(description = "替换人身份证号)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "替换人身份证号")
private String replaceEmpIdcardNo;
/**
* 替换人项目名称
*/
@Schema(description = "替换人项目名称")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "替换人项目名称")
private String replaceProjectName;
/**
* 替换人封面抬头
*/
@Schema(description = "替换人封面抬头")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "替换人封面抬头")
private String replaceInvoiceTitle;
}
......@@ -4433,37 +4433,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, InsuredListVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
Field[] allFields = InsuredListVo.class.getDeclaredFields();
WriteSheet writeSheet;
ExcelUtil<InsuredListVo> util;
//处理封面抬头
//获取所有项目信息
Map<String, ProjectSetInfoVo> data = null;
try {
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(new ArrayList<>());
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
data = setInfoByCodes.getData().getProjectSetInfoVoMap();
}
} catch (Exception e) {
e.printStackTrace();
}
for (int i = 0; i <= count; ) {
// 获取实际记录
param.setLimitStart(i);
param.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = this.baseMapper.getInsuredList(param);
if (Common.isNotNull(list)){
//处理封面抬头
//根据项目编码获取项目名称
Map<String, ProjectSetInfoVo> data = null;
try {
List<String> collect = list.stream().map(InsuredListVo::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
data = setInfoByCodes.getData().getProjectSetInfoVoMap();
}
}catch (Exception e){
e.printStackTrace();
data = null;
}
util = new ExcelUtil<>(InsuredListVo.class);
TInsuranceReplace one;
TInsuranceReplace fromOne;
TInsuranceDetail byId;
ProjectSetInfoVo coverObject = null;
ProjectSetInfoVo coverObject;
for (InsuredListVo vo:list){
//被替换人
one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
......@@ -4472,40 +4469,42 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Optional.ofNullable(one).isPresent()) {
byId = this.getById(one.getFromInsuranceDetailId());
if (Optional.ofNullable(byId).isPresent()) {
//根据项目编码获取项目名称
Map<String, ProjectSetInfoVo> dataReplace = null;
try {
List<String> collect = new ArrayList<>();
collect.add(byId.getDeptNo());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
dataReplace = setInfoByCodes.getData().getProjectSetInfoVoMap();
}
}catch (Exception e){
e.printStackTrace();
dataReplace = null;
}
vo.setCoverEmpName(byId.getEmpName());
vo.setCoverEmpIdcardNo(byId.getEmpIdcardNo());
vo.setCoverProjectName(byId.getDeptName());
coverObject = null;
if (Common.isNotNull(dataReplace)){
coverObject = dataReplace.get(byId.getDeptNo());
}
if (null != coverObject) {
if (Common.isNotNull(data) && Common.isNotNull(data.get(byId.getDeptNo()))){
coverObject = data.get(byId.getDeptNo());
vo.setCoverInvoiceTitle(Optional.ofNullable(coverObject.getInvoiceTitleInsurance()).orElse(""));
}else {
vo.setCoverInvoiceTitle("未获取到对应项目信息");
}
}
}
//替换人
fromOne = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getFromInsuranceDetailId, vo.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(fromOne).isPresent()) {
byId = this.getById(fromOne.getToInsuranceDetailId());
if (Optional.ofNullable(byId).isPresent()) {
vo.setReplaceEmpName(byId.getEmpName());
vo.setReplaceEmpIdcardNo(byId.getEmpIdcardNo());
vo.setReplaceProjectName(byId.getDeptName());
if (Common.isNotNull(data) && Common.isNotNull(data.get(byId.getDeptNo()))){
coverObject = data.get(byId.getDeptNo());
vo.setReplaceInvoiceTitle(Optional.ofNullable(coverObject.getInvoiceTitleInsurance()).orElse(""));
}else {
vo.setReplaceInvoiceTitle("未获取到对应项目信息");
}
}
}
//购买月数
vo.setBuyMonth(LocalDateUtil.betweenMonth(vo.getPolicyStart().toString(), vo.getPolicyEnd().toString()));
if (Objects.nonNull(data)) {
ProjectSetInfoVo jsonObject = data.get(vo.getDeptNo());
if (null != jsonObject) {
vo.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
if (Common.isNotNull(data) && Common.isNotNull(data.get(vo.getDeptNo()))) {
coverObject = data.get(vo.getDeptNo());
vo.setInvoiceTitle(Optional.ofNullable(coverObject.getInvoiceTitleInsurance()).orElse(""));
}
util.convertEntityAsso(vo,null,null,null,allFields);
}
......
......@@ -58,13 +58,13 @@ public class TSalaryEmpModLog extends BaseEntity {
@Schema(description = "content")
private String content;
/**
* 0编辑、1批量更新、2EKP变更银行卡号
* 0编辑、1批量更新、2EKP变更银行卡号;3预入职更新;4导入更新银行信息
*/
@ExcelAttribute(name = "0编辑、1批量更新、2EKP变更银行卡号", isNotEmpty = true, errorInfo = "0编辑、1批量更新、2EKP变更银行卡号不能为空", maxLength = 1)
@NotBlank(message = "0编辑、1批量更新、2EKP变更银行卡号不能为空")
@Length(max = 1, message = "0编辑、1批量更新、2EKP变更银行卡号不能超过1个字符")
@ExcelProperty("0编辑、1批量更新、2EKP变更银行卡号")
@Schema(description = "0编辑、1批量更新、2EKP变更银行卡号")
@ExcelAttribute(name = "类型", isNotEmpty = true, errorInfo = "类型不能为空", maxLength = 1)
@NotBlank(message = "类型不能为空")
@Length(max = 1, message = "类型不能超过1个字符")
@ExcelProperty("类型")
@Schema(description = "0编辑、1批量更新、2EKP变更银行卡号;3预入职更新;4导入更新银行信息")
private String type;
/**
......
......@@ -482,6 +482,14 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty("表格类型 0 薪资原表 1 系统模板")
private String excelType;
/**
* 新员工是否更新
*/
@ExcelAttribute(name = "新员工是否更新")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("新员工是否更新:0否;1是")
private String newEmpUpdateFlag;
/**
* 工资月份-起
*/
......
......@@ -38,4 +38,13 @@ public class SalaryUploadOriginalParamVo {
// 代发户的配置list
List<TSalaryStandardIssueRes> resList;
// 方案名称
String setName;
// 原表类型
String originalSetName;
// 新员工是否更新:0否;1是
String newEmpUpdateFlag;
}
......@@ -50,4 +50,7 @@ public class SalaryUploadParamVo {
// 原表类型
String originalSetName;
// 新员工是否更新:0否;1是
String newEmpUpdateFlag;
}
......@@ -67,6 +67,19 @@ public class TBankSetController {
return new R<>(tBankSetService.getTBankSetPage(page, tBankSet));
}
/**
* @param tBankSet
* @Description: 预入职C端使用开户行
* @Author: hgw
* @Date: 2024/7/15 17:00
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.baomidou.mybatisplus.core.metadata.IPage < com.yifu.cloud.plus.v1.yifu.salary.entity.TBankSet>>
**/
@Operation(description = "预入职C端使用开户行")
@GetMapping("/getWebcBankSetIdNameList")
public R<List<TBankSet>> getWebcBankSetIdNameList(TBankSetSearchVo tBankSet) {
return new R<>(tBankSetService.getTBankSetIdNameList(tBankSet));
}
/**
* 不分页查询
*
......
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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.ErrorMessage;
......@@ -223,4 +224,43 @@ public class TSalaryEmployeeController {
res.setRosterVos(tSalaryEmployeeService.getSalaryEmpRoster(idCardList));
return res;
}
/**
* @param empIdCard 身份证
* @Description: 根据身份证获取计税月份
* @Author: hgw
* @Date: 2024-7-18 10:48:15
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo>
**/
@Inner
@PostMapping("/inner/getEmpTaxMonth")
public String getEmpTaxMonth(@RequestBody String empIdCard) {
return tSalaryEmployeeService.getEmpTaxMonth(empIdCard);
}
/**
* @param empIdCard 身份证
* @Description: 根据身份证获取计税月份
* @Author: hgw
* @Date: 2024-7-18 10:48:15
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo>
**/
@Inner
@PostMapping("/inner/getSalaryEmployee")
public TSalaryEmployee getSalaryEmployee(@RequestBody String empIdCard) {
return tSalaryEmployeeService.getSalaryEmployee(empIdCard);
}
/**
* @Description: 预入职保存薪资人员
* @Author: hgw
* @Date: 2024-7-18 10:48:12
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo>
**/
@Inner
@PostMapping("/inner/savePreNewEmpInfo")
public String savePreNewEmpInfo(@RequestBody TSalaryEmployee newEmp) {
return tSalaryEmployeeService.savePreNewEmpInfo(newEmp);
}
}
......@@ -42,6 +42,8 @@ public interface TBankSetMapper extends BaseMapper<TBankSet> {
*/
IPage<TBankSet> getTBankSetPage(Page<TBankSet> page, @Param("tBankSet") TBankSet tBankSet);
List<TBankSet> getTBankSetIdNameList(@Param("tBankSet") TBankSet tBankSet);
List<String> getTBankSetList(@Param("bankName") String bankName);
}
......@@ -200,4 +200,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List<TSalaryTypeThreeExportEkpVo> getAccountThreeListByApplyNo(String applyNo);
List<TSalaryTypeFourExportEkpVo> getAccountFourListByApplyNo(String applyNo);
/**
* @param empIdCard 身份证
* @Description: C端预入职查询薪资当前年度是否有发薪记录,无则返回0,有则返回数量
* @Author: hgw
* @Date: 2024/7/16 17:01
* @return: java.lang.String
**/
int getAccountIdByIdCard(@Param("empIdCard") String empIdCard);
}
......@@ -44,6 +44,15 @@ public interface TBankSetService extends IService<TBankSet> {
*/
IPage<TBankSet> getTBankSetPage(Page<TBankSet> page, TBankSetSearchVo tBankSet);
/**
* @param tBankSet
* @Description: 获取Id和Name,当前给C端预入职使用,其他接口也可以使用,但是回传参数只有2个
* @Author: hgw
* @Date: 2024/7/15 16:59
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TBankSet>
**/
List<TBankSet> getTBankSetIdNameList(TBankSetSearchVo tBankSet);
/**
* @param bankName 开户行
* @Description: 获取Map
......
......@@ -20,15 +20,11 @@ package com.yifu.cloud.plus.v1.yifu.salary.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.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmpModLog;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpModLogSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
......@@ -38,14 +34,17 @@ import java.util.List;
* @date 2023-10-11 17:48:31
*/
public interface TSalaryEmpModLogService extends IService<TSalaryEmpModLog> {
/**
* 薪资人员档案变更记录简单分页查询
* @param tSalaryEmpModLog 薪资人员档案变更记录
* @return
*/
IPage<TSalaryEmpModLog> getTSalaryEmpModLogPage(Page<TSalaryEmpModLog> page, TSalaryEmpModLogSearchVo tSalaryEmpModLog);
/**
* 薪资人员档案变更记录简单分页查询
*
* @param tSalaryEmpModLog 薪资人员档案变更记录
* @return
*/
IPage<TSalaryEmpModLog> getTSalaryEmpModLogPage(Page<TSalaryEmpModLog> page, TSalaryEmpModLogSearchVo tSalaryEmpModLog);
List<TSalaryEmpModLog> noPageDiy(TSalaryEmpModLogSearchVo searchVo);
List<TSalaryEmpModLog> noPageDiy(TSalaryEmpModLogSearchVo searchVo);
void initModLog(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type, String userName, ExcelUtil<TSalaryEmployee> util);
TSalaryEmpModLog checkEditToLog(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type, String userName, ExcelUtil<TSalaryEmployee> util);
}
......@@ -73,6 +73,14 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
**/
String saveNewEmployeeList(List<TSalaryEmployee> saveNewEmpList, List<ErrorMessage> errorList);
/**
* @Description: 更新卡号等信息
* @Author: hgw
* @Date: 2024/7/22 10:27
* @return: java.lang.String
**/
String updateEmployeeBankList(List<TSalaryEmployee> updateEmpBankList, Map<String, TSalaryEmployee> updateEmpBankMap, List<ErrorMessage> errorList);
/**
* @param inputStream
* @Description: 批量更新-薪资人员信息
......@@ -126,4 +134,30 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
R<Boolean> updateByIdDiy(TSalaryEmployee tSalaryEmployee);
/**
* @param empIdCard 身份证
* @Description: C端预入职获取计税月份
* @Author: hgw
* @Date: 2024/7/16 16:11
* @return: java.lang.String
**/
String getEmpTaxMonth(String empIdCard);
/**
* @param empIdCard 身份证
* @Description: C端预入职获取薪资人员信息
* @Author: hgw
* @Date: 2024/7/23 11:22
* @return: com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
**/
TSalaryEmployee getSalaryEmployee(String empIdCard);
/**
* @Description: 保存
* @Author: hgw
* @Date: 2024/7/23 11:22
* @return: java.lang.String
**/
String savePreNewEmpInfo(TSalaryEmployee newEmp);
}
......@@ -229,7 +229,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
//劳务费和稿酬导入
if (CommonConstants.THREE_STRING.equals(salaryType) || CommonConstants.FOUR_STRING.equals(salaryType)) {
return this.saveLaborSubmit(configSalary, saList, dept, salaryType, orderId);
return this.saveLaborSubmit(configSalary, saList, vo, dept);
}
} else {
return R.failed("导入数据不可为空");
......@@ -254,13 +254,16 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @return: com.yifu.cloud.v1.hrms.api.entity.TSalaryStandard
**/
public R<TSalaryStandard> saveNewTSalary(TConfigSalary configSalary, TSalaryAccountVo sav, TSettleDomainSelectVo dept
, YifuUser user, LocalDateTime nowTime, String invoiceTitle) {
, YifuUser user, LocalDateTime nowTime, String invoiceTitle, String newEmpUpdateFlag) {
TSalaryStandard s = null;
if (sav != null) {
if (null == user || null == user.getId()) {
return null;
}
s = new TSalaryStandard();
if (Common.isNotNull(newEmpUpdateFlag)) {
s.setNewEmpUpdateFlag(newEmpUpdateFlag);
}
s.setInvoiceTitle(invoiceTitle);
s.setType(CommonConstants.ZERO_INT);
s.setBelongDeptId(String.valueOf(user.getDeptId()));
......@@ -335,7 +338,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now();
TSalaryStandard salary;
//工资主表
R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle); //工资主表
R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle
, vo.getNewEmpUpdateFlag()); //工资主表
if (sr == null || sr.getCode() == CommonConstants.FAIL) {
return sr;
} else {
......@@ -1524,7 +1528,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2022/8/16
* @return: com.yifu.cloud.v1.common.core.util.R
**/
public R saveLaborSubmit(TConfigSalary configSalary, List<TSalaryAccountVo> savList, TSettleDomainSelectVo dept, String salaryType, String orderId) {
public R saveLaborSubmit(TConfigSalary configSalary, List<TSalaryAccountVo> savList, SalaryUploadParamVo vo
, TSettleDomainSelectVo dept) {
String orderId = vo.getOrderId();
String salaryType = vo.getSalaryType();
String newEmpUpdateFlag = vo.getNewEmpUpdateFlag();
if (Common.isNotNull(savList) && !savList.isEmpty()) {
TSalaryAccountVo salaryAccountVo = savList.get(0);
List<TSalaryAccountItem> saiList = null; //报账明细List
......@@ -1533,7 +1541,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now();
//工资主表
String invoiceTitle = dept.getBusinessSubjectName();
R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle);
R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle
, newEmpUpdateFlag);
if (sr == null || sr.getCode() == CommonConstants.FAIL) {
return sr;
......
......@@ -71,6 +71,17 @@ public class TBankSetServiceImpl extends ServiceImpl<TBankSetMapper, TBankSet> i
return baseMapper.getTBankSetPage(page, tBankSet);
}
/**
* 开户行配置表简单分页查询
*
* @param tBankSet 开户行配置表
* @return
*/
@Override
public List<TBankSet> getTBankSetIdNameList(TBankSetSearchVo tBankSet) {
return baseMapper.getTBankSetIdNameList(tBankSet);
}
/**
* 开户行Map
* @param bankName 开户行
......
......@@ -22,7 +22,6 @@ 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.esotericsoftware.minlog.Log;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
......@@ -72,13 +71,27 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
* @Author fxj
* @Description 记录变更日志
* @Date 17:59 2023/10/24
* @Param type 0 编辑 1 批量更新 3 EKP 更新
* @Param type 0 编辑 1 批量更新 2 EKP更新 3 预入职更新
* @return
**/
@Override
public void initModLog(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type,String userName,ExcelUtil<TSalaryEmployee> util) {
TSalaryEmpModLog log = doCheckModCore(newEntity, oldEntity, type, userName, util);
if (log != null && Common.isNotNull(log.getContent())){
baseMapper.insert(log);
}
}
@Override
public TSalaryEmpModLog checkEditToLog(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type,String userName
, ExcelUtil<TSalaryEmployee> util) {
return doCheckModCore(newEntity, oldEntity, type, userName, util);
}
private TSalaryEmpModLog doCheckModCore(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, String type, String userName, ExcelUtil<TSalaryEmployee> util) {
TSalaryEmpModLog log = null;
if (Common.isNotNull(newEntity) && Common.isNotNull(oldEntity)){
TSalaryEmpModLog log = new TSalaryEmpModLog();
log = new TSalaryEmpModLog();
log.setIdNum(newEntity.getEmpIdcard());
log.setParentId(newEntity.getId());
log.setType(type);
......@@ -90,7 +103,8 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
}
extracted(newEntity, oldEntity, str);
//计税月份
if (Common.isNotNull(newEntity.getTaxMonth()) && !oldEntity.getTaxMonth().equals(newEntity.getTaxMonth())){
if (Common.isNotNull(newEntity.getTaxMonth())
&& Common.isNotNull(oldEntity.getTaxMonth()) && !oldEntity.getTaxMonth().equals(newEntity.getTaxMonth())){
str.append("计税月份:");
str.append(oldEntity.getTaxMonth());
str.append("->");
......@@ -99,27 +113,25 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
}
//开户行省
if (Common.isNotNull(newEntity.getBankProvince())
&& !oldEntity.getBankProvince().equals(newEntity.getBankProvince())){
&& Common.isNotNull(oldEntity.getBankProvince()) && !oldEntity.getBankProvince().equals(newEntity.getBankProvince())){
str.append("开户行省:");
str.append(Common.isEmpty(oldEntity.getBankProvince())?"":util.getAreaLabelPublic(oldEntity.getBankProvince()));
str.append(Common.isEmpty(oldEntity.getBankProvince())?"": util.getAreaLabelPublic(oldEntity.getBankProvince()));
str.append("->");
str.append(Common.isEmpty(newEntity.getBankProvince())?"":util.getAreaLabelPublic(newEntity.getBankProvince()));
str.append(Common.isEmpty(newEntity.getBankProvince())?"": util.getAreaLabelPublic(newEntity.getBankProvince()));
str.append(" ");
}
//开户行市
if (Common.isNotNull(newEntity.getBankCity()) && !oldEntity.getBankCity().equals(newEntity.getBankCity())){
if (Common.isNotNull(newEntity.getBankCity())
&& Common.isNotNull(oldEntity.getBankCity()) && !oldEntity.getBankCity().equals(newEntity.getBankCity())){
str.append("开户行市:");
str.append(Common.isEmpty(oldEntity.getBankCity())?"":util.getAreaLabelPublic(oldEntity.getBankCity()));
str.append(Common.isEmpty(oldEntity.getBankCity())?"": util.getAreaLabelPublic(oldEntity.getBankCity()));
str.append("->");
str.append(Common.isEmpty(newEntity.getBankCity())?"":util.getAreaLabelPublic(newEntity.getBankCity()));
str.append(Common.isEmpty(newEntity.getBankCity())?"": util.getAreaLabelPublic(newEntity.getBankCity()));
str.append(" ");
}
log.setContent(str.toString());
Log.error("薪资人员变更记录表:"+str.toString());
if (Common.isNotNull(log.getContent())){
baseMapper.insert(log);
}
}
return log;
}
private void extracted(TSalaryEmployee newEntity, TSalaryEmployee oldEntity, StringBuilder str) {
......
......@@ -46,7 +46,9 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmpModLog;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TBankSetService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmpModLogService;
......@@ -88,6 +90,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
@Autowired
private TSalaryEmpModLogService logService;
@Autowired
private TSalaryAccountMapper salaryAccountMapper;
/**
* 薪酬人员表简单分页查询
*
......@@ -383,6 +387,102 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return null;
}
@Override
public String updateEmployeeBankList(List<TSalaryEmployee> updateEmployeeBankList
, Map<String, TSalaryEmployee> updateEmpBankMap, List<ErrorMessage> errorList) {
if (updateEmployeeBankList != null && !updateEmployeeBankList.isEmpty()) {
// 银行卡
List<TCheckBankNo> bankList = new ArrayList<>();
TCheckBankNo checkBankNo;
for (TSalaryEmployee employee : updateEmployeeBankList) {
if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName());
checkBankNo.setBankNo(employee.getBankNo());
bankList.add(checkBankNo);
}
}
// 批量校验 卡号与手机号
Map<String, Boolean> bankMap = new HashMap<>();
if (!bankList.isEmpty()) {
R<CheckBatchVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
bankMap = checkListR.getData().getCheckMap();
}
}
boolean isFalse = false;
String areaProvince;
String areaCity;
TSalaryEmployee oldEmp;
ExcelUtil<TSalaryEmployee> util = new ExcelUtil<>(TSalaryEmployee.class);
TSalaryEmpModLog log;
List<TSalaryEmpModLog> saveLogList = new ArrayList<>();
for (TSalaryEmployee employee : updateEmployeeBankList) {
if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
oldEmp = updateEmpBankMap.get(employee.getEmpIdcard());
if (oldEmp != null) {
if (Common.isNotNull(employee.getBankProvince())) {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
if (Common.isNotNull(areaProvince)) {
if (Common.isNotNull(employee.getBankCity())) {
areaCity = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + employee.getBankProvince().trim());
if (Common.isNotNull(areaCity)) {
employee.setBankCity(areaCity);
} else {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【" + SalaryConstants.CITY_ERROR + "】"));
isFalse = true;
}
}
employee.setBankProvince(areaProvince);
} else {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【" + SalaryConstants.PROVINCE_ERROR + "】"));
isFalse = true;
}
}
// 有变更才更新
if ( (Common.isNotNull(employee.getBankNo()) && !employee.getBankNo().equals(oldEmp.getBankNo()))
|| (Common.isNotNull(employee.getBankProvince()) && !employee.getBankProvince().equals(oldEmp.getBankProvince()))
|| (Common.isNotNull(employee.getBankCity()) && !employee.getBankCity().equals(oldEmp.getBankCity()))
|| (Common.isNotNull(employee.getBankName()) && !employee.getBankName().equals(oldEmp.getBankName()))
|| (Common.isNotNull(employee.getBankSubName()) && !employee.getBankSubName().equals(oldEmp.getBankSubName()))
) {
if (bankMap.get(employee.getBankNo()) != null) {
if (Boolean.FALSE.equals(bankMap.get(employee.getBankNo()))) {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【姓名与卡号验证:认证不一致】"));
isFalse = true;
}
} else {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工更新失败:【姓名与卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
isFalse = true;
}
if (!isFalse) {
log = logService.checkEditToLog(employee,oldEmp,CommonConstants.FOUR_STRING,employee.getCreateName(), util);
if (log != null) {
saveLogList.add(log);
}
}
}
}
}
}
if (isFalse) {
return null;
}
// 更新人员
this.updateBatchById(updateEmployeeBankList);
// 新增日志
logService.saveBatch(saveLogList);
}
return null;
}
/**
* @param employee
* @Description: 校验卡号与手机号
......@@ -989,7 +1089,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
one.setEmpName(vo.getEmpName());
one.setBankName(vo.getBankName());
baseMapper.updateById(one);
logService.initModLog(old,one,CommonConstants.TWO_STRING, "ekp",null);
logService.initModLog(one,old,CommonConstants.TWO_STRING, "ekp",null);
}
return R.ok();
}
......@@ -1024,7 +1124,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (pre != null) return R.failed(pre);
// 变更日志 fxj 2023-10-24
logService.initModLog(old,tSalaryEmployee,CommonConstants.ZERO_STRING,user.getNickname(),null);
logService.initModLog(tSalaryEmployee,old,CommonConstants.ZERO_STRING,user.getNickname(),null);
int res = baseMapper.updateById(tSalaryEmployee);
if (res >= CommonConstants.ZERO_INT){
return R.ok();
......@@ -1064,4 +1164,74 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
return null;
}
/**
* @param empIdCard 身份证
* @Description: C端预入职获取计税月份
* @Author: hgw
* @Date: 2024/7/16 16:11
* @return: java.lang.String
**/
@Override
public String getEmpTaxMonth(String empIdCard) {
// 0表示 未找到薪资记录,C端可编辑
String taxMonth = CommonConstants.ZERO_STRING;
TSalaryEmployee employee = baseMapper.getByEmpIdCard(empIdCard);
if (employee != null && Common.isNotNull(employee.getTaxMonth())) {
// 查找本年度薪资,有则返回薪资人员的计税月份,无则返回空,可编辑
int count = salaryAccountMapper.getAccountIdByIdCard(empIdCard);
if (count > 0) {
taxMonth = employee.getTaxMonth();
}
}
return taxMonth;
}
/**
* @param empIdCard 身份证
* @Description: C端预入职获取薪资人员信息
* @Author: hgw
* @Date: 2024-7-23 11:21:56
* @return: java.lang.String
**/
@Override
public TSalaryEmployee getSalaryEmployee(String empIdCard) {
// 0表示 未找到薪资记录,C端可编辑
return baseMapper.getByEmpIdCard(empIdCard);
}
/**
* @Description: C端预入职获取计税月份
* @Author: hgw
* @Date: 2024/7/16 16:11
* @return: java.lang.String
**/
@Override
public String savePreNewEmpInfo(TSalaryEmployee newEmp) {
// true表示 未找到薪资记录,C端可编辑计税月份
boolean canSaveFlag = true;
TSalaryEmployee employee = baseMapper.getByEmpIdCard(newEmp.getEmpIdcard());
if (employee != null) {
// 查找本年度薪资,有则返回薪资人员的计税月份,无则返回空,可编辑
int count = salaryAccountMapper.getAccountIdByIdCard(newEmp.getEmpIdcard());
if (count > 0) {
canSaveFlag = false;
}
}
if (employee != null) {
String[] ignoreProperties = new String[]{"id", "createBy", "createName", "createTime"};
// 当年有发薪纪录,不允许编辑计税月
if (!canSaveFlag) {
newEmp.setTaxMonth(employee.getTaxMonth());
}
// 变更日志 hgw 2024-7-16 18:19:57
logService.initModLog(newEmp,employee,CommonConstants.THREE_STRING,newEmp.getCreateName(), null);
BeanUtil.copyProperties(newEmp, employee, ignoreProperties);
this.updateById(employee);
} else {
this.save(newEmp);
}
return CommonConstants.SAVE_SUCCESS;
}
}
......@@ -961,55 +961,9 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
if (Common.isEmpty(check.getName())) {
return R.failed("数据行第 " + i + " 行,无员工姓名!");
}
// 调用校验服务
/*String pre = "姓名与身份证验证:";
R<TCheckIdCard> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckidcard/inner/checkIdCardSingle", check, TCheckIdCard.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
TCheckIdCard checkR = checkListR.getData();
if (checkR == null || Common.isEmpty(checkR.getIsTrue())) {
errMsg.append("第 ").append(i).append(" 行:").append(check.getIdCard()).append(pre).append("校验服务器未返回,请联系管理员!");
} else if (checkR.getIsTrue() == CommonConstants.ZERO_INT) {
errMsg.append("第 ").append(i).append(" 行:").append(check.getIdCard()).append(pre).append(check.getReason());
}
} else {
errMsg.append("第 ").append(i).append(" 行:").append(check.getIdCard()).append(pre).append("校验服务器未返回,请联系管理员!!");
}*/
checkList.add(check);
contentList.add(newRowMap);
}
/*if (Common.isNotNull(errMsg) && Common.isNotNull(errMsg.toString())) {
return R.failed(errMsg.toString());
}*/
/*// 调用校验服务
CheckIdCardListVo checkVo = new CheckIdCardListVo();
checkVo.setCheckList(checkList);
R<CheckIdCardListVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckidcard/inner/checkIdCardList", checkVo, CheckIdCardListVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
CheckIdCardListVo checkReturnVo = checkListR.getData();
if (checkReturnVo.getCode() != CommonConstants.SUCCESS) {
if (checkReturnVo.getCheckList() != null && !checkReturnVo.getCheckList().isEmpty()) {
int cardRow = 0;
StringBuilder errMsg = new StringBuilder();
for (TCheckIdCard card : checkReturnVo.getCheckList()) {
cardRow++;
if (card.getIsTrue() == 0) {
errMsg.append(" 第").append(cardRow).append("行:").append(card.getIdCard()).append(",姓名身份证校验错误! ");
}
}
return R.failed(errMsg.toString());
} else {
return R.failed(checkReturnVo.getErrorMsg());
}
}
} else {
return R.failed("原表识别校验姓名身份证,但是校验服务器未返回,请联系管理员!");
}*/
// 最后转化为jsonString
jsonString = JSON.toJSON(contentList).toString();
SalaryUploadParamVo returnVo = new SalaryUploadParamVo();
......@@ -1023,6 +977,9 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
returnVo.setOrderId(excelVo.getOrderId());
returnVo.setResList(excelVo.getResList());
returnVo.setSettleDepart(excelVo.getSettleDepart());
returnVo.setSetName(excelVo.getSetName());
returnVo.setOriginalSetName(excelVo.getOriginalSetName());
returnVo.setNewEmpUpdateFlag(excelVo.getNewEmpUpdateFlag());
//数据保存
return R.ok(returnVo);
}
......
......@@ -40,6 +40,10 @@ security:
- /actuator/**
- /swagger-ui/**
- /taveragesalary/getAverageSalary
- /tbankset/getWebcBankSetIdNameList
- /tsalaryemployee/inner/getEmpTaxMonth
- /tsalaryemployee/inner/getSalaryEmployee
- /tsalaryemployee/inner/savePreNewEmpInfo
......
......@@ -68,10 +68,24 @@
</if>
</if>
</sql>
<!--tBankSet简单分页查询-->
<select id="getTBankSetPage" resultMap="tBankSetMap">
<!--tBankSet简单分页查询-->
<select id="getTBankSetPage" resultMap="tBankSetMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_bank_set a
<where>
a.DELETE_FLAG = '0'
<include refid="tBankSet_where"/>
</where>
order by a.CREATE_TIME desc
</select>
<!--获取IdName-->
<select id="getTBankSetIdNameList" resultMap="tBankSetMap">
SELECT
<include refid="Base_Column_List"/>
a.ID,
a.BANK_NAME
FROM t_bank_set a
<where>
a.DELETE_FLAG = '0'
......@@ -81,14 +95,14 @@
</select>
<!--list-->
<select id="getTBankSetList" resultType="java.lang.String">
SELECT
a.BANK_NAME
FROM t_bank_set a
where a.DELETE_FLAG = '0'
<select id="getTBankSetList" resultType="java.lang.String">
SELECT
a.BANK_NAME
FROM t_bank_set a
where a.DELETE_FLAG = '0'
<if test="bankName != null and bankName.trim() != ''">
and a.BANK_NAME = #{bankName}
</if>
order by a.CREATE_TIME desc
</select>
</select>
</mapper>
......@@ -1485,4 +1485,10 @@
where s.APPLY_NO = #{applyNo} and a.DELETE_FLAG = 0
GROUP BY a.id ORDER BY a.ROW_INDEX ASC
</select>
<!-- C端预入职查询薪资当前年度是否有发薪记录,无则返回空,有则返回Id -->
<select id="getAccountIdByIdCard" resultType="java.lang.Integer">
select count(1) from t_salary_account a where a.DELETE_FLAG = 0 and a.EMP_IDCARD = #{empIdCard} and a.SETTLEMENT_MONTH like concat(DATE_FORMAT(NOW(), '%Y'), '%')
</select>
</mapper>
......@@ -87,6 +87,7 @@
<result property="excelType" column="EXCEL_TYPE"/>
<result property="setName" column="SET_NAME"/>
<result property="originalSetName" column="ORIGINAL_SET_NAME"/>
<result property="newEmpUpdateFlag" column="NEW_EMP_UPDATE_FLAG"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -151,7 +152,8 @@
a.DELETE_DATE,
a.EXCEL_TYPE,
a.SET_NAME,
a.ORIGINAL_SET_NAME
a.ORIGINAL_SET_NAME,
a.NEW_EMP_UPDATE_FLAG
</sql>
<sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null">
......
......@@ -509,7 +509,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
List<String> list2 = list.stream().map(PersonVo::getUid).collect(Collectors.toList());
List<String> collect = list1.stream().filter(s -> !list2.contains(s)
).collect(Collectors.toList());
log.info("要重置为不可用的用户列表:" + collect);
log.error("要重置为不可用的用户列表:" + collect);
if (!collect.isEmpty()) {
LambdaUpdateWrapper<SysUser> settleUpdate = new LambdaUpdateWrapper<>();
settleUpdate.in(SysUser::getUsername, collect)
......
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