| Line 3482... |
Line 3482... |
| 3482 |
throw new ProfitMandiBusinessException("loanstament", loanStatement.getLoanId(), "Invalid LoanId");
|
3482 |
throw new ProfitMandiBusinessException("loanstament", loanStatement.getLoanId(), "Invalid LoanId");
|
| 3483 |
}
|
3483 |
}
|
| 3484 |
}
|
3484 |
}
|
| 3485 |
|
3485 |
|
| 3486 |
public void loanSettlement() throws Exception {
|
3486 |
public void loanSettlement() throws Exception {
|
| 3487 |
List<Loan> blockedLoans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() >= 365).collect(toList());
|
3487 |
// List<Loan> blockedLoans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() >= 365).collect(toList());
|
| 3488 |
List<Loan> loans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() < 365).collect(toList());
|
3488 |
List<Loan> loans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() < 365).collect(toList());
|
| 3489 |
//Settle blocked loans only when normal loans are settled
|
3489 |
//Settle blocked loans only when normal loans are settled
|
| 3490 |
loans.addAll(blockedLoans);
|
3490 |
// loans.addAll(blockedLoans);
|
| 3491 |
//TODO:Remove this code
|
3491 |
//TODO:Remove this code
|
| 3492 |
Loan specificLoan = loanRepository.selectByLoanId(20073);
|
3492 |
Loan specificLoan = loanRepository.selectByLoanId(20073);
|
| 3493 |
loans.add(0, specificLoan);
|
3493 |
loans.add(0, specificLoan);
|
| 3494 |
//TODO:Upto here
|
3494 |
//TODO:Upto here
|
| 3495 |
if (!loans.isEmpty()) {
|
3495 |
if (!loans.isEmpty()) {
|