Commit eee1b730 authored by huyuchen's avatar huyuchen

项目基本信息推送

parent 6c69ec9d
...@@ -1678,6 +1678,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1678,6 +1678,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal actualSalarySum = BigDecimal.ZERO; BigDecimal actualSalarySum = BigDecimal.ZERO;
// 历史个税合计 // 历史个税合计
BigDecimal sumTax = BigDecimal.ZERO; BigDecimal sumTax = BigDecimal.ZERO;
// 历史应发合计
BigDecimal sumSalaryTax = BigDecimal.ZERO;
// 本次实发 // 本次实发
for (TSalaryAccountItem item : itemList) { for (TSalaryAccountItem item : itemList) {
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) { if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) {
...@@ -1690,6 +1692,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1690,6 +1692,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (SalaryConstants.SALARY_TAX_JAVA.equals(item.getJavaFiedName())) { if (SalaryConstants.SALARY_TAX_JAVA.equals(item.getJavaFiedName())) {
sumTax = sumTax.add(item.getSalaryMoney()); sumTax = sumTax.add(item.getSalaryMoney());
} }
if (SalaryConstants.RELAY_SALARY_JAVA.equals(item.getJavaFiedName())) {
sumSalaryTax = sumSalaryTax.add(item.getSalaryMoney());
}
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) { if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) {
actualSalarySum = actualSalarySum.add(item.getSalaryMoney()); actualSalarySum = actualSalarySum.add(item.getSalaryMoney());
} }
...@@ -1703,9 +1708,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1703,9 +1708,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (CommonConstants.ONE_STRING.equals(a.getIsPersonTax())) { if (CommonConstants.ONE_STRING.equals(a.getIsPersonTax())) {
nowTaxT = getNowTax(actualSalarySumNow); nowTaxT = getNowTax(actualSalarySumNow);
if (actualSalarySum.compareTo(actualSalarySumNow) != 0) { if (actualSalarySum.compareTo(actualSalarySumNow) != 0) {
actualSalarySumT = BigDecimalUtils.safeAdd(nowTaxT, sumTax, actualSalarySum).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); actualSalarySumT = BigDecimalUtils.safeAdd(nowTaxT, sumSalaryTax, actualSalarySumNow).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
nowTaxY = getNowTaxNew(actualSalarySumT); nowTaxY = getNowTaxNew(actualSalarySumT);
salaryTax = BigDecimalUtils.safeSubtract(nowTaxY, BigDecimalUtils.safeAdd(nowTaxT, sumTax)); if (sumTax.compareTo(BigDecimal.ZERO) != 0) {
nowTaxY = BigDecimalUtils.safeSubtract(nowTaxY, sumTax).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
}
salaryTax = BigDecimalUtils.safeSubtract(nowTaxY, nowTaxT);
} else { } else {
nowTaxY = nowTaxT; nowTaxY = nowTaxT;
} }
...@@ -1715,13 +1723,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1715,13 +1723,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
a.setSalaryTaxUnit(nowTaxT); a.setSalaryTaxUnit(nowTaxT);
a.setActualSalary(BigDecimalUtils.safeSubtract(actualSalarySumNow, salaryTax)); a.setActualSalary(BigDecimalUtils.safeSubtract(actualSalarySumNow, salaryTax));
} else { } else {
nowTaxT = getNowTax(actualSalarySumNow);
nowTaxY = getNowTax(actualSalarySum); nowTaxY = getNowTax(actualSalarySum);
relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxY).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
a.setActualSalary(actualSalarySumNow); a.setActualSalary(actualSalarySumNow);
a.setSalaryTaxUnit(nowTaxY);
if (sumTax.compareTo(BigDecimal.ZERO) != 0) { if (sumTax.compareTo(BigDecimal.ZERO) != 0) {
nowTaxY = BigDecimalUtils.safeSubtract(nowTaxY, sumTax).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); nowTaxY = BigDecimalUtils.safeSubtract(nowTaxY, sumTax).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
} }
a.setSalaryTaxUnit(nowTaxY);
relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxY).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
} }
a.setRelaySalaryUnit(relaySalary); a.setRelaySalaryUnit(relaySalary);
a.setRelaySalary(actualSalarySumNow); a.setRelaySalary(actualSalarySumNow);
...@@ -1730,7 +1739,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1730,7 +1739,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
sai.setCnName(SalaryConstants.RELAY_SALARY); sai.setCnName(SalaryConstants.RELAY_SALARY);
sai.setJavaFiedName(SalaryConstants.RELAY_SALARY_JAVA); sai.setJavaFiedName(SalaryConstants.RELAY_SALARY_JAVA);
sai.setIsTax(CommonConstants.ZERO_INT); sai.setIsTax(CommonConstants.ZERO_INT);
sai.setSalaryMoney(relaySalary); sai.setSalaryMoney(BigDecimalUtils.safeAdd(nowTaxT,actualSalarySumNow).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP));
saiList.add(sai); saiList.add(sai);
return nowTaxY; return nowTaxY;
} }
......
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