| Line 34... |
Line 34... |
| 34 |
import org.apache.poi.ss.usermodel.CreationHelper;
|
34 |
import org.apache.poi.ss.usermodel.CreationHelper;
|
| 35 |
import org.apache.poi.ss.usermodel.Sheet;
|
35 |
import org.apache.poi.ss.usermodel.Sheet;
|
| 36 |
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
36 |
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
| 37 |
import org.json.JSONObject;
|
37 |
import org.json.JSONObject;
|
| 38 |
import org.springframework.beans.factory.annotation.Autowired;
|
38 |
import org.springframework.beans.factory.annotation.Autowired;
|
| - |
|
39 |
import org.springframework.cglib.core.Local;
|
| 39 |
import org.springframework.core.io.InputStreamResource;
|
40 |
import org.springframework.core.io.InputStreamResource;
|
| 40 |
import org.springframework.http.HttpHeaders;
|
41 |
import org.springframework.http.HttpHeaders;
|
| 41 |
import org.springframework.http.HttpStatus;
|
42 |
import org.springframework.http.HttpStatus;
|
| 42 |
import org.springframework.http.ResponseEntity;
|
43 |
import org.springframework.http.ResponseEntity;
|
| 43 |
import org.springframework.mail.javamail.JavaMailSender;
|
44 |
import org.springframework.mail.javamail.JavaMailSender;
|
| Line 1087... |
Line 1088... |
| 1087 |
creditAccount.setGateway(gateway);
|
1088 |
creditAccount.setGateway(gateway);
|
| 1088 |
if (gateway.equals(Gateway.SIDBI)) {
|
1089 |
if (gateway.equals(Gateway.SIDBI)) {
|
| 1089 |
FofoSidbiSanction fofoSidbiSanction = fofoSidbiSanctionRepository.selectByFofoId(creditAccount.getFofoId());
|
1090 |
FofoSidbiSanction fofoSidbiSanction = fofoSidbiSanctionRepository.selectByFofoId(creditAccount.getFofoId());
|
| 1090 |
creditAccount.setAvailableAmount((float) fofoSidbiSanction.getSanctionAmount());
|
1091 |
creditAccount.setAvailableAmount((float) fofoSidbiSanction.getSanctionAmount());
|
| 1091 |
creditAccount.setSanctionedAmount((float) fofoSidbiSanction.getSanctionAmount());
|
1092 |
creditAccount.setSanctionedAmount((float) fofoSidbiSanction.getSanctionAmount());
|
| 1092 |
|
- |
|
| - |
|
1093 |
fofoSidbiSanction.setIssuedOn(LocalDateTime.now());
|
| 1093 |
SDCreditRequirement sdCreditRequirement = sdCreditRequirementRepository.selectByFofoId(creditAccount.getFofoId());
|
1094 |
SDCreditRequirement sdCreditRequirement = sdCreditRequirementRepository.selectByFofoId(creditAccount.getFofoId());
|
| 1094 |
sdCreditRequirement.setLimit(BigDecimal.valueOf(fofoSidbiSanction.getSanctionAmount()));
|
1095 |
sdCreditRequirement.setLimit(BigDecimal.valueOf(fofoSidbiSanction.getSanctionAmount()));
|
| 1095 |
if (sdCreditRequirement.getUtilizedAmount().compareTo(BigDecimal.ZERO) > 0) {
|
1096 |
if (sdCreditRequirement.getUtilizedAmount().compareTo(BigDecimal.ZERO) > 0) {
|
| 1096 |
throw new ProfitMandiBusinessException("Loans are not closed", "Loans are not closed", "Loans are not closed");
|
1097 |
throw new ProfitMandiBusinessException("Loans are not closed", "Loans are not closed", "Loans are not closed");
|
| 1097 |
}
|
1098 |
}
|