Commit b5958210 authored by hongguangwu's avatar hongguangwu

relaySalarySum = relaySalarySum.add(sai.getSalaryMoney());

parent 05097a1d
......@@ -618,7 +618,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//工资应发
if (SalaryConstants.RELAY_SALARY_JAVA.equals(sai.getJavaFiedName())) {
relaySalary = sai.getSalaryMoney();
relaySalarySum = relaySalarySum.add(sai.getSalaryMoney());
}
//减除费用
if (SalaryConstants.COST_REDUCTION_JAVA.equals(sai.getJavaFiedName())) {
......@@ -771,7 +770,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 个人实发合计
this.saveNewItems(sai, saiList, SalaryConstants.ACTUAL_SALARY_SUM,
SalaryConstants.ACTUAL_SALARY_SUM_JAVA,
calculation(relaySalary, saiList), CommonConstants.ZERO_INT);
calculation(a, relaySalary, saiList), CommonConstants.ZERO_INT);
}
//计算个人社保、公积金欠款————工资不够扣缴社保的
if (relaySalary.compareTo(personalDebt) == SalaryConstants.LESS_THAN) {
......@@ -779,6 +778,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
SalaryConstants.PERSONAL_DEBT_JAVA, relaySalary.subtract(personalDebt), CommonConstants.ZERO_INT);
}
a.setSaiList(saiList);
relaySalarySum = relaySalarySum.add(a.getRelaySalary());
aList.add(a);
} catch (Exception e) {
e.printStackTrace();
......@@ -977,7 +977,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/10/9 15:14
* @return: java.math.BigDecimal
**/
private static BigDecimal calculation(BigDecimal realSalary, List<TSalaryAccountItem> saiList) {
private static BigDecimal calculation(TSalaryAccount a, BigDecimal realSalary, List<TSalaryAccountItem> saiList) {
// 实际发放工资 = 应发工资合计-
// 个人社保扣缴 -个人公积金扣缴-薪资扣税-年终奖扣税-代扣风险抵押金
// -个人其他费用(就是工资表中的其他费用1+其他费用2+其他费用3) -前次个人待补足 -单位补足扣返
......@@ -1004,11 +1004,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
sum = realSalary.subtract(sum).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
if (sum.compareTo(SalaryConstants.B_ZERO) == SalaryConstants.LESS_THAN) {
return SalaryConstants.B_ZERO;
} else {
return sum;
if (sum.compareTo(SalaryConstants.B_ZERO) < SalaryConstants.EQUAL) {
sum = SalaryConstants.B_ZERO;
}
a.setActualSalary(sum);
return sum;
}
/**
......
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