Commit 3a4bf6a4 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.6.7' into MVP1.6.7

parents 4ea83949 d2fed072
......@@ -363,10 +363,14 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
info = baseMapper.getClaimInfoByDeptNo(deptNo,"3");
if (Optional.ofNullable(info).isPresent()) {
if (info.getSurMoney().add(money).compareTo(BigDecimal.ZERO) >=0) {
info.setAdjustMoney(money);
info.setAdjustMoney(money.negate());
info.setAfterAdjustMoney(BigDecimalUtils.safeAdd(info.getSurMoney(),money));
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getErrorInfo(),info));
} else {
info.setAdjustMoney(info.getSurMoney().negate());
info.setAfterAdjustMoney(BigDecimal.ZERO);
money = info.getSurMoney().add(money);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getErrorInfo(),info));
this.subSwitch(deptNo,backInfo,errorMessageList,money,deptName,excel);
}
} else {
......@@ -383,13 +387,13 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
for (ClaimRebackInfotVO subInfo : infoList) {
//分批去减去金额
if (subInfo.getSurMoney().add(money).compareTo(BigDecimal.ZERO) >=0) {
subInfo.setAdjustMoney(money);
subInfo.setAdjustMoney(money.negate());
subInfo.setAfterAdjustMoney(BigDecimalUtils.safeAdd(subInfo.getSurMoney(),money));
money = BigDecimal.ZERO;
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), subInfo.getErrorInfo(),subInfo));
break;
} else {
subInfo.setAdjustMoney(money);
subInfo.setAdjustMoney(subInfo.getSurMoney().negate());
subInfo.setAfterAdjustMoney(BigDecimal.ZERO);
money = subInfo.getSurMoney().add(money);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), subInfo.getErrorInfo(),subInfo));
......
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