Commit c18645de authored by hongguangwu's avatar hongguangwu

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

parents 70a5babc eb89edbc
......@@ -449,6 +449,8 @@ public interface CommonConstants {
public static final String PAYMENT_SOCIAL_WAIT_EXPORT = "payment_social_wait_export";
public static final String PAYMENT_SOCIAL_PUSH = "payment_social_push";
//百分之一 1/100
public static final BigDecimal ONE_OF_PERCENT = new BigDecimal("0.01");
......
......@@ -148,4 +148,9 @@ public class EkpPushFundParam implements Serializable {
* 薪酬申请编号
**/
private String fd_3b3cabde83d1d0;
/**
* 公积金创建人姓名
**/
private String fd_3b43922217c6f8;
}
\ No newline at end of file
......@@ -252,5 +252,9 @@ public class EkpPushSocialParam implements Serializable {
* 薪酬申请编号
**/
private String fd_3b3cab77923f44;
/**
* 社保创建人姓名
**/
private String fd_3b438e33f37378;
}
\ No newline at end of file
......@@ -668,6 +668,12 @@ public class TPaymentInfo extends BaseEntity {
@TableField(exist = false)
@ExcelIgnore
private String ybSameFlg;
/**
* 补缴是否导入重复标识
*/
@TableField(exist = false)
@ExcelIgnore
private String bjSameFlg;
}
......@@ -17,14 +17,19 @@
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 派单导出Vo
......@@ -35,22 +40,17 @@ import java.time.LocalDateTime;
@Schema(description = "派单导出Vo")
public class TDispatchInfoExportVo {
@Schema(description = "主键")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("主键")
private String id;
@ExcelAttribute(name = "申请编码", maxLength = 30)
@Schema(description = "申请编码")
@ExcelAttribute(name = "派单类型", readConverterExp = "0=增加派单,1=减少派单")
@Schema(description = "派单类型:0派增1派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请编码")
private String applyNo;
@ExcelProperty("派单类型")
private String type;
@ExcelAttribute(name = "员工编码", maxLength = 30)
@Schema(description = "员工编码")
@Schema(description = "创建时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工编码")
private String empNo;
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@ExcelAttribute(name = "员工姓名", maxLength = 50)
@Schema(description = "员工姓名")
......@@ -58,24 +58,12 @@ public class TDispatchInfoExportVo {
@ExcelProperty("员工姓名")
private String empName;
@ExcelAttribute(name = "身份证号", maxLength = 20)
@Schema(description = "身份证号")
@ExcelAttribute(name = "员工身份证", maxLength = 20)
@Schema(description = "员工身份证")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
@ExcelProperty("员工身份证")
private String empIdcard;
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型")
private String empType;
@ExcelAttribute(name = "社保公积金类型", readConverterExp = "0=社保,1=公积金")
@Schema(description = "社保公积金类型:0社保1公积金")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保公积金类型")
private String typeSub;
@ExcelAttribute(name = "客户名称", maxLength = 50)
@Schema(description = "客户名称")
@HeadFontStyle(fontHeightInPoints = 11)
......@@ -94,17 +82,63 @@ public class TDispatchInfoExportVo {
@ExcelProperty("项目编码")
private String settleDomainCode;
@ExcelAttribute(name = "派单类型", readConverterExp = "0=派增,1=派减")
@Schema(description = "派单类型:0派增1派减")
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单类型")
private String type;
@ExcelProperty("员工类型")
private String empType;
/**
* 合同类型(字典值)
*/
@NotNull(message = "合同类型不能为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="合同类型")
@ExcelAttribute(name = "合同类型",isDataId = true,dataType = ExcelAttributeConstants.PERSONNEL_TYPE)
private String contractType;
/**
* 业务细分
*/
@ExcelAttribute(name = "业务细分", dataType = ExcelAttributeConstants.PERSONNEL_TYPE_SUB, needExport = true)
@Schema(description = "业务细分(存lable)", name = "contractName")
private String contractSubName;
/**
* 合同期限
*/
@ExcelAttribute(name = "合同期限")
@Schema(description = "合同期限" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同期限" )
private String contractTerm;
/**
* 合同起始时间
*/
@ExcelAttribute(name = "合同起始时间", isDate = true)
@Schema(description = "合同起始时间" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同起始时间" )
private Date contractStart;
/**
* 合同到期时间
*/
@ExcelAttribute(name = "合同到期时间", isDate = true)
@Schema(description = "合同到期时间" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同到期时间" )
private Date contractEnd;
@ExcelAttribute(name = "派单项", maxLength = 50)
@Schema(description = "派单项:如 养老、公积金")
/**
* 备案基数
*/
@Length(max = 255, message = "备案基数 不能超过255 个字符" )
@ExcelAttribute(name = "备案基数", isFloat = true,max = "999999999.99")
@Schema(description = "备案基数:购买社保时必填" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单项")
private String dispatchItem;
@ExcelProperty("备案基数" )
private BigDecimal recordBase;
@ExcelAttribute(name = "社保户", maxLength = 50)
@Schema(description = "社保户")
......@@ -118,11 +152,227 @@ public class TDispatchInfoExportVo {
@ExcelProperty("公积金户")
private String providentHouseholdName;
@ExcelAttribute(name = "审核状态", readConverterExp = "1=待审核,2=审核通过,3=审核不通过,4=已办结")
@Schema(description = "审核状态:1待审核2审核通过3审核不通过4已办结")
/**
* 社保起缴日期
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "社保起缴日期", isDate = true)
@Schema(description = "社保起缴日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保起缴日期" )
private Date socialStartDate;
/**
* 社保停缴日期
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "社保停缴日期", isDate = true)
@Schema(description = "社保停缴日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保停缴日期" )
private Date socialReduceDate;
/**
* 公积金起缴日期
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "公积金起缴日期", isDate = true)
@Schema(description = "公积金起缴日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金起缴日期" )
private Date providentStart;
/**
* 公积金停缴日期
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "公积金停缴日期", isDate = true)
@Schema(description = "公积金停缴日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金停缴日期" )
private Date fundReduceDate;
@ExcelAttribute(name = "社保审核状态", readConverterExp = "0=待审核,1=审核通过,2=审核不通过")
@Schema(description = "社保审核状态:1待审核2审核通过3审核不通过4已办结")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保审核状态")
private String auditStatus;
/**
* 审核人姓名
*/
@Length(max = 32, message = "社保审核人" )
@Schema(description = "社保审核人" )
@ExcelAttribute(name = "社保审核人")
@ExcelProperty("社保审核人" )
private String auditUserName;
/**
* 审核意见
*/
@Length(max = 255, message = "审核意见 不能超过255个字符" )
@ExcelAttribute(name = "审核意见", maxLength = 255)
@Schema(description = "审核意见" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核意见" )
private String auditRemark;
/**
* 社保办理人
*/
@Length(max = 32, message = "社保办理人 不能超过32个字符" )
@ExcelAttribute(name = "社保办理人", maxLength = 32)
@Schema(description = "社保办理人" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保办理人" )
private String handleUser;
/**
* 社保办理时间
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "社保办理时间", isDate = true)
@Schema(description = "社保办理时间" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保办理时间" )
private Date handleTime;
/**
* 审核状态(0待审核/1已审核)
*/
@ExcelAttribute(name = "公积金审核状态",readConverterExp = "0=待审核,1=已审核")
@Schema(description = "公积金审核状态:(0待审核/1已审核)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核状态")
private String status;
@ExcelProperty("公积金审核状态(0待审核/1已审核)" )
private String fundAuditStatus;
/**
* 审核人
*/
@Length(max = 32, message = "公积金审核人 不能超过32个字符" )
@ExcelAttribute(name = "公积金审核人", maxLength = 32)
@Schema(description = "公积金审核人" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金审核人" )
private String fundAuditUser;
@ExcelAttribute(name = "公积金办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "公积金办理状态:0 待办理 1办理成功 2 办理失败 3 已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金办理状态")
private String fundHandleStatus;
/**
* 公积金办理人
*/
@Length(max = 32, message = "公积金办理人 不能超过32个字符" )
@ExcelAttribute(name = "公积金办理人", maxLength = 32)
@Schema(description = "公积金办理人" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金办理人" )
private String fundhHandleUser;
/**
* 公积金办理时间
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "公积金办理时间", isDate = true)
@Schema(description = "公积金办理时间" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金办理时间" )
private Date fundHandleTime;
/**
* 养老基数
*/
@ExcelAttribute(name = "养老基数", isFloat = true,max = "999999999.99" )
@Schema(description = "养老基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数" )
private BigDecimal pensionCardinal;
/**
* 医疗基数
*/
@ExcelAttribute(name = "医疗基数", isFloat = true,max = "999999999.99" )
@Schema(description = "医疗基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数" )
private BigDecimal medicalCardinal;
/**
* 失业基数
*/
@ExcelAttribute(name = "失业基数", isFloat = true,max = "999999999.99" )
@Schema(description = "失业基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数" )
private BigDecimal unemploymentCardinal;
/**
* 工伤基数
*/
@ExcelAttribute(name = "工伤基数", isFloat = true,max = "999999999.99" )
@Schema(description = "工伤基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数" )
private BigDecimal workInjuryCardinal;
/**
* 生育基数
*/
@ExcelAttribute(name = "生育基数", isFloat = true,max = "999999999.99" )
@Schema(description = "生育基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数" )
private BigDecimal birthCardinal;
/**
* 委托备注
*/
@Length(max = 100, message = "委托备注 不能超过100 个字符" )
@ExcelAttribute(name = "委托备注", maxLength = 100)
@Schema(description = "委托备注" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注" )
private String trustRemark;
/**
* 大病基数
*/
@ExcelAttribute(name = "大病基数" , isFloat = true,max = "999999999.99" )
@Schema(description = "大病基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病基数" )
private BigDecimal bigailmentCardinal;
/**
* 离职日期
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "离职日期", isDate = true)
@Schema(description = "离职日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职日期" )
private Date leaveDate;
/**
* 减少原因
*/
@Length(max = 32, message = "减少原因 不能超过32个字符" )
@ExcelAttribute(name = "减少原因", maxLength = 32)
@Schema(description = "减少原因" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("减少原因" )
private String reduceReason;
@Schema(description = "创建人姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建人姓名")
private String createName;
@ExcelAttribute(name = "派单人所属部门", maxLength = 50)
@Schema(description = "派单人所属部门")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单人所属部门")
private String organName;
@ExcelAttribute(name = "申请编码", maxLength = 30)
@Schema(description = "申请编码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请编码")
private String applyNo;
@ExcelAttribute(name = "社保办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=部分办理成功,4=办理中")
@Schema(description = "社保办理状态 0 待办理 1 办理成功 2 办理失败 3 部分办理成功 4 办理中")
......@@ -130,63 +380,75 @@ public class TDispatchInfoExportVo {
@ExcelProperty("社保办理状态")
private String socialHandleStatus;
@ExcelAttribute(name = "养老状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@ExcelAttribute(name = "养老办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "养老办理状态:0待办理1办理成功2办理失败3已派减" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老状态" )
@ExcelProperty("养老办理状态" )
private String pensionHandle;
@ExcelAttribute(name = "医疗状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "医疗状态:0待办理1办理成功2办理失败3已派减" )
@ExcelAttribute(name = "医疗办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "医疗办理状态:0待办理1办理成功2办理失败3已派减" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗状态" )
@ExcelProperty("医疗办理状态" )
private String medicalHandle;
@ExcelAttribute(name = "失业状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@ExcelAttribute(name = "失业办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "失业办理状态:0待办理1办理成功2办理失败3已派减" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业状态" )
@ExcelProperty("失业办理状态" )
private String unemployHandle;
@ExcelAttribute(name = "工伤状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "工伤状态:0待办理1办理成功2办理失败3已派减" )
@ExcelAttribute(name = "工伤办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "工伤办理状态:0待办理1办理成功2办理失败3已派减" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤状态" )
@ExcelProperty("工伤办理状态" )
private String workInjuryHandle;
@ExcelAttribute(name = "生育状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "生育状态:0待办理1办理成功2办理失败3已派减" )
@ExcelAttribute(name = "生育办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "生育办理状态:0待办理1办理成功2办理失败3已派减" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育状态" )
@ExcelProperty("生育办理状态" )
private String birthHandle;
@ExcelAttribute(name = "大病状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "大病状态:0待办理1办理成功2办理失败3已派减" )
@ExcelAttribute(name = "大病办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "大病办理状态:0待办理1办理成功2办理失败3已派减" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病状态" )
@ExcelProperty("大病办理状态" )
private String bigailmentHandle;
@ExcelAttribute(name = "公积金办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "公积金办理状态:0 待办理 1办理成功 2 办理失败 3 已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金办理状态")
private String fundHandleStatus;
@Schema(description = "申请人")
/**
* 派单审核人
*/
@Length(max = 32, message = "派单审核人 不能超过32个字符" )
@Schema(description = "派单审核人" )
@ExcelProperty("派单审核人" )
private String auditUser;
/**
* 审核时间
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "派单审核时间", isDate = true)
@Schema(description = "派单审核时间" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请人")
private String createName;
@ExcelAttribute(name = "申请人所在部门", maxLength = 50)
@Schema(description = "申请人所在部门")
@ExcelProperty("派单审核时间" )
private Date auditTime;
/**
* 社保办理备注
*/
@Length(max = 255, message = "社保办理备注 不能超过255个字符" )
@ExcelAttribute(name = "社保办理备注", maxLength = 255)
@Schema(description = "社保办理备注" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请人所在部门")
private String organName;
@Schema(description = "申请时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@ExcelProperty("社保办理备注" )
private String socialHandleRemark;
/**
* 公积金办理备注
*/
@Length(max = 255, message = "公积金办理备注 不能超过255个字符" )
@ExcelAttribute(name = "公积金办理备注", maxLength = 255)
@Schema(description = "公积金办理备注" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("申请时间")
private LocalDateTime createTime;
@ExcelProperty("公积金办理备注" )
private String fundHandleRemark;
}
......@@ -21,6 +21,7 @@ public class SocialConstants {
public static final String BIR = "生育";
public static final String GS = "工伤";
public static final String YB = "医保";
public static final String BJ = "补缴";
public static final String YEAR_1970 = "1970-02";
}
......@@ -3257,13 +3257,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD);
temp.append(Common.isNullToString(socialTypeRemark));
temp.append(DispatchConstants.DISPATCH_HANDLE_SUCCESS);
initAuditInfo(auditInfo, ( temp + ServiceUtil.ifNullToEmpty(handleRemark)), CommonConstants.THREE_STRING, user, temp.toString(), remark);
initAuditInfo(auditInfo, ( temp + ServiceUtil.ifNullToEmpty(handleRemark)), CommonConstants.THREE_STRING, user, temp.toString().concat(handleRemark), remark);
} else {
temp.setLength(CommonConstants.ZERO_INT);
temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD);
temp.append(Common.isNullToString(socialTypeRemark));
temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL);
initAuditInfo(auditInfo, ( temp + ServiceUtil.ifNullToEmpty(handleRemark)), CommonConstants.FOUR_STRING, user, temp.toString(), remark);
initAuditInfo(auditInfo, ( temp + ServiceUtil.ifNullToEmpty(handleRemark)), CommonConstants.FOUR_STRING, user, temp.toString().concat(handleRemark), remark);
}
auditInfo.setSocialId(dis.getId());
}
......@@ -3326,9 +3326,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
dis.setFundHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
if (CommonConstants.ZERO_INT == flag) {
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_SUCCESS + handleRemark), CommonConstants.THREE_STRING, user, DispatchConstants.DISPATCH_FUND_ADD_SUCCESS, remark);
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_SUCCESS + handleRemark), CommonConstants.THREE_STRING, user, (DispatchConstants.DISPATCH_FUND_ADD_SUCCESS + handleRemark), remark);
} else {
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_FAIL + handleRemark), CommonConstants.FOUR_STRING, user, DispatchConstants.DISPATCH_FUND_ADD_FAIL, remark);
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_FAIL + handleRemark), CommonConstants.FOUR_STRING, user, (DispatchConstants.DISPATCH_FUND_ADD_FAIL + handleRemark), remark);
}
auditInfo.setProvidentId(dis.getId());
} else {
......@@ -3416,10 +3416,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
fundMapper.updateById(providentFund);
dis.setFundHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
if (CommonConstants.ZERO_INT == flag) {
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), CommonConstants.SIX_STRING, user, DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS, remark);
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), CommonConstants.SIX_STRING, user, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), remark);
dis.setFundHandleStatus(CommonConstants.ONE_STRING);
} else {
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_FAIL + handleRemark), CommonConstants.FOUR_STRING, user, DispatchConstants.DISPATCH_FUND_REDUCE_FAIL, remark);
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_FAIL + handleRemark), CommonConstants.FOUR_STRING, user, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), remark);
dis.setFundHandleStatus(CommonConstants.TWO_STRING);
}
auditInfo.setProvidentId(dis.getId());
......@@ -3960,7 +3960,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
**/
@Override
public void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields) {
String fileName = DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT + CommonConstants.XLSX;
String fileName = DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT+ DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<SocialHandleExportVo> list = new ArrayList<>();
long count = getRecordRosterCount(searchVo,idStr);
......
......@@ -278,7 +278,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public R<Boolean> removeInFoById(String id) {
YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
if (Common.isNotNull(redisUtil.get(key))) {
return R.failed("用户正在推送实缴数据中禁止删除!");
}
TPaymentInfo paymentInfo = baseMapper.selectById(id);
if (!user.getId().equals(paymentInfo.getCreateBy()) && !CommonConstants.ONE_STRING.equals(user.getId())) {
return R.failed("非本人创建的数据禁止删除!");
......@@ -302,6 +305,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isEmpty(ids)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
if (Common.isNotNull(redisUtil.get(key))) {
return R.failed("用户正在推送实缴数据中禁止删除!");
}
List<String> idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
TPaymentInfo paymentInfo;
......@@ -340,12 +348,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String socialCreateMonth, String socialPayMonth) {
YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
if (Common.isNotNull(redisUtil.get(key))) {
return R.failed("用户正在推送实缴数据中禁止删除!");
}
LambdaQueryWrapper<TPaymentInfo> wrapper = buildQueryWrapper(empIdCard, socialHouseId, fundHouseId,
socialCreateMonth, socialPayMonth);
List<TPaymentInfo> list = baseMapper.selectList(wrapper);
List<String> idList = new ArrayList<>();
Boolean delFlag = false;
boolean delFlag = false;
if (Common.isNotNull(list)) {
for (TPaymentInfo paymentInfo : list) {
if ((!user.getId().equals(paymentInfo.getCreateBy()) &&
......@@ -404,6 +416,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public R<List<ErrorMessage>> importSocialDiy(InputStream inputStream) {
YifuUser user = SecurityUtils.getUser();
String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key";
if (Common.isNotNull(redisUtil.get(sumNumKey))) {
redisUtil.remove(sumNumKey);
}
String importSuccessKey = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_WAIT_EXPORT;
if (Common.isNotNull(redisUtil.get(importSuccessKey))) {
redisUtil.remove(importSuccessKey);
}
List<ErrorMessage> errorMessageList = new ArrayList<>();
//养老
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>();
......@@ -417,6 +437,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap = new ConcurrentHashMap<>();
//医保
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap = new ConcurrentHashMap<>();
//补缴利息
ConcurrentHashMap<String, BigDecimal> accrualMoneyMap = new ConcurrentHashMap<>();
ExcelUtil<TPaymentInfoVo> util1 = new ExcelUtil<>(TPaymentInfoVo.class);
// 写法2:
......@@ -465,8 +487,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTPaymentSocialInfo(cachedDataList, errorMessageList, user, rowNumber,pensionMoneyMap,
bigMoneyMap,unEmpMoneyMap,birMoneyMap,injuryMoneyMap,medicalMoneyMap);
importTPaymentSocialInfo(cachedDataList, sumNumKey,importSuccessKey,errorMessageList, user,
rowNumber,pensionMoneyMap, bigMoneyMap,unEmpMoneyMap,birMoneyMap,injuryMoneyMap,
medicalMoneyMap,accrualMoneyMap);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -480,17 +503,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
birMoneyMap.clear();
injuryMoneyMap.clear();
medicalMoneyMap.clear();
accrualMoneyMap.clear();
return R.ok(errorMessageList);
}
private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, List<ErrorMessage> errorMessageList,
private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, String sumNumKey,String importSuccessKey,
List<ErrorMessage> errorMessageList,
YifuUser user, Integer rowNumber,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> birMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap) {
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap,
ConcurrentHashMap<String, BigDecimal> accrualMoneyMap) {
HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>();
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
......@@ -538,6 +564,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap = new ConcurrentHashMap<>();
//医保
ConcurrentHashMap<String, TPaymentInfo> paymentInfoMedicalMap = new ConcurrentHashMap<>();
//补缴利息
ConcurrentHashMap<String, TPaymentInfo> paymentInfoaccrualMap = new ConcurrentHashMap<>();
if (Common.isNotNull(paymentInfos)) {
for (TPaymentInfo info : paymentInfos) {
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getUnitPensionMoney()),
......@@ -564,6 +592,30 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+ SocialConstants.YL
, info);
}
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getCompanyAccrual()),
BigDecimalUtils.isNullToZero(info.getPersonalAccrual())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoaccrualMap.get(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.BJ)) {
info.setBjSameFlg("1");
}
paymentInfoaccrualMap.put(info.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ info.getEmpIdcard()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialPayMonth()
+ CommonConstants.DOWN_LINE_STRING
+ info.getSocialCreateMonth()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.BJ
, info);
}
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(info.getPersonalBigmailmentMoney()),
BigDecimalUtils.isNullToZero(info.getUnitBigmailmentMoney())).compareTo(BigDecimal.ZERO) != 0) {
if (null != paymentInfoBigMap.get(info.getSocialPayAddr()
......@@ -689,7 +741,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List<TPaymentInfoVo> tempList = new ArrayList<>();
String importSuccessKey = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_WAIT_EXPORT;
List<CompletableFuture<List<ErrorMessage>>> completableFutureList = new ArrayList<>();
// 创建一个数值格式化对象
......@@ -697,7 +748,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 设置精确到小数点后2位
numberFormat.setMaximumFractionDigits(2);
String maerialRatio = "";
String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key";
Integer bfInt = (Integer) redisUtil.get(sumNumKey);
if (Common.isNotNull(bfInt)) {
if (rowNumber > bfInt + 1) {
......@@ -706,7 +756,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil.set(sumNumKey, bfInt, 360L);
} else {
maerialRatio = "100";
redisUtil.remove(sumNumKey);
}
} else {
if (rowNumber >= 100) {
......@@ -715,7 +764,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil.set(sumNumKey, bfInt, 360L);
} else {
maerialRatio = "100";
redisUtil.remove(sumNumKey);
}
}
redisUtil.set(importSuccessKey, maerialRatio, 360L);
......@@ -728,7 +776,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap), yfSocialImportThreadPoolExecutor);
injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap
), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture);
}
......@@ -742,7 +791,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap), yfSocialImportThreadPoolExecutor);
injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap
), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture);
lastIdx = 1;
......@@ -752,12 +802,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (i % partSize == 0) {
lastIdx = i;
List<TPaymentInfoVo> finalTempList = tempList;
CompletableFuture.supplyAsync(() ->
CompletableFuture<List<ErrorMessage>> oneCompletableFuture = CompletableFuture.supplyAsync(() ->
executeImportSocialList(user, finalTempList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap), yfSocialImportThreadPoolExecutor);
injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap
), yfSocialImportThreadPoolExecutor);
completableFutureList.add(oneCompletableFuture);
tempList = new ArrayList<>();
}
}
......@@ -774,6 +826,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (int i = lastIdx + 1; i < list.size(); i++) {
tempList.add(list.get(i));
}
lastIdx += 1;
}
List<TPaymentInfoVo> finalTempList = tempList;
......@@ -782,7 +835,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap), yfSocialImportThreadPoolExecutor);
injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap
), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture);
}
// 阻塞当前线程,等待所有的线程执行完毕
......@@ -862,7 +916,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> birMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap) {
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap,
ConcurrentHashMap<String, BigDecimal> accrualMoneyMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoaccrualMap) {
if (Common.isNotNull(list)) {
TPaymentInfo paymentInfo;
TSocialFundInfo socialInfo;
......@@ -941,6 +997,19 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalPensionMoney())));
}
//补缴
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.BJ));
if (accrualMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalAccrual()), BigDecimalUtils.isNullToZero(
infoVo.getCompanyAccrual())), accrualMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpIdcard() + "的补缴缴费数据"));
continue;
} else {
accrualMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalAccrual()),
BigDecimalUtils.isNullToZero(infoVo.getCompanyAccrual())));
}
//医疗
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.YB));
if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
......@@ -1027,6 +1096,31 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
//判断是否存在补缴缴费数据
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getPersonalAccrual()),
BigDecimalUtils.isNullToZero(infoVo.getCompanyAccrual())).compareTo(BigDecimal.ZERO) != 0) {
paymentInfo = paymentInfoaccrualMap.get(infoVo.getSocialPayAddr()
+ CommonConstants.DOWN_LINE_STRING
+ infoVo.getEmpIdcard().trim()
+ CommonConstants.DOWN_LINE_STRING
+ infoVo.getSocialPayMonth().trim()
+ CommonConstants.DOWN_LINE_STRING
+ infoVo.getSocialCreateMonth().trim()
+ CommonConstants.DOWN_LINE_STRING
+ SocialConstants.BJ);
//存在社保缴费数据
if (null != paymentInfo && ((null != paymentInfo.getBjSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getBjSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getPersonalAccrual()),
BigDecimalUtils.isNullToZero(infoVo.getCompanyAccrual())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalAccrual()),
BigDecimalUtils.isNullToZero(paymentInfo.getCompanyAccrual()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的补缴缴费数据,请勿重复导入!"));
continue;
}
}
//判断是否存在失业缴费数据
if (BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getUnitUnemploymentMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalUnemploymentMoney())).compareTo(BigDecimal.ZERO) != 0) {
......@@ -1261,6 +1355,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public R<List<ErrorMessage>> importSocialHeFeiDiy(InputStream inputStream, String random, String type) {
YifuUser user = SecurityUtils.getUser();
String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key";
if (Common.isNotNull(redisUtil.get(sumNumKey))) {
redisUtil.remove(sumNumKey);
}
String importSuccessKey = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_WAIT_EXPORT;
if (Common.isNotNull(redisUtil.get(importSuccessKey))) {
redisUtil.remove(importSuccessKey);
}
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TPaymentHeFeiVo> util1 = new ExcelUtil<>(TPaymentHeFeiVo.class);
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>();
......@@ -1315,7 +1417,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTPaymentSocialHeFei(cachedDataList, errorMessageList, user, type, rowNumber,pensionMoneyMap,
bigMoneyMap,unEmpMoneyMap,injuryMoneyMap,medicalMoneyMap);
bigMoneyMap,unEmpMoneyMap,injuryMoneyMap,medicalMoneyMap,sumNumKey,importSuccessKey);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -1599,7 +1701,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap) {
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap,
String sumNumKey,String importSuccessKey) {
HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>();
......@@ -1772,14 +1875,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<CompletableFuture<List<ErrorMessage>>> completableFutureList = new ArrayList<>();
String importSuccessKey = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_WAIT_EXPORT;
// 创建一个数值格式化对象
NumberFormat numberFormat = NumberFormat.getInstance();
// 设置精确到小数点后2位
numberFormat.setMaximumFractionDigits(2);
String maerialRatio = "";
String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key";
Integer bfInt = (Integer) redisUtil.get(sumNumKey);
if (Common.isNotNull(bfInt)) {
if (rowNumber > bfInt + 1) {
......@@ -1788,7 +1888,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil.set(sumNumKey, bfInt, 360L);
} else {
maerialRatio = "100";
redisUtil.remove(sumNumKey);
}
} else {
if (rowNumber >= 100) {
......@@ -1855,6 +1954,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (int i = lastIdx + 1; i < list.size(); i++) {
tempList.add(list.get(i));
}
lastIdx += 1;
}
List<TPaymentHeFeiVo> finalTempList = tempList;
......@@ -1962,7 +2062,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在养老缴费数据
if (PaymentConstants.PENSION_RISK.equals(infoVo.getRiskType())) {
//导入模板判重 养老
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.YL));
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(PaymentConstants.PENSION_RISK));
if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getUnitMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
......@@ -1999,7 +2099,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在失业缴费数据
if (PaymentConstants.UNEMPLOYEEMENT_RISK.equals(infoVo.getRiskType())) {
//导入模板判重 失业
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.SY));
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(PaymentConstants.UNEMPLOYEEMENT_RISK));
if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
......@@ -2037,7 +2137,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在医保缴费数据
if (CommonConstants.ONE_STRING.equals(type)) {
//导入模板判重 医疗
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.YB));
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(PaymentConstants.MEDICAL));
if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
......@@ -2076,7 +2176,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//判断是否存在工伤缴费数据
if (PaymentConstants.INJURY_RISK.equals(infoVo.getRiskType())) {
//导入模板判重 工伤
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.GS));
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(PaymentConstants.INJURY_RISK));
if (injuryMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())),
......@@ -2429,12 +2529,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public void pushPaymentSocialFundInfo() {
YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
redisUtil.set(key, user.getId(), 36000L);
try {
//手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user);
createPaymentFundInfoReal(user);
//推送社保公积金收入数据
createPaymentInfoIncomeReal(user);
createPaymentFundIncomeReal(user);
redisUtil.remove(key);
} catch (Exception e) {
log.error("社保缴费库:" + e);
redisUtil.remove(key);
}
}
@Override
......@@ -2745,6 +2853,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
......@@ -2923,6 +3037,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
fundParam.setFd_3b43922217c6f8(library.getCreateName());
} else {
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING);
}
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isNotNull(body) && body.length() == 32) {
//更新推送状态为已推送的列表
......
......@@ -105,21 +105,15 @@
</resultMap>
<!-- 派单导出vo -->
<resultMap id="exportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo">
<id property="id" column="ID"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="empNo" column="EMP_NO"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empType" column="EMP_TYPE"/>
<result property="typeSub" column="TYPE_SUB"/>
<result property="belongUnitName" column="BELONG_UNIT_NAME"/>
<result property="settleDomainName" column="SETTLE_DOMAIN_NAME"/>
<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
<result property="type" column="TYPE"/>
<result property="dispatchItem" column="DISPATCH_ITEM"/>
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="status" column="STATUS"/>
<result property="socialHandleStatus" column="SOCIAL_HANDLE_STATUS"/>
<result property="pensionHandle" column="PENSION_HANDLE"/>
<result property="medicalHandle" column="MEDICAL_HANDLE"/>
......@@ -571,21 +565,15 @@
<!-- 派单导出 -->
<select id="exportDispatch" resultMap="exportMap">
select
a.ID,
a.APPLY_NO,
a.EMP_NO,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_TYPE,
a.TYPE_SUB,
a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SETTLE_DOMAIN_CODE,
a.TYPE,
a.DISPATCH_ITEM,
a.SOCIAL_HOUSEHOLD_NAME,
a.PROVIDENT_HOUSEHOLD_NAME,
a.STATUS,
a.SOCIAL_HANDLE_STATUS,
s.PENSION_HANDLE,
s.MEDICAL_HANDLE,
......
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