|
@@ -1,5 +1,6 @@
|
|
|
package com.sky.ioc.controller.device;
|
|
|
|
|
|
+import com.sky.ioc.service.device.DeviceMessageService;
|
|
|
import com.sky.ioc.service.device.DeviceTypeService;
|
|
|
import com.sky.ioc.service.device.SecurityDeviceService;
|
|
|
import com.sky.ioc.tool.ReturnMsg;
|
|
@@ -21,6 +22,9 @@ public class DeviceController {
|
|
|
@Autowired
|
|
|
DeviceTypeService deviceTypeService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ DeviceMessageService deviceMessageService;
|
|
|
+
|
|
|
@ApiOperation("批量删除设备")
|
|
|
@DeleteMapping(value = "/batch_delete_device")
|
|
|
public ReturnMsg delBatch(String device_ids,String device_type_id) {
|
|
@@ -50,4 +54,31 @@ public class DeviceController {
|
|
|
public ReturnMsg getDevice(Integer id) {
|
|
|
return securityDeviceService.getDevice(id);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation("根据设备种类获取设备列表")
|
|
|
+ @GetMapping(value = "/device_kind_list")
|
|
|
+ public ReturnMsg getDeviceKind(String id) {
|
|
|
+ return securityDeviceService.getListByKind(id);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("根据设备类别获取设备列表")
|
|
|
+ @GetMapping(value = "/device_list")
|
|
|
+ public ReturnMsg getByDeviceType(String id,
|
|
|
+ @RequestParam(defaultValue = "1") Integer page,
|
|
|
+ @RequestParam(defaultValue = "20") Integer page_size) {
|
|
|
+ return deviceTypeService.getListByType(id,page,page_size);
|
|
|
+
|
|
|
+ }
|
|
|
+ @ApiOperation("删除设备告警")
|
|
|
+ @DeleteMapping(value = "/device_alarm")
|
|
|
+ public ReturnMsg delDeviceAlarm(String alarm_message_id) {
|
|
|
+ return deviceMessageService.delDeviceMessage(alarm_message_id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取设备告警列表")
|
|
|
+ @GetMapping(value = "/device_alarm")
|
|
|
+ public ReturnMsg getDeviceAlarm(String alarm_type,@RequestParam(defaultValue = "1") Integer page,@RequestParam(defaultValue = "20") Integer page_size) {
|
|
|
+ return deviceMessageService.getList(alarm_type,page,page_size);
|
|
|
+ }
|
|
|
}
|