| Line 1159... |
Line 1159... |
| 1159 |
|
1159 |
|
| 1160 |
public void test() throws Exception {
|
1160 |
public void test() throws Exception {
|
| 1161 |
//System.out.println(trialFormRepository.selectByEmailOrMobile("9990381568"));
|
1161 |
//System.out.println(trialFormRepository.selectByEmailOrMobile("9990381568"));
|
| 1162 |
/*CreditBlockedExceptionPartner creditBlockedExceptionPartner = creditBlockedExceptionPartnersRepository.select(175139430);
|
1162 |
/*CreditBlockedExceptionPartner creditBlockedExceptionPartner = creditBlockedExceptionPartnersRepository.select(175139430);
|
| 1163 |
System.out.println(creditBlockedExceptionPartner);*/
|
1163 |
System.out.println(creditBlockedExceptionPartner);*/
|
| 1164 |
this.updatePartnerLimit(175139595);
|
1164 |
//this.updatePartnerLimit(175139595);
|
| - |
|
1165 |
this.releaseBlockedLimit();
|
| 1165 |
//sdCreditService.resetHardLimit();
|
1166 |
//sdCreditService.resetHardLimit();
|
| 1166 |
//migrations.migrateSerialInvoiceMap();
|
1167 |
//migrations.migrateSerialInvoiceMap();
|
| 1167 |
//runOnceTasks.checkRewardsEligibility();
|
1168 |
//runOnceTasks.checkRewardsEligibility();
|
| 1168 |
//hybridEncryptor.getJwt();
|
1169 |
//hybridEncryptor.getJwt();
|
| 1169 |
/*System.out.printf("Date|Transaction Id|Serial Number|Sale Amount|Swipe Payout|Discount Payout%n");
|
1170 |
/*System.out.printf("Date|Transaction Id|Serial Number|Sale Amount|Swipe Payout|Discount Payout%n");
|
| Line 1204... |
Line 1205... |
| 1204 |
}
|
1205 |
}
|
| 1205 |
});*/
|
1206 |
});*/
|
| 1206 |
//Utils.sendMailWithAttachments(googleMailSender, new String[]{"amit.gupta@smartdukaan.com"}, null, "DTDC AWb", "PFA");*/
|
1207 |
//Utils.sendMailWithAttachments(googleMailSender, new String[]{"amit.gupta@smartdukaan.com"}, null, "DTDC AWb", "PFA");*/
|
| 1207 |
}
|
1208 |
}
|
| 1208 |
|
1209 |
|
| - |
|
1210 |
private void releaseBlockedLimit() throws ProfitMandiBusinessException {
|
| - |
|
1211 |
List<Loan> blockedLoans = loanRepository.selectAllBlockedLoans();
|
| - |
|
1212 |
for (Loan blockedLoan : blockedLoans) {
|
| - |
|
1213 |
LoanTransaction loanTransaction = loanTransactionRepository.selectByLoanId(blockedLoan.getId());
|
| - |
|
1214 |
int transactionId = loanTransaction.getTransactionId();
|
| - |
|
1215 |
List<UserWalletHistory> userWalletHistory = walletService.getAllByReference(blockedLoan.getFofoId(), transactionId, WalletReferenceType.PURCHASE);
|
| - |
|
1216 |
int amount = userWalletHistory.get(userWalletHistory.size()-1).getAmount();
|
| - |
|
1217 |
int loanAmount = blockedLoan.getIntialAmount().intValue();
|
| - |
|
1218 |
if(loanAmount > -amount) {
|
| - |
|
1219 |
sdCreditService.settleBlockedLoan(transactionId, loanAmount+amount);
|
| - |
|
1220 |
}
|
| - |
|
1221 |
|
| - |
|
1222 |
|
| - |
|
1223 |
|
| - |
|
1224 |
}
|
| - |
|
1225 |
}
|
| - |
|
1226 |
|
| 1209 |
@Autowired
|
1227 |
@Autowired
|
| 1210 |
LoanTransactionRepository loanTransactionRepository;
|
1228 |
LoanTransactionRepository loanTransactionRepository;
|
| 1211 |
|
1229 |
|
| 1212 |
private void fixBlockedCredit() throws ProfitMandiBusinessException {
|
1230 |
private void fixBlockedCredit() throws ProfitMandiBusinessException {
|
| 1213 |
List<Loan> unsettledBlockedLoans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() >= 365).collect(toList());
|
1231 |
List<Loan> unsettledBlockedLoans = loanRepository.selectAllActiveLoan().stream().filter(x -> x.getFreeDays() >= 365).collect(toList());
|