Commit 0443938c authored by zhaji's avatar zhaji

Merge branch 'develop' into feature-zhaji

parents ec3e9b30 b5958210
......@@ -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;
}
/**
......
......@@ -332,12 +332,14 @@ public class SalaryAccountUtil implements Serializable {
+ CommonConstants.DOWN_LINE_STRING + salaryType + CommonConstants.DOWN_LINE_STRING + relaySalary) != null) {
entity.setIsRepeat(CommonConstants.ONE_INT);
}
if (!CommonConstants.THREE_STRING.equals(salaryType) && !CommonConstants.FOUR_STRING.equals(salaryType)) {
relaySalarySum = BigDecimalUtils.safeAdd(relaySalary, specialMap.get(entity.getEmpIdcard()));
if (money3500.compareTo(relaySalarySum) == CommonConstants.ZERO_INT
|| money5000.compareTo(relaySalarySum) == CommonConstants.ZERO_INT) {
entity.setHaveSpecialFlag(CommonConstants.ONE_INT);
}
}
}
if (actualSalarySum != null) {
actualSalarySum = actualSalarySum.setScale(2, BigDecimal.ROUND_HALF_UP);
if (!checkMap.isEmpty() && checkMap.get(entity.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + DateUtil.addMonth(configSalary.getSalaryMonth())
......
......@@ -269,6 +269,7 @@
left join t_salary_standard s on a.SALARY_FORM_ID = s.id
left join t_salary_account_item relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
where a.DELETE_FLAG = 0 and s.UNIT_ID = #{unitId} and a.SALARY_MONTH = #{salaryMonth} and a.INVOICE_TITLE = #{invoiceTitle}
and a.FORM_TYPE !='3' and a.FORM_TYPE !='4'
group by a.EMP_IDCARD
</select>
......
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