| | |
| | | package com.job.zsc.controller; |
| | | |
| | | |
| | | import com.job.zsc.pojo.AnalysisDustData; |
| | | import com.job.zsc.pojo.DustSiteData; |
| | | import com.job.zsc.pojo.PageBean; |
| | | import com.job.zsc.pojo.Result; |
| | | import com.job.zsc.pojo.*; |
| | | import com.job.zsc.service.FugitiveDustService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | List<AnalysisDustData> list = fugitiveDustService.analysisdata(siteName,beginTime,endTime); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | // 根据站点名字和时段进行统计分析 后端分页 |
| | | @GetMapping("/analysistime") |
| | | public Result analysisByTime( @RequestParam(defaultValue = "1") Integer page, |
| | | @RequestParam(defaultValue = "20")Integer pageSize,String siteName,String beginTime, String endTime){ |
| | | PageBean pageBean = fugitiveDustService.pageAnalysisTime(page,pageSize,siteName,beginTime,endTime); |
| | | return Result.success(pageBean); |
| | | } |
| | | |
| | | //获得不同的异常类型 |
| | | @GetMapping("/exceptiontype") |
| | | public Result getExceptionType(){ |
| | | List<DustExceptionType> list = fugitiveDustService.getExceptionType(); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | //条件查询异常数据 |
| | | @GetMapping("/exceptiondata") |
| | | public Result getExceptionData(@RequestParam(defaultValue = "1") Integer page, |
| | | @RequestParam(defaultValue = "20")Integer pageSize,String siteName,String [] exceptionType,String beginTime, String endTime){ |
| | | PageBean pageBean = fugitiveDustService.getExceptionData(page,pageSize,siteName,exceptionType,beginTime,endTime); |
| | | return Result.success(pageBean); |
| | | } |
| | | //条件查询异常数据 不分页 |
| | | @GetMapping("/exceptiondata1") |
| | | public Result getExceptionAllData(String siteName,String [] exceptionType,String beginTime, String endTime){ |
| | | List<DustExceptionData> list = fugitiveDustService.getExceptionAllData(siteName,exceptionType,beginTime,endTime); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | //根据某段时间内某个异常类型查询对应的店铺名称和设备编号 |
| | | @GetMapping("/sitenamecode") |
| | | public Result getExceptionSitenameAndCode(String exceptionType,String beginTime, String endTime){ |
| | | List<DustExceptionData> list = fugitiveDustService.getExceptionSitenameAndCode(exceptionType,beginTime,endTime); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | |
| | | // 根据时间返回该异常类型的个数 |
| | | @GetMapping("/exceptionnum") |
| | | public Result exceptionNum(String exceptionType,String beginTime,String endTime){ |
| | | Integer list = fugitiveDustService.exceptionNum( exceptionType, beginTime, endTime); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | // 查询历史数据 不分页 |
| | | @GetMapping("/history") |
| | | public Result conditonQueryHistoryData(String siteName,String beginTime, String endTime ){ |
| | | List<DustSiteData> list= fugitiveDustService.conditonQueryHistoryData(siteName,beginTime,endTime); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | // 返回异常的店铺总数 |
| | | @GetMapping("/exceptionsitenum") |
| | | public Result exceptionSiteNum(){ |
| | | List<DustExceptionData> list = fugitiveDustService.exceptionSiteNum(); |
| | | return Result.success(list); |
| | | } |
| | | |
| | | } |