Subversion Repositories SmartDukaan

Rev

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

Rev 34388 Rev 34528
Line 756... Line 756...
756
        LOGGER.info("InvestmentChart" + cm);
756
        LOGGER.info("InvestmentChart" + cm);
757
        return "investmentdetails";
757
        return "investmentdetails";
758
    }
758
    }
759
 
759
 
760
    @RequestMapping(value = "/getlmsLineChart", method = RequestMethod.GET)
760
    @RequestMapping(value = "/getlmsLineChart", method = RequestMethod.GET)
761
    public String getlmsLineChart(HttpServletRequest request, Model model) throws Exception {
761
    public String getlmsLineChart(HttpServletRequest request, Model model, @RequestParam(name = "fofoId", defaultValue = "0") int fofoId) throws Exception {
-
 
762
        if (fofoId == 0) {
762
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
763
            LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
763
        int fofoId = loginDetails.getFofoId();
764
            fofoId = loginDetails.getFofoId();
-
 
765
        }
-
 
766
 
764
        ChartModel cm = fofoUser.getLmsLineChart(loginDetails.getFofoId());
767
        ChartModel cm = fofoUser.getLmsLineChart(fofoId);
765
 
768
 
766
        LOGGER.info("linechartMap" + gson.toJson(cm));
769
        LOGGER.info("linechartMap" + gson.toJson(cm));
767
        model.addAttribute("linechartMap", gson.toJson(cm));
770
        model.addAttribute("linechartMap", gson.toJson(cm));
768
        return "lmsLineChart";
771
        return "lmsLineChart";
769
    }
772
    }
770
 
773
 
771
    @RequestMapping(value = "/getMonthlyPurchaseLineChart", method = RequestMethod.GET)
774
    @RequestMapping(value = "/getMonthlyPurchaseLineChart", method = RequestMethod.GET)
772
    public String getMonthlyPurchaseLineChart(HttpServletRequest request, Model model) throws Exception {
775
    public String getMonthlyPurchaseLineChart(HttpServletRequest request, Model model, @RequestParam(name = "fofoId", defaultValue = "0") int fofoId) throws Exception {
-
 
776
        if (fofoId == 0) {
773
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
777
            LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
774
        int fofoId = loginDetails.getFofoId();
778
            fofoId = loginDetails.getFofoId();
-
 
779
        }
775
        ChartModel cm = fofoUser.getPurchaseOrderChart(fofoId);
780
        ChartModel cm = fofoUser.getPurchaseOrderChart(fofoId);
776
 
781
 
777
        LOGGER.info("chartMap" + gson.toJson(cm));
782
        LOGGER.info("chartMap" + gson.toJson(cm));
778
        model.addAttribute("chartMap", gson.toJson(cm));
783
        model.addAttribute("chartMap", gson.toJson(cm));
779
 
784
 
Line 850... Line 855...
850
 
855
 
851
        return "price-drop-details";
856
        return "price-drop-details";
852
    }
857
    }
853
 
858
 
854
    @RequestMapping(value = "/getMonthlyPriceDrop", method = RequestMethod.GET)
859
    @RequestMapping(value = "/getMonthlyPriceDrop", method = RequestMethod.GET)
855
    public String getMonthlyPriceDropTabular(HttpServletRequest request, Model model) throws Exception {
860
    public String getMonthlyPriceDropTabular(HttpServletRequest request, Model model, @RequestParam(name = "fofoId", defaultValue = "0") int fofoId) throws Exception {
856
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
861
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
-
 
862
        if (fofoId == 0) {
857
        int fofoId = loginDetails.getFofoId();
863
            fofoId = loginDetails.getFofoId();
-
 
864
        }
-
 
865
 
858
        LocalDateTime curDate = LocalDate.now().atStartOfDay();
866
        LocalDateTime curDate = LocalDate.now().atStartOfDay();
859
 
867
 
860
        LocalDateTime startOfMonth = curDate.withDayOfMonth(1).minusMonths(6);
868
        LocalDateTime startOfMonth = curDate.withDayOfMonth(1).minusMonths(6);
861
        LocalDateTime startfMonthTotal = curDate.withDayOfMonth(1).minusMonths(12);
869
        LocalDateTime startfMonthTotal = curDate.withDayOfMonth(1).minusMonths(12);
862
        LocalDateTime endMonthTotal = curDate.withDayOfMonth(1).minusMonths(5);
870
        LocalDateTime endMonthTotal = curDate.withDayOfMonth(1).minusMonths(5);
Line 948... Line 956...
948
 
956
 
949
        return "price-drop-tabular";
957
        return "price-drop-tabular";
950
    }
958
    }
951
 
959
 
952
    @RequestMapping(value = "/getMonthlyActivation", method = RequestMethod.GET)
960
    @RequestMapping(value = "/getMonthlyActivation", method = RequestMethod.GET)
953
    public String getMonthlyActivation(HttpServletRequest request, Model model) throws Exception {
961
    public String getMonthlyActivation(HttpServletRequest request, Model model, @RequestParam(name = "fofoId", defaultValue = "0") int fofoId) throws Exception {
954
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
962
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
-
 
963
        if (fofoId == 0) {
955
        int fofoId = loginDetails.getFofoId();
964
            fofoId = loginDetails.getFofoId();
-
 
965
        }
956
 
966
 
957
        LocalDateTime curDate = LocalDate.now().atStartOfDay();
967
        LocalDateTime curDate = LocalDate.now().atStartOfDay();
958
        LocalDateTime startOfMonth = curDate.withDayOfMonth(1).minusMonths(6);
968
        LocalDateTime startOfMonth = curDate.withDayOfMonth(1).minusMonths(6);
959
 
969
 
960
        List<YearMonth> yms = new ArrayList<YearMonth>();
970
        List<YearMonth> yms = new ArrayList<YearMonth>();