| | |
| | | @Autowired |
| | | private DeviceService deviceService; |
| | | |
| | | /** |
| | | * @Description: 根据mac查询报警信息 |
| | | * @Param: [mac] |
| | | * @return: com.moral.constant.ResultMessage |
| | | * @Author: 陈凯裕 |
| | | * @Date: 2021/8/23 |
| | | */ |
| | | @GetMapping("queryAlarmByMac") |
| | | public ResultMessage queryAlarmByMac(String mac) { |
| | | if(mac==null) |
| | | return new ResultMessage(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg(),null); |
| | | List<Sensor> sensors = organizationUnitAlarmService.queryAlarmLevel(mac); |
| | | AlarmLevelVO vo = AlarmLevelVO.convert(sensors); |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(), vo); |