初始化项目
This commit is contained in:
@@ -85,38 +85,36 @@ public class erpFlowService {
|
|||||||
|
|
||||||
debts.setRemaining(BigDecimalUtils.add(debts.getRemaining(), erpDebtRecords.getRepayAmount()));
|
debts.setRemaining(BigDecimalUtils.add(debts.getRemaining(), erpDebtRecords.getRepayAmount()));
|
||||||
erpDebtsService.save(debts);
|
erpDebtsService.save(debts);
|
||||||
|
|
||||||
if (debts.getDebtType().equals("1")) {
|
if (debts.getDebtType().equals("1")) {
|
||||||
account.setUpdateTime(new Date());
|
account.setUpdateTime(new Date());
|
||||||
account.setCurrentBalance(BigDecimalUtils.subtract(account.getCurrentBalance(), erpDebtRecords.getRepayAmount()));
|
account.setCurrentBalance(BigDecimalUtils.subtract(account.getCurrentBalance(), erpDebtRecords.getRepayAmount()));
|
||||||
erpAccountService.save(account);
|
erpAccountService.save(account);
|
||||||
addFlow(
|
addFlow(
|
||||||
erpDebtRecords.getDebtName(), // 交易名称
|
erpDebtRecords.getDebtName(),
|
||||||
category.getCategoryType(), // 交易类型
|
category.getCategoryType(),
|
||||||
erpDebtRecords.getRepayAmount(), // 交易金额
|
erpDebtRecords.getRepayAmount(),
|
||||||
erpDebtRecords.getAccountId(), // 账户ID
|
erpDebtRecords.getAccountId(),
|
||||||
debts.getCategoryId(), // 分类ID
|
category.getCategoryId(),
|
||||||
erpDebtRecords.getRemark(), // 备注
|
erpDebtRecords.getRemark(),
|
||||||
erpDebtRecords.getDebtId(), // 业务ID
|
erpDebtRecords.getDebtId(),
|
||||||
DateUtils.getCurrentYear(), // 年份
|
DateUtils.getCurrentYear(),
|
||||||
DateUtils.getCurrentMonth() // 月份
|
DateUtils.getCurrentMonth()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debts.getDebtType().equals("2")) {
|
if (debts.getDebtType().equals("2")) {
|
||||||
account.setUpdateTime(new Date());
|
account.setUpdateTime(new Date());
|
||||||
account.setCurrentBalance(BigDecimalUtils.add(account.getCurrentBalance(), erpDebtRecords.getRepayAmount()));
|
account.setCurrentBalance(BigDecimalUtils.add(account.getCurrentBalance(), erpDebtRecords.getRepayAmount()));
|
||||||
erpAccountService.save(account);
|
erpAccountService.save(account);
|
||||||
addFlow(
|
addFlow(
|
||||||
erpDebtRecords.getDebtName(), // 交易名称
|
erpDebtRecords.getDebtName(),
|
||||||
category.getCategoryType(), // 交易类型
|
category.getCategoryType(),
|
||||||
erpDebtRecords.getRepayAmount(), // 交易金额
|
erpDebtRecords.getRepayAmount(),
|
||||||
erpDebtRecords.getAccountId(), // 账户ID
|
erpDebtRecords.getAccountId(),
|
||||||
debts.getCategoryId(), // 分类ID
|
category.getCategoryId(),
|
||||||
erpDebtRecords.getRemark(), // 备注
|
erpDebtRecords.getRemark(),
|
||||||
erpDebtRecords.getDebtId(), // 业务ID
|
erpDebtRecords.getDebtId(),
|
||||||
DateUtils.getCurrentYear(), // 年份
|
DateUtils.getCurrentYear(),
|
||||||
DateUtils.getCurrentMonth() // 月份
|
DateUtils.getCurrentMonth()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user