|
@@ -1,16 +1,20 @@
|
|
package com.persagy.apm.alarmservice.group.management.controller;
|
|
package com.persagy.apm.alarmservice.group.management.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
-import com.persagy.apm.common.response.CommonResult;
|
|
|
|
-import com.persagy.apm.common.utils.ResultHelper;
|
|
|
|
import com.persagy.apm.alarmservice.group.management.model.vo.GroupTreeDetailVO;
|
|
import com.persagy.apm.alarmservice.group.management.model.vo.GroupTreeDetailVO;
|
|
import com.persagy.apm.alarmservice.group.management.model.vo.GroupTreeVO;
|
|
import com.persagy.apm.alarmservice.group.management.model.vo.GroupTreeVO;
|
|
|
|
+import com.persagy.apm.alarmservice.group.management.service.GroupManagementService;
|
|
|
|
+import com.persagy.apm.common.response.CommonResult;
|
|
|
|
+import com.persagy.apm.common.utils.ResultHelper;
|
|
|
|
+import com.persagy.apm.model.dto.GroupManagementDTO;
|
|
|
|
+import com.persagy.apm.model.vo.GroupManagementVo;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.io.IOUtils;
|
|
import org.apache.commons.io.IOUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -33,8 +37,11 @@ import java.util.Objects;
|
|
@RequestMapping("group-management")
|
|
@RequestMapping("group-management")
|
|
public class GroupManagementController {
|
|
public class GroupManagementController {
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private GroupManagementService managementService;
|
|
|
|
+
|
|
@ApiOperation(value = "获取分组树")
|
|
@ApiOperation(value = "获取分组树")
|
|
- @PostMapping("/queryGroupTree")
|
|
|
|
|
|
+ @PostMapping("/eq_groups/tree")
|
|
public CommonResult<List<GroupTreeVO>> queryGroupTree(){
|
|
public CommonResult<List<GroupTreeVO>> queryGroupTree(){
|
|
return ResultHelper.single(getGroupTree());
|
|
return ResultHelper.single(getGroupTree());
|
|
}
|
|
}
|
|
@@ -59,8 +66,8 @@ public class GroupManagementController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "根据id获取分组详情信息")
|
|
|
|
- @PostMapping("/queryTreeById")
|
|
|
|
|
|
+ @ApiOperation(value = "获取分组名称")
|
|
|
|
+ @PostMapping("/eq_groups/get")
|
|
public CommonResult<GroupTreeDetailVO> queryTreeById(@RequestBody String id){
|
|
public CommonResult<GroupTreeDetailVO> queryTreeById(@RequestBody String id){
|
|
List<GroupTreeVO> groupTreeVOList = getGroupTree();
|
|
List<GroupTreeVO> groupTreeVOList = getGroupTree();
|
|
GroupTreeDetailVO groupTreeDetailVO = new GroupTreeDetailVO();
|
|
GroupTreeDetailVO groupTreeDetailVO = new GroupTreeDetailVO();
|
|
@@ -91,4 +98,16 @@ public class GroupManagementController {
|
|
}
|
|
}
|
|
return groupTreeDetailVO;
|
|
return groupTreeDetailVO;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "分组条件(设备类+查询条件)+项目 获取设备")
|
|
|
|
+ @PostMapping("/equips/query")
|
|
|
|
+ public CommonResult<List<GroupManagementVo>> equipsQuery(@RequestBody GroupManagementDTO managementDTO){
|
|
|
|
+ return ResultHelper.single(managementService.equipsQuery(managementDTO));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "获取设备名称")
|
|
|
|
+ @PostMapping("/equips/get")
|
|
|
|
+ public CommonResult<GroupManagementVo> equipsQuery(@RequestBody String id) {
|
|
|
|
+ return ResultHelper.single(managementService.equipsGet(id));
|
|
|
|
+ }
|
|
}
|
|
}
|