Subversion Repositories SmartDukaan

Rev

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

Rev 31738 Rev 31739
Line 437... Line 437...
437
 
437
 
438
		FofoOrder fofoOrder = fofoOrderRepository.selectByInvoiceNumber(invoiceNumber);
438
		FofoOrder fofoOrder = fofoOrderRepository.selectByInvoiceNumber(invoiceNumber);
439
		List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
439
		List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
440
		Customer customer = customerRepository.selectById(fofoOrder.getCustomerId());
440
		Customer customer = customerRepository.selectById(fofoOrder.getCustomerId());
441
		CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
441
		CustomerAddress customerAddress = customerAddressRepository.selectById(fofoOrder.getCustomerAddressId());
442
		List<Integer> fofoPartnerPaymentOptions = fofoPartnerPaymentOptionRepository
442
		Map<Integer, PaymentOption> paymentOptionIdPaymentOptionMap = paymentOptionRepository.selectActiveOption().stream().collect(Collectors.toMap(x -> x.getId(), x -> x));
443
				.selectPaymentOptionIdsByFofoId(fofoOrder.getFofoId());
443
		List<Integer> fofoPartnerPaymentOptions = new ArrayList<>(paymentOptionIdPaymentOptionMap.keySet());
444
		Map<Integer, Item> itemsMap = fofoOrderItems.stream().collect(Collectors.toMap(x -> x.getItemId(), x -> {
444
		Map<Integer, Item> itemsMap = fofoOrderItems.stream().collect(Collectors.toMap(x -> x.getItemId(), x -> {
445
			try {
445
			try {
446
				return itemRepository.selectById(x.getItemId());
446
				return itemRepository.selectById(x.getItemId());
447
			} catch (ProfitMandiBusinessException e) {
447
			} catch (ProfitMandiBusinessException e) {
448
				// TODO Auto-generated catch block
448
				// TODO Auto-generated catch block
Line 451... Line 451...
451
		}));
451
		}));
452
		LOGGER.info("fofoPartnerPaymentOptions" + fofoPartnerPaymentOptions);
452
		LOGGER.info("fofoPartnerPaymentOptions" + fofoPartnerPaymentOptions);
453
		List<PaymentOptionTransaction> paymentOptionTransactions = paymentOptionTransactionRepository
453
		List<PaymentOptionTransaction> paymentOptionTransactions = paymentOptionTransactionRepository
454
				.selectByReferenceIdAndType(fofoOrder.getId(), PaymentOptionReferenceType.ORDER);
454
				.selectByReferenceIdAndType(fofoOrder.getId(), PaymentOptionReferenceType.ORDER);
455
		LOGGER.info("paymentOptionTransactions" + paymentOptionTransactions);
455
		LOGGER.info("paymentOptionTransactions" + paymentOptionTransactions);
456
		Map<Integer, PaymentOption> paymentOptionIdPaymentOptionMap = paymentOptionRepository.selectActiveOption().stream().collect(Collectors.toMap(x -> x.getId(), x -> x));
-
 
-
 
456
 
457
		Map<Integer, PaymentOptionTransaction> paymentOptionIdPaymentOptionTransactionMap = this
457
		Map<Integer, PaymentOptionTransaction> paymentOptionIdPaymentOptionTransactionMap = this
458
				.paymentOptionIdPaymentOptionTransactionMap(paymentOptionTransactions);
458
				.paymentOptionIdPaymentOptionTransactionMap(paymentOptionTransactions);
459
		LOGGER.info("paymentOptionIdPaymentOptionTransactionMap" + paymentOptionIdPaymentOptionTransactionMap.keySet());
459
		LOGGER.info("paymentOptionIdPaymentOptionTransactionMap" + paymentOptionIdPaymentOptionTransactionMap.keySet());
460
		List<InsurancePolicy> insurancePolicies = insurancePolicyRepository
460
		List<InsurancePolicy> insurancePolicies = insurancePolicyRepository
461
				.selectByRetailerIdInvoiceNumber(fofoOrder.getInvoiceNumber());
461
				.selectByRetailerIdInvoiceNumber(fofoOrder.getInvoiceNumber());