Commit d2fed072 authored by huyuchen's avatar huyuchen

hyc-项目余额调整

parent 62c8dafa
......@@ -363,11 +363,11 @@ 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());
info.setAdjustMoney(info.getSurMoney().negate());
info.setAfterAdjustMoney(BigDecimal.ZERO);
money = info.getSurMoney().add(money);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getErrorInfo(),info));
......@@ -387,7 +387,7 @@ 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));
......
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