package com.ycl.controller.smoke; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ycl.annotation.LogSave; import com.ycl.api.CommonPage; import com.ycl.api.CommonResult; import com.ycl.controller.BaseController; import com.ycl.entity.smoke.OdsCurAlarm; import com.ycl.entity.smoke.OdsCustomer; import com.ycl.entity.smoke.OdsStatistics; import com.ycl.service.smoke.IOdsCurAlarmService; import com.ycl.service.smoke.IOdsStatisticsService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/smoke") @Api(tags = "油烟管理管理-统计数据数据") public class OdsStatisticsController extends BaseController { IOdsStatisticsService odsStatisticsService; IOdsCurAlarmService curAlarmService; @Autowired public void setOdsStatisticsService(IOdsStatisticsService odsStatisticsService) { this.odsStatisticsService = odsStatisticsService; } @Autowired public void setCurAlarmService(IOdsCurAlarmService curAlarmService) { this.curAlarmService = curAlarmService; } @ApiOperation("检测仪总体情况报表") @RequestMapping(value = "/statistics/listDataDetectorDailyStats", method = RequestMethod.GET) @ResponseBody @LogSave(operationType = "油烟模块", contain = "检测仪总体情况报表") public CommonResult findDataDetectorDailyStats() { OdsStatistics odsStatistics = odsStatisticsService.getByType("listDataDetectorDailyStats"); return CommonResult.success(odsStatistics.getContent()); } @ApiOperation("油烟减排统计") @RequestMapping(value = "/statistics/listDetectorDaily", method = RequestMethod.GET) @ResponseBody @LogSave(operationType = "油烟模块", contain = "油烟减排统计") public CommonResult findDetectorDaily() { OdsStatistics odsStatistics = odsStatisticsService.getByType("listDetectorDaily"); return CommonResult.success(odsStatistics.getContent()); } @ApiOperation("监测报警统计&运维情况报表") @RequestMapping(value = "/statistics/listCurAlarm", method = RequestMethod.GET) @ResponseBody @LogSave(operationType = "油烟模块", contain = "监测报警统计&运维情况报表") public CommonResult> findCurAlarm() { List list = curAlarmService.list(); return CommonResult.success(list); } }