Commit 1627c598 authored by hongguangwu's avatar hongguangwu

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

parent 69a24780
......@@ -1018,13 +1018,15 @@ 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 (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
......@@ -1042,9 +1044,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
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 (!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());
}
......@@ -1057,9 +1061,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
}
}
// 缴费库没找到,从预估库找
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