NewWaterTingController.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package com.lightinit.hsdatashow.controller.admin;
  2. import com.lightinit.hsdatashow.dictionary.DicViewMenuTitle;
  3. import com.lightinit.hsdatashow.model.admin.PrecipitationAggregateResultModel;
  4. import com.lightinit.hsdatashow.model.admin.WaterResourceAggregateResultModel;
  5. import com.lightinit.hsdatashow.model.admin.WaterStorageAggregateResultModel;
  6. import com.lightinit.hsdatashow.service.admin.IWaterThingService;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.stereotype.Controller;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.servlet.ModelAndView;
  11. @Controller
  12. @RequestMapping(value = "/admin/newWater")
  13. public class NewWaterTingController extends BaseController {
  14. @Autowired
  15. private IWaterThingService waterThingService ;
  16. @RequestMapping(value = "/index.htm")
  17. public ModelAndView index(){
  18. ModelAndView modelAndView = new ModelAndView("admin/newWater/index");
  19. //降水总量
  20. PrecipitationAggregateResultModel jiangshui = waterThingService.getnewPrecipitationAggregate() ;
  21. modelAndView.addObject("jiangshui",jiangshui) ;
  22. //水资源总量
  23. WaterResourceAggregateResultModel shuiziyuan = waterThingService.getWaterResourceAggregate() ;
  24. modelAndView.addObject("shuiziyuan",shuiziyuan) ;
  25. //蓄水总量
  26. WaterStorageAggregateResultModel xushui = waterThingService.getWaterStorageAggregate() ;
  27. modelAndView.addObject("xushui",xushui) ;
  28. modelAndView.addObject("title", DicViewMenuTitle.WATER) ;
  29. return modelAndView;
  30. }
  31. }