Commit 31bffc52 authored by xinglei's avatar xinglei

查询树(通用)

parent 4e86d138
...@@ -9,7 +9,9 @@ public enum TopoNodeTypeEnum { ...@@ -9,7 +9,9 @@ public enum TopoNodeTypeEnum {
PAMS("PAMS", 2), PAMS("PAMS", 2),
动环监控("动环监控", 3), 动环监控("动环监控", 3),
设备监控("设备监控", 4), 设备监控("设备监控", 4),
自建系统("自建系统", 5); 自建系统("自建系统", 5),
金融城域网("金融城域网", 6),
虚拟云平台监控("虚拟云平台监控", 7);
/** /**
* 名称 * 名称
*/ */
......
...@@ -5,13 +5,7 @@ import java.util.List; ...@@ -5,13 +5,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
...@@ -381,8 +375,22 @@ public class TopographyController extends BaseController { ...@@ -381,8 +375,22 @@ public class TopographyController extends BaseController {
topographyService.saveNodes(topographyService.getSelfOrgCode(),nodeData); topographyService.saveNodes(topographyService.getSelfOrgCode(),nodeData);
} }
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
/**
*查询-树
*
* @param type 类型
* @return
*/
@GetMapping(value = "/treeByType/{type}", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "查询-树", notes = "查询-树")
public CommonResponse treeByType(@ApiParam(value = "查询类型:1-网络拓扑图;2-PAMS;3-动环监控;4-设备监控;5-自建系统;6-金融城域网;7-虚拟云平台监控", required = true)
@PathVariable int type) {
//获取当前登录人的公司code
ReginParams reginParams =getSelectedOrgInfo();
List<TopographyTreeDTO> list = topographyService.getTree(reginParams.getCompany().getOrgCode(), type);
return CommonResponseUtil.success(list);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment