| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.controller;
|
1 |
package com.spice.profitmandi.web.controller;
|
| 2 |
|
2 |
|
| 3 |
import java.math.BigDecimal;
|
3 |
import java.math.BigDecimal;
|
| 4 |
import java.time.LocalDateTime;
|
4 |
import java.time.LocalDateTime;
|
| - |
|
5 |
import java.util.Arrays;
|
| 5 |
import java.util.Comparator;
|
6 |
import java.util.Comparator;
|
| 6 |
import java.util.List;
|
7 |
import java.util.List;
|
| 7 |
import java.util.stream.Collectors;
|
8 |
import java.util.stream.Collectors;
|
| 8 |
|
9 |
|
| 9 |
import javax.servlet.http.HttpServletRequest;
|
10 |
import javax.servlet.http.HttpServletRequest;
|
| Line 157... |
Line 158... |
| 157 |
}
|
158 |
}
|
| 158 |
} else if (gateway != null && gateway.equals(Gateway.SDDIRECT)) {
|
159 |
} else if (gateway != null && gateway.equals(Gateway.SDDIRECT)) {
|
| 159 |
CreditAccount creditAccount = creditAccountRepository.selectByFofoIdAndGateway(retailerId,
|
160 |
CreditAccount creditAccount = creditAccountRepository.selectByFofoIdAndGateway(retailerId,
|
| 160 |
Gateway.SDDIRECT);
|
161 |
Gateway.SDDIRECT);
|
| 161 |
|
162 |
|
| 162 |
List<Loan> loans = loanRepository.selectActiveLoan(retailerId).stream()
|
163 |
/*List<Loan> loans = loanRepository.selectActiveLoan(retailerId).stream()
|
| 163 |
.filter(x -> x.getDueDate().isBefore(LocalDateTime.now())).collect(Collectors.toList());
|
164 |
.filter(x -> x.getDueDate().isBefore(LocalDateTime.now())).collect(Collectors.toList());*/
|
| - |
|
165 |
//TODO Amit - Bypass due date condition need to undo
|
| - |
|
166 |
List<Loan> loans = Arrays.asList();
|
| 164 |
|
167 |
|
| 165 |
SDCreditRequirement sdCreditRequirement = sdCreditRequirementRepository.selectByFofoId(retailerId);
|
168 |
SDCreditRequirement sdCreditRequirement = sdCreditRequirementRepository.selectByFofoId(retailerId);
|
| 166 |
|
169 |
|
| 167 |
AccountStatusResponseOut accountStatusResponseOut = new AccountStatusResponseOut();
|
170 |
AccountStatusResponseOut accountStatusResponseOut = new AccountStatusResponseOut();
|
| 168 |
BigDecimal availability = BigDecimal.ZERO;
|
171 |
BigDecimal availability = BigDecimal.ZERO;
|