package com.whyc.controller; 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.util.ActionUtil; 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.text.ParseException; @RequestMapping("analysis") @RestController @Api(tags = "预警分析管理") public class AnalysisAlmController { @Autowired private BattalarmDataService battalarmDataService; @Autowired private PwrdevAlarmService pwrdevAlarmService; @Autowired private AlmAnalysisParamService almAnalysisParamService; @PostMapping("getBattAlmAnalyse") @ApiOperation("预警分析管理-电池告警") public Response getBattAlmAnalyse(@RequestBody AlmAnalyseDto dto){ Integer uid= ActionUtil.getUser().getId(); dto.setUid(uid); return battalarmDataService.getBattAlmAnalyse(dto); } @PostMapping("getPwrtAlmAnalyse") @ApiOperation("预警分析管理-电源告警") public Response getPwrtAlmAnalyse(@RequestBody AlmAnalyseDto dto){ Integer uid=ActionUtil.getUser().getId(); dto.setUid(uid); return pwrdevAlarmService.getPwrtAlmAnalyse(dto); } @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); } }