Subversion Repositories SmartDukaan

Rev

Rev 29818 | Rev 29995 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29818 Rev 29835
Line 3261... Line 3261...
3261
 
3261
 
3262
					creditAccount.setFofoId(fs.getId());
3262
					creditAccount.setFofoId(fs.getId());
3263
					creditAccount.setGateway(Gateway.MANDII);
3263
					creditAccount.setGateway(Gateway.MANDII);
3264
 
3264
 
3265
				}
3265
				}
3266
				if (accountStatusResponseOut.getSanctionLimit() != null) {
-
 
3267
					creditAccount.setSanctionedAmount(accountStatusResponseOut.getSanctionLimit().floatValue());
-
 
3268
				} else {
-
 
3269
					creditAccount.setSanctionedAmount(0);
-
 
3270
				}
-
 
3271
 
3266
 
3272
				creditAccount.setInterestRate(accountStatusResponseOut.getRateOfInterest());
-
 
3273
				if (accountStatusResponseOut.getBalanceAmount() != null) {
3267
				if (accountStatusResponseOut == null) {
3274
					creditAccount.setAvailableAmount(accountStatusResponseOut.getBalanceAmount().floatValue());
3268
					creditAccount.setCreditStatus(CreditStatus.UNKNOWN);
3275
				} else {
-
 
3276
					creditAccount.setAvailableAmount(0);
3269
					creditAccount.setDescription("User company not found");
3277
				}
-
 
3278
 
3270
 
3279
				creditAccount.setUpdatedOn(LocalDateTime.now());
-
 
3280
				if (accountStatusResponseOut.getCurrentStage() != null) {
-
 
3281
					creditAccount.setDescription(accountStatusResponseOut.getCurrentStage().toString());
-
 
3282
				}
-
 
3283
				if (accountStatusResponseOut.getStatus().equals(EligibilityStatusEnum.SANCTION_AVAILABLE)) {
-
 
3284
					creditAccount.setCreditStatus(CreditStatus.SANCTIONED);
-
 
3285
				} else if (accountStatusResponseOut.getStatus().equals(EligibilityStatusEnum.IN_ELIGIBLE)) {
-
 
3286
					creditAccount.setCreditStatus(CreditStatus.INELIGIBLE);
-
 
3287
				} else {
3271
				} else {
-
 
3272
					if (accountStatusResponseOut.getSanctionLimit() != null) {
-
 
3273
						creditAccount.setSanctionedAmount(accountStatusResponseOut.getSanctionLimit().floatValue());
-
 
3274
					} else {
-
 
3275
						creditAccount.setSanctionedAmount(0);
-
 
3276
					}
-
 
3277
 
-
 
3278
					creditAccount.setInterestRate(accountStatusResponseOut.getRateOfInterest());
-
 
3279
					if (accountStatusResponseOut.getBalanceAmount() != null) {
-
 
3280
						creditAccount.setAvailableAmount(accountStatusResponseOut.getBalanceAmount().floatValue());
-
 
3281
					} else {
-
 
3282
						creditAccount.setAvailableAmount(0);
-
 
3283
					}
-
 
3284
 
-
 
3285
					if (accountStatusResponseOut.getCurrentStage() != null) {
-
 
3286
						creditAccount.setDescription(accountStatusResponseOut.getCurrentStage().toString());
-
 
3287
					}
-
 
3288
					if (accountStatusResponseOut.getStatus().equals(EligibilityStatusEnum.SANCTION_AVAILABLE)) {
-
 
3289
						creditAccount.setCreditStatus(CreditStatus.SANCTIONED);
-
 
3290
					} else if (accountStatusResponseOut.getStatus().equals(EligibilityStatusEnum.IN_ELIGIBLE)) {
-
 
3291
						creditAccount.setCreditStatus(CreditStatus.INELIGIBLE);
-
 
3292
					} else {
3288
 
3293
 
3289
					creditAccount.setCreditStatus(CreditStatus.TO_BE_EVALUATED);
3294
						creditAccount.setCreditStatus(CreditStatus.TO_BE_EVALUATED);
-
 
3295
					}
3290
				}
3296
				}
-
 
3297
 
-
 
3298
				creditAccount.setUpdatedOn(LocalDateTime.now());
3291
				creditAccountRepository.persist(creditAccount);
3299
				creditAccountRepository.persist(creditAccount);
3292
			}
3300
			}
3293
		}
3301
		}
3294
	}
3302
	}
3295
 
3303