12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- package com.lightinit.hsdatashow.controller.admin;
- import com.lightinit.hsdatashow.dictionary.DicCategoryIndex;
- import com.lightinit.hsdatashow.model.ResultState;
- import com.lightinit.hsdatashow.service.admin.ICockpitService;
- import com.lightinit.hsdatashow.service.admin.IHomeService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.ResponseBody;
- import org.springframework.web.servlet.ModelAndView;
- import java.util.ArrayList;
- @Controller("adminHomeController")
- @RequestMapping(value = {"/admin", "/admin/home"})
- public class HomeController {
- @Autowired
- private IHomeService homeService;
- @Autowired
- private ICockpitService cockpitService;
- @RequestMapping(value = {"/", "/index.action"})
- public ModelAndView index(){
- ModelAndView modelAndView = new ModelAndView("admin/home/index");
- return modelAndView;
- }
-
- @RequestMapping(value="moreindex.action")
- @ResponseBody
- public ResultState getMoreIndex(){
- ArrayList<String> findIndexes = new ArrayList<>();
- findIndexes.add(DicCategoryIndex.SOCIETYDEVELOPINDEX);
- findIndexes.add(DicCategoryIndex.ECOLOGICALENVIRONMENTINDEX);
- findIndexes.add(DicCategoryIndex.RESIDENTSERVICEINDEX);
- findIndexes.add(DicCategoryIndex.SOCIETYSECURITYINDEX);
- return cockpitService.getIndex(findIndexes);
- }
-
- @RequestMapping(value="citygreening.action")
- @ResponseBody
- public ResultState getCityGreening(){
- return homeService.getCityGreening();
- }
-
- @RequestMapping(value="societysecurity.action")
- @ResponseBody
- public ResultState getSocietySecurity(){
- return homeService.getSocietySecurity();
- }
-
- @RequestMapping(value="pollutionindex.action")
- @ResponseBody
- public ResultState getPollutionIndex(){
- return homeService.getPollutionIndex();
- }
-
- @RequestMapping(value="societydevelop.action")
- @ResponseBody
- public ResultState getSocietyDevelop(){
- return homeService.getSocietyDevelop();
- }
- }
|