Commit 1c2cbd6a authored by hongguangwu's avatar hongguangwu

MVP1.5.4-SALARY实发倒推应发最后提交

parent 7bd539c3
...@@ -1172,6 +1172,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1172,6 +1172,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal actualSalaryNow = SalaryConstants.B_ZERO; // 本次实发 BigDecimal actualSalaryNow = SalaryConstants.B_ZERO; // 本次实发
BigDecimal actualSalary = SalaryConstants.B_ZERO; // 实发 BigDecimal actualSalary = SalaryConstants.B_ZERO; // 实发
BigDecimal annualBonus = SalaryConstants.B_ZERO; // -单独年终奖 BigDecimal annualBonus = SalaryConstants.B_ZERO; // -单独年终奖
BigDecimal annualBonusTax = SalaryConstants.B_ZERO; // -单独年终奖税
BigDecimal deduction = SalaryConstants.B_ZERO; // +个人代扣 BigDecimal deduction = SalaryConstants.B_ZERO; // +个人代扣
BigDecimal phoneSubsidy = SalaryConstants.B_ZERO; // -通讯补贴(不计税) BigDecimal phoneSubsidy = SalaryConstants.B_ZERO; // -通讯补贴(不计税)
BigDecimal otherDeduction = SalaryConstants.B_ZERO; // -其他扣除项,包含【累计个人社保(含代扣,含本期)+累计个人公积金(含代扣) BigDecimal otherDeduction = SalaryConstants.B_ZERO; // -其他扣除项,包含【累计个人社保(含代扣,含本期)+累计个人公积金(含代扣)
...@@ -1181,8 +1182,13 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1181,8 +1182,13 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal taxHistory = SalaryConstants.B_ZERO; // 历史个税 BigDecimal taxHistory = SalaryConstants.B_ZERO; // 历史个税
//本次 //本次
for (TSalaryAccountItem item : itemList) { for (TSalaryAccountItem item : itemList) {
if (SalaryConstants.ANNUAL_BONUS_JAVA.equals(item.getJavaFiedName()) && CommonConstants.ONE_STRING.equals(a.getAnnualBonusType())) { if (CommonConstants.ONE_STRING.equals(a.getAnnualBonusType())) {
annualBonus = item.getSalaryMoney(); if (SalaryConstants.ANNUAL_BONUS_JAVA.equals(item.getJavaFiedName())) {
annualBonus = item.getSalaryMoney();
}
if (SalaryConstants.ANNUAL_BONUS_TAX.equals(item.getJavaFiedName())) {
annualBonusTax = item.getSalaryMoney();
}
} }
if (SalaryConstants.RELAY_SALARY_JAVA.equals(item.getJavaFiedName())) { if (SalaryConstants.RELAY_SALARY_JAVA.equals(item.getJavaFiedName())) {
res = res.add(item.getSalaryMoney()); res = res.add(item.getSalaryMoney());
...@@ -1207,8 +1213,13 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1207,8 +1213,13 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} }
//历史累计 //历史累计
for (TSalaryAccountItem item : itemHistoryList) { for (TSalaryAccountItem item : itemHistoryList) {
if (SalaryConstants.ANNUAL_BONUS_JAVA.equals(item.getJavaFiedName()) && CommonConstants.ONE_STRING.equals(item.getAnnualBonusType())) { if (CommonConstants.ONE_STRING.equals(a.getAnnualBonusType())) {
annualBonus = annualBonus.add(item.getSalaryMoney()); if (SalaryConstants.ANNUAL_BONUS_JAVA.equals(item.getJavaFiedName())) {
annualBonus = item.getSalaryMoney();
}
if (SalaryConstants.ANNUAL_BONUS_TAX.equals(item.getJavaFiedName())) {
annualBonusTax = item.getSalaryMoney();
}
} }
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());
...@@ -1261,7 +1272,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1261,7 +1272,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// -通讯补贴(不计税)-费用扣除标准(本期)-专项附加扣除(含本期)) // -通讯补贴(不计税)-费用扣除标准(本期)-专项附加扣除(含本期))
// 税率档 // 税率档
BigDecimal areaMoney = actualSalary.subtract(annualBonus).add(deduction).subtract(phoneSubsidy); BigDecimal areaMoney = actualSalary.subtract(annualBonus).add(deduction).subtract(phoneSubsidy).add(annualBonusTax);
if (costReduction != null) { if (costReduction != null) {
areaMoney = areaMoney.subtract(costReduction); areaMoney = areaMoney.subtract(costReduction);
} }
...@@ -1274,8 +1285,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1274,8 +1285,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (areaMoney.compareTo(sub.getMinIncome()) > SalaryConstants.EQUAL if (areaMoney.compareTo(sub.getMinIncome()) > SalaryConstants.EQUAL
&& areaMoney.compareTo(sub.getMaxIncome()) <= SalaryConstants.EQUAL) { && areaMoney.compareTo(sub.getMaxIncome()) <= SalaryConstants.EQUAL) {
// 3 计算应缴税所得额(参与计税的金额)= (税率档位-速算扣除数)/(1—税率) // 3 计算应缴税所得额(参与计税的金额)= (税率档位-速算扣除数)/(1—税率)
doTaxMoney = (areaMoney.subtract(sub.getQuickDeducation())).divide(SalaryConstants.B_ONEHUNDRED.subtract(new BigDecimal(sub.getWithholdingRate())).divide( doTaxMoney = (areaMoney.subtract(sub.getQuickDeducation())).divide(SalaryConstants.B_ONEHUNDRED
SalaryConstants.B_ONEHUNDRED, SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP), SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); .subtract(new BigDecimal(sub.getWithholdingRate())).divide(
SalaryConstants.B_ONEHUNDRED, SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP)
, SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
break; break;
} }
} }
......
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