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())) {
......
......@@ -40,11 +40,15 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.compress.utils.Lists;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service;
......@@ -58,6 +62,7 @@ import java.net.URL;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.*;
import java.util.regex.Pattern;
/**
* 预入职-主表
......@@ -68,6 +73,7 @@ import java.util.*;
@Log4j2
@AllArgsConstructor
@Service
@EnableConfigurationProperties(DaprSalaryProperties.class)
public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreEmpMain> implements TPreEmpMainService {
// 预入职-员工不良记录表
private final TPreEmpBadRecordService tPreEmpBadRecordService;
......@@ -89,6 +95,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
private final TPreEmployeeProjectService tPreEmployeeProjectService;
// 预入职-员工职业资格信息表
private final TPreEmpProfessionalQualificationService tPreEmpProfessionalService;
// 预入职-其他附件
private final TPreEmpOtherFileService tPreEmpOtherFileService;
// 附件21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件)
private final TAttaInfoService tAttaInfoService;
......@@ -115,11 +124,18 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
private final TSettleDomainService tSettleDomainService;
// 审核日志
private final TPreEmpMainLogService tPreEmpMainLogService;
// 其他附件
private final TEmpOtherFileService tEmpOtherFileService;
// 薪资服务,获取计税月份
private final DaprSalaryProperties salaryProperties;
private final OSSUtil ossUtil;
private static final String ID = "id";
public static final String taxMonthRegex = "^2\\d{5}";
/**
* 预入职-主表简单分页查询
*
......@@ -161,6 +177,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
baseMapper.deleteProjectByMainId(main.getId());
tPreEmpWorkRecordingService.deleteByMainId(main.getId());
tPreEmpProfessionalService.deleteProfessionalByMainId(main.getId());
tPreEmpOtherFileService.deleteOtherFileByMainId(main.getId());
tAttaInfoService.deleteByDomainId(main.getId());
}
baseMapper.deleteById(main);
......@@ -470,8 +487,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
vo.setTpreEmpFamilyList(tPreEmpFamilyList);
// 预入职-人员档案表
TPreEmployeeInfo tPreEmployeeInfo;
if (vo.getTpreEmployeeInfo() == null) {
TPreEmployeeInfo tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(id);
tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(id);
if (tPreEmployeeInfo == null) {
tPreEmployeeInfo = new TPreEmployeeInfo();
tPreEmployeeInfo.setEmpIdcard(main.getEmpIdcard());
......@@ -483,6 +501,22 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
vo.setTpreEmployeeInfo(tPreEmployeeInfo);
}
tPreEmployeeInfo = vo.getTpreEmployeeInfo();
if (tPreEmployeeInfo != null && Common.isEmpty(tPreEmployeeInfo.getBankNo()) && Common.isNotNull(tPreEmployeeInfo.getEmpIdcard())) {
// 去薪资服务获取卡号
R<TSalaryEmployee> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/getSalaryEmployee", tPreEmployeeInfo.getEmpIdcard(), TSalaryEmployee.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null) {
TSalaryEmployee tSalaryEmployee = sdr.getData();
if (tSalaryEmployee != null && Common.isNotNull(tSalaryEmployee.getBankNo())) {
tPreEmployeeInfo.setBankNo(tSalaryEmployee.getBankNo());
tPreEmployeeInfo.setBankName(tSalaryEmployee.getBankName());
tPreEmployeeInfo.setBankSubName(tSalaryEmployee.getBankSubName());
tPreEmployeeInfo.setBankProvince(tSalaryEmployee.getBankProvince());
tPreEmployeeInfo.setBankCity(tSalaryEmployee.getBankCity());
}
}
}
// 预入职-项目档案表
if (vo.getTpreEmployeeProject() == null) {
TPreEmployeeProject tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(id);
......@@ -580,6 +614,65 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
vo.setTpreEmpProfessionalQualificationList(tPreEmpProfessionalQualificationList);
// 预入职-其他附件
List<TPreEmpOtherFile> tPreEmpOtherFileList = tPreEmpOtherFileService.getTPreEmpOtherFileList(id);
if (tPreEmpOtherFileList == null || tPreEmpOtherFileList.isEmpty()) {
tPreEmpOtherFileList = new ArrayList<>();
if (Common.isNotNull(empId)) {
List<TEmpOtherFile> infoList = tEmpOtherFileService.getListByEmpId(empId);
TPreEmpOtherFile record;
if (infoList != null && !infoList.isEmpty()) {
for (TEmpOtherFile info : infoList) {
record = new TPreEmpOtherFile();
BeanUtil.copyProperties(info, record, ID);
record.setEmpId(empId);
record.setOldId(info.getId());
// 附件
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
record.setAttaList(attaInfoList);
record.setPreMainId(id);
if (Common.isEmpty(record.getCreateTime())) {
record.setCreateTime(LocalDateTime.now());
}
tPreEmpOtherFileList.add(record);
}
tPreEmpOtherFileService.saveBatch(tPreEmpOtherFileList);
}
}
if (tPreEmpOtherFileList.isEmpty()) {
TPreEmpOtherFile record = new TPreEmpOtherFile();
if (employee != null) {
record.setEmpId(employee.getId());
}
record.setCreateTime(LocalDateTime.now());
record.setPreMainId(id);
record.setAttaList(new ArrayList<>());
tPreEmpOtherFileService.save(record);
tPreEmpOtherFileList.add(record);
}
} else {
for (TPreEmpOtherFile info : tPreEmpOtherFileList) {
// 附件
List<TAttaInfo> attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null) {
URL url;
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
info.setAttaList(attaInfoList);
}
}
vo.setTpreEmpOtherFileList(tPreEmpOtherFileList);
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecordingList = tPreEmpWorkRecordingService.getTPreEmpWorkRecordingList(id);
if (tPreEmpWorkRecordingList == null || tPreEmpWorkRecordingList.isEmpty()) {
......@@ -718,6 +811,26 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
vo.setTpreEmpProfessionalQualificationList(tPreEmpProfessionalQualificationList);
// 预入职-其他附件
List<TPreEmpOtherFile> tPreEmpOtherFileList = tPreEmpOtherFileService.getTPreEmpOtherFileList(id);
if (tPreEmpOtherFileList != null && !tPreEmpOtherFileList.isEmpty()) {
List<TAttaInfo> attaInfoList;
URL url;
for (TPreEmpOtherFile info : tPreEmpOtherFileList) {
// 附件
attaInfoList = tAttaInfoService.getTAttaInfoListByDoMainId(info.getId());
if (attaInfoList != null) {
for (TAttaInfo atta : attaInfoList) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(String.valueOf(url));
}
}
info.setAttaList(attaInfoList);
}
}
vo.setTpreEmpOtherFileList(tPreEmpOtherFileList);
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecording = tPreEmpWorkRecordingService.getTPreEmpWorkRecordingList(id);
vo.setTpreEmpWorkRecordingList(tPreEmpWorkRecording);
......@@ -748,6 +861,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
public R<String> doImproveInformation(PreEmpMainDetailVo vo) {
TPreEmpMain preMain = vo.getMain();
TPreEmployeeInfo tPreEmployee = vo.getTpreEmployeeInfo();
TPreEmployeeInfo oldPreEmployee = tPreEmployeeInfoService.getTPreEmployeeInfoList(preMain.getId());
TPreEmployeeProject project = vo.getTpreEmployeeProject();
if (preMain == null || tPreEmployee == null || project == null ||
Common.isEmpty(preMain.getId()) || Common.isEmpty(tPreEmployee.getId()) || Common.isEmpty(project.getId())) {
......@@ -767,6 +881,21 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(errorInfo)) {
return R.failed(errorInfo + "不可为空!");
}
// 计税月份
if (Common.isNotNull(tPreEmployee.getBankNo()) && Common.isEmpty(tPreEmployee.getTaxMonth())) {
return R.failed("有银行卡号,计税月份必填!");
}
if (Common.isNotNull(tPreEmployee.getTaxMonth())) {
String taxMonth = tPreEmployee.getTaxMonth().trim();
if (!taxMonth.matches(taxMonthRegex)) {
return R.failed("计税月份为6位年月,例如:202407!");
}
if (Common.isNotNull(tPreEmployee.getTaxMonthFlag()) && CommonConstants.ZERO_STRING.equals(tPreEmployee.getTaxMonthFlag())
&& oldPreEmployee != null && !oldPreEmployee.getTaxMonth().equals(tPreEmployee.getTaxMonth()) ) {
return R.failed("本年度有发薪纪录,计税月份不可编辑!");
}
}
tPreEmployeeInfoService.updateById(tPreEmployee);
project.setEmpNatrue(tPreEmployee.getEmpNatrue());
tPreEmployeeProjectService.updateById(project);
......@@ -811,149 +940,72 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private R<String> saveBase(PreEmpMainDetailVo vo, String status) {
YifuUser user = getNewYifuUser();
TPreEmpMain main = vo.getMain();
String idCard = main.getEmpIdcard();
if (Common.isNotNull(idCard)) {
TPreEmployeeProject tPreEmployeeProject = vo.getTpreEmployeeProject();
if (tPreEmployeeProject != null && Common.isNotNull(tPreEmployeeProject.getOldId())) {
// 预入职-人员档案表
TPreEmployeeInfo tPreEmployeeInfo = vo.getTpreEmployeeInfo();
if (tPreEmployeeInfo != null && Common.isNotNull(tPreEmployeeInfo.getOldId())) {
// 转到更新档案去
return updateToEmployeeByPre(vo);
try {
YifuUser user = getNewYifuUser();
String idCard = main.getEmpIdcard();
if (Common.isNotNull(idCard)) {
TPreEmployeeProject tPreEmployeeProject = vo.getTpreEmployeeProject();
if (tPreEmployeeProject != null && Common.isNotNull(tPreEmployeeProject.getOldId())) {
// 预入职-人员档案表
TPreEmployeeInfo tPreEmployeeInfo = vo.getTpreEmployeeInfo();
if (tPreEmployeeInfo != null && Common.isNotNull(tPreEmployeeInfo.getOldId())) {
// 转到更新档案去
return updateToEmployeeByPre(vo);
} else {
return R.failed("档案原ID不可为空!");
}
} else {
return R.failed("档案原ID不可为空!");
}
} else {
main.setStatus(status);
main.setCreateBy(user.getId());
main.setCreateName(user.getNickname());
main.setCreateTime(LocalDateTime.now());
this.saveOrUpdate(main);
String mainId = main.getId();
// 预入职-员工不良记录表
TPreEmpBadRecord tPreEmpBadRecord = vo.getTpreEmpBadRecord();
if (tPreEmpBadRecord != null) {
tPreEmpBadRecord.setPreMainId(mainId);
tPreEmpBadRecord.setCreateBy(user.getId());
tPreEmpBadRecord.setCreateName(user.getNickname());
tPreEmpBadRecord.setCreateTime(LocalDateTime.now());
tPreEmpBadRecordService.saveOrUpdate(tPreEmpBadRecord);
}
// 预入职-紧急联络人
TPreEmpContactInfo tPreEmpContactInfo = vo.getTpreEmpContactInfo();
if (tPreEmpContactInfo != null) {
tPreEmpContactInfo.setPreMainId(mainId);
tPreEmpContactInfo.setCreateBy(user.getId());
tPreEmpContactInfo.setCreateName(user.getNickname());
tPreEmpContactInfo.setCreateTime(LocalDateTime.now());
tPreEmpContactInfoService.saveOrUpdate(tPreEmpContactInfo);
}
// 预入职-员工伤残信息表
TPreEmpDisabilityInfo tPreEmpDisabilityInfo = vo.getTpreEmpDisabilityInfo();
if (tPreEmpDisabilityInfo != null) {
tPreEmpDisabilityInfo.setPreMainId(mainId);
tPreEmpDisabilityInfo.setCreateBy(user.getId());
tPreEmpDisabilityInfo.setCreateName(user.getNickname());
tPreEmpDisabilityInfo.setCreateTime(LocalDateTime.now());
tPreEmpDisabilityInfoService.saveOrUpdate(tPreEmpDisabilityInfo);
}
// 预入职-员工学历信息表
TPreEmpEducation tPreEmpEducation = vo.getTpreEmpEducation();
if (tPreEmpEducation != null) {
tPreEmpEducation.setPreMainId(mainId);
tPreEmpEducation.setCreateBy(user.getId());
tPreEmpEducation.setCreateName(user.getNickname());
tPreEmpEducation.setCreateTime(LocalDateTime.now());
tPreEmpEducationService.saveOrUpdate(tPreEmpEducation);
// 附件
if (tPreEmpEducation.getAttaList() != null && !tPreEmpEducation.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = tPreEmpEducation.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainIdAndType(tPreEmpEducation.getId(),0);
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(tPreEmpEducation.getId());
atta.setCreateBy(user.getId());
atta.setCreateName(user.getNickname());
atta.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveBatch(attaList);
}
main.setStatus(status);
main.setCreateBy(user.getId());
main.setCreateName(user.getNickname());
main.setCreateTime(LocalDateTime.now());
this.saveOrUpdate(main);
String mainId = main.getId();
// 预入职-员工不良记录表
TPreEmpBadRecord tPreEmpBadRecord = vo.getTpreEmpBadRecord();
if (tPreEmpBadRecord != null) {
tPreEmpBadRecord.setPreMainId(mainId);
tPreEmpBadRecord.setCreateBy(user.getId());
tPreEmpBadRecord.setCreateName(user.getNickname());
tPreEmpBadRecord.setCreateTime(LocalDateTime.now());
tPreEmpBadRecordService.saveOrUpdate(tPreEmpBadRecord);
}
}
// 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamily = vo.getTpreEmpFamilyList();
if (tPreEmpFamily != null) {
tPreEmpFamilyService.deleteFamilyByMainId(mainId);
for (TPreEmpFamily info : tPreEmpFamily) {
info.setEmpIdcard(idCard);
info.setPreMainId(mainId);
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
// 预入职-紧急联络人
TPreEmpContactInfo tPreEmpContactInfo = vo.getTpreEmpContactInfo();
if (tPreEmpContactInfo != null) {
tPreEmpContactInfo.setPreMainId(mainId);
tPreEmpContactInfo.setCreateBy(user.getId());
tPreEmpContactInfo.setCreateName(user.getNickname());
tPreEmpContactInfo.setCreateTime(LocalDateTime.now());
tPreEmpContactInfoService.saveOrUpdate(tPreEmpContactInfo);
}
tPreEmpFamilyService.saveOrUpdateBatch(tPreEmpFamily);
}
// 预入职-人员档案表
TPreEmployeeInfo tPreEmployeeInfo = vo.getTpreEmployeeInfo();
if (tPreEmployeeInfo != null) {
if (tPreEmpEducation != null) {
if (Common.isNotNull(tPreEmpEducation.getEducationName())) {
// 5大专 6本科 7硕士 8博士
if ("5".equals(tPreEmpEducation.getEducationName())
|| "6".equals(tPreEmpEducation.getEducationName())
|| "7".equals(tPreEmpEducation.getEducationName())
|| "8".equals(tPreEmpEducation.getEducationName())) {
tPreEmployeeInfo.setIsCollege(CommonConstants.ONE_INT);
} else {
tPreEmployeeInfo.setIsCollege(CommonConstants.ZERO_INT);
}
tPreEmployeeInfo.setHignEducation(tPreEmpEducation.getEducationName());
}
tPreEmployeeInfo.setSchool(tPreEmpEducation.getSchool());
tPreEmployeeInfo.setMajor(tPreEmpEducation.getMajor());
tPreEmployeeInfo.setAdmissionDate(tPreEmpEducation.getEntryDate());
tPreEmployeeInfo.setGradutionDate(tPreEmpEducation.getGradutionDate());
// 预入职-员工伤残信息表
TPreEmpDisabilityInfo tPreEmpDisabilityInfo = vo.getTpreEmpDisabilityInfo();
if (tPreEmpDisabilityInfo != null) {
tPreEmpDisabilityInfo.setPreMainId(mainId);
tPreEmpDisabilityInfo.setCreateBy(user.getId());
tPreEmpDisabilityInfo.setCreateName(user.getNickname());
tPreEmpDisabilityInfo.setCreateTime(LocalDateTime.now());
tPreEmpDisabilityInfoService.saveOrUpdate(tPreEmpDisabilityInfo);
}
// 生成性别年龄等:
this.setBaseSexInfo(tPreEmployeeInfo);
tPreEmployeeInfo.setPreMainId(mainId);
tPreEmployeeInfo.setCreateBy(user.getId());
tPreEmployeeInfo.setCreateName(user.getNickname());
tPreEmployeeInfo.setCreateTime(LocalDateTime.now());
tPreEmployeeInfoService.saveOrUpdate(tPreEmployeeInfo);
}
// 预入职-项目档案表
if (tPreEmployeeProject != null) {
tPreEmployeeProject.setPreMainId(mainId);
tPreEmployeeProject.setCreateBy(user.getId());
tPreEmployeeProject.setCreateName(user.getNickname());
tPreEmployeeProject.setCreateTime(LocalDateTime.now());
tPreEmployeeProjectService.saveOrUpdate(tPreEmployeeProject);
}
// 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = vo.getTpreEmpProfessionalQualificationList();
if (tPreEmpProfessionalQualification != null) {
// 先删除后增加
tPreEmpProfessionalService.deleteProfessionalByMainId(mainId);
for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualification) {
info.setEmpIdcard(idCard);
info.setPreMainId(mainId);
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
tPreEmpProfessionalService.saveOrUpdate(info);
// 预入职-员工学历信息表
TPreEmpEducation tPreEmpEducation = vo.getTpreEmpEducation();
if (tPreEmpEducation != null) {
tPreEmpEducation.setPreMainId(mainId);
tPreEmpEducation.setCreateBy(user.getId());
tPreEmpEducation.setCreateName(user.getNickname());
tPreEmpEducation.setCreateTime(LocalDateTime.now());
tPreEmpEducationService.saveOrUpdate(tPreEmpEducation);
// 附件
if (info.getAttaList() != null && !info.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = info.getAttaList();
if (tPreEmpEducation.getAttaList() != null && !tPreEmpEducation.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = tPreEmpEducation.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainIdAndType(info.getId(),1);
tAttaInfoService.deleteByDomainIdAndType(tPreEmpEducation.getId(), 0);
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(info.getId());
atta.setDomainId(tPreEmpEducation.getId());
atta.setCreateBy(user.getId());
atta.setCreateName(user.getNickname());
atta.setCreateTime(LocalDateTime.now());
......@@ -962,42 +1014,176 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
}
}
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecording = vo.getTpreEmpWorkRecordingList();
if (tPreEmpWorkRecording != null) {
// 先删除后增加
tPreEmpWorkRecordingService.deleteByMainId(mainId);
for (TPreEmpWorkRecording info : tPreEmpWorkRecording) {
info.setEmpIdcard(idCard);
info.setPreMainId(mainId);
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
// 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamily = vo.getTpreEmpFamilyList();
if (tPreEmpFamily != null) {
tPreEmpFamilyService.deleteFamilyByMainId(mainId);
for (TPreEmpFamily info : tPreEmpFamily) {
info.setEmpIdcard(idCard);
info.setPreMainId(mainId);
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
tPreEmpFamilyService.saveOrUpdateBatch(tPreEmpFamily);
}
tPreEmpWorkRecordingService.saveOrUpdateBatch(tPreEmpWorkRecording);
}
// 预入职-附件
List<TAttaInfo> attaInfoList = vo.getAttaInfoList();
if (attaInfoList != null) {
// 先删除后增加
tAttaInfoService.deleteByDomainId(mainId);
for (TAttaInfo info : attaInfoList) {
info.setId(null);
info.setDomainId(mainId);
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
// 预入职-人员档案表
TPreEmployeeInfo tPreEmployeeInfo = vo.getTpreEmployeeInfo();
if (tPreEmployeeInfo != null) {
if (tPreEmpEducation != null) {
if (Common.isNotNull(tPreEmpEducation.getEducationName())) {
// 5大专 6本科 7硕士 8博士
if ("5".equals(tPreEmpEducation.getEducationName())
|| "6".equals(tPreEmpEducation.getEducationName())
|| "7".equals(tPreEmpEducation.getEducationName())
|| "8".equals(tPreEmpEducation.getEducationName())) {
tPreEmployeeInfo.setIsCollege(CommonConstants.ONE_INT);
} else {
tPreEmployeeInfo.setIsCollege(CommonConstants.ZERO_INT);
}
tPreEmployeeInfo.setHignEducation(tPreEmpEducation.getEducationName());
}
tPreEmployeeInfo.setSchool(tPreEmpEducation.getSchool());
tPreEmployeeInfo.setMajor(tPreEmpEducation.getMajor());
tPreEmployeeInfo.setAdmissionDate(tPreEmpEducation.getEntryDate());
tPreEmployeeInfo.setGradutionDate(tPreEmpEducation.getGradutionDate());
}
// 生成性别年龄等:
this.setBaseSexInfo(tPreEmployeeInfo);
tPreEmployeeInfo.setPreMainId(mainId);
tPreEmployeeInfo.setCreateBy(user.getId());
tPreEmployeeInfo.setCreateName(user.getNickname());
tPreEmployeeInfo.setCreateTime(LocalDateTime.now());
// 塞计税月份标志
this.setTaxMonthAndFlag(status, tPreEmployeeInfo);
tPreEmployeeInfoService.saveOrUpdate(tPreEmployeeInfo);
}
// 预入职-项目档案表
if (tPreEmployeeProject != null) {
tPreEmployeeProject.setPreMainId(mainId);
tPreEmployeeProject.setCreateBy(user.getId());
tPreEmployeeProject.setCreateName(user.getNickname());
tPreEmployeeProject.setCreateTime(LocalDateTime.now());
tPreEmployeeProjectService.saveOrUpdate(tPreEmployeeProject);
}
// 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = vo.getTpreEmpProfessionalQualificationList();
if (tPreEmpProfessionalQualification != null) {
// 先删除后增加
tPreEmpProfessionalService.deleteProfessionalByMainId(mainId);
for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualification) {
info.setEmpIdcard(idCard);
info.setPreMainId(mainId);
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
tPreEmpProfessionalService.saveOrUpdate(info);
// 附件
if (info.getAttaList() != null && !info.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = info.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainIdAndType(info.getId(), 1);
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(info.getId());
atta.setCreateBy(user.getId());
atta.setCreateName(user.getNickname());
atta.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveBatch(attaList);
}
}
}
}
// 预入职-其他附件
List<TPreEmpOtherFile> tPreOtherFileList = vo.getTpreEmpOtherFileList();
if (tPreOtherFileList != null) {
// 先删除后增加
tPreEmpOtherFileService.deleteOtherFileByMainId(mainId);
for (TPreEmpOtherFile info : tPreOtherFileList) {
info.setPreMainId(mainId);
info.setCreateTime(LocalDateTime.now());
tPreEmpOtherFileService.saveOrUpdate(info);
// 附件
if (info.getAttaList() != null && !info.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = info.getAttaList();
if (attaList != null) {
tAttaInfoService.deleteByDomainIdAndType(info.getId(), 2);
for (TAttaInfo atta : attaList) {
atta.setId(null);
atta.setDomainId(info.getId());
atta.setCreateBy(user.getId());
atta.setCreateName(user.getNickname());
atta.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveBatch(attaList);
}
}
}
}
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecording = vo.getTpreEmpWorkRecordingList();
if (tPreEmpWorkRecording != null) {
// 先删除后增加
tPreEmpWorkRecordingService.deleteByMainId(mainId);
for (TPreEmpWorkRecording info : tPreEmpWorkRecording) {
info.setEmpIdcard(idCard);
info.setPreMainId(mainId);
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
tPreEmpWorkRecordingService.saveOrUpdateBatch(tPreEmpWorkRecording);
}
// 预入职-附件
List<TAttaInfo> attaInfoList = vo.getAttaInfoList();
if (attaInfoList != null) {
// 先删除后增加
tAttaInfoService.deleteByDomainId(mainId);
for (TAttaInfo info : attaInfoList) {
info.setId(null);
info.setDomainId(mainId);
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveBatch(attaInfoList);
}
tAttaInfoService.saveBatch(attaInfoList);
}
return R.ok("成功");
} else {
return R.failed("身份证不可为空!");
}
return R.ok("成功");
} else {
return R.failed("身份证不可为空!");
} catch (Exception e) {
log.error("档案预入职C端保存异常:", e);
throw new RuntimeException("保存失败,请联系管理员!!预入职主键【" + main.getId() +"】");
}
}
/**
* @param status 1:保存
* @Description: 获取计税月份和是否可编辑的标志
* @Author: hgw
* @Date: 2024/7/16 16:15
* @return: java.lang.String
**/
private void setTaxMonthAndFlag(String status, TPreEmployeeInfo employeeInfo) {
String taxMonth = DateUtil.getThisMonth();
employeeInfo.setTaxMonthFlag(CommonConstants.ONE_STRING);
if (CommonConstants.ONE_STRING.equals(status)) {
// 去薪资服务获取
R<String> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/getEmpTaxMonth", employeeInfo.getEmpIdcard(), String.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null && !CommonConstants.ZERO_STRING.equals(sdr.getData())) {
taxMonth = sdr.getData();
employeeInfo.setTaxMonthFlag(CommonConstants.ZERO_STRING);
}
}
employeeInfo.setTaxMonth(taxMonth);
}
private YifuUser getNewYifuUser() {
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
......@@ -1086,7 +1272,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isEmpty(tPreEmployeeProject.getTryPeriod())) {
tPreEmployeeProject.setTryPeriod("");
}
BeanUtil.copyProperties(tPreEmployeeInfo, project, ID);
// 2024-7-23 11:52:33 金龙弟预张倩倩认为不同步项目的合同信息
String[] ignoreProperties = new String[]{"id", "contractType", "workingHours", "post", "enjoinDate"
, "enjoinDate", "tryPeriod"};
BeanUtil.copyProperties(tPreEmployeeProject, project, ignoreProperties);
if (CommonConstants.ONE_INT == project.getProjectStatus()) {
project.setCreateTime(LocalDateTime.now());
project.setDeleteFlag(CommonConstants.STATUS_NORMAL);
......@@ -1113,6 +1302,43 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (emp == null) {
return R.failed("新建员工失败!");
}
// 更新或新增薪资人员
if (Common.isNotNull(tPreEmployeeInfo.getBankNo())) {
TSalaryEmployee newEmp = new TSalaryEmployee();
newEmp.setFileStatus(CommonConstants.ZERO_STRING);
newEmp.setDeptId(dept.getId());
newEmp.setDeptName(dept.getDepartName());
newEmp.setDeptNo(dept.getDepartNo());
newEmp.setUnitId(dept.getCustomerId());
newEmp.setUnitName(dept.getCustomerName());
newEmp.setUnitNo(dept.getCustomerNo());
newEmp.setCreateBy(String.valueOf(user.getId()));
newEmp.setCreateName(user.getNickname());
newEmp.setCreateTime(LocalDateTime.now());
newEmp.setUpdateBy(String.valueOf(user.getId()));
newEmp.setUpdateTime(LocalDateTime.now());
newEmp.setInvoiceTitle(dept.getInvoiceTitleSalary());
newEmp.setEmpName(tPreEmployeeInfo.getEmpName());
newEmp.setEmpIdcard(tPreEmployeeInfo.getEmpIdcard());
newEmp.setBankProvince(tPreEmployeeInfo.getBankProvince());
newEmp.setBankCity(tPreEmployeeInfo.getBankCity());
newEmp.setBankNo(tPreEmployeeInfo.getBankNo());
String taxMonth = tPreEmployeeInfo.getTaxMonth();
if (Common.isEmpty(tPreEmployeeInfo.getTaxMonth())) {
taxMonth = DateUtil.getThisMonth();
}
newEmp.setTaxMonth(taxMonth);
newEmp.setBankName(tPreEmployeeInfo.getBankName());
newEmp.setBankSubName(tPreEmployeeInfo.getBankSubName());
newEmp.setEmpPhone(tPreEmployeeInfo.getEmpPhone());
// 保存薪资人员(含判断是否有发薪)
R<String> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/savePreNewEmpInfo", newEmp, String.class, SecurityConstants.FROM_IN);
if (sdr == null || Common.isEmpty(sdr.getData())) {
return R.failed("同步薪资人员失败!");
}
}
// 3:其他附属信息
......@@ -1324,6 +1550,42 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
}
// 预入职-其他附件
List<TPreEmpOtherFile> preEmpOtherFileList = vo.getTpreEmpOtherFileList();
// 先删除其他信息
tEmpOtherFileService.deleteOtherFileByEmpId(empId);
if (preEmpOtherFileList != null && !preEmpOtherFileList.isEmpty()) {
TEmpOtherFile info;
for (TPreEmpOtherFile preInfo : preEmpOtherFileList) {
info = new TEmpOtherFile();
BeanUtil.copyProperties(preInfo, info, ID);
info.setEmpId(empId);
if (Common.isNotNull(preInfo.getOldId())) {
info.setId(preInfo.getOldId());
}
tEmpOtherFileService.save(info);
if (preInfo.getAttaList() != null && !preInfo.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = preInfo.getAttaList();
if (attaList != null) {
String attaId = preInfo.getOldId();
tAttaInfoService.deleteByDomainIdAndType(attaId, 2);
TAttaInfo newEmpAtta;
for (TAttaInfo atta : attaList) {
newEmpAtta = new TAttaInfo();
BeanUtil.copyProperties(atta, newEmpAtta, ID);
newEmpAtta.setDomainId(info.getId());
if (Common.isEmpty(atta.getCreateBy())) {
atta.setCreateBy(user.getId());
atta.setCreateName(user.getNickname());
atta.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveOrUpdate(newEmpAtta);
}
}
}
}
}
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecordingList = vo.getTpreEmpWorkRecordingList();
// 先删除其他信息
......@@ -1403,6 +1665,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isEmpty(tPreEmployeeProject.getTryPeriod())) {
tPreEmployeeProject.setTryPeriod("");
}
// 2024-7-23 11:52:33 金龙弟预张倩倩认为不同步项目的合同信息
ignoreProperties = new String[]{"id", "contractType", "workingHours", "post", "enjoinDate"
, "enjoinDate", "tryPeriod"};
BeanUtil.copyProperties(tPreEmployeeProject, project, ignoreProperties);
if (Common.isEmpty(project.getStatus())) {
project.setStatus(CommonConstants.ZERO_INT);
......@@ -1438,11 +1703,21 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
isNew = true;
emp = new TEmployeeInfo();
}
String empCode = emp.getEmpCode();
BeanUtil.copyProperties(tPreEmployeeInfo, emp, ID);
if (Common.isEmpty(emp.getEmpCode()) && Common.isNotNull(empCode)) {
emp.setEmpCode(empCode);
}
if (Common.isEmpty(emp.getEmpCode())) {
emp.setEmpCode(tEmployeeInfoService.getCode());
}
emp.setFileStatus(CommonConstants.ZERO_INT);
emp.setDeleteFlag(CommonConstants.STATUS_NORMAL);
if (isNew) {
// 新员工塞基本属性
this.setNewEmpBaseData(emp, user);
}
emp.setFileStatus(CommonConstants.ZERO_INT);
tEmployeeInfoService.saveOrUpdate(emp);
return emp;
}
......@@ -1733,6 +2008,20 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (project == null || Common.isEmpty(project.getId())) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到预入职项目档案表!"));
} else {
if (Common.isNotNull(employee.getBankNo()) && Common.isEmpty(excel.getTaxMonth())) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "有银行卡号,计税月份必填!"));
continue;
}
if (Common.isNotNull(excel.getTaxMonth())) {
String taxMonth = excel.getTaxMonth().trim();
if (!taxMonth.matches(taxMonthRegex)) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "计税月份为6位年月,例如:202407!"));
continue;
}
if (Common.isEmpty(employee.getTaxMonthFlag()) || CommonConstants.ONE_STRING.equals(employee.getTaxMonthFlag())) {
employee.setTaxMonth(excel.getTaxMonth());
}
}
employee.setEmpNatrue(excel.getEmpNatrue());
project.setEmpNatrue(excel.getEmpNatrue());
employee.setFileProvince(Integer.parseInt(excel.getFileProvince()));
......@@ -1743,6 +2032,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
employee.setFileCity(Integer.parseInt(excel.getFileCity()));
} catch (Exception e) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到市!"));
continue;
}
}
if (Common.isEmpty(excel.getFileTown())) {
......@@ -1752,6 +2042,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
employee.setFileTown(Integer.parseInt(excel.getFileTown()));
} catch (Exception e) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到县!"));
continue;
}
}
tPreEmployeeInfoService.updateById(employee);
......@@ -1777,46 +2068,51 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (preEmpMain == null || Common.isEmpty(preEmpMain.getStatus()) || !CommonConstants.TWO_STRING.equals(preEmpMain.getStatus())) {
return R.failed("请确认ID与状态!");
}
if (!CommonConstants.THREE_STRING.equals(status) && !CommonConstants.FOUR_STRING.equals(status)) {
return R.failed("审核状态不对!");
}
if (CommonConstants.THREE_STRING.equals(status) && Common.isEmpty(auditRemark)) {
return R.failed("审核不通过,原因必填!");
}
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed("未找到登录信息!");
}
preEmpMain.setStatus(status);
preEmpMain.setAuditId(user.getId());
preEmpMain.setAuditRemark(auditRemark);
preEmpMain.setAuditName(user.getNickname());
if (CommonConstants.FOUR_STRING.equals(status)) {
preEmpMain.setAuditTime(new Date());
}
// 审核日志
TPreEmpMainLog auditLog = new TPreEmpMainLog();
auditLog.setAuditId(user.getId());
auditLog.setAuditName(user.getNickname());
auditLog.setAuditTime(new Date());
auditLog.setAuditRemark(auditRemark);
auditLog.setMainId(preEmpMain.getId());
auditLog.setAuditResult(status);
R<PreEmpMainDetailVo> voR = this.getInfoById(id);
if (voR != null && voR.getCode() == CommonConstants.SUCCESS) {
// 转到更新档案去
PreEmpMainDetailVo vo = voR.getData();
tPreEmpMainLogService.save(auditLog);
this.updateById(preEmpMain);
try {
if (!CommonConstants.THREE_STRING.equals(status) && !CommonConstants.FOUR_STRING.equals(status)) {
return R.failed("审核状态不对!");
}
if (CommonConstants.THREE_STRING.equals(status) && Common.isEmpty(auditRemark)) {
return R.failed("审核不通过,原因必填!");
}
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed("未找到登录信息!");
}
preEmpMain.setStatus(status);
preEmpMain.setAuditId(user.getId());
preEmpMain.setAuditRemark(auditRemark);
preEmpMain.setAuditName(user.getNickname());
if (CommonConstants.FOUR_STRING.equals(status)) {
return updateToEmployeeByPre(vo);
preEmpMain.setAuditTime(new Date());
}
// 审核日志
TPreEmpMainLog auditLog = new TPreEmpMainLog();
auditLog.setAuditId(user.getId());
auditLog.setAuditName(user.getNickname());
auditLog.setAuditTime(new Date());
auditLog.setAuditRemark(auditRemark);
auditLog.setMainId(preEmpMain.getId());
auditLog.setAuditResult(status);
R<PreEmpMainDetailVo> voR = this.getInfoById(id);
if (voR != null && voR.getCode() == CommonConstants.SUCCESS) {
// 转到更新档案去
PreEmpMainDetailVo vo = voR.getData();
tPreEmpMainLogService.save(auditLog);
this.updateById(preEmpMain);
if (CommonConstants.FOUR_STRING.equals(status)) {
return updateToEmployeeByPre(vo);
} else {
return R.ok("已审核");
}
} else {
return R.ok("已审核");
return R.failed("未找到信息,未审核!");
}
} else {
return R.failed("未找到信息,未审核!");
} catch (Exception e) {
log.error("档案预入职审核异常:", e);
throw new RuntimeException("保存失败,请联系管理员!!预入职主键【" + preEmpMain.getId() +"】");
}
}
......
/*
* 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);
......
//package com.yifu.cloud.plus.v1.ekp.service.impl;
//
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import com.icbc.api.DefaultIcbcClient;
//import com.icbc.api.IcbcApiException;
//import com.icbc.api.IcbcConstants;
//import com.icbc.api.request.JftApiB2bpayTransqueryRequestV1;
//import com.icbc.api.request.JftApiPayB2bpayGenpreorderRequestV1;
//import com.icbc.api.response.JftApiB2bpayTransqueryResponseV1;
//import com.icbc.api.response.JftApiPayB2bpayGenpreorderResponseV1;
//import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties;
//import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
//import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.log4j.Log4j2;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.stereotype.Service;
//
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * 聚富通到账通知交易流水查询
// *
// * @author huyc
// * @date 2024-05-23 11:21:56
// */
//@Log4j2
//@Service
//@RequiredArgsConstructor
//@EnableConfigurationProperties(IcbcConfigProperties.class)
//public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements IcbcTransactionFlowQueryService {
//
// @Autowired
// private IcbcConfigProperties icbcConfigProperties;
//
// public R getIcbcTransactionFlow() {
// //应用id 应用方私钥 网关公钥 应用方加密串
// String APP_ID = "11000000000000015602";
// //应用方私钥
// String MY_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCudy1tOyVTSCjJD9ej/IXmIKHTBLJ3FPYyhUnAt65hXgTD7OJso3+1cc+AakLGTLrSm9pxxd2AsUkVbdYFsXyq0rQOkG71ULPrzYI/XfbIcjf8dleFkTlEi+bVNN3J3LzbY4uPhPztDbkcwBoawl1jhcGTkFdIUCfJ8s9zXAAKgHjeNLXwrdnfvlTn8sfJX3JvrQ9W1Ji2NhCzAg7/fgJ9wAmS+aWKKBuc3ge5DQYcTtIe8hBeKSh6WZkjdUOja6ytOwEGCA3KiCVTw42rP/njrMAR3rh2ptXQtlLekMIEtiN3QAnIWp8IDg8uBEKr0aye6m/IfKMNpbbyaKqaeBUhAgMBAAECggEAOp0rk+ElHx/FJBfAeQWj7rbT51NSqhNOy5ZgOvD7ExdFPpXdVGZxx4HfFuOcX4bz1UIrV8IEMvJc/WgTWYJRwgpcF/CKdryQVg6LTcLB4IIPMTCJIwSxWsgt2z+Rq/oPMR32i1dAqlvL707S9l6KhZ8wc+UwjcjwNTbwX29vTBdiTsFS6QJBaUytu+nHoHvVrpg4botifiokHR1JX0hWjxP/Dh29aooaIbSu80A2sRPLIvRtCzxGjfcZP+H1ZtE439SCguuI+pOqWWLmzUV743PkGPpYPnYXadajrYBz8R5Uysm0tRwV4Ir4TxeH9axUP4Z/agldDNk/xBtK+PcgAQKBgQDwtUjrnzm29w/IwZHHCNDYtqZV2N42WrZZQusUbJ92QXsPFJpe4LCG4Ek7OYONuKuGfK/KJ2vZzlf+HlxlG7D+Xq/5Cb5LbZtIdIkLceOt+omfwHDVTqCM0jodNWKoYBQtI6PsksHpWtAkzP5kGSj7IabaJwKD0wxcbHvs5VFWoQKBgQC5jJFEfUAFGlPSoABdq8BQoaJZg976msnAy2QJMZRG/iEMywHTKFhMBkk3d0qpphdgHJQUr/gMcUtx9zlRBbvY30IOnpM9+nYqRXXlffqYIByM+PeO7AyihYrFpWlVdOO/ezp0VN0QZ8XwlkaYcvADae53C8K7DKtkLlDV71qugQKBgQDstzspDIMznbAWG9aCx/aqyKS3k/ijt33QNnD8uv3uy+J7KCXP3GN9oKAj8CGhg9SbA4/U3APCRJxgOfdfL2ZWIUQpQx2zC+1DyebkLHJdrB8fzZ6pBxP4qN2hz9hgAWyWH5CbnI+6Lya2qioawmt83NE7hFWC0lA7rCwLAlGFQQKBgBmpf03hpMEP6xfuWR6banW8ZR/MRUKTteOcPbGn0cIf06JZUV9K7StWkznAnerotcLtMO3LiJrv8GdKsfqquFg+SHyNIgAoa79c6/lZexcfGdPFezehHf48Sf0b632ONRF+kY8VTZ2/PHkRz6G2A8v1Eq4USlJkZi/s1/E+sWQBAoGAMU8mm9SGWka1hPYOI3ONCzeBbRBNulcS7B7luGcEbhPwi0p77xciSUy64GSVjZboD/DX9n3m7rU2GIqr50gkpQuTW9N9PNr7z74Tk36bCp5MpEeybMOgv8hovEQBa5PoTbAm9qMf9Xm1whQXUzhjcWR7vT4qAg1A+QXX58G9EkA=";
// //网关公钥
// String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB";
// //应用方加密串
// String AES_Key = "5xGJdh7qb+B95SUoxDlatg==";
// DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2,
// MY_PRIVATE_KEY, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, APIGW_PUBLIC_KEY,
// AES_Key, icbcConfigProperties.getAesKey(), "", "");
// JftApiB2bpayTransqueryRequestV1 request = new JftApiB2bpayTransqueryRequestV1();
// request.setServiceUrl("https://apipcs3.dccnet.com.cn/api/jft/api/b2bpay/transquery/V1");
//
// JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz bizContent = new
// JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz();
// bizContent.setAppId(APP_ID);
//// bizContent.setOutVendorId("955888");
//// bizContent.setOutUserId("874");
// bizContent.setCardNo("9558830200003786563");
//// bizContent.setPayAccount("0200000309200211917");
// bizContent.setStartTrxDate("20240401");
package com.yifu.cloud.plus.v1.ekp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.icbc.api.DefaultIcbcClient;
import com.icbc.api.IcbcApiException;
import com.icbc.api.IcbcConstants;
import com.icbc.api.request.JftApiB2bpayTransqueryRequestV1;
import com.icbc.api.request.JftApiPayB2bpayGenpreorderRequestV1;
import com.icbc.api.response.JftApiB2bpayTransqueryResponseV1;
import com.icbc.api.response.JftApiPayB2bpayGenpreorderResponseV1;
import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* 聚富通到账通知交易流水查询
*
* @author huyc
* @date 2024-05-23 11:21:56
*/
@Log4j2
@Service
@RequiredArgsConstructor
@EnableConfigurationProperties(IcbcConfigProperties.class)
public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements IcbcTransactionFlowQueryService {
@Autowired
private IcbcConfigProperties icbcConfigProperties;
public R getIcbcTransactionFlow() {
//应用id 应用方私钥 网关公钥 应用方加密串
String APP_ID = "11000000000000028685";
//应用方私钥
String MY_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCEZYrhm3dBp3PqlMc9fBBEE8Tp8M34Yy6Ucs3FV/VahsdHaLe0kEPugf1twbt/hD4hdIwzUj/ZtG2BhusRiMptdlWtNKcIgFxaaFaKANKrIodeQjv0jjZvK9ugoQxmiM4gF5SGX2a847zohv/6TvAYiB9AI3tdKQTbj6I3pwmuO3cfzgU5IwepeguE4fxqnh7C19MEq4vXv0yBq/f43zQ2HBMS+KRgokNLUBqoEOyfaKkPL9ot+zISPwENQOLqQMZ1hczp5tEB2FeZecdzrzjeXkzPSy1ZJmNyNuOl+WG85aoeDJTQ7hx/g6KFA6zU2VBGUR7q4pXdGRslpa6KYETBAgMBAAECggEALkfElXqf5G5hocWiJAcDNJjog5JunX4mITREY9CMbrmgXYDofpDTfkMoUL6hCUEz6sPv4lzE/xgIE3gTIcz8Xek4p9Q480rTfbLtVU5WVgY65aMnjCROOOxO2MaTLCB0VVmIzLP6mNrPBUVzo48GdLzYl7YPgJA/J3T9EpEsXB/iAdjiv/VH9vOIW6WUlQUSceyNznf1rfwMJvHt7zb56IJGZMq9G6C5SUeqWbqbvNi+nL8yeu8fM/O/ERZJQBDwMXbRAPvhhcbDwVzpg4BRc7AVv0SLzy6ZA2+zLJmDe9F9uXmG6QQ4ra8mDqLeugDP9blKUOEm8JLIh7nzvhpNhQKBgQDK4ZEz1zui6GQsxsnbm24EvparfniPqDBS/V29MDZysXDmG123R22RA//BWC3m5cY+3vg0ayCGaXRrc9/V+u+jmwVfsR6XCM6WM2IZVVFBUzqKMlTKsZ4n3V/6pqBHG8++GUab5W6p/7NYI22xx0ZFObEt4EkaaaP7RzY6AVrtCwKBgQCnD6P24uR6VHN84lhyZl+iJW6azTd26AhaJ768wSl5rqN6N4AV9cXeAUKylPgMPvy+2mjNX7He0Oitb7/lrKK93/olmDQoHpqj1yZum8VVPiyEKk6qCoYYoHEloLPJDPRs6yiBjrO8oghHRuyJErKRN6IZC3Rq/mrXuDwrZYS84wKBgFn9wDisigly56xs6PD+esij+ZVMXhHq2rSVKlVW42/wgVGwZdt8VX9ztKiAgqve1BbjNFmcAytb74YSOgFic5Wwl6uglx8LiwdY93ShQY+maVsPhEj8jFjGe2JlMscX8QgzkfxowrOpdlXsMSYgbG0ccBkXWZXbsh8tsUH9g+WNAoGAbQ5avOo0uF603Uts7ZFC0Lia0Vcx499oxGG5s8Js7tBAS6I7bRp5xokQHz/8BRKBL52oWJklpgy+N6oBnU7rFgRGaZBITABedqIWppHtac4ihUyQ+ZPRIfZqpmOXuaFJVmjUkm6zimpD+TOlaX3ZL88fdDX0E3xuBtBwBuxIkH0CgYEAlXyBbG2/fVV/PDUVCAA+aeWstojR1ncDhJmFnENSk5I/y3mh+d+u4ZG3hmVQZfR1EYM+n9wPQ2LxqNpGPA8o4JK/MSfVKun4lBwjkergHzxWJ5AMuYL1DPrOtMPEqrTqOHfVzSZGsz9cMK4tDWETKKFBOM/5oSdGGW3oYvzcS0M=";
//网关公钥
String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB";
//应用方加密串
String AES_Key = "8jTKCqZ9035g+HRzpZQqZA==";
DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2,
MY_PRIVATE_KEY, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, APIGW_PUBLIC_KEY,
IcbcConstants.ENCRYPT_TYPE_AES, AES_Key, "", "");
JftApiB2bpayTransqueryRequestV1 request = new JftApiB2bpayTransqueryRequestV1();
request.setServiceUrl("https://gw.open.icbc.com.cn/api/jft/api/b2bpay/transquery/V1");
JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz bizContent = new
JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz();
bizContent.setAppId(APP_ID);
// bizContent.setOutVendorId("130290000436004");
// bizContent.setOutUserId("874");
bizContent.setCardNo("1302010109024596014");
// bizContent.setPayAccount("0200000309200211917");
// bizContent.setStartTrxDate("20240301");
// bizContent.setEndTrxDate("20240730");
// bizContent.setStartId("1");
// bizContent.setEndId("50");
// request.setBizContent(bizContent);
// JftApiB2bpayTransqueryResponseV1 response;
// try {
// //到账通知交易流水查询
// response = client.execute(request);
// log.info(request.toString());
// log.info(response.toString());
// if ("00".equals(response.getStatus())) {
// return R.ok();
// } else {
// return R.failed();
// }
// } catch (IcbcApiException e) {
// e.printStackTrace();
// return R.ok();
// }
// }
//
// public R saveIcbcManagerCard() {
// //应用id 应用方私钥 网关公钥 应用方加密串
// String APP_ID = "11000000000000015602";
// //应用方私钥
// String MY_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCudy1tOyVTSCjJD9ej/IXmIKHTBLJ3FPYyhUnAt65hXgTD7OJso3+1cc+AakLGTLrSm9pxxd2AsUkVbdYFsXyq0rQOkG71ULPrzYI/XfbIcjf8dleFkTlEi+bVNN3J3LzbY4uPhPztDbkcwBoawl1jhcGTkFdIUCfJ8s9zXAAKgHjeNLXwrdnfvlTn8sfJX3JvrQ9W1Ji2NhCzAg7/fgJ9wAmS+aWKKBuc3ge5DQYcTtIe8hBeKSh6WZkjdUOja6ytOwEGCA3KiCVTw42rP/njrMAR3rh2ptXQtlLekMIEtiN3QAnIWp8IDg8uBEKr0aye6m/IfKMNpbbyaKqaeBUhAgMBAAECggEAOp0rk+ElHx/FJBfAeQWj7rbT51NSqhNOy5ZgOvD7ExdFPpXdVGZxx4HfFuOcX4bz1UIrV8IEMvJc/WgTWYJRwgpcF/CKdryQVg6LTcLB4IIPMTCJIwSxWsgt2z+Rq/oPMR32i1dAqlvL707S9l6KhZ8wc+UwjcjwNTbwX29vTBdiTsFS6QJBaUytu+nHoHvVrpg4botifiokHR1JX0hWjxP/Dh29aooaIbSu80A2sRPLIvRtCzxGjfcZP+H1ZtE439SCguuI+pOqWWLmzUV743PkGPpYPnYXadajrYBz8R5Uysm0tRwV4Ir4TxeH9axUP4Z/agldDNk/xBtK+PcgAQKBgQDwtUjrnzm29w/IwZHHCNDYtqZV2N42WrZZQusUbJ92QXsPFJpe4LCG4Ek7OYONuKuGfK/KJ2vZzlf+HlxlG7D+Xq/5Cb5LbZtIdIkLceOt+omfwHDVTqCM0jodNWKoYBQtI6PsksHpWtAkzP5kGSj7IabaJwKD0wxcbHvs5VFWoQKBgQC5jJFEfUAFGlPSoABdq8BQoaJZg976msnAy2QJMZRG/iEMywHTKFhMBkk3d0qpphdgHJQUr/gMcUtx9zlRBbvY30IOnpM9+nYqRXXlffqYIByM+PeO7AyihYrFpWlVdOO/ezp0VN0QZ8XwlkaYcvADae53C8K7DKtkLlDV71qugQKBgQDstzspDIMznbAWG9aCx/aqyKS3k/ijt33QNnD8uv3uy+J7KCXP3GN9oKAj8CGhg9SbA4/U3APCRJxgOfdfL2ZWIUQpQx2zC+1DyebkLHJdrB8fzZ6pBxP4qN2hz9hgAWyWH5CbnI+6Lya2qioawmt83NE7hFWC0lA7rCwLAlGFQQKBgBmpf03hpMEP6xfuWR6banW8ZR/MRUKTteOcPbGn0cIf06JZUV9K7StWkznAnerotcLtMO3LiJrv8GdKsfqquFg+SHyNIgAoa79c6/lZexcfGdPFezehHf48Sf0b632ONRF+kY8VTZ2/PHkRz6G2A8v1Eq4USlJkZi/s1/E+sWQBAoGAMU8mm9SGWka1hPYOI3ONCzeBbRBNulcS7B7luGcEbhPwi0p77xciSUy64GSVjZboD/DX9n3m7rU2GIqr50gkpQuTW9N9PNr7z74Tk36bCp5MpEeybMOgv8hovEQBa5PoTbAm9qMf9Xm1whQXUzhjcWR7vT4qAg1A+QXX58G9EkA=";
// //网关公钥
// String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB";
// //应用方加密串
// String AES_Key = "5xGJdh7qb+B95SUoxDlatg==";
// DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2,
// MY_PRIVATE_KEY, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON,
// APIGW_PUBLIC_KEY, IcbcConstants.ENCRYPT_TYPE_AES, AES_Key, null, null);
// JftApiPayB2bpayGenpreorderRequestV1 request = new JftApiPayB2bpayGenpreorderRequestV1();
// request.setServiceUrl("https://apipcs3.dccnet.com.cn/api/jft/api/pay/b2bpay/genpreorder/V1");
// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz bizContent =
// new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz();
// bizContent.setAppId(APP_ID);
// bizContent.setOutOrderId("202406200000066688");
// bizContent.setPayMethod("05");
// bizContent.setMultiRecFlag("0");
// bizContent.setStlFlag("0");
// bizContent.setAsynFlag("0");
// bizContent.setOutVendorId("158742714");
// bizContent.setOutUserId("0202401200000000039");
//// bizContent.setRecAcctId("123654123");
//// bizContent.setPayerAcctId("1001765234");
// bizContent.setTradeTime("2024-06-21 10:41:56");
// bizContent.setTrxChannel("01");
// bizContent.setTrxIp("172.16.24.98");
// bizContent.setPayModeTool("5");
// bizContent.setPayPhoneno("18856151558");
// bizContent.setPayerType("1");
// bizContent.setOrderAmount("2.00");
// bizContent.setPayAmount("2.00");
// bizContent.setFloatRate("888");
// bizContent.setProvince("安徽");
// bizContent.setCity("合肥市");
// bizContent.setCounty("包河区");
// bizContent.setEmail("123456@icbc.com");
// bizContent.setPhone("1388888888");
// bizContent.setAddress("安徽");
// bizContent.setPost("5168845");
// bizContent.setPayRem("试一下");
// bizContent.setOrderRem("食品");
// bizContent.setAddRemark("食品");
// bizContent.setPayerName("aigc科技集团");
// bizContent.setPayerAcctNum("0200062009212528888");
// bizContent.setCurrency("001");
// bizContent.setPayerWalletId("1234567890123456789012");
// bizContent.setPayerWalletName("XXXXX有限公司");
// bizContent.setNotifyUrl("http://www.xxx.com");
// bizContent.setJumpUrl("http://www.xxx.com");
bizContent.setStartId("1");
bizContent.setEndId("50");
request.setBizContent(bizContent);
JftApiB2bpayTransqueryResponseV1 response;
try {
//到账通知交易流水查询
response = client.execute(request);
log.error("到账通知交易流水状态" + response.getStatus());
log.error("到账通知交易流水结果" + response.getErrordesc());
if ("00".equals(response.getStatus())) {
return R.ok(response.getDatalist());
} else {
return R.failed();
}
} catch (IcbcApiException e) {
e.printStackTrace();
return R.ok();
}
}
public R saveIcbcManagerCard() {
//应用id 应用方私钥 网关公钥 应用方加密串
String APP_ID = "11000000000000015602";
//应用方私钥
String MY_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCudy1tOyVTSCjJD9ej/IXmIKHTBLJ3FPYyhUnAt65hXgTD7OJso3+1cc+AakLGTLrSm9pxxd2AsUkVbdYFsXyq0rQOkG71ULPrzYI/XfbIcjf8dleFkTlEi+bVNN3J3LzbY4uPhPztDbkcwBoawl1jhcGTkFdIUCfJ8s9zXAAKgHjeNLXwrdnfvlTn8sfJX3JvrQ9W1Ji2NhCzAg7/fgJ9wAmS+aWKKBuc3ge5DQYcTtIe8hBeKSh6WZkjdUOja6ytOwEGCA3KiCVTw42rP/njrMAR3rh2ptXQtlLekMIEtiN3QAnIWp8IDg8uBEKr0aye6m/IfKMNpbbyaKqaeBUhAgMBAAECggEAOp0rk+ElHx/FJBfAeQWj7rbT51NSqhNOy5ZgOvD7ExdFPpXdVGZxx4HfFuOcX4bz1UIrV8IEMvJc/WgTWYJRwgpcF/CKdryQVg6LTcLB4IIPMTCJIwSxWsgt2z+Rq/oPMR32i1dAqlvL707S9l6KhZ8wc+UwjcjwNTbwX29vTBdiTsFS6QJBaUytu+nHoHvVrpg4botifiokHR1JX0hWjxP/Dh29aooaIbSu80A2sRPLIvRtCzxGjfcZP+H1ZtE439SCguuI+pOqWWLmzUV743PkGPpYPnYXadajrYBz8R5Uysm0tRwV4Ir4TxeH9axUP4Z/agldDNk/xBtK+PcgAQKBgQDwtUjrnzm29w/IwZHHCNDYtqZV2N42WrZZQusUbJ92QXsPFJpe4LCG4Ek7OYONuKuGfK/KJ2vZzlf+HlxlG7D+Xq/5Cb5LbZtIdIkLceOt+omfwHDVTqCM0jodNWKoYBQtI6PsksHpWtAkzP5kGSj7IabaJwKD0wxcbHvs5VFWoQKBgQC5jJFEfUAFGlPSoABdq8BQoaJZg976msnAy2QJMZRG/iEMywHTKFhMBkk3d0qpphdgHJQUr/gMcUtx9zlRBbvY30IOnpM9+nYqRXXlffqYIByM+PeO7AyihYrFpWlVdOO/ezp0VN0QZ8XwlkaYcvADae53C8K7DKtkLlDV71qugQKBgQDstzspDIMznbAWG9aCx/aqyKS3k/ijt33QNnD8uv3uy+J7KCXP3GN9oKAj8CGhg9SbA4/U3APCRJxgOfdfL2ZWIUQpQx2zC+1DyebkLHJdrB8fzZ6pBxP4qN2hz9hgAWyWH5CbnI+6Lya2qioawmt83NE7hFWC0lA7rCwLAlGFQQKBgBmpf03hpMEP6xfuWR6banW8ZR/MRUKTteOcPbGn0cIf06JZUV9K7StWkznAnerotcLtMO3LiJrv8GdKsfqquFg+SHyNIgAoa79c6/lZexcfGdPFezehHf48Sf0b632ONRF+kY8VTZ2/PHkRz6G2A8v1Eq4USlJkZi/s1/E+sWQBAoGAMU8mm9SGWka1hPYOI3ONCzeBbRBNulcS7B7luGcEbhPwi0p77xciSUy64GSVjZboD/DX9n3m7rU2GIqr50gkpQuTW9N9PNr7z74Tk36bCp5MpEeybMOgv8hovEQBa5PoTbAm9qMf9Xm1whQXUzhjcWR7vT4qAg1A+QXX58G9EkA=";
//网关公钥
String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB";
//应用方加密串
String AES_Key = "5xGJdh7qb+B95SUoxDlatg==";
DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2,
MY_PRIVATE_KEY, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON,
APIGW_PUBLIC_KEY, IcbcConstants.ENCRYPT_TYPE_AES, AES_Key, null, null);
JftApiPayB2bpayGenpreorderRequestV1 request = new JftApiPayB2bpayGenpreorderRequestV1();
request.setServiceUrl("https://apipcs3.dccnet.com.cn/api/jft/api/pay/b2bpay/genpreorder/V1");
JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz bizContent =
new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz();
bizContent.setAppId(APP_ID);
bizContent.setOutOrderId("202406200000066688");
bizContent.setPayMethod("05");
bizContent.setMultiRecFlag("0");
bizContent.setStlFlag("0");
bizContent.setAsynFlag("0");
bizContent.setOutVendorId("158742714");
bizContent.setOutUserId("0202401200000000039");
// bizContent.setRecAcctId("123654123");
// bizContent.setPayerAcctId("1001765234");
bizContent.setTradeTime("2024-06-21 10:41:56");
bizContent.setTrxChannel("01");
bizContent.setTrxIp("172.16.24.98");
bizContent.setPayModeTool("5");
bizContent.setPayPhoneno("18856151558");
bizContent.setPayerType("1");
bizContent.setOrderAmount("2.00");
bizContent.setPayAmount("2.00");
bizContent.setFloatRate("888");
bizContent.setProvince("安徽");
bizContent.setCity("合肥市");
bizContent.setCounty("包河区");
bizContent.setEmail("123456@icbc.com");
bizContent.setPhone("1388888888");
bizContent.setAddress("安徽");
bizContent.setPost("5168845");
bizContent.setPayRem("试一下");
bizContent.setOrderRem("食品");
bizContent.setAddRemark("食品");
bizContent.setPayerName("aigc科技集团");
bizContent.setPayerAcctNum("0200062009212528888");
bizContent.setCurrency("001");
bizContent.setPayerWalletId("1234567890123456789012");
bizContent.setPayerWalletName("XXXXX有限公司");
bizContent.setNotifyUrl("http://www.xxx.com");
bizContent.setJumpUrl("http://www.xxx.com");
JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good
goodsInfo = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good();
goodsInfo.setGoodsSeqno("1");
goodsInfo.setGoodsName("牛肉干");
goodsInfo.setGoodsNum("10");
goodsInfo.setGoodsAmt("10");
goodsInfo.setWeight("肉干");
goodsInfo.setPrice("50");
goodsInfo.setSellerAddress("13866668");
goodsInfo.setSellerName("牛大");
goodsInfo.setUnits("斤");
goodsInfo.setOutVendorId("158742714");
// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good
// goodsInfo = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good();
// goodsInfo.setGoodsSeqno("1");
// goodsInfo.setGoodsName("牛肉干");
// goodsInfo.setGoodsNum("10");
// goodsInfo.setGoodsAmt("10");
// goodsInfo.setWeight("肉干");
// goodsInfo.setPrice("50");
// goodsInfo.setSellerAddress("13866668");
// goodsInfo.setSellerName("牛大");
// goodsInfo.setUnits("斤");
// goodsInfo.setOutVendorId("158742714");
//// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good
//// goodsInfo2 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good();
//// goodsInfo2.setGoodsSeqno("2");
//// goodsInfo2.setGoodsName("商品");
//// goodsInfo2.setGoodsNum("10");
//// goodsInfo2.setGoodsAmt("10");
//// goodsInfo2.setWeight("商品规格");
//// goodsInfo2.setPrice("50");
//// goodsInfo2.setSellerAddress("13866668");
//// goodsInfo2.setSellerName("张三");
//// goodsInfo2.setUnits("斤");
//// goodsInfo2.setOutVendorId("158742714");
// List<JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good> goodList = new ArrayList<>();
// goodList.add(goodsInfo);
//// goodList.add(goodsInfo2);
// bizContent.setGoodsInfo(goodList);
// goodsInfo2 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good();
// goodsInfo2.setGoodsSeqno("2");
// goodsInfo2.setGoodsName("商品");
// goodsInfo2.setGoodsNum("10");
// goodsInfo2.setGoodsAmt("10");
// goodsInfo2.setWeight("商品规格");
// goodsInfo2.setPrice("50");
// goodsInfo2.setSellerAddress("13866668");
// goodsInfo2.setSellerName("张三");
// goodsInfo2.setUnits("斤");
// goodsInfo2.setOutVendorId("158742714");
List<JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good> goodList = new ArrayList<>();
goodList.add(goodsInfo);
// goodList.add(goodsInfo2);
bizContent.setGoodsInfo(goodList);
JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo
recInfo1 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo();
recInfo1.setOutVendorId("158742714");
recInfo1.setRecAcctId("123654123");
recInfo1.setTrxAmount("2.00");
recInfo1.setOrderAmount("2.00");
// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo
// recInfo1 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo();
// recInfo1.setOutVendorId("158742714");
// recInfo1.setRecAcctId("123654123");
// recInfo1.setTrxAmount("2.00");
// recInfo1.setOrderAmount("2.00");
//// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo
//// recInfo2 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo();
//// recInfo2.setOutVendorId("158742714");
//// recInfo2.setRecAcctId("04187335");
//// recInfo2.setTrxAmount("1.00");
//// recInfo2.setOrderAmount("1.00");
// List<JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo> recList = new ArrayList<>();
// recList.add(recInfo1);
//// recList.add(recInfo2);
// bizContent.setRecList(recList);
// bizContent.setSummary("测试一下");
// bizContent.setPurpose("测试一下");
// request.setBizContent(bizContent);
// try {
// JftApiPayB2bpayGenpreorderResponseV1 responseV1 = client.execute(request);
// if ("00".equals(responseV1.getStatus())) {
// return R.ok();
// } else {
// return R.failed();
// }
// } catch (IcbcApiException e) {
// e.printStackTrace();
// return R.ok();
// }
// }
//}
// recInfo2 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo();
// recInfo2.setOutVendorId("158742714");
// recInfo2.setRecAcctId("04187335");
// recInfo2.setTrxAmount("1.00");
// recInfo2.setOrderAmount("1.00");
List<JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo> recList = new ArrayList<>();
recList.add(recInfo1);
// recList.add(recInfo2);
bizContent.setRecList(recList);
bizContent.setSummary("测试一下");
bizContent.setPurpose("测试一下");
request.setBizContent(bizContent);
try {
JftApiPayB2bpayGenpreorderResponseV1 responseV1 = client.execute(request);
if ("00".equals(responseV1.getStatus())) {
return R.ok();
} else {
return R.failed();
}
} catch (IcbcApiException e) {
e.printStackTrace();
return R.ok();
}
}
}
......@@ -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);
}
......
package com.yifu.cloud.plus.v1.yifu.salary.util;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
......@@ -74,6 +75,11 @@ public class SalaryAccountUtil implements Serializable {
, Map<String, Integer> ownDeptMap, TSalaryAccountService tSalaryAccountService, Map<String, String> bankMap) {
String jsonStr = vo.getJsonString();
String salaryType = vo.getSalaryType();
// 新员工是否更新:0否;1是 hgw 2024-7-18 16:36:31
String newEmpUpdateFlag = vo.getNewEmpUpdateFlag();
if (Common.isEmpty(newEmpUpdateFlag)) {
newEmpUpdateFlag = CommonConstants.ZERO_STRING;
}
Integer isIssue = vo.getIsIssue();
if (Common.isEmpty(isIssue)) {
isIssue = 0;
......@@ -137,6 +143,11 @@ public class SalaryAccountUtil implements Serializable {
boolean notLabour = !CommonConstants.THREE_STRING.equals(salaryType);
// 连接查询的数据集合
List<TSalaryEmployee> updateEmpList = new ArrayList<>();
// 2024-7-22 10:16:42 hgw 更新卡号等信息
List<TSalaryEmployee> updateEmpBankList = new ArrayList<>();
// 2024-7-22 10:16:42 hgw 更新卡号等信息,存储旧人员信息,以增加更新记录使用
Map<String, TSalaryEmployee> updateEmpBankMap = new HashMap<>();
List<TSalaryEmployee> checkBankInfoEmpList = new ArrayList<>();
List<TSalaryEmployee> newEmpList = new ArrayList<>();
Map<String, TSalaryAccountVo> entityMap = new HashMap<>();
......@@ -468,9 +479,12 @@ public class SalaryAccountUtil implements Serializable {
otherIdCard.add(newEmp.getEmpIdcard());
}
if (emp != null) {
// 新员工是否更新:0否;1是 hgw 2024-7-18 16:36:31
// newEmpUpdateFlag = CommonConstants.ZERO_STRING
if (setEntityByEmpInfo(dept, ownEmployeeMap, ownDeptMap, salaryType, isIssue, errorList
, entity, emp, saiList, salaryGiveTimeFlag, isNewEmployee, empName, salaryStyle
, nowMonth, updateEmpList, checkBankInfoEmpList, i + dataRow, bankMap))
, nowMonth, updateEmpList, checkBankInfoEmpList, i + dataRow, bankMap
, newEmpUpdateFlag, updateEmpBankList, updateEmpBankMap))
continue;
}
if (saiList != null && !saiList.isEmpty()) {
......@@ -516,7 +530,9 @@ public class SalaryAccountUtil implements Serializable {
}
// 统一处理连接查询
tSalaryEmployeeService.updateBatchById(updateEmpList);
if (updateEmpList != null && !updateEmpList.isEmpty()) {
tSalaryEmployeeService.updateBatchById(updateEmpList);
}
if (!checkBankInfoEmpList.isEmpty()) {
// 本次不为代发户,并且薪资人员里的代发户标记没去掉,要校验银行卡
tSalaryEmployeeService.checkBankInfoList(checkBankInfoEmpList, errorList);
......@@ -566,7 +582,8 @@ public class SalaryAccountUtil implements Serializable {
, CommonConstants.ZERO_STRING.equals(entity.getSalaryGiveTime())
, CommonConstants.ONE_STRING.equals(entity.getIsNewEmployee())
, otherEmp.getEmpName(), entity.getSalaryStyle()
, nowMonth, updateEmpList, checkBankInfoEmpList, newEmps.getLineNums() + dataRow, bankMap)) {
, nowMonth, updateEmpList, checkBankInfoEmpList, newEmps.getLineNums() + dataRow
, bankMap, newEmpUpdateFlag, updateEmpBankList, updateEmpBankMap)) {
isContinue = false;
}
}
......@@ -594,9 +611,32 @@ public class SalaryAccountUtil implements Serializable {
}
}
}
if (!updateEmpBankList.isEmpty()) {
TSalaryEmployee saveNewEmp;
for (int i = 0; i < updateEmpBankList.size(); i++) {
saveNewEmp = updateEmpBankList.get(i);
// 新员工校验计税月
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
entity = entityMap.get(saveNewEmp.getEmpIdcard());
minTaxMonth = minTaxMonthMap.get(saveNewEmp.getEmpIdcard());
if (Common.isNotNull(minTaxMonth)
&& !minTaxMonth.equals(entity.getTaxMonth())) {
error = "第" + (saveNewEmp.getLineNums() + dataRow) + "行:该员工已有发薪记录,计税月份请填写:【" + minTaxMonth + "】" + ",你填写了计税月:【" + entity.getTaxMonth() + "】";
errorList.add(new ErrorMessage((saveNewEmp.getLineNums() + dataRow), error));
canSave = false;
}
}
}
}
if (canSave) {
// 新增
tSalaryEmployeeService.saveNewEmployeeList(saveNewEmpList, errorList);
if (!saveNewEmpList.isEmpty()) {
tSalaryEmployeeService.saveNewEmployeeList(saveNewEmpList, errorList);
}
// 更新人员信息
if (!updateEmpBankList.isEmpty()) {
tSalaryEmployeeService.updateEmployeeBankList(updateEmpBankList, updateEmpBankMap, errorList);
}
}
}
}
......@@ -609,13 +649,25 @@ public class SalaryAccountUtil implements Serializable {
this.setErrorInfo(errorList);
}
// updateEmpBankList hgw 2024-7-22 10:18:02 更新开户行卡号等信息,以表导入为准
private boolean setEntityByEmpInfo(TSettleDomainSelectVo dept, Map<String, Integer> ownEmployeeMap
, Map<String, Integer> ownDeptMap, String salaryType, Integer isIssue, List<ErrorMessage> errorList
, TSalaryAccountVo entity, TSalaryEmployee emp, List<TSalaryAccountItemVo> saiList
, boolean salaryGiveTimeFlag, boolean isNewEmployee, String empName, String salaryStyle, String nowMonth
, List<TSalaryEmployee> updateEmpList, List<TSalaryEmployee> checkBankInfoEmpList, int i, Map<String, String> bankMap) {
, List<TSalaryEmployee> updateEmpList, List<TSalaryEmployee> checkBankInfoEmpList, int i
, Map<String, String> bankMap, String newEmpUpdateFlag, List<TSalaryEmployee> updateEmpBankList
, Map<String, TSalaryEmployee> updateEmpBankMap) {
TSalaryAccountItemVo sai;
String error;
emp.setLineNums(i);
if (dept != null && dept.getId() != null && !dept.getId().equals(emp.getDeptId())) {
emp.setDeptId(dept.getId());
emp.setDeptName(dept.getDepartName());
emp.setDeptNo(dept.getDepartNo());
emp.setUnitId(dept.getCustomerId());
emp.setUnitNo(dept.getCustomerNo());
emp.setUnitName(dept.getCustomerName());
}
if (Common.isEmpty(emp.getEmpName())) {
error = "第" + i + "行:薪酬人员查询处-员工姓名-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
......@@ -683,67 +735,147 @@ public class SalaryAccountUtil implements Serializable {
entity.setEmpIdcard(emp.getEmpIdcard());
entity.setEmpName(emp.getEmpName());
entity.setEmpPhone(emp.getEmpPhone());
if (SalaryConstants.SALARY_STYLE_BANK.equals(salaryStyle) && salaryGiveTimeFlag) {
if (Common.isEmpty(emp.getBankName())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
if (Common.isEmpty(emp.getBankNo())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-银行卡号-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
if (Common.isEmpty(emp.getBankProvince())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行省-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
if (Common.isEmpty(emp.getBankCity())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行市-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
if (bankMap.get(emp.getBankName()) == null) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行总行-不符合财务要求,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
entity.setBankName(emp.getBankName());
entity.setBankNo(emp.getBankNo());
entity.setBankProvince(String.valueOf(emp.getBankProvince()));
entity.setBankCity(String.valueOf(emp.getBankCity()));
entity.setBankSubName(emp.getBankSubName());
} else {
if (Common.isNotNull(emp.getBankName())) {
// hgs 2024-7-19 09:33:29 新增按照页面开关与新员工字段,来更新员工信息:
if (SalaryConstants.SALARY_STYLE_BANK.equals(salaryStyle)) {
if (CommonConstants.ONE_STRING.equals(newEmpUpdateFlag) && isNewEmployee) {
TSalaryEmployee oldEmp = new TSalaryEmployee();
BeanUtil.copyProperties(emp,oldEmp);
updateEmpBankMap.put(emp.getEmpIdcard(), oldEmp);
if (Common.isEmpty(entity.getBankName())) {
if (Common.isEmpty(emp.getBankName())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行总行-为空,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
} else {
entity.setBankName(emp.getBankName());
}
} else {
emp.setBankName(entity.getBankName());
}
if (Common.isEmpty(entity.getBankNo())) {
if (Common.isEmpty(emp.getBankNo())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-银行卡号-为空,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
} else {
entity.setBankNo(emp.getBankNo());
}
} else {
emp.setBankNo(entity.getBankNo());
}
if (Common.isEmpty(entity.getBankProvince())) {
if (Common.isEmpty(emp.getBankProvince())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行省-为空,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
} else {
entity.setBankProvince(String.valueOf(emp.getBankProvince()));
}
} else {
emp.setBankProvince(entity.getBankProvince());
}
if (Common.isEmpty(emp.getBankCity())) {
if (Common.isEmpty(emp.getBankCity())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行市-为空,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
} else {
entity.setBankCity(String.valueOf(emp.getBankCity()));
}
} else {
emp.setBankCity(entity.getBankCity());
}
if (Common.isNotNull(emp.getBankProvince())) {
String areaInt = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + emp.getBankProvince().trim());
if (Common.isNotNull(areaInt)) {
entity.setBankProvince(areaInt);
}
String areaCityInt = null;
if (Common.isNotNull(emp.getBankCity())) {
areaCityInt = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + emp.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + emp.getBankProvince().trim());
if (Common.isNotNull(areaCityInt)) {
entity.setBankCity(areaCityInt);
}
}
}
if (Common.isEmpty(entity.getBankSubName()) ){
if (Common.isNotNull(emp.getBankSubName())) {
entity.setBankSubName(emp.getBankSubName());
}
} else {
emp.setBankSubName(entity.getBankSubName());
}
if (bankMap.get(entity.getBankName()) == null) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行总行-不符合财务要求,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
return true;
}
updateEmpBankList.add(emp);
} else if (salaryGiveTimeFlag) {
if (Common.isEmpty(emp.getBankName())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
if (Common.isEmpty(emp.getBankNo())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-银行卡号-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
if (Common.isEmpty(emp.getBankProvince())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行省-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
if (Common.isEmpty(emp.getBankCity())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行市-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
if (bankMap.get(emp.getBankName()) == null) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行总行-不符合财务要求,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
entity.setBankName(emp.getBankName());
} else {
entity.setBankName(null);
}
if (Common.isNotNull(emp.getBankNo())) {
entity.setBankNo(emp.getBankNo());
} else {
entity.setBankNo(null);
}
if (Common.isNotNull(emp.getBankSubName())) {
entity.setBankSubName(emp.getBankSubName());
} else {
entity.setBankSubName(null);
}
if (Common.isNotNull(emp.getBankProvince())) {
entity.setBankProvince(String.valueOf(emp.getBankProvince()));
} else {
entity.setBankProvince(null);
}
if (Common.isNotNull(emp.getBankCity())) {
entity.setBankCity(String.valueOf(emp.getBankCity()));
entity.setBankSubName(emp.getBankSubName());
} else {
entity.setBankCity(null);
if (Common.isNotNull(emp.getBankName())) {
if (bankMap.get(emp.getBankName()) == null) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行总行-不符合财务要求,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage(i, error));
return true;
}
entity.setBankName(emp.getBankName());
} else {
entity.setBankName(null);
}
if (Common.isNotNull(emp.getBankNo())) {
entity.setBankNo(emp.getBankNo());
} else {
entity.setBankNo(null);
}
if (Common.isNotNull(emp.getBankSubName())) {
entity.setBankSubName(emp.getBankSubName());
} else {
entity.setBankSubName(null);
}
if (Common.isNotNull(emp.getBankProvince())) {
entity.setBankProvince(String.valueOf(emp.getBankProvince()));
} else {
entity.setBankProvince(null);
}
if (Common.isNotNull(emp.getBankCity())) {
entity.setBankCity(String.valueOf(emp.getBankCity()));
} else {
entity.setBankCity(null);
}
}
}
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
......@@ -757,7 +889,7 @@ public class SalaryAccountUtil implements Serializable {
entity.setTaxMonth(emp.getTaxMonth());
}
if (DateUtil.compareYearMonth(entity.getTaxMonth(), nowMonth)) {
error = "第" + i + "行:薪酬人员查询处-计税月份-大于当前年月或错误,请调整:" + entity.getTaxMonth();
error = "第" + i + "行:薪酬人员查询处-计税月份-大于当前年月或错误,请去薪酬人员查询处调整:" + entity.getTaxMonth();
errorList.add(new ErrorMessage(i, error));
return true;
}
......
......@@ -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