Subversion Repositories SmartDukaan

Rev

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

Rev 25798 Rev 25799
Line 518... Line 518...
518
		Map<Integer, CatalogListingModel> catalogListingMap = new HashMap<>();
518
		Map<Integer, CatalogListingModel> catalogListingMap = new HashMap<>();
519
 
519
 
520
		Map<Integer, FocusedModel> focusedModelMap = focusedModelRepository.selectAll().stream()
520
		Map<Integer, FocusedModel> focusedModelMap = focusedModelRepository.selectAll().stream()
521
				.collect(Collectors.toMap(FocusedModel::getCatalogId, Function.identity()));
521
				.collect(Collectors.toMap(FocusedModel::getCatalogId, Function.identity()));
522
 
522
 
523
		MonthlyPlanned monthlyPlanned = monthlyPlannedRepository.selectByFofoIdYearMonth(loginDetails.getFofoId(),
523
		MonthlyPlanned monthlyPlanned = monthlyPlannedRepository.selectByFofoId(loginDetails.getFofoId());
524
				LocalDate.now().withDayOfMonth(1));
-
 
525
		LOGGER.info("monthlyPlanned" + monthlyPlanned);
524
		LOGGER.info("monthlyPlanned" + monthlyPlanned);
526
		Map<Integer, Integer> plannedDetailMap = null;
525
		Map<Integer, Integer> plannedDetailMap = null;
527
		if (monthlyPlanned != null) {
526
		if (monthlyPlanned != null) {
528
			plannedDetailMap = plannedDetailRepository.selectByPlannedId(monthlyPlanned.getId()).stream()
527
			plannedDetailMap = plannedDetailRepository.selectByPlannedId(monthlyPlanned.getId()).stream()
529
					.collect(Collectors.toMap(x -> x.getCatalogId(), x -> x.getQuantity()));
528
					.collect(Collectors.toMap(x -> x.getCatalogId(), x -> x.getQuantity()));
Line 638... Line 637...
638
				Comparator.reverseOrder());
637
				Comparator.reverseOrder());
639
		LOGGER.info("monthlyPlanned" + monthlyPlanned);
638
		LOGGER.info("monthlyPlanned" + monthlyPlanned);
640
		model.addAttribute("catalogTagListings",
639
		model.addAttribute("catalogTagListings",
641
				catalogModelList.stream().sorted(firstCmp).collect(Collectors.toList()));
640
				catalogModelList.stream().sorted(firstCmp).collect(Collectors.toList()));
642
		model.addAttribute("isAdmin", roleManager.isAdmin(roleIds));
641
		model.addAttribute("isAdmin", roleManager.isAdmin(roleIds));
643
	    model.addAttribute("brandStockPrices",this.getBrandStockPrices(loginDetails.getFofoId()));
642
		model.addAttribute("brandStockPrices", this.getBrandStockPrices(loginDetails.getFofoId()));
644
		model.addAttribute("customRetailers", customRetailers);
643
		model.addAttribute("customRetailers", customRetailers);
645
		model.addAttribute("totalAmount", totalAmount);
644
		model.addAttribute("totalAmount", totalAmount);
646
		model.addAttribute("monthlyPlanned", monthlyPlanned);
645
		model.addAttribute("monthlyPlanned", monthlyPlanned);
647
		model.addAttribute("totalPcs", totalPcs);
646
		model.addAttribute("totalPcs", totalPcs);
648
		return "open-indent";
647
		return "open-indent";