Commit 4964fff9 authored by huyuchen's avatar huyuchen

优化修改

parent 4a69c0b3
...@@ -2172,7 +2172,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2172,7 +2172,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
emp.setIdProvince(Common.isNotNullToInt(excel.getIdCardProvince())); emp.setIdProvince(Common.isNotNullToInt(excel.getIdCardProvince()));
emp.setIdCity(Common.isNotNullToInt(excel.getIdCardCity())); emp.setIdCity(Common.isNotNullToInt(excel.getIdCardCity()));
emp.setIdTown(Common.isNotNullToInt(excel.getIdCardTown())); emp.setIdTown(Common.isNotNullToInt(excel.getIdCardTown()));
emp.setProjectNum(CommonConstants.ONE_INT); // emp.setProjectNum(CommonConstants.ONE_INT);
emp.setDeptNo(excel.getSettleDomainCode()); emp.setDeptNo(excel.getSettleDomainCode());
emp.setPost(excel.getPost()); emp.setPost(excel.getPost());
emp.setDeptId(excel.getSettleDomainId()); emp.setDeptId(excel.getSettleDomainId());
......
...@@ -1147,89 +1147,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1147,89 +1147,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
} }
private void changeSocialInfoByBase(TSocialFundInfo social, SysBaseSetInfo socialSet) {
if (Common.isNotNull(socialSet)) {
social.setCanOverpay(socialSet.getCanOverpay());
social.setSocialHousehold(socialSet.getDepartId());
social.setCollectMoth(socialSet.getCollectMoth());
social.setCollectType(socialSet.getCollectType());
social.setHaveThisMonth(socialSet.getHaveThisMonth());
social.setInsuranceBigailment(socialSet.getInsuranceBigailment());
social.setInsuranceBirth(socialSet.getInsuranceBirth());
social.setInsuranceInjury(socialSet.getInsuranceInjury());
social.setInsuranceMedical(socialSet.getInsuranceMedical());
social.setInsurancePension(socialSet.getInsurancePension());
social.setInsuranceUnemployment(socialSet.getInsuranceUnemployment());
social.setLatestCardinality(socialSet.getInsuranceIsLatestCardinality());
social.setIsChargePersonal(socialSet.getIsChargePersonal());
social.setIsIllness(socialSet.getIsIllness());
social.setOverpayNumber(socialSet.getOverpayNumber());
social.setValueType(socialSet.getValueType());
social.setLowerLimit(socialSet.getLowerLimit());
social.setUpperLimit(socialSet.getUpperLimit());
// 比例初始化
// 按最低
if (CommonConstants.ZERO_STRING.equals(social.getPaymentType())) {
this.setBaseInfo(social, socialSet.getLowerLimit());
} else if (CommonConstants.TWO_STRING.equals(social.getPaymentType())) {
//按最高
this.setBaseInfo(social, socialSet.getUpperLimit());
} else if (CommonConstants.ONE_STRING.equals(social.getPaymentType())) {
//自定义
// 五险
if (social.getUnitPensionCardinal() != null) {
if (social.getUnitPensionCardinal().compareTo(socialSet.getLowerLimit()) < CommonConstants.ZERO_INT) {
social.setPersonalPensionCardinal(socialSet.getLowerLimit());
social.setUnitPensionCardinal(socialSet.getLowerLimit());
} else if (social.getUnitPensionCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT) {
social.setPersonalPensionCardinal(socialSet.getUpperLimit());
social.setUnitPensionCardinal(socialSet.getUpperLimit());
}
if (social.getUnitMedicalCardinal().compareTo(socialSet.getLowerLimit()) < CommonConstants.ZERO_INT) {
social.setPersonalMedicalCardinal(socialSet.getLowerLimit());
social.setUnitMedicalCardinal(socialSet.getLowerLimit());
} else if (social.getUnitMedicalCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT) {
social.setPersonalMedicalCardinal(socialSet.getUpperLimit());
social.setUnitMedicalCardinal(socialSet.getUpperLimit());
}
if (social.getUnitUnemploymentCardinal().compareTo(socialSet.getLowerLimit()) < CommonConstants.ZERO_INT) {
social.setPersonalUnemploymentCardinal(socialSet.getLowerLimit());
social.setUnitUnemploymentCardinal(socialSet.getLowerLimit());
} else if (social.getUnitUnemploymentCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT) {
social.setPersonalUnemploymentCardinal(socialSet.getUpperLimit());
social.setUnitUnemploymentCardinal(socialSet.getUpperLimit());
}
if (social.getUnitWorkInjuryCardinal().compareTo(socialSet.getLowerLimit()) < CommonConstants.ZERO_INT) {
social.setUnitWorkInjuryCardinal(socialSet.getLowerLimit());
} else if (social.getUnitWorkInjuryCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT) {
social.setUnitWorkInjuryCardinal(socialSet.getUpperLimit());
}
if (social.getUnitBirthCardinal().compareTo(socialSet.getLowerLimit()) < CommonConstants.ZERO_INT) {
social.setUnitBirthCardinal(socialSet.getLowerLimit());
} else if (social.getUnitBirthCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT) {
social.setUnitBirthCardinal(socialSet.getUpperLimit());
}
if (social.getUnitBigailmentCardinal().compareTo(socialSet.getLowerLimit()) < CommonConstants.ZERO_INT) {
social.setPersonalBigailmentCardinal(socialSet.getLowerLimit());
social.setUnitBigailmentCardinal(socialSet.getLowerLimit());
} else if (social.getUnitBigailmentCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT) {
social.setPersonalBigailmentCardinal(socialSet.getUpperLimit());
social.setUnitBigailmentCardinal(socialSet.getUpperLimit());
}
} else if (social.getUnitWorkInjuryCardinal() != null) {
// 兼职工伤
if (social.getUnitWorkInjuryCardinal().compareTo(socialSet.getLowerLimit()) < CommonConstants.ZERO_INT) {
social.setUnitWorkInjuryCardinal(socialSet.getLowerLimit());
} else if (social.getUnitWorkInjuryCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT) {
social.setUnitWorkInjuryCardinal(socialSet.getUpperLimit());
}
}
}
// 比例与金额
this.setProAndMoney(social, socialSet);
}
}
/** /**
* 初始化公积金预估信息 * 初始化公积金预估信息
* *
...@@ -1293,30 +1210,138 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1293,30 +1210,138 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
saveLibraryMap.put(mapKeyStr, lib); saveLibraryMap.put(mapKeyStr, lib);
} }
private void changeSocialInfoByBase(TSocialFundInfo social, SysBaseSetInfo socialSet) {
if (Common.isNotNull(socialSet)) {
social.setCanOverpay(socialSet.getCanOverpay());
social.setSocialHousehold(socialSet.getDepartId());
social.setCollectMoth(socialSet.getCollectMoth());
social.setCollectType(socialSet.getCollectType());
social.setHaveThisMonth(socialSet.getHaveThisMonth());
social.setInsuranceBigailment(socialSet.getInsuranceBigailment());
social.setInsuranceBirth(socialSet.getInsuranceBirth());
social.setInsuranceInjury(socialSet.getInsuranceInjury());
social.setInsuranceMedical(socialSet.getInsuranceMedical());
social.setInsurancePension(socialSet.getInsurancePension());
social.setInsuranceUnemployment(socialSet.getInsuranceUnemployment());
social.setLatestCardinality(socialSet.getInsuranceIsLatestCardinality());
social.setIsChargePersonal(socialSet.getIsChargePersonal());
social.setIsIllness(socialSet.getIsIllness());
social.setOverpayNumber(socialSet.getOverpayNumber());
social.setValueType(socialSet.getValueType());
social.setLowerLimit(socialSet.getLowerLimit());
social.setUpperLimit(socialSet.getUpperLimit());
// 比例初始化
// 按最低
if (CommonConstants.ZERO_STRING.equals(social.getPaymentType())) {
this.setBaseInfo(social, socialSet);
} else if (CommonConstants.TWO_STRING.equals(social.getPaymentType())) {
//按最高
this.setBaseInfo1(social, socialSet);
} else if (CommonConstants.ONE_STRING.equals(social.getPaymentType())) {
//自定义
// 五险
if (social.getUnitPensionCardinal() != null) {
if (social.getUnitPensionCardinal().compareTo(socialSet.getLowerPersion()) < CommonConstants.ZERO_INT) {
social.setPersonalPensionCardinal(socialSet.getLowerPersion());
social.setUnitPensionCardinal(socialSet.getLowerPersion());
} else if (social.getUnitPensionCardinal().compareTo(socialSet.getUpPersion()) > CommonConstants.ZERO_INT) {
social.setPersonalPensionCardinal(socialSet.getUpPersion());
social.setUnitPensionCardinal(socialSet.getUpPersion());
}
if (social.getUnitMedicalCardinal().compareTo(socialSet.getLowerMedical()) < CommonConstants.ZERO_INT) {
social.setPersonalMedicalCardinal(socialSet.getLowerMedical());
social.setUnitMedicalCardinal(socialSet.getLowerMedical());
} else if (social.getUnitMedicalCardinal().compareTo(socialSet.getUpMedical()) > CommonConstants.ZERO_INT) {
social.setPersonalMedicalCardinal(socialSet.getUpMedical());
social.setUnitMedicalCardinal(socialSet.getUpMedical());
}
if (social.getUnitUnemploymentCardinal().compareTo(socialSet.getLowerUnemployment()) < CommonConstants.ZERO_INT) {
social.setPersonalUnemploymentCardinal(socialSet.getLowerUnemployment());
social.setUnitUnemploymentCardinal(socialSet.getLowerUnemployment());
} else if (social.getUnitUnemploymentCardinal().compareTo(socialSet.getUpUnemployment()) > CommonConstants.ZERO_INT) {
social.setPersonalUnemploymentCardinal(socialSet.getUpUnemployment());
social.setUnitUnemploymentCardinal(socialSet.getUpUnemployment());
}
if (social.getUnitWorkInjuryCardinal().compareTo(socialSet.getLowerInjury()) < CommonConstants.ZERO_INT) {
social.setUnitWorkInjuryCardinal(socialSet.getLowerInjury());
} else if (social.getUnitWorkInjuryCardinal().compareTo(socialSet.getUpInjury()) > CommonConstants.ZERO_INT) {
social.setUnitWorkInjuryCardinal(socialSet.getUpInjury());
}
if (social.getUnitBirthCardinal().compareTo(socialSet.getLowerBirth()) < CommonConstants.ZERO_INT) {
social.setUnitBirthCardinal(socialSet.getLowerBirth());
} else if (social.getUnitBirthCardinal().compareTo(socialSet.getUpBirth()) > CommonConstants.ZERO_INT) {
social.setUnitBirthCardinal(socialSet.getUpBirth());
}
if (social.getUnitBigailmentCardinal().compareTo(socialSet.getLowerBig()) < CommonConstants.ZERO_INT) {
social.setPersonalBigailmentCardinal(socialSet.getLowerBig());
social.setUnitBigailmentCardinal(socialSet.getLowerBig());
} else if (social.getUnitBigailmentCardinal().compareTo(socialSet.getUpBig()) > CommonConstants.ZERO_INT) {
social.setPersonalBigailmentCardinal(socialSet.getUpBig());
social.setUnitBigailmentCardinal(socialSet.getUpBig());
}
} else if (social.getUnitWorkInjuryCardinal() != null) {
// 兼职工伤
if (social.getUnitWorkInjuryCardinal().compareTo(socialSet.getLowerInjury()) < CommonConstants.ZERO_INT) {
social.setUnitWorkInjuryCardinal(socialSet.getLowerInjury());
} else if (social.getUnitWorkInjuryCardinal().compareTo(socialSet.getUpInjury()) > CommonConstants.ZERO_INT) {
social.setUnitWorkInjuryCardinal(socialSet.getUpInjury());
}
}
}
// 比例与金额
this.setProAndMoney(social, socialSet);
}
}
/** /**
* @param social * @param social
* @param limitBase * @param socialSet
* @Description: 塞基数 * @Description: 塞基数
* @Author: hgw * @Author: hgw
* @Date: 2022/7/27 14:55 * @Date: 2022/7/27 14:55
* @return: void * @return: void
**/ **/
private void setBaseInfo(TSocialFundInfo social, BigDecimal limitBase) { private void setBaseInfo(TSocialFundInfo social, SysBaseSetInfo socialSet) {
if (social.getUnitPensionCardinal() != null) { if (social.getUnitPensionCardinal() != null) {
// 基数 // 基数
social.setPersonalPensionCardinal(limitBase); social.setPersonalPensionCardinal(socialSet.getLowerPersion());
social.setPersonalMedicalCardinal(limitBase); social.setPersonalMedicalCardinal(socialSet.getLowerMedical());
social.setPersonalUnemploymentCardinal(limitBase); social.setPersonalUnemploymentCardinal(socialSet.getLowerUnemployment());
social.setPersonalBigailmentCardinal(limitBase); social.setPersonalBigailmentCardinal(socialSet.getLowerBig());
social.setUnitPensionCardinal(limitBase); social.setUnitPensionCardinal(socialSet.getLowerPersion());
social.setUnitMedicalCardinal(limitBase); social.setUnitMedicalCardinal(socialSet.getLowerMedical());
social.setUnitUnemploymentCardinal(limitBase); social.setUnitUnemploymentCardinal(socialSet.getLowerUnemployment());
social.setUnitWorkInjuryCardinal(limitBase); social.setUnitWorkInjuryCardinal(socialSet.getLowerInjury());
social.setUnitBigailmentCardinal(limitBase); social.setUnitBigailmentCardinal(socialSet.getLowerBig());
social.setUnitBirthCardinal(limitBase); social.setUnitBirthCardinal(socialSet.getLowerBirth());
} else if (social.getUnitWorkInjuryCardinal() != null) {
social.setUnitWorkInjuryCardinal(socialSet.getLowerInjury());
}
}
/**
* @param social
* @param socialSet
* @Description: 塞基数
* @Author: hgw
* @Date: 2022/7/27 14:55
* @return: void
**/
private void setBaseInfo1(TSocialFundInfo social, SysBaseSetInfo socialSet) {
if (social.getUnitPensionCardinal() != null) {
// 基数
social.setPersonalPensionCardinal(socialSet.getUpPersion());
social.setPersonalMedicalCardinal(socialSet.getUpMedical());
social.setPersonalUnemploymentCardinal(socialSet.getUpUnemployment());
social.setPersonalBigailmentCardinal(socialSet.getUpBig());
social.setUnitPensionCardinal(socialSet.getUpPersion());
social.setUnitMedicalCardinal(socialSet.getUpMedical());
social.setUnitUnemploymentCardinal(socialSet.getUpUnemployment());
social.setUnitWorkInjuryCardinal(socialSet.getUpInjury());
social.setUnitBigailmentCardinal(socialSet.getUpBig());
social.setUnitBirthCardinal(socialSet.getUpBirth());
} else if (social.getUnitWorkInjuryCardinal() != null) { } else if (social.getUnitWorkInjuryCardinal() != null) {
social.setUnitWorkInjuryCardinal(limitBase); social.setUnitWorkInjuryCardinal(socialSet.getUpInjury());
} }
} }
......
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