Subversion Repositories SmartDukaan

Rev

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

Rev 26171 Rev 26222
Line 370... Line 370...
370
				model.addAttribute("partnerTypeImage", PartnerType.imageMap.get(partnerType));
370
				model.addAttribute("partnerTypeImage", PartnerType.imageMap.get(partnerType));
371
				model.addAttribute("fofoStore", fofoStore);
371
				model.addAttribute("fofoStore", fofoStore);
372
				model.addAttribute("partnerType", partnerType);
372
				model.addAttribute("partnerType", partnerType);
373
				model.addAttribute("hasGift", hasGift(loginDetails.getFofoId()));
373
				model.addAttribute("hasGift", hasGift(loginDetails.getFofoId()));
374
				model.addAttribute("giftItemId", ProfitMandiConstants.GIFT_ID);
374
				model.addAttribute("giftItemId", ProfitMandiConstants.GIFT_ID);
375
				model.addAttribute("retailers", new JSONObject()
375
				model.addAttribute("retailers", new JSONObject().append("code", fofoStore.getCode())
376
						.append("code", fofoStore.getCode())
-
 
377
						.append("partnerId", fofoStore.getId()).toString());
376
						.append("partnerId", fofoStore.getId()).toString());
378
				LocalDateTime curDate = LocalDate.now().atStartOfDay();
377
				LocalDateTime curDate = LocalDate.now().atStartOfDay();
379
				Map<Integer, Double> accesoriesmtdsale = fofoOrderRepository
378
				Map<Integer, Double> accesoriesmtdsale = fofoOrderRepository
380
						.selectSumSaleGroupByFofoIdsForMobileOrAccessories(loginDetails.getFofoId(),
379
						.selectSumSaleGroupByFofoIdsForMobileOrAccessories(loginDetails.getFofoId(),
381
								curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), Optional.of(false));
380
								curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), Optional.of(false));
Line 558... Line 557...
558
		return "admin";
557
		return "admin";
559
	}
558
	}
560
 
559
 
561
	private String getWarehouses(Set<CustomRetailer> positionRetailers) {
560
	private String getWarehouses(Set<CustomRetailer> positionRetailers) {
562
		Map<Integer, String> warehouses = new HashMap<>();
561
		Map<Integer, String> warehouses = new HashMap<>();
563
		positionRetailers.stream().forEach(x-> {
562
		positionRetailers.stream().forEach(x -> {
564
			if(x.getWarehouseId()!=0) {
563
			if (x.getWarehouseId() != 0) {
565
				warehouses.put(x.getWarehouseId(), ProfitMandiConstants.WAREHOUSE_MAP.get(x.getWarehouseId()));
564
				warehouses.put(x.getWarehouseId(), ProfitMandiConstants.WAREHOUSE_MAP.get(x.getWarehouseId()));
566
			}
565
			}
567
		});
566
		});
568
		return gson.toJson(warehouses);
567
		return gson.toJson(warehouses);
569
 
568
 
Line 621... Line 620...
621
		} else {
620
		} else {
622
			userId = userAccountRepository.selectUserIdByRetailerId(loginDetails.getFofoId());
621
			userId = userAccountRepository.selectUserIdByRetailerId(loginDetails.getFofoId());
623
		}
622
		}
624
		List<Notification> notifications = null;
623
		List<Notification> notifications = null;
625
 
624
 
626
		if (messageType == null) {
-
 
627
			messageType = MessageType.notification;
-
 
628
		}
-
 
629
 
-
 
630
		List<NotificationCampaign> notificationCampaigns = notificationCampaignRepository.getNotifications(messageType,
625
		List<NotificationCampaign> notificationCampaigns = notificationCampaignRepository.getNotifications(messageType,
631
				userId, offset, limit);
626
				userId, offset, limit);
632
		LOGGER.info("messageType" + messageType);
627
		LOGGER.info("messageType" + messageType);
633
		notifications = getNotifications(notificationCampaigns, messageType);
628
		notifications = getNotifications(notificationCampaigns, messageType);
634
 
629