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<Map> getACInputAnalysis(@RequestParam Integer userId){
|
Response<Map> response = service.getACInputAnalysis(userId);
|
return response;
|
}
|
|
@GetMapping("error")
|
@ApiOperation(value = "故障")
|
public Response<Map> getErrorAnalysis(@RequestParam Integer userId){
|
Response<Map> response = service.getErrorAnalysis(userId);
|
return response;
|
}
|
|
/**
|
* +告警机房数和占比
|
* @return
|
*/
|
@GetMapping("acABC")
|
@ApiOperation(value = "交流ABC")
|
public Response<Map> getAcABCAnalysis(@RequestParam Integer userId){
|
Response<Map> response = service.getAcABCAnalysis(userId);
|
return response;
|
}
|
|
@GetMapping("rectifier")
|
@ApiOperation(value = "整流器")
|
public Response<Map> getRectifierAnalysis(@RequestParam Integer userId){
|
Response<Map> response = service.getRectifierAnalysis(userId);
|
return response;
|
}
|
|
@GetMapping("status")
|
@ApiOperation(value = "电源状态告警")
|
public Response<Map> getStatus(@RequestParam Integer userId){
|
Response<Map> response = service.getStatus(userId);
|
return response;
|
}
|
|
@GetMapping("batteryGroup")
|
@ApiOperation(value = "电池组")
|
public Response<Map> getBatteryGroupAnalysis(@RequestParam Integer userId){
|
Response<Map> response = service.getBatteryGroupAnalysis(userId);
|
return response;
|
}
|
|
@GetMapping("stationCount")
|
@ApiOperation(value = "故障机房数量")
|
public Response<List> getAlarmStationCount(@RequestParam Integer userId){
|
Response<List> response = service.getAlarmStationCount(userId);
|
return response;
|
}
|
|
}
|