| Line 557... |
Line 557... |
| 557 |
walletService.consumeAmountFromWallet(fofoId, insurancePolicy.getId(),
|
557 |
walletService.consumeAmountFromWallet(fofoId, insurancePolicy.getId(),
|
| 558 |
WalletReferenceType.DAMAGE_PROTECTION, walletDescription, insurancePolicy.getPurchaseAmount());
|
558 |
WalletReferenceType.DAMAGE_PROTECTION, walletDescription, insurancePolicy.getPurchaseAmount());
|
| 559 |
insurancePolicyRepository.persist(insurancePolicy);
|
559 |
insurancePolicyRepository.persist(insurancePolicy);
|
| 560 |
}
|
560 |
}
|
| 561 |
}
|
561 |
}
|
| 562 |
schemeService.processSchemeOut(fofoOrder.getId(), fofoId);
|
562 |
//schemeService.processSchemeOut(fofoOrder.getId(), fofoId);
|
| 563 |
return fofoOrder.getId();
|
563 |
return fofoOrder.getId();
|
| 564 |
}
|
564 |
}
|
| 565 |
|
565 |
|
| 566 |
private WiseAppInsuaranceModel createWiseAppInsuranceModel(MobileInsurancePlan mobileInsurancePlan,
|
566 |
private WiseAppInsuaranceModel createWiseAppInsuranceModel(MobileInsurancePlan mobileInsurancePlan,
|
| 567 |
InsurancePolicy insurancePolicy, CustomCustomer customer) throws ProfitMandiBusinessException {
|
567 |
InsurancePolicy insurancePolicy, CustomCustomer customer) throws ProfitMandiBusinessException {
|
| Line 1063... |
Line 1063... |
| 1063 |
for (Map.Entry<Integer, CustomFofoOrderItem> entry : itemIdCustomFofoLineItemMap.entrySet()) {
|
1063 |
for (Map.Entry<Integer, CustomFofoOrderItem> entry : itemIdCustomFofoLineItemMap.entrySet()) {
|
| 1064 |
int itemId = entry.getKey();
|
1064 |
int itemId = entry.getKey();
|
| 1065 |
CustomFofoOrderItem customFofoOrderItem = entry.getValue();
|
1065 |
CustomFofoOrderItem customFofoOrderItem = entry.getValue();
|
| 1066 |
PriceModel priceModel = itemIdMopPriceMap.get(itemId);
|
1066 |
PriceModel priceModel = itemIdMopPriceMap.get(itemId);
|
| 1067 |
if (customFofoOrderItem.getSerialNumberDetails().stream()
|
1067 |
if (customFofoOrderItem.getSerialNumberDetails().stream()
|
| 1068 |
.filter(x -> org.apache.commons.lang.StringUtils.isEmpty(x.getSerialNumber()))
|
1068 |
.filter(x -> org.apache.commons.lang.StringUtils.isNotEmpty(x.getSerialNumber()))
|
| 1069 |
.collect(Collectors.toList()).size() > 0) {
|
1069 |
.collect(Collectors.toList()).size() > 0) {
|
| 1070 |
if (priceModel.getPrice() > customFofoOrderItem.getSellingPrice()) {
|
1070 |
if (priceModel.getPrice() > customFofoOrderItem.getSellingPrice()) {
|
| 1071 |
throw new ProfitMandiBusinessException("Selling Price for ",
|
1071 |
throw new ProfitMandiBusinessException("Selling Price for ",
|
| 1072 |
itemRepository.selectById(itemId).getItemDescription(), "FFORDR_1010");
|
1072 |
itemRepository.selectById(itemId).getItemDescription(), "FFORDR_1010");
|
| 1073 |
}
|
1073 |
}
|