Commit d4792c05 authored by huyuchen's avatar huyuchen

薪资审核页面接口修改

parent c957e4b9
......@@ -271,7 +271,7 @@
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if test="tSalaryStandard.status == null">
AND a.STATUS = 1 OR a.STATUS = 2
AND a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5
</if>
<if test="tSalaryStandard.status != null">
AND a.STATUS = #{tSalaryStandard.status}
......
......@@ -195,7 +195,7 @@ public class TPaymentInfo extends BaseEntity {
/**
* 公积金缴纳地-省
*/
@ExcelAttribute(name = "公积金缴纳地-省" )
@ExcelAttribute(name = "公积金缴纳地-省", isArea = true)
@Schema(description ="公积金缴纳地-省")
@ExcelProperty("公积金缴纳地-省")
private String fundProvince;
......@@ -203,7 +203,7 @@ public class TPaymentInfo extends BaseEntity {
/**
* 公积金缴纳地-市
*/
@ExcelAttribute(name = "公积金缴纳地-市" )
@ExcelAttribute(name = "公积金缴纳地-市",isArea = true, parentField = "fundProvince")
@Schema(description ="公积金缴纳地-市")
@ExcelProperty("公积金缴纳地-市")
private String fundCity;
......@@ -211,7 +211,7 @@ public class TPaymentInfo extends BaseEntity {
/**
* 公积金缴纳地-县
*/
@ExcelAttribute(name = "公积金缴纳地-县" )
@ExcelAttribute(name = "公积金缴纳地-县",isArea = true, parentField = "fundCity")
@Schema(description ="公积金缴纳地-县")
@ExcelProperty("公积金缴纳地-县")
private String fundTown;
......@@ -219,7 +219,7 @@ public class TPaymentInfo extends BaseEntity {
/**
* 社保缴纳地-省
*/
@ExcelAttribute(name = "社保缴纳地-省" )
@ExcelAttribute(name = "社保缴纳地-省",isArea = true)
@Schema(description ="社保缴纳地-省")
@ExcelProperty("社保缴纳地-省")
private String socialProvince;
......@@ -227,7 +227,7 @@ public class TPaymentInfo extends BaseEntity {
/**
* 社保缴纳地-市
*/
@ExcelAttribute(name = "社保缴纳地-市" )
@ExcelAttribute(name = "社保缴纳地-市", isArea = true, parentField = "socialProvince")
@Schema(description ="社保缴纳地-市")
@ExcelProperty("社保缴纳地-市")
private String socialCity;
......@@ -235,7 +235,7 @@ public class TPaymentInfo extends BaseEntity {
/**
* 社保缴纳地-县
*/
@ExcelAttribute(name = "社保缴纳地-县" )
@ExcelAttribute(name = "社保缴纳地-县", isArea = true, parentField = "socialCity")
@Schema(description ="社保缴纳地-县")
@ExcelProperty("社保缴纳地-县")
private String socialTown;
......@@ -367,51 +367,33 @@ public class TPaymentInfo extends BaseEntity {
/**
* 单位养老基数
*/
@ExcelAttribute(name = "单位养老基数" )
@ExcelAttribute(name = "单位养老基数", isFloat = true,max = "999999999.99")
@ExcelProperty("单位养老基数")
private BigDecimal unitPensionSet;
/**
* 单位医疗基数
*/
@ExcelAttribute(name = "单位医疗基数" )
@ExcelAttribute(name = "单位医疗基数", isFloat = true,max = "999999999.99")
@ExcelProperty("单位医疗基数")
private BigDecimal unitMedicalSet;
/**
* 单位失业基数
*/
@ExcelAttribute(name = "单位失业基数" )
@ExcelAttribute(name = "单位失业基数", isFloat = true,max = "999999999.99")
@ExcelProperty("单位失业基数")
private BigDecimal unitUnemploymentSet;
/**
* 单位工伤基数
* 工伤基数
*/
@ExcelAttribute(name = "单位工伤基数" )
@ExcelProperty("单位工伤基数")
@ExcelAttribute(name = "工伤基数", isFloat = true,max = "999999999.99")
@ExcelProperty("工伤基数")
private BigDecimal unitInjurySet;
/**
* 单位生育基数
* 生育基数
*/
@ExcelAttribute(name = "单位生育基数" )
@ExcelProperty("单位生育基数")
@ExcelAttribute(name = "生育基数", isFloat = true,max = "999999999.99")
@ExcelProperty("生育基数")
private BigDecimal unitBirthSet;
/**
* 个人养老基数
*/
@ExcelAttribute(name = "个人养老基数")
@ExcelProperty("个人养老基数")
private BigDecimal personalPensionSet;
/**
* 个人医疗基数
*/
@ExcelAttribute(name = "个人医疗基数")
@ExcelProperty("个人医疗基数")
private BigDecimal personalMedicalSet;
/**
* 个人失业基数
*/
@ExcelAttribute(name = "个人失业基数")
@ExcelProperty("个人失业基数")
private BigDecimal personalUnemploymentSet;
/**
* 单位养老比例
*/
......@@ -535,14 +517,14 @@ public class TPaymentInfo extends BaseEntity {
/**
* 公积金编号
*/
@ExcelAttribute(name = "公积金编号", maxLength = 50)
@Size(max = 50, message = "公积金编号不可超过50位")
@ExcelAttribute(name = "公积金编号", maxLength = 20)
@Size(max = 20, message = "公积金编号不可超过20位")
@ExcelProperty("公积金编号")
private String providentNo;
/**
* 单位公积金基数
*/
@ExcelAttribute(name = "单位公积金基数")
@ExcelAttribute(name = "单位公积金基数", isFloat = true,max = "999999999.99")
@ExcelProperty("单位公积金基数")
private BigDecimal unitProvidentSet;
/**
......@@ -560,7 +542,7 @@ public class TPaymentInfo extends BaseEntity {
/**
* 个人公积金基数
*/
@ExcelAttribute(name = "个人公积金基数")
@ExcelAttribute(name = "个人公积金基数", isFloat = true,max = "999999999.99")
@ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet;
/**
......@@ -570,5 +552,17 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty("个人公积金费用")
private BigDecimal personalProvidentSum;
/**
* 工资社保结算状态 0: 未结算 1: 待结算 2: 已结算
*/
@ExcelAttribute(name = "工资社保结算状态", maxLength = 1,isDataId = true,dataType = "settlement_flag")
@ExcelProperty("工资社保结算状态")
private String salarySocialFlag;
/**
* 工资公积金结算状态 0: 未结算 1: 待结算 2: 已结算
*/
@ExcelAttribute(name = "工资公积金结算状态", maxLength = 1,isDataId = true,dataType = "settlement_flag")
@ExcelProperty("工资公积金结算状态")
private String salaryFundFlag;
}
......@@ -99,7 +99,7 @@ public class TPreDispatchInfo extends BaseEntity {
@Schema(description ="身份证号")
@NotNull(message = "身份证号码不可为空")
@Size(max = 20, message = "身份证号码不可超过20位")
@ExcelAttribute(name = "身份证号", isNotEmpty = true,errorInfo = "身份证号不能为空", maxLength = 20, isIdCard = true)
@ExcelAttribute(name = "身份证号", isNotEmpty = true,errorInfo = "身份证号不能为空", maxLength = 20)
private String empIdcard;
/**
......
......@@ -92,10 +92,9 @@ public class TPaymentHeFeiVo extends RowIndex implements Serializable {
@ExcelProperty("社保缴纳地-县")
private Integer socialTown;
/**
* 社保缴纳月份empNo
* 社保缴纳月份
*/
@Length(max = 6, message = "社保缴纳月份不能超过6个字符")
@ExcelAttribute(name = "社保缴纳月份", isNotEmpty = true, errorInfo = "社保缴纳月份不可为空", maxLength = 6,isInteger = true)
@ExcelAttribute(name = "社保缴纳月份", isNotEmpty = true, errorInfo = "社保缴纳月份不可为空", maxLength = 6, min = 6, isInteger = true)
@Schema(description = "社保缴纳月份")
@ExcelProperty("社保缴纳月份")
private String socialPayMonth;
......@@ -103,7 +102,7 @@ public class TPaymentHeFeiVo extends RowIndex implements Serializable {
* 社保生成月份
*/
@Length(max = 6, message = "社保生成月份不能超过6个字符")
@ExcelAttribute(name = "社保生成月份", isNotEmpty = true, errorInfo = "社保生成月份不可为空", maxLength = 6,isInteger = true)
@ExcelAttribute(name = "社保生成月份", isNotEmpty = true, errorInfo = "社保生成月份不可为空", maxLength = 6, min = 6,isInteger = true)
@Schema(description = "社保生成月份")
@ExcelProperty("社保生成月份")
private String socialCreateMonth;
......@@ -118,14 +117,14 @@ public class TPaymentHeFeiVo extends RowIndex implements Serializable {
/**
* 个人缴费基数
*/
@ExcelAttribute(name = "个人缴费基数")
@ExcelAttribute(name = "个人缴费基数", isFloat = true,max = "999999999.99")
@Schema(description = "个人缴费基数")
@ExcelProperty("个人缴费基数")
private BigDecimal personalSet;
/**
* 单位缴费基数
*/
@ExcelAttribute(name = "单位缴费基数")
@ExcelAttribute(name = "单位缴费基数", isFloat = true,max = "999999999.99")
@Schema(description = "单位缴费基数")
@ExcelProperty("单位缴费基数")
private BigDecimal unitSet;
......@@ -133,14 +132,14 @@ public class TPaymentHeFeiVo extends RowIndex implements Serializable {
/**
* 个人缴费额
*/
@ExcelAttribute(name = "个人缴费额")
@ExcelAttribute(name = "个人缴费额", isFloat = true,max = "999999999.99")
@Schema(description = "个人缴费额")
@ExcelProperty("个人缴费额")
private BigDecimal personalMoney;
/**
* 单位缴费额
*/
@ExcelAttribute(name = "单位缴费额")
@ExcelAttribute(name = "单位缴费额", isFloat = true,max = "999999999.99")
@Schema(description = "单位缴费额")
@ExcelProperty("单位缴费额")
private BigDecimal unitMoney;
......@@ -148,21 +147,21 @@ public class TPaymentHeFeiVo extends RowIndex implements Serializable {
/**
* 医保基数
*/
@ExcelAttribute(name = "医保基数")
@ExcelAttribute(name = "医保基数", isFloat = true,max = "999999999.99")
@Schema(description = "医保基数")
@ExcelProperty("医保基数")
private BigDecimal medicalSet;
/**
* 医保单位缴费
*/
@ExcelAttribute(name = "医保单位缴费")
@ExcelAttribute(name = "医保单位缴费", isFloat = true,max = "999999999.99")
@Schema(description = "医保单位缴费")
@ExcelProperty("医保单位缴费")
private BigDecimal unitMedicalMoney;
/**
* 医保个人缴费
*/
@ExcelAttribute(name = "医保个人缴费")
@ExcelAttribute(name = "医保个人缴费", isFloat = true,max = "999999999.99")
@Schema(description = "医保个人缴费")
@ExcelProperty("医保个人缴费")
private BigDecimal personalMedicalMoney;
......@@ -170,7 +169,7 @@ public class TPaymentHeFeiVo extends RowIndex implements Serializable {
/**
* 单位医疗救助金 (对应单位大病)
*/
@ExcelAttribute(name = "单位医疗救助金")
@ExcelAttribute(name = "单位医疗救助金", isFloat = true,max = "999999999.99")
@Schema(description = "单位医疗救助金")
@ExcelProperty("单位医疗救助金")
private BigDecimal unitBigailmentMoney;
......@@ -178,7 +177,7 @@ public class TPaymentHeFeiVo extends RowIndex implements Serializable {
/**
* 个人医疗救助金 (对应个人大病)
*/
@ExcelAttribute(name = "个人医疗救助金")
@ExcelAttribute(name = "个人医疗救助金", isFloat = true,max = "999999999.99")
@Schema(description = "个人医疗救助金")
@ExcelProperty("个人医疗救助金")
private BigDecimal personalBigailmentMoney;
......
......@@ -76,7 +76,7 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
* 身份证号
*/
@Length(max = 20, message = "身份证号 不能超过20 个字符")
@ExcelAttribute(name = "身份证号", maxLength = 20)
@ExcelAttribute(name = "身份证号", maxLength = 20, isNotEmpty = true,errorInfo = "身份证字段不可为空!")
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
......@@ -123,16 +123,14 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
/**
* 社保缴纳月份
*/
@Length(max = 6, message = "社保缴纳月份 不能超过6 个字符")
@ExcelAttribute(name = "社保缴纳月份", maxLength = 6,isInteger = true)
@ExcelAttribute(name = "社保缴纳月份", maxLength = 6, min = 6,isInteger = true)
@Schema(description = "社保缴纳月份")
@ExcelProperty("社保缴纳月份")
private String socialPayMonth;
/**
* 社保生成月份
*/
@Length(max = 6, message = "社保生成月份 不能超过6 个字符")
@ExcelAttribute(name = "社保生成月份", maxLength = 6,isInteger = true)
@ExcelAttribute(name = "社保生成月份", maxLength = 6, min = 6,isInteger = true)
@Schema(description = "社保生成月份")
@ExcelProperty("社保生成月份")
private String socialCreateMonth;
......@@ -154,16 +152,14 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
/**
* 公积金缴纳月份
*/
@Length(max = 6, message = "公积金缴纳月份 不能超过6 个字符")
@ExcelAttribute(name = "公积金缴纳月份", maxLength = 6,isInteger = true)
@ExcelAttribute(name = "公积金缴纳月份", maxLength = 6, min = 6,isInteger = true)
@Schema(description = "公积金缴纳月份")
@ExcelProperty("公积金缴纳月份")
private String providentPayMonth;
/**
* 公积金生成月份
*/
@Length(max = 6, message = "公积金生成月份 不能超过6 个字符")
@ExcelAttribute(name = "公积金生成月份", maxLength = 6,isInteger = true)
@ExcelAttribute(name = "公积金生成月份", maxLength = 6, min = 6,isInteger = true)
@Schema(description = "公积金生成月份")
@ExcelProperty("公积金生成月份")
private String providentCreateMonth;
......@@ -332,75 +328,54 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
@ExcelProperty("财务账单ID")
private String financeBillId;
/**
* 单位社保补缴利息
* 单位补缴利息
*/
@ExcelAttribute(name = "单位社保补缴利息")
@Schema(description ="单位社保补缴利息")
@ExcelProperty("单位社保补缴利息")
@ExcelAttribute(name = "单位补缴利息", isFloat = true,max = "999999999.99")
@Schema(description ="单位补缴利息")
@ExcelProperty("单位补缴利息")
private BigDecimal companyAccrual;
/**
* 个人社保补缴利息
* 个人补缴利息
*/
@ExcelAttribute(name = "个人社保补缴利息")
@Schema(description ="个人社保补缴利息")
@ExcelProperty("个人社保补缴利息")
@ExcelAttribute(name = "个人补缴利息", isFloat = true,max = "999999999.99")
@Schema(description ="个人补缴利息")
@ExcelProperty("个人补缴利息")
private BigDecimal personalAccrual;
/**
* 单位养老基数
* 养老基数
*/
@ExcelAttribute(name = "单位养老基数")
@Schema(description ="单位养老基数")
@ExcelProperty("单位养老基数")
@ExcelAttribute(name = "养老基数", isFloat = true,max = "999999999.99")
@Schema(description ="养老基数")
@ExcelProperty("养老基数")
private BigDecimal unitPensionSet;
/**
* 单位医疗基数
* 医保基数
*/
@ExcelAttribute(name = "单位医疗基数")
@Schema(description ="单位医疗基数")
@ExcelProperty("单位医疗基数")
@ExcelAttribute(name = "医保基数", isFloat = true,max = "999999999.99")
@Schema(description ="医保基数")
@ExcelProperty("医保基数")
private BigDecimal unitMedicalSet;
/**
* 单位失业基数
* 失业基数
*/
@ExcelAttribute(name = "单位失业基数")
@Schema(description ="单位失业基数")
@ExcelProperty("单位失业基数")
@ExcelAttribute(name = "失业基数", isFloat = true,max = "999999999.99")
@Schema(description ="失业基数")
@ExcelProperty("失业基数")
private BigDecimal unitUnemploymentSet;
/**
* 单位工伤基数
* 工伤基数
*/
@ExcelAttribute(name = "单位工伤基数")
@Schema(description ="单位工伤基数")
@ExcelProperty("单位工伤基数")
@ExcelAttribute(name = "工伤基数", isFloat = true,max = "999999999.99")
@Schema(description ="工伤基数")
@ExcelProperty("工伤基数")
private BigDecimal unitInjurySet;
/**
* 单位生育基数
* 生育基数
*/
@ExcelAttribute(name = "单位生育基数")
@Schema(description ="单位生育基数")
@ExcelProperty("单位生育基数")
@ExcelAttribute(name = "生育基数", isFloat = true,max = "999999999.99")
@Schema(description ="生育基数")
@ExcelProperty("生育基数")
private BigDecimal unitBirthSet;
/**
* 个人养老基数
*/
@ExcelAttribute(name = "个人养老基数")
@Schema(description ="个人养老基数")
@ExcelProperty("个人养老基数")
private BigDecimal personalPensionSet;
/**
* 个人医疗基数
*/
@ExcelAttribute(name = "个人医疗基数")
@Schema(description ="个人医疗基数")
@ExcelProperty("个人医疗基数")
private BigDecimal personalMedicalSet;
/**
* 个人失业基数
*/
@ExcelAttribute(name = "个人失业基数")
@Schema(description ="个人失业基数")
@ExcelProperty("个人失业基数")
private BigDecimal personalUnemploymentSet;
/**
* 单位养老比例
*/
......@@ -472,108 +447,108 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
@ExcelProperty("个人大病比例")
private BigDecimal personalBigailmentPer;
/**
* 单位养老金额
* 养老单位缴费
*/
@ExcelAttribute(name = "单位养老金额")
@Schema(description ="单位养老金额")
@ExcelProperty("单位养老金额")
@ExcelAttribute(name = "养老单位缴费", isFloat = true,max = "999999999.99")
@Schema(description ="养老单位缴费")
@ExcelProperty("养老单位缴费")
private BigDecimal unitPensionMoney;
/**
* 单位医疗金额
* 医保单位缴费
*/
@ExcelAttribute(name = "单位医疗金额")
@Schema(description ="单位医疗金额")
@ExcelProperty("单位医疗金额")
@ExcelAttribute(name = "医保单位缴费", isFloat = true,max = "999999999.99")
@Schema(description ="医保单位缴费")
@ExcelProperty("医保单位缴费")
private BigDecimal unitMedicalMoney;
/**
* 单位失业金额
* 失业单位缴费
*/
@ExcelAttribute(name = "单位失业金额")
@Schema(description ="单位失业金额")
@ExcelProperty("单位失业金额")
@ExcelAttribute(name = "失业单位缴费", isFloat = true,max = "999999999.99")
@Schema(description ="失业单位缴费")
@ExcelProperty("失业单位缴费")
private BigDecimal unitUnemploymentMoney;
/**
* 单位工伤金额
* 工伤缴费
*/
@ExcelAttribute(name = "单位工伤金额")
@Schema(description ="单位工伤金额")
@ExcelProperty("单位工伤金额")
@ExcelAttribute(name = "工伤缴费", isFloat = true,max = "999999999.99")
@Schema(description ="工伤缴费")
@ExcelProperty("工伤缴费")
private BigDecimal unitInjuryMoney;
/**
* 单位生育金额
* 生育缴费
*/
@ExcelAttribute(name = "单位生育金额")
@Schema(description ="单位生育金额")
@ExcelProperty("单位生育金额")
@ExcelAttribute(name = "生育缴费", isFloat = true,max = "999999999.99")
@Schema(description ="生育缴费")
@ExcelProperty("生育缴费")
private BigDecimal unitBirthMoney;
/**
* 单位大病金额
* 单位医疗救助金
*/
@ExcelAttribute(name = "单位大病金额")
@Schema(description ="单位大病金额")
@ExcelProperty("单位大病金额")
@ExcelAttribute(name = "单位医疗救助金", isFloat = true,max = "999999999.99")
@Schema(description ="单位医疗救助金")
@ExcelProperty("单位医疗救助金")
private BigDecimal unitBigmailmentMoney;
/**
* 个人养老金额
* 养老个人缴费
*/
@ExcelAttribute(name = "个人养老金额")
@Schema(description ="个人养老金额")
@ExcelProperty("个人养老金额")
@ExcelAttribute(name = "养老个人缴费", isFloat = true,max = "999999999.99")
@Schema(description ="养老个人缴费")
@ExcelProperty("养老个人缴费")
private BigDecimal personalPensionMoney;
/**
* 个人医疗金额
* 医保个人缴费
*/
@ExcelAttribute(name = "个人医疗金额")
@Schema(description ="个人医疗金额")
@ExcelProperty("个人医疗金额")
@ExcelAttribute(name = "医保个人缴费", isFloat = true,max = "999999999.99")
@Schema(description ="医保个人缴费")
@ExcelProperty("医保个人缴费")
private BigDecimal personalMedicalMoney;
/**
* 个人失业金额
* 失业个人缴费
*/
@ExcelAttribute(name = "个人失业金额")
@Schema(description ="个人失业金额")
@ExcelProperty("个人失业金额")
@ExcelAttribute(name = "失业个人缴费", isFloat = true,max = "999999999.99")
@Schema(description ="失业个人缴费")
@ExcelProperty("失业个人缴费")
private BigDecimal personalUnemploymentMoney;
/**
* 个人大病金额
* 个人医疗救助金
*/
@ExcelAttribute(name = "个人大病金额")
@Schema(description ="个人大病金额")
@ExcelProperty("个人大病金额")
@ExcelAttribute(name = "个人医疗救助金", isFloat = true,max = "999999999.99")
@Schema(description ="个人医疗救助金")
@ExcelProperty("个人医疗救助金")
private BigDecimal personalBigmailmentMoney;
/**
* 公积金编号
*/
@Length(max=50,message = "公积金编号 不能超过50 个字符")
@ExcelAttribute(name = "公积金编号", maxLength = 50 )
@Length(max=20,message = "公积金编号不能超过20个字符")
@ExcelAttribute(name = "公积金编号", maxLength = 20 )
@Schema(description ="公积金编号")
@ExcelProperty("公积金编号")
private String providentNo;
/**
* 公积金单边基数
*/
@ExcelAttribute(name = "公积金单边基数")
@ExcelAttribute(name = "公积金单边基数", isFloat = true,max = "999999999.99")
@Schema(description ="公积金单边基数")
@ExcelProperty("公积金单边基数")
private BigDecimal unitProvidentSet;
/**
* 公积金单边比例
*/
@ExcelAttribute(name = "公积金单边比例")
@ExcelAttribute(name = "公积金单边比例", isFloat = true,max = "100.00")
@Schema(description ="公积金单边比例")
@ExcelProperty("公积金单边比例")
private BigDecimal providentPercent;
/**
* 公积金单边金额
*/
@ExcelAttribute(name = "公积金单边金额")
@ExcelAttribute(name = "公积金单边金额", isFloat = true,max = "999999999.99")
@Schema(description ="公积金单边金额")
@ExcelProperty("公积金单边金额")
private BigDecimal unitProvidentSum;
/**
* 个人公积金基数
*/
@ExcelAttribute(name = "个人公积金基数")
@ExcelAttribute(name = "个人公积金基数", isFloat = true,max = "999999999.99")
@Schema(description ="个人公积金基数")
@ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet;
......
......@@ -396,11 +396,11 @@ public class TPreDispatchReduceVo {
private String pensionAddressReduce;
/**
* 养老截止时间
* 养老时间
*/
@Schema(description ="养老截止时间")
@Schema(description ="养老时间")
@Length(max = 6, message = "养老时间不能超过6个字符")
@ExcelAttribute(name = "养老时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "养老时间", maxLength = 6, min = 6, isInteger = true)
private String pensionEndReduce;
/**
......@@ -415,7 +415,7 @@ public class TPreDispatchReduceVo {
*/
@Schema(description ="医疗时间")
@Length(max = 6, message = "医疗时间不能超过6个字符")
@ExcelAttribute(name = "医疗时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "医疗时间", maxLength = 6, min = 6, isInteger = true)
private String medicalEndReduce;
/**
......@@ -423,7 +423,7 @@ public class TPreDispatchReduceVo {
*/
@Schema(description ="工伤时间")
@Length(max = 6, message = "工伤时间不能超过6个字符")
@ExcelAttribute(name = "工伤时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "工伤时间", maxLength = 6, min = 6, isInteger = true)
private String injuryEndReduce;
/**
......@@ -438,7 +438,7 @@ public class TPreDispatchReduceVo {
*/
@Schema(description ="生育时间")
@Length(max = 6, message = "生育时间不能超过6个字符")
@ExcelAttribute(name = "生育时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "生育时间", maxLength = 6, min = 6, isInteger = true)
private String birthEndReduce;
/**
......@@ -468,7 +468,7 @@ public class TPreDispatchReduceVo {
*/
@Schema(description ="公积金时间")
@Length(max = 6, message = "公积金时间不能超过6个字符")
@ExcelAttribute(name = "公积金时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "公积金时间", maxLength = 6, min = 6, isInteger = true)
private String fundEndReduce;
/**
......
......@@ -330,7 +330,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
* 医疗截止时间
*/
@Length(max = 6, message = "医疗截止时间不能超过6个字符")
@ExcelAttribute(name = "医疗截止时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "医疗截止时间", maxLength = 6, min = 6, isInteger = true)
private String medicalEndReduce;
/**
* 工伤截止城市
......@@ -342,7 +342,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
* 工伤截止时间
*/
@Length(max = 6, message = "工伤截止时间不能超过6个字符")
@ExcelAttribute(name = "工伤截止时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "工伤截止时间", maxLength = 6, min = 6, isInteger = true)
private String injuryEndReduce;
/**
* 生育截止城市
......@@ -354,7 +354,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
* 生育截止时间
*/
@Length(max = 6, message = "生育截止时间不能超过6个字符")
@ExcelAttribute(name = "生育截止时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "生育截止时间", maxLength = 6, min = 6, isInteger = true)
private String birthEndReduce;
/**
* 失业截止城市
......@@ -366,7 +366,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
* 失业截止时间
*/
@Length(max = 6, message = "失业截止时间不能超过6个字符")
@ExcelAttribute(name = "失业截止时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "失业截止时间", maxLength = 6, min = 6, isInteger = true)
private String unemploymentEndReduce;
/**
* 公积金截止城市
......@@ -378,7 +378,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
* 公积金截止时间
*/
@Length(max = 6, message = "公积金截止时间不能超过6个字符")
@ExcelAttribute(name = "公积金截止时间", maxLength = 6, isInteger = true)
@ExcelAttribute(name = "公积金截止时间", maxLength = 6, min = 6, isInteger = true)
private String fundEndReduce;
/**
......
......@@ -55,14 +55,14 @@ public class TPaymentInfoImportLogController {
@Operation(description = "导出社保导入日志")
@GetMapping("/exportPaymentInfoLog")
public String exportPaymentInfoLog(HttpServletResponse response) {
public String exportPaymentInfoLog() {
YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_WAIT_EXPORT;
String importRandom = (String) redisUtil.get(key);
if (StringUtils.isBlank(importRandom)) {
if (StringUtils.isNotBlank(importRandom)) {
return importRandom;
}
return null;
return CommonConstants.ZERO_STRING;
}
/**
......
......@@ -55,6 +55,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.*;
import com.alibaba.excel.EasyExcel;
......@@ -196,8 +197,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return R.failed("非本人创建的数据禁止删除!");
}
if (CommonConstants.ZERO_STRING.equals(paymentInfo.getPushStatus()) &&
!CommonConstants.ONE_STRING.equals(user.getId())) {
if (CommonConstants.ZERO_STRING.equals(paymentInfo.getPushStatus())) {
return R.failed("已推送至结算平台禁止删除!");
}
baseMapper.deleteById(id);
......@@ -558,12 +558,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} while (computeFlag);
String importSuccessKey = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_WAIT_EXPORT;
DecimalFormat df = new DecimalFormat("0.00000");
String maerialRatio = df.format((float)atomicLine.get()/list.size());
// 创建一个数值格式化对象
NumberFormat numberFormat = NumberFormat.getInstance();
// 设置精确到小数点后2位
numberFormat.setMaximumFractionDigits(2);
String maerialRatio = numberFormat.format((float)atomicLine.get()/(float)list.size()*100);
redisUtil.set(importSuccessKey, maerialRatio, 1800L);
} catch (Exception e) {
log.error("社保缴费库数据批量导入异常:" + e);
log.error("社保缴费库数据批量导入异常:" + e);
redisUtil.remove(key);
} finally {
paymentInfoPensionMap.clear();
......@@ -1001,11 +1005,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setUnitUnemploymentSet(infoVo.getUnitUnemploymentSet());
paymentInfo.setUnitUnemploymentPer(infoVo.getUnitUnemploymentPer());
paymentInfo.setUnitBigailmentPer(infoVo.getUnitBigailmentPer());
paymentInfo.setPersonalPensionSet(paymentInfo.getUnitPensionSet());
paymentInfo.setPersonalPensionPer(infoVo.getPersonalPensionPer());
paymentInfo.setPersonalMedicalPer(infoVo.getPersonalMedicalPer());
paymentInfo.setPersonalMedicalSet(paymentInfo.getUnitMedicalSet());
paymentInfo.setPersonalUnemploymentSet(paymentInfo.getUnitUnemploymentSet());
paymentInfo.setPersonalUnemploymentPer(infoVo.getPersonalUnemploymentPer());
paymentInfo.setPersonalBigailmentPer(infoVo.getPersonalBigailmentPer());
paymentInfo.setCompanyAccrual(infoVo.getCompanyAccrual());
......@@ -1742,8 +1743,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
} while (computeFlag);
String importSuccessKey = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_WAIT_EXPORT;
redisUtil.set(importSuccessKey, random, 1800L);
// 创建一个数值格式化对象
NumberFormat numberFormat = NumberFormat.getInstance();
// 设置精确到小数点后2位
numberFormat.setMaximumFractionDigits(2);
String maerialRatio = numberFormat.format((float)atomicLine.get()/(float)list.size()*100);
redisUtil.set(importSuccessKey, maerialRatio, 1800L);
} catch (Exception e) {
log.error("社保缴费库数据批量导入异常:" + e);
......@@ -2054,11 +2062,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setUnitPensionMoney(infoVo.getUnitMoney());
payExists.setPersonalPensionMoney(infoVo.getPersonalMoney());
payExists.setUnitPensionSet(infoVo.getUnitSet());
payExists.setPersonalPensionSet(infoVo.getPersonalSet());
payExists.setUnitPensionMoney(infoVo.getUnitMoney());
payExists.setPersonalPensionMoney(infoVo.getPersonalMoney());
payExists.setUnitPensionSet(infoVo.getUnitSet());
payExists.setPersonalPensionSet(infoVo.getPersonalSet());
payExists.setUnitSocialSum(BigDecimalUtils.safeAdd(payExists.getUnitPensionMoney()
, payExists.getUnitSocialSum()));
payExists.setSocialSecurityPersonalSum(BigDecimalUtils.safeAdd(payExists.getPersonalPensionMoney()
......@@ -2068,11 +2073,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setUnitUnemploymentMoney(infoVo.getUnitMoney());
payExists.setPersonalUnemploymentMoney(infoVo.getPersonalMoney());
payExists.setUnitUnemploymentSet(infoVo.getUnitSet());
payExists.setPersonalUnemploymentSet(infoVo.getPersonalSet());
payExists.setUnitUnemploymentMoney(infoVo.getUnitMoney());
payExists.setPersonalUnemploymentMoney(infoVo.getPersonalMoney());
payExists.setUnitUnemploymentSet(infoVo.getUnitSet());
payExists.setPersonalUnemploymentSet(infoVo.getPersonalSet());
payExists.setUnitSocialSum(BigDecimalUtils.safeAdd(payExists.getUnitUnemploymentMoney()
, payExists.getUnitSocialSum()));
payExists.setSocialSecurityPersonalSum(BigDecimalUtils.safeAdd(payExists.getPersonalUnemploymentMoney()
......@@ -2090,13 +2093,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setUnitMedicalMoney(infoVo.getUnitMedicalMoney());
payExists.setUnitMedicalSet(infoVo.getMedicalSet());
payExists.setPersonalMedicalMoney(infoVo.getPersonalMedicalMoney());
payExists.setPersonalMedicalSet(infoVo.getMedicalSet());
payExists.setPersonalBigmailmentMoney(infoVo.getPersonalBigailmentMoney());
payExists.setUnitBigmailmentMoney(infoVo.getUnitBigailmentMoney());
payExists.setUnitMedicalMoney(infoVo.getUnitMedicalMoney());
payExists.setUnitMedicalSet(infoVo.getMedicalSet());
payExists.setPersonalMedicalMoney(infoVo.getPersonalMedicalMoney());
payExists.setPersonalMedicalSet(infoVo.getMedicalSet());
payExists.setPersonalBigmailmentMoney(infoVo.getPersonalBigailmentMoney());
payExists.setUnitBigmailmentMoney(infoVo.getUnitBigailmentMoney());
payExists.setSocialSecurityNo(infoVo.getSocialSecurityNo());
......
......@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.*;
......@@ -40,6 +41,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TPreDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.RequiredArgsConstructor;
import org.checkerframework.checker.units.qual.C;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -86,6 +88,9 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
@Autowired
private SysHouseHoldInfoMapper sysHouseHoldInfoMapper;
@Autowired
private TSocialFundInfoMapper socialFundInfoMapper;
/**
* 预派单记录简单分页查询
*
......@@ -395,14 +400,38 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (Common.isNotNull(preInfo.getLeaveDate())){
dispatchReduceVo.setLeaveDate(DateUtil.stringToDate(preInfo.getLeaveDate()));
}
dispatchReduceVo.setReasonType(preInfo.getLeaveReasonAdd());
dispatchReduceVo.setTrustRemark(preInfo.getLeaveReason());
TSocialFundInfo tSocialFundInfo = socialFundInfoMapper.selectOne(Wrappers.<TSocialFundInfo>query().lambda()
.eq(TSocialFundInfo::getEmpIdcard, preInfo.getEmpIdcard()).last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(tSocialFundInfo)) {
if (Common.isNotNull(tSocialFundInfo.getSettleDomainCode())) {
dispatchReduceVo.setDepartNo(tSocialFundInfo.getSettleDomainCode());
}else {
dispatchReduceVo.setDepartNo(tSocialFundInfo.getSettleDomainCodeFund());
}
}
// 渲染字典值
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue()
.get(CacheConstants.DICT_DETAILS
+ CommonConstants.COLON_STRING
+ "reduce_project_reason");
if (Common.isNotNull(dicObj)) {
for (Map.Entry<String, String> entry : dicObj.entrySet()) {
String key = entry.getKey();
String Label = entry.getValue();
if (Label.equals(preInfo.getLeaveReason())) {
dispatchReduceVo.setReasonType(key);
}
}
}
dispatchReduceVo.setTrustRemark(preInfo.getRemark());
if (Common.isNotNull(preInfo.getPensionEndReduce())) {
dispatchReduceVo.setSocialReduceDate(DateUtil.getFirstDay(preInfo.getPensionEndReduce()));
}
if (Common.isNotNull(preInfo.getFundEndReduce())){
dispatchReduceVo.setFundReduceDate(DateUtil.getFirstDay(preInfo.getFundEndReduce()));
}
dispatchReduceVo.setRowIndex(CommonConstants.ONE_INT);
List<TDispatchReduceVo> dispatchImportList = new ArrayList<>();
dispatchImportList.add(dispatchReduceVo);
dispatchInfoService.batchReduceDispatch(dispatchImportList, errorMessageList, user);
......@@ -415,6 +444,70 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
return R.ok();
}
@Override
public R update(TPreDispatchInfo tPreDispatchInfo) {
YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) {
return R.failed(CommonConstants.USER_FAIL);
}
ExcelAttributeValidityUtil<TPreDispatchInfo> validity = new ExcelAttributeValidityUtil<>(TPreDispatchInfo.class);
validity.ValidityObj(tPreDispatchInfo);
if (null != validity.getErrorInfo() && !validity.getErrorInfo().isEmpty()) {
return R.failed(validity.getErrorInfo(), ResultConstants.VALIDITY_FAIL);
}
HashMap<String, SysArea> areaHashMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
HashMap<String, SysArea> areaIdMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
TPreDispatchInfo preDispatchTemp = baseMapper.selectById(tPreDispatchInfo.getId());
tPreDispatchInfo.setType(preDispatchTemp.getType());
// 初步校验 如果合同时间变更 同步更新 派单的时间
R<Boolean> errorMessage1 = checkUpdate(tPreDispatchInfo, areaHashMap, areaIdMap, preDispatchTemp);
if (errorMessage1 != null) {
return errorMessage1;
}
// 社保缴纳地变更 同步更新 社保的省市县数据
R<Boolean> areaErrorMessage = handleSocialArea(areaHashMap, areaIdMap, tPreDispatchInfo, preDispatchTemp);
if (null != areaErrorMessage) {
return areaErrorMessage;
}
// 公积金缴纳地变更 同步更新 公积金的省市县数据
areaErrorMessage = handleFundArea(areaHashMap, areaIdMap, tPreDispatchInfo, preDispatchTemp);
if (null != areaErrorMessage) {
return areaErrorMessage;
}
// 派增要派单时间 派减不需要
if (CommonConstants.ZERO_STRING.equals(tPreDispatchInfo.getType())) {
// 社保起缴日期变更 验证是否可派增
R<Boolean> x = checkSocialStartDate(tPreDispatchInfo, preDispatchTemp);
if (x != null) {
return x;
}
// 公积金起缴日期变更 验证是否可派增
x = checkFundStartDate(tPreDispatchInfo, preDispatchTemp);
if (x != null) {
return x;
}
// 手机号码必填及格式校验
if (Common.isEmpty(tPreDispatchInfo.getTelTwo())){
return R.failed(PreDispatchConstants.TEL_NOT_EMPTY);
}
}
if (CommonConstants.ONE_STRING.equals(tPreDispatchInfo.getType())) {
initLeaveReason(tPreDispatchInfo);
tPreDispatchInfo.setPensionAddress(tPreDispatchInfo.getPensionAddressReduce());
tPreDispatchInfo.setFundAddress(tPreDispatchInfo.getFundAddressReduce());
}
// 合同开始截止时间 同步更新派单的合同时间
// tPreDispatchInfo.setContractEndAdd(tPreDispatchInfo.getContractEnd());
// tPreDispatchInfo.setContractStartAdd(tPreDispatchInfo.getContractStart());
// 没问题重置异常状态,有问题 在前面就返回了
tPreDispatchInfo.setExceptionContent(CommonConstants.EMPTY_STRING);
tPreDispatchInfo.setPreStatus(CommonConstants.ZERO_STRING);
baseMapper.updatePreDispatchInfoById(tPreDispatchInfo);
return R.ok();
}
/**
* 一键派单
* @param idStr
......@@ -465,22 +558,25 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
.eq(TPreDispatchInfo::getPreStatus, CommonConstants.ZERO_STRING));
}
if (!Common.isNotNull(preList)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
return R.failed("数据不符合派单要求,请核实!");
}
// 找出所有需要派减的社保或公积金数据 主要用于派减是获取项目相关数据
HashMap<String, TSocialInfo> socialMap = new HashMap<>();
HashMap<String, TProvidentFund> fundMap = new HashMap<>();
HashMap<String, TSocialInfo> socialMap = new HashMap<>();
// 封装需要派减的社保或公积金信息
initReduceSocialFundInfo(preList, socialMap, fundMap);
// 开始处理派增
List<ErrorMessage> errorMessageList = new ArrayList<>();
List<ErrorMessage> errorMsgList = new ArrayList<>();
HashMap<String, SysArea> areaMap = new HashMap<>();
HashMap<String, SysArea> areaIdMap = new HashMap<>();
int i = 1;
for (TPreDispatchInfo pre : preList) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
i++;
if (checkLimit(pre)) {
errorMessageList.add(new ErrorMessage(i+1,"派减时间为次月之后的月份不做处理!"));
//重新组装数据
resetMessageList(pre, errorMessageList, errorMsgList, i + 1);
continue;
}
// 派单派增处理
......@@ -488,14 +584,43 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
areaMap, areaIdMap);
// 派单派减处理
if (CommonConstants.ONE_STRING.equals(pre.getType())) {
// 当月创建的大于 限制日期的不派单 放在次月派单 本月之前的数据正常派单
if (null != pre.getDayLimit() && pre.getCreateTime().getDayOfMonth() > pre.getDayLimit().intValue() &&
LocalDateTime.now().getMonthValue() == pre.getCreateTime().getMonthValue()) {
errorMessageList.add(new ErrorMessage(i+1,"当月创建的大于限制日期的不派单,放在次月派单!"));
//重新组装数据
resetMessageList(pre, errorMessageList, errorMsgList, i + 1);
continue;
}
TDispatchReduceVo dispatchReduceVo = new TDispatchReduceVo();
dispatchReduceVo.setEmpName(pre.getEmpName());
dispatchReduceVo.setEmpIdcard(pre.getEmpIdcard());
if (null != pre.getLeaveDate()){
dispatchReduceVo.setLeaveDate(DateUtil.stringToDate(pre.getLeaveDate()));
TSocialFundInfo tSocialFundInfo = socialFundInfoMapper.selectOne(Wrappers.<TSocialFundInfo>query().lambda()
.eq(TSocialFundInfo::getEmpIdcard, pre.getEmpIdcard()).last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(tSocialFundInfo)) {
if (Common.isNotNull(tSocialFundInfo.getSettleDomainCode())) {
dispatchReduceVo.setDepartNo(tSocialFundInfo.getSettleDomainCode());
}else {
dispatchReduceVo.setDepartNo(tSocialFundInfo.getSettleDomainCodeFund());
}
}
dispatchReduceVo.setReasonType(pre.getLeaveReasonAdd());
dispatchReduceVo.setTrustRemark(pre.getLeaveReason());
// 渲染字典值
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue()
.get(CacheConstants.DICT_DETAILS
+ CommonConstants.COLON_STRING
+ "reduce_project_reason");
if (Common.isNotNull(dicObj)) {
for (Map.Entry<String, String> entry : dicObj.entrySet()) {
String key = entry.getKey();
String Label = entry.getValue();
if (Label.equals(pre.getLeaveReason())) {
dispatchReduceVo.setReasonType(key);
}
}
}
dispatchReduceVo.setTrustRemark(pre.getRemark());
dispatchReduceVo.setRowIndex(i);
// 处理派减派单时间
dispatchReduce(dispatchReduceVo, pre);
List<TDispatchReduceVo> dispatchImportList = new ArrayList<>();
......@@ -509,75 +634,11 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
}
if (Common.isNotNull(errorMsgList)) {
return R.failed(errorMsgList);
return R.ok(errorMsgList,"操作成功,存在异常数据,请核实");
}
return R.ok();
}
@Override
public R update(TPreDispatchInfo tPreDispatchInfo) {
YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) {
return R.failed(CommonConstants.USER_FAIL);
}
ExcelAttributeValidityUtil<TPreDispatchInfo> validity = new ExcelAttributeValidityUtil<>(TPreDispatchInfo.class);
validity.ValidityObj(tPreDispatchInfo);
if (null != validity.getErrorInfo() && !validity.getErrorInfo().isEmpty()) {
return R.failed(validity.getErrorInfo(), ResultConstants.VALIDITY_FAIL);
}
HashMap<String, SysArea> areaHashMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
HashMap<String, SysArea> areaIdMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
TPreDispatchInfo preDispatchTemp = baseMapper.selectById(tPreDispatchInfo.getId());
tPreDispatchInfo.setType(preDispatchTemp.getType());
// 初步校验 如果合同时间变更 同步更新 派单的时间
R<Boolean> errorMessage1 = checkUpdate(tPreDispatchInfo, areaHashMap, areaIdMap, preDispatchTemp);
if (errorMessage1 != null) {
return errorMessage1;
}
// 社保缴纳地变更 同步更新 社保的省市县数据
R<Boolean> areaErrorMessage = handleSocialArea(areaHashMap, areaIdMap, tPreDispatchInfo, preDispatchTemp);
if (null != areaErrorMessage) {
return areaErrorMessage;
}
// 公积金缴纳地变更 同步更新 公积金的省市县数据
areaErrorMessage = handleFundArea(areaHashMap, areaIdMap, tPreDispatchInfo, preDispatchTemp);
if (null != areaErrorMessage) {
return areaErrorMessage;
}
// 派增要派单时间 派减不需要
if (CommonConstants.ZERO_STRING.equals(tPreDispatchInfo.getType())) {
// 社保起缴日期变更 验证是否可派增
R<Boolean> x = checkSocialStartDate(tPreDispatchInfo, preDispatchTemp);
if (x != null) {
return x;
}
// 公积金起缴日期变更 验证是否可派增
x = checkFundStartDate(tPreDispatchInfo, preDispatchTemp);
if (x != null) {
return x;
}
// 手机号码必填及格式校验
if (Common.isEmpty(tPreDispatchInfo.getTelTwo())){
return R.failed(PreDispatchConstants.TEL_NOT_EMPTY);
}
}
if (CommonConstants.ONE_STRING.equals(tPreDispatchInfo.getType())) {
initLeaveReason(tPreDispatchInfo);
tPreDispatchInfo.setPensionAddress(tPreDispatchInfo.getPensionAddressReduce());
tPreDispatchInfo.setFundAddress(tPreDispatchInfo.getFundAddressReduce());
}
// 合同开始截止时间 同步更新派单的合同时间
// tPreDispatchInfo.setContractEndAdd(tPreDispatchInfo.getContractEnd());
// tPreDispatchInfo.setContractStartAdd(tPreDispatchInfo.getContractStart());
// 没问题重置异常状态,有问题 在前面就返回了
tPreDispatchInfo.setExceptionContent(CommonConstants.EMPTY_STRING);
tPreDispatchInfo.setPreStatus(CommonConstants.ZERO_STRING);
baseMapper.updatePreDispatchInfoById(tPreDispatchInfo);
return R.ok();
}
@Override
public List<ErrorMessage> batchSavePreDisPatchAdd(List<TPreDispatchInfo> listInfo, YifuUser user, String socialHouse
, String fundHouse, String departId) {
......@@ -1112,7 +1173,9 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
info.setSocialHouseAdd(sysHouseHoldInfo.getId());
SysHouseHoldInfo sysHouseHoldFund = sysHouseHoldInfoMapper.selectOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getName, fundHouse).eq(SysHouseHoldInfo::getType, CommonConstants.ONE_STRING));
info.setFundHouseAdd(sysHouseHoldFund.getId());
if (Common.isNotNull(sysHouseHoldFund)) {
info.setFundHouseAdd(sysHouseHoldFund.getId());
}
}
/**
......@@ -2044,11 +2107,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
* @Date 2022-07-18
**/
private boolean checkLimit(TPreDispatchInfo pre) {
// 当月创建的大于 限制日期的不派单 放在次月派单 本月之前的数据正常派单
if (null != pre.getDayLimit() && pre.getCreateTime().getDayOfMonth() > pre.getDayLimit().intValue() &&
LocalDateTime.now().getMonthValue() == pre.getCreateTime().getMonthValue()) {
return true;
}
// 当派减时间为次月之后的月份 不做处理 放到次月及之后派单
if (Common.isNotNull(pre.getFundEndReduce()) && checkMonthForReduce(pre.getFundEndReduce())) {
return true;
......@@ -2097,27 +2155,20 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
* @Date 2022-07-18
**/
private R<Boolean> handleDispatchAddRes(TPreDispatchInfo preInfo, List<ErrorMessage> errorMessageList) {
if (errorMessageList.size() > CommonConstants.ZERO_INT) {
if (errorMessageList.size() == CommonConstants.ZERO_INT) {
preInfo.setPreStatus(CommonConstants.TWO_STRING);
preInfo.setExceptionContent(CommonConstants.EMPTY_STRING);
baseMapper.updatePreStatusById(preInfo);
return null;
} else {
ErrorMessage errorMessage = errorMessageList.get(CommonConstants.ZERO_INT);
if (null != errorMessage) {
if (errorMessage.getMessage().indexOf(PreDispatchConstants.DISPATCH_ADD_SUCCESS) >= CommonConstants.ZERO_INT) {
preInfo.setPreStatus(CommonConstants.TWO_STRING);
preInfo.setExceptionContent(CommonConstants.EMPTY_STRING);
baseMapper.updatePreStatusById(preInfo);
return R.ok(null, preInfo.getEmpIdcard() +
CommonConstants.COLON_STRING +
PreDispatchConstants.DISPATCH_ADD_SUCCESS);
} else {
preInfo.setPreStatus(CommonConstants.ONE_STRING);
preInfo.setExceptionContent(errorMessage.getMessage());
baseMapper.updatePreStatusById(preInfo);
return R.failed(preInfo.getEmpIdcard() +
CommonConstants.COLON_STRING +
errorMessage.getMessage());
}
}
preInfo.setPreStatus(CommonConstants.ONE_STRING);
preInfo.setExceptionContent(errorMessage.getMessage());
baseMapper.updatePreStatusById(preInfo);
return R.failed(preInfo.getEmpIdcard() +
CommonConstants.COLON_STRING +
errorMessage.getMessage());
}
return null;
}
private R<Boolean> handleBatchSocialFundReduce(TPreDispatchInfo preInfo,
......@@ -2185,8 +2236,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
importVo.setEmpMobile(preInfo.getTelTwo());
importVo.setCustomerId(preInfo.getUnitIdAdd());
importVo.setCustomerCode(preInfo.getUnitNameAdd());
importVo.setSettleDomainId(preInfo.getDepartIdAdd());
importVo.setIdCardAddress(preInfo.getPayAddress());
importVo.setSettleDomainId(preInfo.getDepartIdAdd());
importVo.setPost(preInfo.getPositionAdd());
importVo.setWorkingHours(preInfo.getWorkingHoursAdd());
importVo.setEmpNational(CommonConstants.ONE_STRING);
......@@ -2330,7 +2381,9 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
if (Common.isNotNull(preInfo.getFundAddress())){
SysHouseHoldInfo sysHouseHoldInfo = sysHouseHoldInfoMapper.selectById(preInfo.getFundHouseAdd());
importVo.setProvidentHousehold(sysHouseHoldInfo.getName());
if (Common.isNotNull(sysHouseHoldInfo)) {
importVo.setProvidentHousehold(sysHouseHoldInfo.getName());
}
}
}
......@@ -2366,6 +2419,11 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
List<TDispatchImportVo> importVoList = new ArrayList<>();
importVoList.add(importVo);
// 当月创建的大于 限制日期的不派单 放在次月派单 本月之前的数据正常派单
if (null != pre.getDayLimit() && pre.getCreateTime().getDayOfMonth() > pre.getDayLimit().intValue() &&
LocalDateTime.now().getMonthValue() == pre.getCreateTime().getMonthValue()) {
errorMessageList.add(new ErrorMessage(i+1,"当月创建的大于限制日期的不派单,放在次月派单!"));
}
// 如果档案地市空 只能用缴纳地封装,如果缴纳地有问题直接返回
if (null == importVo.getFileCity()){
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
......@@ -2383,7 +2441,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
// 处理派增结果
handleDispatchAddRes(pre, errorMessageList);
// 重新组装数据
resetMessageList(pre, errorMessageList, errorMsgList, i+1);
}
resetMessageList(pre, errorMessageList, errorMsgList, i+1);
}
}
......@@ -68,9 +68,6 @@
<result property="unitUnemploymentSet" column="UNIT_UNEMPLOYMENT_SET"/>
<result property="unitInjurySet" column="UNIT_INJURY_SET"/>
<result property="unitBirthSet" column="UNIT_BIRTH_SET"/>
<result property="personalPensionSet" column="PERSONAL_PENSION_SET"/>
<result property="personalMedicalSet" column="PERSONAL_MEDICAL_SET"/>
<result property="personalUnemploymentSet" column="PERSONAL_UNEMPLOYMENT_SET"/>
<result property="unitPensionPer" column="UNIT_PENSION_PER"/>
<result property="unitMedicalPer" column="UNIT_MEDICAL_PER"/>
<result property="unitUnemploymentPer" column="UNIT_UNEMPLOYMENT_PER"/>
......@@ -92,6 +89,8 @@
<result property="personalUnemploymentMoney" column="PERSONAL_UNEMPLOYMENT_MONEY"/>
<result property="personalBigmailmentMoney" column="PERSONAL_BIGMAILMENT_MONEY"/>
<result property="providentNo" column="PROVIDENT_NO"/>
<result property="salarySocialFlag" column="SALARY_SOCIAL_FLAG"/>
<result property="salaryFundFlag" column="SALARY_FUND_FLAG"/>
<result property="unitProvidentSet" column="UNIT_PROVIDENT_SET"/>
<result property="providentPercent" column="PROVIDENT_PERCENT"/>
<result property="unitProvidentSum" column="UNIT_PROVIDENT_SUM"/>
......@@ -141,6 +140,8 @@
a.TELECOM_NUMBER,
a.SORT_TIME,
a.AGENT_ID,
a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG,
a.FINANCE_BILL_ID,
a.COMPANY_ACCRUAL,
a.PERSONAL_ACCRUAL,
......@@ -268,7 +269,7 @@
AND a.ID = #{tPaymentInfo.id}
</if>
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like CONCAT(#{tPaymentInfo.empName},'%')
AND a.EMP_NAME = #{tPaymentInfo.empName}
</if>
<if test="tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''">
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
......@@ -277,7 +278,7 @@
AND a.EMP_ID = #{tPaymentInfo.empId}
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like CONCAT(#{tPaymentInfo.empIdcard},'%')
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.unitId != null and tPaymentInfo.unitId.trim() != ''">
AND a.UNIT_ID = #{tPaymentInfo.unitId}
......@@ -286,7 +287,7 @@
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
AND a.SOCIAL_HOUSEHOLD like CONCAT(#{tPaymentInfo.socialHousehold},'%')
</if>
<if test="tPaymentInfo.socialSecurityNo != null and tPaymentInfo.socialSecurityNo.trim() != ''">
AND a.SOCIAL_SECURITY_NO like CONCAT(#{tPaymentInfo.socialSecurityNo},'%')
......@@ -316,25 +317,16 @@
AND a.PROVIDENT_CREATE_MONTH = #{tPaymentInfo.providentCreateMonth}
</if>
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
AND a.PROVIDENT_HOUSEHOLD like CONCAT(#{tPaymentInfo.providentHousehold},'%')
</if>
<if test="tPaymentInfo.providentPayAddr != null and tPaymentInfo.providentPayAddr.trim() != ''">
AND a.PROVIDENT_PAY_ADDR = #{tPaymentInfo.providentPayAddr}
</if>
<if test="tPaymentInfo.fundProvince != null and tPaymentInfo.fundProvince.trim() != ''">
AND a.FUND_PROVINCE = #{tPaymentInfo.fundProvince}
</if>
<if test="tPaymentInfo.fundCity != null and tPaymentInfo.fundCity.trim() != ''">
AND a.FUND_CITY = #{tPaymentInfo.fundCity}
</if>
<if test="tPaymentInfo.fundTown != null and tPaymentInfo.fundTown.trim() != ''">
AND a.FUND_TOWN = #{tPaymentInfo.fundTown}
</if>
<if test="tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != ''">
AND a.SOCIAL_PROVINCE = #{tPaymentInfo.socialProvince}
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
</if>
<if test="tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != ''">
AND a.SOCIAL_CITY = #{tPaymentInfo.socialCity}
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
</if>
<if test="tPaymentInfo.socialTown == null">
<if test="tPaymentInfo.socialCity != null">
......@@ -409,15 +401,6 @@
<if test="tPaymentInfo.unitBirthSet != null">
AND a.UNIT_BIRTH_SET = #{tPaymentInfo.unitBirthSet}
</if>
<if test="tPaymentInfo.personalPensionSet != null">
AND a.PERSONAL_PENSION_SET = #{tPaymentInfo.personalPensionSet}
</if>
<if test="tPaymentInfo.personalMedicalSet != null">
AND a.PERSONAL_MEDICAL_SET = #{tPaymentInfo.personalMedicalSet}
</if>
<if test="tPaymentInfo.personalUnemploymentSet != null">
AND a.PERSONAL_UNEMPLOYMENT_SET = #{tPaymentInfo.personalUnemploymentSet}
</if>
<if test="tPaymentInfo.unitPensionPer != null">
AND a.UNIT_PENSION_PER = #{tPaymentInfo.unitPensionPer}
</if>
......@@ -527,7 +510,7 @@
AND a.ID = #{tPaymentInfo.id}
</if>
<if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
AND a.EMP_NAME like CONCAT(#{tPaymentInfo.empName},'%')
AND a.EMP_NAME = #{tPaymentInfo.empName}
</if>
<if test="tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''">
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
......@@ -536,7 +519,7 @@
AND a.EMP_ID = #{tPaymentInfo.empId}
</if>
<if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like CONCAT(#{tPaymentInfo.empIdcard},'%')
AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
</if>
<if test="tPaymentInfo.unitId != null and tPaymentInfo.unitId.trim() != ''">
AND a.UNIT_ID = #{tPaymentInfo.unitId}
......@@ -545,7 +528,7 @@
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
AND a.SOCIAL_HOUSEHOLD like CONCAT(#{tPaymentInfo.socialHousehold},'%')
</if>
<if test="tPaymentInfo.socialSecurityNo != null and tPaymentInfo.socialSecurityNo.trim() != ''">
AND a.SOCIAL_SECURITY_NO like CONCAT(#{tPaymentInfo.socialSecurityNo},'%')
......@@ -572,7 +555,7 @@
AND a.PROVIDENT_CREATE_MONTH = #{tPaymentInfo.providentCreateMonth}
</if>
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
AND a.PROVIDENT_HOUSEHOLD like CONCAT(#{tPaymentInfo.providentHousehold},'%')
</if>
<if test="tPaymentInfo.providentPayAddr != null and tPaymentInfo.providentPayAddr.trim() != ''">
AND a.PROVIDENT_PAY_ADDR = #{tPaymentInfo.providentPayAddr}
......@@ -665,15 +648,6 @@
<if test="tPaymentInfo.unitBirthSet != null">
AND a.UNIT_BIRTH_SET = #{tPaymentInfo.unitBirthSet}
</if>
<if test="tPaymentInfo.personalPensionSet != null">
AND a.PERSONAL_PENSION_SET = #{tPaymentInfo.personalPensionSet}
</if>
<if test="tPaymentInfo.personalMedicalSet != null">
AND a.PERSONAL_MEDICAL_SET = #{tPaymentInfo.personalMedicalSet}
</if>
<if test="tPaymentInfo.personalUnemploymentSet != null">
AND a.PERSONAL_UNEMPLOYMENT_SET = #{tPaymentInfo.personalUnemploymentSet}
</if>
<if test="tPaymentInfo.unitPensionPer != null">
AND a.UNIT_PENSION_PER = #{tPaymentInfo.unitPensionPer}
</if>
......@@ -807,9 +781,6 @@
<result property="unitUnemploymentSet" column="UNIT_UNEMPLOYMENT_SET"/>
<result property="unitInjurySet" column="UNIT_INJURY_SET"/>
<result property="unitBirthSet" column="UNIT_BIRTH_SET"/>
<result property="personalPensionSet" column="PERSONAL_PENSION_SET"/>
<result property="personalMedicalSet" column="PERSONAL_MEDICAL_SET"/>
<result property="personalUnemploymentSet" column="PERSONAL_UNEMPLOYMENT_SET"/>
<result property="unitPensionPer" column="UNIT_PENSION_PER"/>
<result property="unitMedicalPer" column="UNIT_MEDICAL_PER"/>
<result property="unitUnemploymentPer" column="UNIT_UNEMPLOYMENT_PER"/>
......
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