| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.constant.BattSingalIdEnum; |
| | | import com.whyc.dto.AnalysisAlm.AnalysisChangeRes; |
| | | import com.whyc.dto.Param.AlmAnalyseDto; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.service.AlmAnalysisParamService; |
| | | import com.whyc.service.BattRealdataIdService; |
| | | import com.whyc.service.BattalarmDataService; |
| | | import com.whyc.service.PwrdevAlarmService; |
| | | import com.whyc.pojo.db_alarm.BattalarmData; |
| | | import com.whyc.service.*; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | |
| | | @RequestMapping("analysis") |
| | | @RestController |
| | |
| | | |
| | | @Autowired |
| | | private AlmAnalysisParamService almAnalysisParamService; |
| | | |
| | | @Autowired |
| | | private DevalarmDataService devalarmDataService; |
| | | |
| | | @PostMapping("getBattAlmAnalyse") |
| | | @ApiOperation("预警分析管理-电池告警") |
| | | public Response getBattAlmAnalyse(@RequestBody AlmAnalyseDto dto){ |
| | | Integer uid= ActionUtil.getUser().getId(); |
| | | dto.setUid(uid); |
| | | return battalarmDataService.getBattAlmAnalyse(dto); |
| | | } |
| | | |
| | | @PostMapping("getDevAlmAnalyse") |
| | | @ApiOperation("预警分析管理-设备告警") |
| | | public Response getDevAlmAnalyse(@RequestBody AlmAnalyseDto dto){ |
| | | Integer uid= ActionUtil.getUser().getId(); |
| | | dto.setUid(uid); |
| | | return devalarmDataService.getDevAlmAnalyse(dto); |
| | | } |
| | | |
| | | @PostMapping("getPwrtAlmAnalyse") |
| | |
| | | |
| | | @GetMapping("getHisRealInAlm") |
| | | @ApiOperation("预警分析管理-电源主属性和分析属性") |
| | | public Response getHisRealInAlm(@RequestParam Integer battgroupId,@RequestParam Integer powerId,@RequestParam String startTime,@RequestParam(required = false) Integer almId,@RequestParam(required = false) Integer intervalTime) throws ParseException, InterruptedException { |
| | | return almAnalysisParamService.getHisRealInAlm(battgroupId,powerId,startTime,almId,intervalTime); |
| | | public Response getHisRealInAlm(@RequestParam Integer battgroupId,@RequestParam Integer powerId,@RequestParam String startTime,@RequestParam(required = false) Integer almId) throws ParseException, InterruptedException { |
| | | return almAnalysisParamService.getHisRealInAlm(battgroupId,powerId,startTime,almId); |
| | | } |
| | | |
| | | @PostMapping("getHisRealWithChage") |
| | | @ApiOperation("预警分析管理-切换时间间隔和副属性") |
| | | public Response getHisRealWithChage(@RequestBody AnalysisChangeRes res) throws ParseException, InterruptedException { |
| | | return almAnalysisParamService.getHisRealWithChage(res); |
| | | } |
| | | |
| | | @PostMapping("getAlmSummaryParam") |
| | | @ApiOperation("预警分析管理-查询所有的属性对应关系") |
| | | public Response getAlmSummaryParam(){ |
| | | return almAnalysisParamService.getAlmSummaryParam(); |
| | | } |
| | | |
| | | } |