AdmRelationController.java 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.persagy.proxy.adm.controller;
  2. import cn.hutool.core.collection.CollUtil;
  3. import com.fasterxml.jackson.databind.node.ArrayNode;
  4. import com.fasterxml.jackson.databind.node.JsonNodeFactory;
  5. import com.fasterxml.jackson.databind.node.ObjectNode;
  6. import com.persagy.dmp.basic.model.QueryCriteria;
  7. import com.persagy.dmp.common.helper.SpringHelper;
  8. import com.persagy.dmp.digital.entity.ObjectRelation;
  9. import com.persagy.proxy.adm.constant.AdmCommonConstant;
  10. import com.persagy.proxy.adm.model.AdmFloor;
  11. import com.persagy.proxy.adm.model.AdmGraphicType;
  12. import com.persagy.proxy.adm.model.AdmRelationType;
  13. import com.persagy.proxy.adm.model.AdmWindow;
  14. import com.persagy.proxy.adm.request.AdmCreateRequest;
  15. import com.persagy.proxy.adm.request.AdmQueryCriteria;
  16. import com.persagy.proxy.adm.request.AdmResponse;
  17. import com.persagy.proxy.adm.service.IAdmGraphicTypeService;
  18. import com.persagy.proxy.adm.service.IAdmRelationService;
  19. import com.persagy.proxy.adm.service.IAdmRelationTypeService;
  20. import com.persagy.proxy.adm.service.IAdmWindowService;
  21. import com.persagy.proxy.common.entity.InstanceUrlParam;
  22. import org.apache.commons.lang.StringUtils;
  23. import org.springframework.beans.factory.annotation.Autowired;
  24. import org.springframework.beans.factory.annotation.Value;
  25. import org.springframework.web.bind.annotation.PostMapping;
  26. import org.springframework.web.bind.annotation.RequestBody;
  27. import org.springframework.web.bind.annotation.RequestMapping;
  28. import org.springframework.web.bind.annotation.RestController;
  29. import javax.ws.rs.QueryParam;
  30. import java.util.ArrayList;
  31. import java.util.List;
  32. import java.util.stream.Collectors;
  33. /**
  34. * ADM 窗户 API
  35. * @author xujiaheng
  36. * @date 2021-09-3
  37. */
  38. @RestController
  39. @RequestMapping("/rel")
  40. public class AdmRelationController {
  41. @Autowired
  42. private IAdmGraphicTypeService service;
  43. @Value("${middleware.group.code}")
  44. private String groupCode;
  45. /**
  46. * 创建
  47. * @param
  48. * @return
  49. * @throws Exception
  50. */
  51. @PostMapping("/equip/category")
  52. public AdmResponse equipRel(@QueryParam("projectId") String projectId) {
  53. //组装上下文条件
  54. InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
  55. AdmResponse res = service.query(context);
  56. return res;
  57. }
  58. }