Subversion Repositories SmartDukaan

Rev

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

Rev 35104 Rev 35119
Line 233... Line 233...
233
    private SamsungUpgradeOfferRepository samsungUpgradeOfferRepository;
233
    private SamsungUpgradeOfferRepository samsungUpgradeOfferRepository;
234
    private static final Logger LOGGER = LogManager.getLogger(DashboardController.class);
234
    private static final Logger LOGGER = LogManager.getLogger(DashboardController.class);
235
 
235
 
236
    @Autowired
236
    @Autowired
237
    private SSHService sshService;
237
    private SSHService sshService;
-
 
238
 
238
    @Autowired
239
    @Autowired
239
    BrandsService brandsService;
240
    BrandsService brandsService;
240
 
241
 
241
    @Autowired
242
    @Autowired
242
    SaleRewardService saleRewardService;
243
    SaleRewardService saleRewardService;
243
 
244
 
-
 
245
    @Autowired
-
 
246
    SchemeService schemeService;
-
 
247
    @Autowired
-
 
248
    PrintResourceRegionRepository printResourceRegionRepository;
-
 
249
    @Autowired
-
 
250
    PartnerRegionRepository partnerRegionRepository;
-
 
251
    @Autowired
-
 
252
    PrintResourceRepository printResourceRepository;
-
 
253
    @Autowired
-
 
254
    CatalogRepository catalogRepository;
-
 
255
    @Autowired
-
 
256
    OfferRepository offerRepository;
-
 
257
    @Autowired
-
 
258
    OfferPayoutRepository offerPayoutRepository;
-
 
259
    @Value("${google.api.key}")
-
 
260
    private String googleApiKey;
-
 
261
 
244
    @RequestMapping(value = "/12dashboard34", method = RequestMethod.GET)
262
    @RequestMapping(value = "/12dashboard34", method = RequestMethod.GET)
245
    public String dashboard1(HttpServletRequest request, Model model, @RequestParam int fofoId) throws Exception {
263
    public String dashboard1(HttpServletRequest request, Model model, @RequestParam int fofoId) throws Exception {
246
        boolean isAdmin = false;
264
        boolean isAdmin = false;
247
        model.addAttribute("isAdmin", isAdmin);
265
        model.addAttribute("isAdmin", isAdmin);
248
 
266
 
Line 364... Line 382...
364
        List<BrandItemWisePartnerSaleModel> brandItemWisePartnerSaleModels = fofoStoreRepository.selectPartnerBrandItemMonthlySale(Collections.singletonList(fofoId), month, brand);
382
        List<BrandItemWisePartnerSaleModel> brandItemWisePartnerSaleModels = fofoStoreRepository.selectPartnerBrandItemMonthlySale(Collections.singletonList(fofoId), month, brand);
365
        LOGGER.info("brandItemWisePartnerSaleModels {}", brandItemWisePartnerSaleModels);
383
        LOGGER.info("brandItemWisePartnerSaleModels {}", brandItemWisePartnerSaleModels);
366
        return brandItemWisePartnerSaleModels;
384
        return brandItemWisePartnerSaleModels;
367
    }
385
    }
368
 
386
 
-
 
387
    @RequestMapping(value = "/getBrandItemwisePartnerSecondarySale", method = RequestMethod.GET)
-
 
388
    @ResponseBody
-
 
389
    public List<BrandItemWisePartnerSaleModel> getBrandItemwisePartnerSecondarySale(HttpServletRequest request, @RequestParam(name = "month", required = true, defaultValue = "0") int month, @RequestParam(name = "brand") String brand, @RequestParam(name = "fofoId") Integer fofoId, Model model) throws Exception {
-
 
390
        if (month < 1 || month > 12) {
-
 
391
            throw new IllegalArgumentException("Month must be between 1 and 12");
-
 
392
        }
-
 
393
        List<BrandItemWisePartnerSaleModel> brandItemWisePartnerSaleModels = fofoStoreRepository.selectPartnerBrandItemMonthlySecondarySale(Collections.singletonList(fofoId), month, brand);
-
 
394
        LOGGER.info("brandItemWisePartnerSaleModels {}", brandItemWisePartnerSaleModels);
-
 
395
        return brandItemWisePartnerSaleModels;
-
 
396
    }
369
 
397
 
370
    @Autowired
-
 
371
    SchemeService schemeService;
-
 
372
 
-
 
373
    @Value("${google.api.key}")
-
 
374
    private String googleApiKey;
-
 
375
 
-
 
376
    @Autowired
-
 
377
    PrintResourceRegionRepository printResourceRegionRepository;
-
 
378
 
-
 
379
    @Autowired
-
 
380
    PartnerRegionRepository partnerRegionRepository;
-
 
381
 
-
 
382
    @Autowired
-
 
383
    PrintResourceRepository printResourceRepository;
-
 
384
 
-
 
385
    @Autowired
-
 
386
    CatalogRepository catalogRepository;
-
 
387
 
398
 
388
    @RequestMapping(value = "/dashboard", method = RequestMethod.GET)
399
    @RequestMapping(value = "/dashboard", method = RequestMethod.GET)
389
    public String dashboard(HttpServletRequest request, Model model) throws Exception {
400
    public String dashboard(HttpServletRequest request, Model model) throws Exception {
390
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
401
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
391
        String email = loginDetails.getEmailId();
402
        String email = loginDetails.getEmailId();
Line 671... Line 682...
671
            model.addAttribute("shippedLineItemMap", shippedLineItemMap);
682
            model.addAttribute("shippedLineItemMap", shippedLineItemMap);
672
        }
683
        }
673
        return "purchase-shipped-order-status";
684
        return "purchase-shipped-order-status";
674
    }
685
    }
675
 
686
 
676
    @Autowired
-
 
677
    OfferRepository offerRepository;
-
 
678
 
687
 
679
    @Autowired
-
 
680
    OfferPayoutRepository offerPayoutRepository;
-
 
681
 
688
 
682
    @RequestMapping(value = "/partnerTotalIncomeByMonth/{yearMonth}", method = RequestMethod.GET)
689
    @RequestMapping(value = "/partnerTotalIncomeByMonth/{yearMonth}", method = RequestMethod.GET)
683
    public String getPartnerTotalIncomeByMonth(HttpServletRequest request, @PathVariable int yearMonth, Model model) throws
690
    public String getPartnerTotalIncomeByMonth(HttpServletRequest request, @PathVariable int yearMonth, Model model) throws
684
            Exception {
691
            Exception {
685
 
692