Subversion Repositories SmartDukaan

Rev

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

Rev 32626 Rev 32792
Line 1382... Line 1382...
1382
        }
1382
        }
1383
        List<Notification> notifications = null;
1383
        List<Notification> notifications = null;
1384
 
1384
 
1385
        List<NotificationCampaign> notificationCampaigns = notificationCampaignRepository.getNotifications(messageType, userId, offset, limit);
1385
        List<NotificationCampaign> notificationCampaigns = notificationCampaignRepository.getNotifications(messageType, userId, offset, limit);
1386
        LOGGER.info("messageType" + messageType);
1386
        LOGGER.info("messageType" + messageType);
-
 
1387
        if(messageType != null){
1387
        notifications = fofoUser.getNotifications(notificationCampaigns, messageType);
1388
        notifications = fofoUser.getNotifications(notificationCampaigns, messageType);
1388
 
1389
 
1389
        model.addAttribute("notifications", notifications);
1390
        model.addAttribute("notifications", notifications);
1390
 
1391
 
1391
        LOGGER.info("notifications" + notifications);
1392
        LOGGER.info("notifications" + notifications);}
1392
        return "notification-template";
1393
        return "notification-template";
1393
    }
1394
    }
1394
 
1395
 
1395
    @RequestMapping(value = "/notifyDocument/documentId", method = RequestMethod.GET)
1396
    @RequestMapping(value = "/notifyDocument/documentId", method = RequestMethod.GET)
1396
    public ResponseEntity<?> retailerDocumentById(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.DOCUMENT_ID) int documentId, @RequestParam int cid) throws ProfitMandiBusinessException {
1397
    public ResponseEntity<?> retailerDocumentById(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.DOCUMENT_ID) int documentId, @RequestParam int cid) throws ProfitMandiBusinessException {
Line 1764... Line 1765...
1764
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
1765
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
1765
        String email = loginDetails.getEmailId();
1766
        String email = loginDetails.getEmailId();
1766
        Set<Integer> authFofoIds = csService1.getAuthFofoIds(email, true);
1767
        Set<Integer> authFofoIds = csService1.getAuthFofoIds(email, true);
1767
 
1768
 
1768
        Set<Integer> fofoIdlist = fofoStoreRepository.selectActiveStores().stream().filter(x -> !x.isInternal()).map(x -> x.getId()).collect(Collectors.toSet());
1769
        Set<Integer> fofoIdlist = fofoStoreRepository.selectActiveStores().stream().filter(x -> !x.isInternal()).map(x -> x.getId()).collect(Collectors.toSet());
-
 
1770
        Set<Integer> fofoIds = null;
-
 
1771
        if(authFofoIds != null){
-
 
1772
            fofoIds = authFofoIds.stream().filter(x -> fofoIdlist.contains(x)).collect(Collectors.toSet());
-
 
1773
        }
-
 
1774
 
1769
 
1775
 
1770
        Set<Integer> fofoIds = authFofoIds.stream().filter(x -> fofoIdlist.contains(x)).collect(Collectors.toSet());
-
 
1771
        Map<Integer, Double> last3MonthSale = fofoOrderItemRepository.selectSumMopGroupByRetailer(
1776
        Map<Integer, Double> last3MonthSale = fofoOrderItemRepository.selectSumMopGroupByRetailer(
1772
                LocalDateTime.now().withDayOfMonth(1).minusMonths(2), LocalDateTime.now(), 0, false);
1777
                LocalDateTime.now().withDayOfMonth(1).minusMonths(2), LocalDateTime.now(), 0, false);
1773
 
1778
 
1774
        if (fofoIds != null && fofoIds.size() > 0) {
1779
        if (fofoIds != null && fofoIds.size() > 0) {
1775
            if (warehouseId != 0) {
1780
            if (warehouseId != 0) {
Line 1843... Line 1848...
1843
        String email = loginDetails.getEmailId();
1848
        String email = loginDetails.getEmailId();
1844
 
1849
 
1845
        Set<Integer> authFofoIds = csService1.getAuthFofoIds(email, true);
1850
        Set<Integer> authFofoIds = csService1.getAuthFofoIds(email, true);
1846
 
1851
 
1847
        Set<Integer> fofoIdlist = fofoStoreRepository.selectActiveStores().stream().filter(x -> !x.isInternal()).map(x -> x.getId()).collect(Collectors.toSet());
1852
        Set<Integer> fofoIdlist = fofoStoreRepository.selectActiveStores().stream().filter(x -> !x.isInternal()).map(x -> x.getId()).collect(Collectors.toSet());
-
 
1853
        Set<Integer> fofoIds = null;
-
 
1854
        if(authFofoIds != null){
1848
        Set<Integer> fofoIds = authFofoIds.stream().filter(x -> fofoIdlist.contains(x)).collect(Collectors.toSet());
1855
            fofoIds = authFofoIds.stream().filter(x -> fofoIdlist.contains(x)).collect(Collectors.toSet());
-
 
1856
        }
1849
 
1857
 
1850
        Map<Integer, Double> last3MonthS = orderRepository.selectBillingDatesBetweenSumGroupByRetailerId(
1858
        Map<Integer, Double> last3MonthS = orderRepository.selectBillingDatesBetweenSumGroupByRetailerId(
1851
                LocalDateTime.now().withDayOfMonth(1).minusMonths(2), LocalDateTime.now());
1859
                LocalDateTime.now().withDayOfMonth(1).minusMonths(2), LocalDateTime.now());
1852
 
1860
 
1853
        if (fofoIds != null && fofoIds.size() > 0) {
1861
        if (fofoIds != null && fofoIds.size() > 0) {