AdmEquipment.java 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. package com.persagy.proxy.adm.model;
  2. import cn.hutool.core.util.StrUtil;
  3. import com.alibaba.fastjson.annotation.JSONField;
  4. import com.fasterxml.jackson.databind.node.ObjectNode;
  5. import com.persagy.proxy.adm.annotations.CascadeColumn;
  6. import lombok.Data;
  7. import lombok.EqualsAndHashCode;
  8. import javax.persistence.Column;
  9. import java.util.List;
  10. /**
  11. * ADM 设备 实体
  12. * @author lvxy
  13. * @date 2021/8/17
  14. */
  15. @Data
  16. @EqualsAndHashCode(callSuper = true)
  17. public class AdmEquipment extends AdmSBaseEntity<AdmEquipment>{
  18. public static final String OBJ_TYPE = "equipment";
  19. /** 设备名称 */
  20. private String name;
  21. /** 本地编码 */
  22. private String localId;
  23. /** 本地名称 */
  24. private String localName;
  25. /** 二维码内容 */
  26. private String defaultQRCode;
  27. /** 设计图纸中编码 */
  28. private String cadId;
  29. /** RFID标识 */
  30. @JSONField(name = "rFID")
  31. private String rfId;
  32. /** BIM模型中编码 */
  33. private String bimId;
  34. /** BIM构建编码 */
  35. private String bimTypeId;
  36. /** BIM模型中坐标 */
  37. private String bimLocation;
  38. /** 现场发现人员 */
  39. private String findPeople;
  40. /** 项目ID */
  41. private String projectId;
  42. /** 设备类型code */
  43. private String classCode;
  44. /** 设备所在建筑ID */
  45. private String buildingId;
  46. /** 设备所在楼层id */
  47. private String floorId;
  48. /** 设备关联的资产id */
  49. private String propertyId;
  50. /** 参见 EquipmentProSy **/
  51. /** 品牌型号id */
  52. private String dpManufacturerId;
  53. /** 供应商信息id */
  54. private String dpSupplierId;
  55. /** 维修商信息id */
  56. private String dpMaintainerId;
  57. /** 保险公司信息id */
  58. private String dpInsurerId;
  59. /** 设备型号id */
  60. private String dpSpecificationId;
  61. /** 品牌id */
  62. private String dpBrandId;
  63. /** Revit族 */
  64. private String bimFamilyName;
  65. /** Revit族类型 */
  66. private String bimFamilySymbol;
  67. /** 设备序号 */
  68. private Double equipSerial;
  69. /** 部件关联设备的id */
  70. private String parentId;
  71. /** 系统id集合 */
  72. private List<String> systemList;
  73. /** 项目自定义类型 */
  74. private String customCategory;
  75. /** 任务状态 */
  76. private Integer taskState;
  77. /** 模型id */
  78. private String modelId;
  79. /** 贴码状态 */
  80. private Integer codeType;
  81. /** 备注 */
  82. private String note;
  83. /** 客户端id */
  84. private String appId;
  85. /** 方案id */
  86. private String schemeId;
  87. /** 系统编码 */
  88. private String systemCode;
  89. /** 系统名称 */
  90. private String systemName;
  91. /** 二维码图片 */
  92. private String qrcodePic;
  93. /** 对象类型 */
  94. private String objectType = OBJ_TYPE;
  95. /** 资产信息实体类 资产对应设备设施关系 资产→设备设施*/
  96. @CascadeColumn(graphCode = "Property2Mech", relCode = "Pe2Eq", selectToObj = false)
  97. private AdmProperty property;
  98. /** 建筑信息实体类 */
  99. @CascadeColumn(graphCode = "MechForArch", relCode = "Eq2Bd")
  100. private AdmBuilding building;
  101. /** 楼层信息实体类 */
  102. @CascadeColumn(graphCode = "MechForArch", relCode = "Eq2Fl")
  103. private AdmFloor floor;
  104. /** 项目信息实体类 */
  105. @CascadeColumn(graphCode = "MechSubset", relCode = "Pj2Eq", selectToObj = false)
  106. private AdmProject project;
  107. /**BIM模型中坐标json,坐标x,y,z */
  108. private AdmBIMLocation locationJson;
  109. public AdmBIMLocation getLocationJson() {
  110. if (StrUtil.isNotEmpty(bimLocation)){
  111. String[] split = bimLocation.split(",");
  112. AdmBIMLocation bimLocation = new AdmBIMLocation();
  113. if (split.length == 3){
  114. bimLocation.setX(Double.valueOf(split[0]));
  115. bimLocation.setY(Double.valueOf(split[1]));
  116. bimLocation.setZ(Double.valueOf(split[2]));
  117. }else if (split.length == 2){
  118. bimLocation.setX(Double.valueOf(split[0]));
  119. bimLocation.setY(Double.valueOf(split[1]));
  120. bimLocation.setZ(0.0);
  121. }
  122. return bimLocation;
  123. }
  124. return null;
  125. }
  126. /** 级联-设备服务所在的空 */
  127. @CascadeColumn(graphCode = "MechForArch", relCode = "Eq2Sp")
  128. private List<AdmSpace> zoneSpaceForBase;
  129. /** 级联-设备服务所在的空 */
  130. @CascadeColumn(graphCode = "MechInArch", relCode = "Eq2Sp")
  131. private List<AdmSpace> zoneSpaceInBase;
  132. /** 级联-设备所在的竖井 */
  133. @CascadeColumn(graphCode = "MechInArch", relCode = "Eq2Sh")
  134. private List<AdmShaft> shaftList;
  135. /** 资产列表 */
  136. @CascadeColumn(graphCode = "Property2Mech", relCode = "Pe2Eq", selectToObj = false)
  137. private List<AdmProperty> propertyList;
  138. /** 级联-部件 */
  139. @CascadeColumn(graphCode = "MechSubset", relCode = "Eq2Ec")
  140. private List<AdmComponent> component;
  141. /******************************** 报表使用 **************************************/
  142. /** 资产id */
  143. @Column(name = "link_id")
  144. private String linkId;
  145. /** 资产名称 */
  146. @Column(name = "link_name")
  147. private String linkEquipName;
  148. /** 资产本地名称 */
  149. @Column(name = "link_local_name")
  150. private String linkEquipLocalName;
  151. /** 资产分类 */
  152. @Column(name = "link_family")
  153. private String linkFamily;
  154. /** 系统对象 */
  155. @CascadeColumn(graphCode = "MechSubset", relCode = "Sy2Eq", selectToObj = false)
  156. private List<AdmSystem> linkSystem;
  157. /** 部件数量 */
  158. private Integer count = 0;
  159. /** 级联-部件 table 对应关系表 idColumn 对应 本类的id childIdColumn 级联对象的关系id */
  160. //@CascadeColumn(table="equipment", idColumn="class_code", childIdColumn="parent_id")
  161. private List<AdmObjectType> componentCategory;
  162. /** 级联-设备分类 */
  163. //@SCascade(table="equipment", idColumn="id", childIdColumn="class_code")
  164. private ObjectNode equipCategory;
  165. }