Commit 73e78749 authored by LSL's avatar LSL

结清默认结清账单

parent 3d57f045
...@@ -103,16 +103,10 @@ public class BackedCommand extends AbstractCommand { ...@@ -103,16 +103,10 @@ public class BackedCommand extends AbstractCommand {
planList = loanPlanComponent.getByLoan(loanNo); planList = loanPlanComponent.getByLoan(loanNo);
LoanModel loanModel = loanComponent.getByLoanNo(loanNo); LoanModel loanModel = loanComponent.getByLoanNo(loanNo);
//存在还款中计划改为还款中
List<LoanPlanModel> overduedList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.OVERDUED.getCode()).collect(Collectors.toList()); List<LoanPlanModel> backingList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.BACKING.getCode()).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(overduedList)) { if (CollectionUtils.isEmpty(backingList)) {
loanModel.setLoanStatus(DebtInfoStatusEnum.OVERDUED.getCode()); loanModel.setLoanStatus(DebtInfoStatusEnum.SETTLED.getCode());
} else {
//存在还款中计划改为还款中
List<LoanPlanModel> backingList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.SETTLED.getCode()).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(backingList)) {
loanModel.setLoanStatus(DebtInfoStatusEnum.SETTLED.getCode());
}
} }
if (IsSettleEnum.ONE.getCode().equals(backedRequest.getIsSettle())) { if (IsSettleEnum.ONE.getCode().equals(backedRequest.getIsSettle())) {
loanModel.setLoanStatus(DebtPlanStatusEnum.SETTLED.getCode()); loanModel.setLoanStatus(DebtPlanStatusEnum.SETTLED.getCode());
......
...@@ -218,15 +218,10 @@ public class BackedBurdenJob { ...@@ -218,15 +218,10 @@ public class BackedBurdenJob {
private void upWindowsLoan(LoanModel loanModel) { private void upWindowsLoan(LoanModel loanModel) {
List<LoanPlanModel> planList = loanPlanComponent.getByLoan(loanModel.getLoanNo()); List<LoanPlanModel> planList = loanPlanComponent.getByLoan(loanModel.getLoanNo());
List<LoanPlanModel> overduedList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.OVERDUED.getCode()).collect(Collectors.toList()); //存在还款中计划改为还款中
if (CollectionUtils.isNotEmpty(overduedList)) { List<LoanPlanModel> backingList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.BACKING.getCode()).collect(Collectors.toList());
loanModel.setLoanStatus(DebtInfoStatusEnum.OVERDUED.getCode()); if (CollectionUtils.isEmpty(backingList)) {
} else { loanModel.setLoanStatus(DebtInfoStatusEnum.SETTLED.getCode());
//存在还款中计划改为还款中
List<LoanPlanModel> backingList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.BACKING.getCode()).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(backingList)) {
loanModel.setLoanStatus(DebtInfoStatusEnum.SETTLED.getCode());
}
} }
//修改 windows_loan 还款状态 //修改 windows_loan 还款状态
loanComponent.updateByLoanNo(loanModel); loanComponent.updateByLoanNo(loanModel);
......
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