| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.AFEInverterState; |
| | | import com.whyc.pojo.CentralMonitorSysRT; |
| | | import com.whyc.service.CentralMonitorSysCtrlService; |
| | | import com.whyc.service.CentralMonitorSysRTService; |
| | | 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 org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | @RequestMapping("centralMonitorSys") |
| | | @RestController |
| | | @Api(tags = "集中监控系统-进出线屏的状态/数据信息") |
| | | @Api(tags = "集中监控系统-进出线屏的状态及数据信息") |
| | | public class CentralMonitorSysRTController { |
| | | |
| | | @Autowired |
| | |
| | | return service.getInfoByDevId(devId); |
| | | } |
| | | |
| | | @GetMapping("inField") |
| | | @ApiOperation(value = "查询告警阈值字段-进线屏") |
| | | public Response<Map<String,List>> getInField(){ |
| | | return service.getInField(); |
| | | } |
| | | |
| | | @GetMapping("outField") |
| | | @ApiOperation(value = "查询告警阈值字段-出线屏") |
| | | public Response<Map<String,List>> getOutField(){ |
| | | return service.getOutField(); |
| | | } |
| | | |
| | | @PutMapping("updateState") |
| | | @ApiOperation(value = "更新状态-演示使用") |
| | | public Response updateState(@RequestParam int devId,@RequestParam int switchClose){ |
| | | return service.updateState(devId,switchClose); |
| | | } |
| | | |
| | | /** |
| | | * ======History====== |
| | | * 历史查询时,因为历史记录是按照日期分表的,如果查询所有的日期表(union)后再分页,会导致速度极慢,故查询按照单个日期查询 |
| | | * TODO 待确定是否需要加上日期 |
| | | * */ |
| | | @GetMapping("history/all") |
| | | @ApiOperation(value = "查询历史记录") |
| | | public Response<PageInfo<CentralMonitorSysRT>> getHistory(@RequestParam int pageNum, int pageSize, int devId){ |
| | | return service.getHistory(pageNum,pageSize,devId); |
| | | } |
| | | |
| | | |
| | | } |