Commit d8a37730 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents 2423d690 4f7aa894
......@@ -354,16 +354,13 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
BigDecimal oneBecimal = new BigDecimal("36000");
BigDecimal twoBecimal = new BigDecimal("144000");
BigDecimal subOneBecimal = BigDecimalUtils.safeSubtract(wSalary,oneBecimal);
BigDecimal subTwoBecimal1 = BigDecimalUtils.safeSubtract(wSalary,twoBecimal);
BigDecimal subTwoBecimal = BigDecimalUtils.safeSubtract(wSalary,twoBecimal);
if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(oneBecimal) <= 0) {
if (wSalary.compareTo(oneBecimal) <= 0) {
if (isSend) {
maxAnualSalary = wSalary;
} else {
if (!isSend) {
minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
}
}else {
if (isSend) {
......@@ -371,16 +368,12 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
} else {
minSalary = subOneBecimal.compareTo(socialFundTax) >0 ? subOneBecimal : socialFundTax;
}
maxAnualSalary = oneBecimal;
}
} else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("72000")) <= 0) {
if (wSalary.compareTo(oneBecimal) <= 0) {
if (isSend) {
maxAnualSalary = wSalary;
} else {
if (!isSend) {
minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
}
}else {
if (isSend) {
......@@ -388,16 +381,12 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
} else {
minSalary = subOneBecimal.compareTo(socialFundTax) >0 ? subOneBecimal : socialFundTax;
}
maxAnualSalary = oneBecimal;
}
}else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("203100")) <= 0) {
if (wSalary.compareTo(oneBecimal) <= 0) {
if (isSend) {
maxAnualSalary = wSalary;
} else {
if (!isSend) {
minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
}
}else {
if (isSend) {
......@@ -405,52 +394,40 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
} else {
minSalary = subOneBecimal.compareTo(socialFundTax) >0 ? subOneBecimal : socialFundTax;
}
maxAnualSalary = oneBecimal;
}
}else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("288000")) <= 0) {
if (wSalary.compareTo(twoBecimal) <= 0) {
if (isSend) {
maxAnualSalary = wSalary;
} else {
if (!isSend) {
minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
}
}else {
if (isSend) {
minSalary = subTwoBecimal1;
minSalary = subTwoBecimal;
} else {
minSalary = subTwoBecimal1.compareTo(socialFundTax) >0 ? subTwoBecimal1 : socialFundTax;
minSalary = subTwoBecimal.compareTo(socialFundTax) >0 ? subTwoBecimal : socialFundTax;
}
maxAnualSalary = twoBecimal;
}
}else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("672000")) <= 0) {
if (wSalary.compareTo(twoBecimal) <= 0) {
if (isSend) {
maxAnualSalary = wSalary;
} else {
if (!isSend) {
minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
}
}else {
if (isSend) {
minSalary = subTwoBecimal1;
minSalary = subTwoBecimal;
} else {
minSalary = subTwoBecimal1.compareTo(socialFundTax) >0 ? subTwoBecimal1 : socialFundTax;
minSalary = subTwoBecimal.compareTo(socialFundTax) >0 ? subTwoBecimal : socialFundTax;
}
maxAnualSalary = twoBecimal;
}
}else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("1277500")) <= 0) {
BigDecimal threeBecimal = new BigDecimal("300000");
BigDecimal subThreeBecimal = BigDecimalUtils.safeSubtract(wSalary,threeBecimal);
if (wSalary.compareTo(threeBecimal) <= 0) {
if (isSend) {
maxAnualSalary = wSalary;
} else {
if (!isSend) {
minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
}
}else {
if (isSend) {
......@@ -458,18 +435,14 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
} else {
minSalary = subThreeBecimal.compareTo(socialFundTax) >0 ? subThreeBecimal : socialFundTax;
}
maxAnualSalary = threeBecimal;
}
}else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("1452500")) <= 0) {
BigDecimal fourBecimal = new BigDecimal("420000");
BigDecimal subFourBecimal = BigDecimalUtils.safeSubtract(wSalary,fourBecimal);
if (wSalary.compareTo(fourBecimal) <= 0) {
if (isSend) {
maxAnualSalary = wSalary;
} else {
if (!isSend) {
minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
}
}else {
if (isSend) {
......@@ -477,18 +450,14 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
} else {
minSalary = subFourBecimal.compareTo(socialFundTax) >0 ? subFourBecimal : socialFundTax;
}
maxAnualSalary = fourBecimal;
}
}else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("1452500")) > 0) {
BigDecimal fiveBecimal = new BigDecimal("660000");
BigDecimal subFiveBecimal = BigDecimalUtils.safeSubtract(wSalary,fiveBecimal);
if (wSalary.compareTo(fiveBecimal) <= 0) {
if (isSend) {
maxAnualSalary = wSalary;
} else {
if (!isSend) {
minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
}
}else {
if (isSend) {
......@@ -496,12 +465,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
} else {
minSalary = subFiveBecimal.compareTo(socialFundTax) >0 ? subFiveBecimal : socialFundTax;
}
maxAnualSalary = fiveBecimal;
}
}
JSONObject jsonObject = calculationPersonSalary(personTax, annousTax, minSalary, maxAnualSalary,
wSalary, sumTax, ySalary, sumDeductSalary, twlSalaryTax);
JSONObject jsonObject = calculationPersonSalary(personTax, annousTax, minSalary, wSalary, sumTax,
ySalary, sumDeductSalary, twlSalaryTax);
res = jsonObject.getBigDecimal("zySalary");
BigDecimal anRes = BigDecimal.ZERO;
if (Common.isNotNull(jsonObject.getBigDecimal("anRes"))) {
......@@ -535,7 +503,6 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
* @param personTax 薪资扣税阶梯表list
* @param annousTax 年终奖扣税阶梯表list
* @param minSalary 工资下限
* @param maxAnualSalary 年终奖上限
* @param wSalary 未发金额
* @param ySalary 应发工资合计
* @param sumTax 薪资扣税合计
......@@ -546,15 +513,14 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
* @return: java.math.BigDecimal
**/
private static JSONObject calculationPersonSalary(List<TSalaryTaxConfig> personTax, List<TSalaryTaxConfig> annousTax,
BigDecimal minSalary, BigDecimal maxAnualSalary,
BigDecimal wSalary, BigDecimal sumTax, BigDecimal ySalary,
BigDecimal minSalary,BigDecimal wSalary, BigDecimal sumTax, BigDecimal ySalary,
BigDecimal sumDeductSalary, BigDecimal twlSalaryTax) {
JSONObject jsonObject = new JSONObject();
BigDecimal anRes;
BigDecimal res;
List<BigDecimal> zySalary = new ArrayList<>();
Map<String,BigDecimal> map = new HashMap<>();
for (BigDecimal i = minSalary; i.compareTo(maxAnualSalary) <= 0; i = BigDecimalUtils.safeAdd(i,new BigDecimal(100)) ) {
for (BigDecimal i = minSalary; i.compareTo(wSalary) <= 0; i = BigDecimalUtils.safeAdd(i,new BigDecimal(100)) ) {
//本次薪资纳税额
res = BigDecimal.ZERO;
//本次年终奖纳税额
......
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