Subversion Repositories SmartDukaan

Rev

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

Rev 26435 Rev 26445
Line 668... Line 668...
668
			authIdAndAuthUserMap.put(auth, authUser);
668
			authIdAndAuthUserMap.put(auth, authUser);
669
 
669
 
670
			List<Integer> fofoIds = pp.get(auth);
670
			List<Integer> fofoIds = pp.get(auth);
671
 
671
 
672
			for (Integer fId : fofoIds) {
672
			for (Integer fId : fofoIds) {
-
 
673
				try {
-
 
674
					PartnerDailyInvestment investment = partnerInvestmentService.getInvestment(fId, 0);
673
				Map<String, Object> investmentMap = this.getInvestments(fId);
675
					totalTodayInvestment += investment.getTotalInvestment();
-
 
676
					totalStockInInvestment += investment.getInStockAmount();
-
 
677
				} catch(Exception e) {
-
 
678
				}
674
 
679
 
675
				double currentMonthRating = hygieneDataRepository.selectRatingAvg(fId,
680
				double currentMonthRating = hygieneDataRepository.selectRatingAvg(fId,
676
						curDate.withDayOfMonth(1).minusMonths(1), curDate.plusMonths(1).withDayOfMonth(1));
681
						curDate.withDayOfMonth(1).minusMonths(1), curDate.plusMonths(1).withDayOfMonth(1));
677
 
682
 
678
				currentMonthRatingAllPartners += currentMonthRating;
683
				currentMonthRatingAllPartners += currentMonthRating;
Line 680... Line 685...
680
				fofoIds.size();
685
				fofoIds.size();
681
 
686
 
682
				Double lmtdAmount = lmtdSale.get(fId);
687
				Double lmtdAmount = lmtdSale.get(fId);
683
				Double mtdAmount = mtdSale.get(fId);
688
				Double mtdAmount = mtdSale.get(fId);
684
				Long ticketCount = ticketMap.get(fId);
689
				Long ticketCount = ticketMap.get(fId);
685
 
-
 
686
				if (!investmentMap.isEmpty()) {
-
 
687
					totalTodayInvestment += (float) investmentMap.get("today");
-
 
688
					totalStockInInvestment += (float) investmentMap.get("inStock");
-
 
689
 
-
 
690
				}
-
 
691
				LOGGER.info("totalTodayInvestment" + totalTodayInvestment);
-
 
692
				LOGGER.info("totalStockInInvestment" + totalStockInInvestment);
-
 
693
				if (ticketCount != null) {
690
				if (ticketCount != null) {
694
					totalTicketCount += ticketCount;
691
					totalTicketCount += ticketCount;
695
				}
692
				}
696
 
693
 
697
				if (lmtdAmount != null) {
694
				if (lmtdAmount != null) {
Line 986... Line 983...
986
	
983
	
987
	public Map<Integer, Object> getL2AuthUserPartnerDetail() throws Exception {
984
	public Map<Integer, Object> getL2AuthUserPartnerDetail() throws Exception {
988
		List<Position> pos = positionRepository.selectPositionbyCategoryIdAndEscalationType(
985
		List<Position> pos = positionRepository.selectPositionbyCategoryIdAndEscalationType(
989
				ProfitMandiConstants.TICKET_CATEGORY_SALES, EscalationType.L2);
986
				ProfitMandiConstants.TICKET_CATEGORY_SALES, EscalationType.L2);
990
 
987
 
-
 
988
		LOGGER.info("getL2AuthUserPartnerDetail Started");
991
		LocalDateTime curDate = LocalDate.now().atStartOfDay();
989
		LocalDateTime curDate = LocalDate.now().atStartOfDay();
992
		Map<Integer, Double> lmtdSale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(
990
		Map<Integer, Double> lmtdSale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(
993
				curDate.withDayOfMonth(1).minusMonths(1), curDate.with(LocalTime.MAX).minusMonths(1), 0, false);
991
				curDate.withDayOfMonth(1).minusMonths(1), curDate.with(LocalTime.MAX).minusMonths(1), 0, false);
994
		Map<Integer, Double> mtdSale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(curDate.withDayOfMonth(1),
992
		Map<Integer, Double> mtdSale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(curDate.withDayOfMonth(1),
995
				curDate.with(LocalTime.MAX), 0, false);
993
				curDate.with(LocalTime.MAX), 0, false);