| Line 365... |
Line 365... |
| 365 |
GIFT_SERIES.put(12001.0, Arrays.asList(ScratchedGift.CASSROLE, ScratchedGift.NECK_BAND, ScratchedGift.JUICE_JUG, ScratchedGift.INSULATED_FLASK));
|
365 |
GIFT_SERIES.put(12001.0, Arrays.asList(ScratchedGift.CASSROLE, ScratchedGift.NECK_BAND, ScratchedGift.JUICE_JUG, ScratchedGift.INSULATED_FLASK));
|
| 366 |
GIFT_SERIES.put(35001.0, Arrays.asList(ScratchedGift.CASSROLE, ScratchedGift.NECK_BAND, ScratchedGift.JUICE_JUG, ScratchedGift.INSULATED_FLASK));
|
366 |
GIFT_SERIES.put(35001.0, Arrays.asList(ScratchedGift.CASSROLE, ScratchedGift.NECK_BAND, ScratchedGift.JUICE_JUG, ScratchedGift.INSULATED_FLASK));
|
| 367 |
}
|
367 |
}
|
| 368 |
|
368 |
|
| 369 |
@Override
|
369 |
@Override
|
| 370 |
public int createOrder(CreateOrderRequest createOrderRequest, int fofoId, boolean accessoriesDeals) throws ProfitMandiBusinessException {
|
370 |
public int createOrder(CreateOrderRequest createOrderRequest, int fofoId, boolean accessoriesDeals) throws Exception {
|
| 371 |
LOGGER.info("fofoId -- {} Order Request -- {}", fofoId, createOrderRequest);
|
371 |
LOGGER.info("fofoId -- {} Order Request -- {}", fofoId, createOrderRequest);
|
| 372 |
CustomCustomer customCustomer = createOrderRequest.getCustomer();
|
372 |
CustomCustomer customCustomer = createOrderRequest.getCustomer();
|
| 373 |
Customer customer = customerRepository.selectById(customCustomer.getCustomerId());
|
373 |
Customer customer = customerRepository.selectById(customCustomer.getCustomerId());
|
| 374 |
|
374 |
|
| 375 |
if (!StringUtils.isValidGstNumber(customCustomer.getGstNumber())) {
|
375 |
if (!StringUtils.isValidGstNumber(customCustomer.getGstNumber())) {
|
| Line 454... |
Line 454... |
| 454 |
serialNumbers.add(serialNumberDetail.getSerialNumber());
|
454 |
serialNumbers.add(serialNumberDetail.getSerialNumber());
|
| 455 |
if (serialNumberDetail.getAmount() > 0) {
|
455 |
if (serialNumberDetail.getAmount() > 0) {
|
| 456 |
if (customer.getEmailId() == null || customer.getEmailId().equals("")) {
|
456 |
if (customer.getEmailId() == null || customer.getEmailId().equals("")) {
|
| 457 |
throw new ProfitMandiBusinessException("Email Id is required for insurance", "Email Id is required for insurance", "Email Id is required for insurance");
|
457 |
throw new ProfitMandiBusinessException("Email Id is required for insurance", "Email Id is required for insurance", "Email Id is required for insurance");
|
| 458 |
}
|
458 |
}
|
| - |
|
459 |
|
| 459 |
InsuranceModel im = new InsuranceModel();
|
460 |
InsuranceModel im = new InsuranceModel();
|
| 460 |
im.setBrand(item.getBrand());
|
461 |
im.setBrand(item.getBrand());
|
| 461 |
im.setColor(item.getColor());
|
462 |
im.setColor(item.getColor());
|
| 462 |
im.setModelName(item.getModelName() + item.getModelNumber());
|
463 |
im.setModelName(item.getModelName() + item.getModelNumber());
|
| 463 |
im.setInsuranceAmount(serialNumberDetail.getAmount());
|
464 |
im.setInsuranceAmount(serialNumberDetail.getAmount());
|
| 464 |
im.setDeviceSellingPrice(customFofoOrderItem.getSellingPrice());
|
465 |
im.setDeviceSellingPrice(customFofoOrderItem.getSellingPrice());
|
| 465 |
im.setInsuranceId(serialNumberDetail.getInsurance());
|
466 |
im.setInsuranceUId(serialNumberDetail.getInsurance());
|
| - |
|
467 |
im.setInsuranceId(String.valueOf(insuranceService.getOneAssistPremiumByVariantId(serialNumberDetail.getInsurance()).getId()));
|
| 466 |
im.setSerialNumber(serialNumberDetail.getSerialNumber());
|
468 |
im.setSerialNumber(serialNumberDetail.getSerialNumber());
|
| 467 |
im.setMemory(serialNumberDetail.getMemory());
|
469 |
im.setMemory(serialNumberDetail.getMemory());
|
| 468 |
im.setRam(serialNumberDetail.getRam());
|
470 |
im.setRam(serialNumberDetail.getRam());
|
| 469 |
im.setMfgDate(serialNumberDetail.getMfgDate());
|
471 |
im.setMfgDate(serialNumberDetail.getMfgDate());
|
| 470 |
insuredModels.add(im);
|
472 |
insuredModels.add(im);
|