| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询大气设备心跳包时间 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/QueryHeartBeatTime") |
| | | public ResponseVO<Object> QueryHeartBeatTime(@RequestParam(value = "mac", required = false) String mac) { |
| | | if (!permissionConfig.check(MenuEnum.AIR_HEARTBEATTIME.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(airEquipmentService.QueryHeartBeatTime(mac)); |
| | | } |
| | | |
| | | /** |
| | | * 设置心跳包间隔时间 |
| | | * |
| | | * @param mac |
| | | * @param time |
| | | * @return |
| | | */ |
| | | @GetMapping("/setHeartBeatTime") |
| | | public ResponseVO<Object> setHeartBeatTime(@RequestParam(value = "mac", required = false) String mac, |
| | | @RequestParam(value = "time", required = false) Integer time) { |
| | | if (!permissionConfig.check(MenuEnum.AIR_HEARTBEATTIME.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(airEquipmentService.setHeartBeatTime(mac, time)); |
| | | } |
| | | |
| | | /** |
| | | * 查询传感器数量/故障 |
| | | * |
| | | * @param mac |
| | | * @return |
| | | */ |
| | | @GetMapping("/QuerySensorInfo") |
| | | public ResponseVO<Object> QuerySensorInfo(@RequestParam(value = "mac", required = false) String mac) { |
| | | return ResponseUtil.success(airEquipmentService.QuerySensorInfo(mac)); |
| | | } |
| | | |
| | | /** |
| | | * 查询软硬件版本 |
| | | * |
| | | * @param mac |
| | | * @return |
| | | */ |
| | | @GetMapping("/QueryVersion") |
| | | public ResponseVO<Object> QueryVersion(@RequestParam(value = "mac", required = false) String mac) { |
| | | if (!permissionConfig.check(MenuEnum.AIR_QUERYVERSION.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(airEquipmentService.QueryVersion(mac)); |
| | | } |
| | | |
| | | /** |
| | | * 软重启 |
| | | * |
| | | * @param mac |
| | | * @return |
| | | */ |
| | | @GetMapping("/Reboot") |
| | | public ResponseVO<Object> Reboot(@RequestParam(value = "mac", required = false) String mac) { |
| | | if (!permissionConfig.check(MenuEnum.AIR_REBOOT.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(airEquipmentService.Reboot(mac)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置数据修正值 |
| | | * |
| | | * @param mac 灯杆MAC |
| | | * @param type 数据修正设备类型 |
| | | * @param valueOfReal 传感器数值 |
| | | * @param valueOfStandard 标准仪器数值 |
| | | * @return |
| | | */ |
| | | @GetMapping("/ModifiedData") |
| | | public ResponseVO<Object> ModifiedData(@RequestParam(value = "mac", required = false) String mac, |
| | | @RequestParam(value = "type", required = false) String type, |
| | | @RequestParam(value = "valueOfReal", required = false) String valueOfReal, |
| | | @RequestParam(value = "valueOfStandard", required = false) String valueOfStandard) { |
| | | airEquipmentService.ModifiedData(mac, type, valueOfReal, valueOfStandard); |
| | | return ResponseUtil.success(null); |
| | | } |
| | | |
| | | |
| | | } |