| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.BattMaintDealarm; |
| | | import com.whyc.dto.Page; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.paramter.AlarmPar; |
| | |
| | | import com.whyc.pojo.BattalarmData; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.service.BattalarmDataService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | @Api(tags = "电池告警-实时告警") |
| | | @Api(tags = "告警管理-电池告警实时查询") |
| | | @RestController |
| | | @RequestMapping("/Battalarm_dataAction") |
| | | @RequestMapping("Battalarm_dataAction") |
| | | public class BattalarmDataController { |
| | | |
| | | @Autowired |
| | | private BattalarmDataService service; |
| | | |
| | | /*@GetMapping("/getAll") |
| | | @ApiOperation(value = "查询所有的实时告警")*/ |
| | | public Response<List<BattalarmData>> getAll(){ |
| | | @GetMapping("/getAll") |
| | | @ApiOperation(value = "查询所有的实时告警") |
| | | public Response getAll(){ |
| | | return service.getAll(); |
| | | } |
| | | |
| | |
| | | return service.getAllByPage(page); |
| | | } |
| | | //测试 |
| | | public Response<List<Batt_Maint_Dealarm>> test(@RequestBody BattalarmData battalarmData){ |
| | | public Response<List<BattMaintDealarm>> test(@RequestBody BattalarmData battalarmData){ |
| | | return service.test(battalarmData); |
| | | } |
| | | @PostMapping("/serchByCondition") |
| | |
| | | return service.getCountByStationId(stationId); |
| | | } |
| | | |
| | | @GetMapping("/getRealAlarm") |
| | | @ApiOperation(value = "获取底部电池告警",notes = "项目下方的滚动,查询最新电池告警(电池告警和设备告警筛选出最新的五条)") |
| | | public Response getRealAlarm(){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | return service.getRealAlarm(userInf.getUId().intValue(), null); |
| | | } |
| | | |
| | | |
| | | |
| | | } |