Commit 1627c598 authored by hongguangwu's avatar hongguangwu

工资拉取-社保公积金-各自分开

parent 69a24780
......@@ -1018,48 +1018,52 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
sub = (new BigDecimal("100").subtract(deptSet.getUnitSeriousIllnessProp()))
.divide(SalaryConstants.B_ONEHUNDRED, SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
}
boolean typeFlag = true;
if (estmateList != null && !estmateList.isEmpty()) {
money = money.setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
for (TPaymentBySalaryVo m : estmateList) {
if (Common.isNotNull(idNumber) && idNumber.equals(m.getEmpIdcard())) {
//社保
if (isSocial && (!Common.isNotNull(m.getSalarySocialFlag()) || CommonConstants.ZERO_STRING.equals(m.getSalarySocialFlag()))
&& (m.getPersonalSocialSum() != null || m.getUnitSocialSum() != null)) {
if (isPerson && m.getPersonalSocialSum() != null) {
money = money.add(m.getPersonalSocialSum());
if (sub.compareTo(SalaryConstants.B_ZERO) != SalaryConstants.EQUAL
&& m.getUnitBitmailmentFee() != null) {
money = money.add(m.getUnitBitmailmentFee().multiply(sub));
if (isSocial && (m.getPersonalSocialSum() != null || m.getUnitSocialSum() != null)) {
typeFlag = false;
if (Common.isEmpty(m.getSalarySocialFlag()) || CommonConstants.ZERO_STRING.equals(m.getSalarySocialFlag())) {
if (isPerson && m.getPersonalSocialSum() != null) {
money = money.add(m.getPersonalSocialSum());
if (sub.compareTo(SalaryConstants.B_ZERO) != SalaryConstants.EQUAL
&& m.getUnitBitmailmentFee() != null) {
money = money.add(m.getUnitBitmailmentFee().multiply(sub));
}
}
}
if (!isPerson && m.getUnitSocialSum() != null) {
money = money.add(m.getUnitSocialSum());
if (sub.compareTo(SalaryConstants.B_ZERO) != SalaryConstants.EQUAL
&& m.getUnitBitmailmentFee() != null) {
money = money.subtract(m.getUnitBitmailmentFee().multiply(sub));
if (!isPerson && m.getUnitSocialSum() != null) {
money = money.add(m.getUnitSocialSum());
if (sub.compareTo(SalaryConstants.B_ZERO) != SalaryConstants.EQUAL
&& m.getUnitBitmailmentFee() != null) {
money = money.subtract(m.getUnitBitmailmentFee().multiply(sub));
}
}
a.setSocialType(CommonConstants.ZERO_STRING);
socialList.add(m.getId());
}
a.setSocialType(CommonConstants.ZERO_STRING);
socialList.add(m.getId());
}
//公积金
if (!isSocial && (!Common.isNotNull(m.getSalaryFundFlag()) || CommonConstants.ZERO_STRING.equals(m.getSalaryFundFlag()))
&& (m.getPersonalFundSum() != null || m.getUnitFundSum() != null)) {
if (isPerson && m.getPersonalFundSum() != null) {
money = money.add(m.getPersonalFundSum());
}
if (!isPerson && m.getUnitFundSum() != null) {
money = money.add(m.getUnitFundSum());
if (!isSocial && (m.getPersonalFundSum() != null || m.getUnitFundSum() != null)) {
typeFlag = false;
if (Common.isEmpty(m.getSalaryFundFlag()) || CommonConstants.ZERO_STRING.equals(m.getSalaryFundFlag())) {
if (isPerson && m.getPersonalFundSum() != null) {
money = money.add(m.getPersonalFundSum());
}
if (!isPerson && m.getUnitFundSum() != null) {
money = money.add(m.getUnitFundSum());
}
a.setFundType(CommonConstants.ZERO_STRING);
fundList.add(m.getId());
}
a.setFundType(CommonConstants.ZERO_STRING);
fundList.add(m.getId());
}
}
}
}
// 缴费库没找到,从预估库找
if (money.compareTo(SalaryConstants.B_ZERO) == SalaryConstants.EQUAL
&& forecastList != null && !forecastList.isEmpty()) {
if (typeFlag && forecastList != null && !forecastList.isEmpty()) {
money = money.setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
for (TPaymentBySalaryVo m : forecastList) {
if (Common.isNotNull(idNumber) && idNumber.equals(m.getEmpIdcard())) {
......
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