package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.service.PowerAlarmService; import com.whyc.util.CommonUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; /** * 电源设备告警 */ @RestController @RequestMapping("powerAlarm") @Api(tags = "电源设备告警") public class PowerAlarmController { @Autowired private PowerAlarmService service; @GetMapping("acInput") @ApiOperation(value = "交流输入") public Response getACInputAnalysis(@RequestParam Integer userId){ Response response = service.getACInputAnalysis(userId); return response; } @GetMapping("error") @ApiOperation(value = "故障") public Response getErrorAnalysis(@RequestParam Integer userId){ Response response = service.getErrorAnalysis(userId); return response; } /** * +告警机房数和占比 * @return */ @GetMapping("acABC") @ApiOperation(value = "交流ABC") public Response getAcABCAnalysis(@RequestParam Integer userId){ Response response = service.getAcABCAnalysis(userId); return response; } @GetMapping("rectifier") @ApiOperation(value = "整流器") public Response getRectifierAnalysis(@RequestParam Integer userId){ Response response = service.getRectifierAnalysis(userId); return response; } @GetMapping("status") @ApiOperation(value = "电源状态告警") public Response getStatus(@RequestParam Integer userId){ Response response = service.getStatus(userId); return response; } @GetMapping("batteryGroup") @ApiOperation(value = "电池组") public Response getBatteryGroupAnalysis(@RequestParam Integer userId){ Response response = service.getBatteryGroupAnalysis(userId); return response; } @GetMapping("stationCount") @ApiOperation(value = "故障机房数量") public Response getAlarmStationCount(@RequestParam Integer userId){ Response response = service.getAlarmStationCount(userId); return response; } }