Commit e99917b8 by kangxiaoshan

计算确认收入

parent 6f6ba554
...@@ -622,6 +622,14 @@ public class DmpIncomeServiceImpl implements DmpIncomeService { ...@@ -622,6 +622,14 @@ public class DmpIncomeServiceImpl implements DmpIncomeService {
public PdIncome pdCreate(PdIncome income, User user) { public PdIncome pdCreate(PdIncome income, User user) {
income.setCreateTime(new Date()); income.setCreateTime(new Date());
income.setInputUser(user.getName()); income.setInputUser(user.getName());
if (StringUtils.isEmpty(income.getAcceptanceAmount())) {
Long rax = Long.parseLong(income.getTaxRate().replace("%", "")) / 100 + 1;
Long confirmIncome = rax * Long.parseLong(income.getAcceptanceAmount());
income.setConfirmIncome(confirmIncome + "");
} else {
income.setConfirmIncome("0");
}
return pdIncomeRepository.save(income); return pdIncomeRepository.save(income);
} }
......
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