Commit 73e78749 authored by LSL's avatar LSL

结清默认结清账单

parent 3d57f045
...@@ -103,17 +103,11 @@ public class BackedCommand extends AbstractCommand { ...@@ -103,17 +103,11 @@ 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());
if (CollectionUtils.isNotEmpty(overduedList)) {
loanModel.setLoanStatus(DebtInfoStatusEnum.OVERDUED.getCode());
} else {
//存在还款中计划改为还款中 //存在还款中计划改为还款中
List<LoanPlanModel> backingList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.SETTLED.getCode()).collect(Collectors.toList()); List<LoanPlanModel> backingList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.BACKING.getCode()).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(backingList)) { if (CollectionUtils.isEmpty(backingList)) {
loanModel.setLoanStatus(DebtInfoStatusEnum.SETTLED.getCode()); 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,16 +218,11 @@ public class BackedBurdenJob { ...@@ -218,16 +218,11 @@ 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)) {
loanModel.setLoanStatus(DebtInfoStatusEnum.OVERDUED.getCode());
} else {
//存在还款中计划改为还款中 //存在还款中计划改为还款中
List<LoanPlanModel> backingList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.BACKING.getCode()).collect(Collectors.toList()); List<LoanPlanModel> backingList = planList.stream().filter(i -> i.getStatus() == DebtPlanStatusEnum.BACKING.getCode()).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(backingList)) { if (CollectionUtils.isEmpty(backingList)) {
loanModel.setLoanStatus(DebtInfoStatusEnum.SETTLED.getCode()); 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