package com.persagy.proxy.adm.constant;

import cn.hutool.core.collection.CollUtil;
import lombok.Getter;
import org.apache.commons.lang3.EnumUtils;

import java.util.*;
import java.util.stream.Collectors;

/***
 * Description: ADM关系类型枚举,直接用枚举类表示,以前是在数据库里存储的
 * @author : lijie
 * @date :2021/9/2 14:54
 * @see [graphtype.graphic_type.relation_type]表
 * Update By lijie 2021/9/2 14:54
 */
@Getter
public enum AdmRelationTypeEnum {

    /**燃气旁通-气体管道-*/
    EQ2EQ_GASNETWORK_2("eq2eq_GasNetwork_2","GasNetwork","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**设备所在楼层-设备→楼层-【设备台账】*/
    EQ2FL("eq2fl","MechInArch","Eq2Fl",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.FLOOR.getIndex(),false,false,false,false,false,false),
    /**空间隔断有窗-空间-空间-【全部关系总览】*/
    SP2SP_SPACENEIGHBORHOOD_3("sp2sp_SpaceNeighborhood_3","SpaceNeighborhood","Window",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,false),
    /**设备所在物业分区-设备→业务空间-【业务空间台账】*/
    EQ2SP_IN("eq2sp_in","MechInArch","Eq2Sp",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,false,false),
    /**建筑下的竖井-竖井→建筑-【竖井台账】*/
    SH2BD("sh2bd","ArchSubset","Bd2Sh",AdmObjectType.BUILDING.getIndex(),AdmObjectType.SHAFT.getIndex(),false,false,false,false,false,false),
    /**空间隔断有门-空间-空间-【全部关系总览】*/
    SP2SP_SPACENEIGHBORHOOD_2("sp2sp_SpaceNeighborhood_2","SpaceNeighborhood","Door",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,false),
    /**空间连通-空间-空间-【全部关系总览】*/
    SP2SP_SPACENEIGHBORHOOD_5("sp2sp_SpaceNeighborhood_5","SpaceNeighborhood","Connect",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,false),
    /**系统服务于竖井-系统→竖井-【竖井台账】*/
    SY2SH_FOR("sy2sh_for","MechForArch","Sy2Sh",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.SHAFT.getIndex(),false,false,false,false,true,false),
    /**污水排水-污水排水相关设备，沿水流方向-*/
    EQ2EQ_DRAININGWATERNETWORK_1("eq2eq_DrainingWaterNetwork_1","DrainingWaterNetwork","Discharge",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**设备服务于功能分区-设备→业务空间-【业务空间台账】*/
    EQ2SP_FOR("eq2sp_for","MechForArch","Eq2Sp",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,false,false),
    /**空调回风-空调回风相关设备，沿气流方向-*/
    EQ2EQ_ACAIRNETWORK_2("eq2eq_ACAirNetwork_2","ACAirNetwork","Return",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**系统下的设备-系统→设备-【系统台账】,【设备台账】*/
    EQ2SY("eq2sy","MechSubset","Sy2Eq",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,false,false,false,false,false),
    /**空调冷冻水补水-空调冷冻水补水相关设备，沿水流方向-*/
    EQ2EQ_CHILLWATERLOOP_4("eq2eq_ChillWaterLoop_4","ChillWaterLoop","Fill",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**设备服务于建筑-设备→建筑-【设备台账】*/
    EQ2BD_FOR("eq2bd_for","MechForArch","Eq2Bd",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,true,false),
    /**空调冷凝水排水-空调冷凝水排水相关设备，沿水流方向-*/
    EQ2EQ_CONDWATERNETWORK_1("eq2eq_CondWaterNetwork_1","CondWaterNetwork","Discharge",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**空间隔断无门窗-空间-空间-【全部关系总览】*/
    SP2SP_SPACENEIGHBORHOOD_1("sp2sp_SpaceNeighborhood_1","SpaceNeighborhood","None",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,false),
    /**阀门限制设备关系-阀门→被限设备-【全部关系总览】*/
    EQ2EQ_VALVERELATIONSHIP_VV2EQ("eq2eq_ValveRelationship_vv2eq","ValveRelationship","Vv2Eq",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**资产所在业务空间-资产→业务空间-*/
    PE2SP("pe2sp","PropertyInArch","Pe2Sp",AdmObjectType.PROPERTY.getIndex(),AdmObjectType.SPACE.getIndex(),true,false,false,false,true,false),
    /**通风排风-通风排风相关设备，沿气流方向-*/
    EQ2EQ_VENTNETWORK_2("eq2eq_VentNetwork_2","VentNetwork","Discharge",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**弱电通信连接-上位机→下位机，连接弱电、消防、安防等专业设备-*/
    EQ2EQ_SENSORNETWORK_1("eq2eq_SensorNetwork_1","SensorNetwork","Normal",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**空调冷却水旁通-液体管道-*/
    EQ2EQ_COOLINGWATERLOOP_3("eq2eq_CoolingWaterLoop_3","CoolingWaterLoop","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**设备服务于楼层-设备→楼层-【设备台账】*/
    EQ2FL_FOR("eq2fl_for","MechForArch","Eq2Fl",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.FLOOR.getIndex(),false,false,false,false,true,false),
    /**空调排风-空调排风相关设备，沿气流方向-*/
    EQ2EQ_ACAIRNETWORK_3("eq2eq_ACAirNetwork_3","ACAirNetwork","Discharge",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**生活给水供水-生活给水供水相关设备，沿水流方向-*/
    EQ2EQ_SUPPLYWATERNETWORK_1("eq2eq_SupplyWaterNetwork_1","DomesticWaterNetwork","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**生活给水旁通-液体管道-*/
    EQ2EQ_SUPPLYWATERNETWORK_2("eq2eq_SupplyWaterNetwork_2","DomesticWaterNetwork","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**系统控制关系-控制设备→被控系统-【全部关系总览】*/
    EQ2SY_CONTROLRELATION_2("eq2sy_ControlRelation_2","MechCtrl","SyCtrl",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SYSTEM.getIndex(),false,false,false,false,true,false),
    /**采暖水补水-采暖水补水相关设备，沿水流方向-*/
    EQ2EQ_HEATWATERLOOP_4("eq2eq_HeatWaterLoop_4","HeatWaterLoop","Fill",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**建筑下的空间-建筑→空间-【业务空间台账】*/
    BD2SP("bd2sp","ArchSubset","Bd2Sp",AdmObjectType.BUILDING.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,false,false),
    /**消防常开交通-业务空间-业务空间-【全部关系总览】*/
    SP2SP_TRAFFICNETWORK_2("sp2sp_TrafficNetwork_2","TrafficNetwork","FFOpen",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,true,CollUtil.newHashSet("GeneralZone")),
    /**楼层下的业务空间-楼层→业务空间-【业务空间台账】*/
    FL2SP("fl2sp","ArchSubset","Fl2Sp",AdmObjectType.FLOOR.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,false,false),
    /**竖井下的业务空间-竖井→空间-【竖井台账】*/
    SH2SP_ARCHSUBSET("Sh2Sp_ArchSubset","ArchSubset","Sh2Sp",AdmObjectType.SHAFT.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,false,false),
    /**空气混合机械通风-空间-空间-【全部关系总览】*/
    SP2SP_CONVECTIONNETWORK_2("sp2sp_ConvectionNetwork_2","ConvectionNetwork","MixMech",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,true,CollUtil.newHashSet("AirConditioningZone")),
    /**系统所在竖井-系统→竖井-【系统台账】,【竖井台账】*/
    SY2SH("sy2sh","MechInArch","Sy2Sh",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.SHAFT.getIndex(),false,false,false,false,false,false),
    /**系统所在建筑-系统→建筑-【系统台账】*/
    SY2BD_MECHINARCH("sy2bd_MechInArch","MechInArch","Sy2Bd",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,false,false),
    /**生活热水旁通-液体管道-*/
    EQ2EQ_DHWNETWORK_2("eq2eq_DHWNetwork_2","DHWNetwork","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**采暖水供水-采暖水供水相关设备，沿水流方向-*/
    EQ2EQ_HEATWATERLOOP_1("eq2eq_HeatWaterLoop_1","HeatWaterLoop","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**空气单向机械通风-空间→空间-【全部关系总览】*/
    SP2SP_CONVECTIONNETWORK_3("sp2sp_ConvectionNetwork_3","ConvectionNetwork","OnewayMech",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,true,CollUtil.newHashSet("AirConditioningZone")),
    /**弱电通信连接-弱电通信相关设备，沿弱电信号方向-*/
    EQ2EQ_CONTROLEQUIPNETWORK("eq2eq_ControlEquipNetwork","ControlEquipNetwork","Normal",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**系统服务于楼层-系统→楼层-【系统台账】*/
    SY2FL_FOR("sy2fl_for","MechForArch","Sy2Fl",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.FLOOR.getIndex(),false,false,false,false,true,false),
    /**生活热水供水-生活热水供水相关设备，沿水流方向-*/
    EQ2EQ_DHWNETWORK_1("eq2eq_DHWNetwork_1","DHWNetwork","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**中水旁通-液体管道-*/
    EQ2EQ_RECYCLEWATERNETWORK_2("eq2eq_RecycleWaterNetwork_2","RecycleWaterNetwork","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**传感器测量系统关系-传感器→被测系统-【全部关系总览】*/
    EQ2SY_SENSORRELATIONSHIP_SS2SY("eq2sy_SensorRelationship_ss2sy","SensorRelationship","Ss2Sy",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SYSTEM.getIndex(),false,false,false,true,true,false),
    /**空间隔断有门窗-空间-空间-【全部关系总览】*/
    SP2SP_SPACENEIGHBORHOOD_4("sp2sp_SpaceNeighborhood_4","SpaceNeighborhood","DoorWindow",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,false),
    /**资产所在楼层-楼层→资产-【资产台账】*/
    PE2FL("pe2fl","PropertyInArch","Pe2Fl",AdmObjectType.PROPERTY.getIndex(),AdmObjectType.FLOOR.getIndex(),false,false,false,false,false,false),
    /**中水供水-中水供水相关设备，沿水流方向-*/
    EQ2EQ_RECYCLEWATERNETWORK_1("eq2eq_RecycleWaterNetwork_1","RecycleWaterNetwork","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**竖井贯通关系-竖井-竖井-【竖井台账】*/
    SH2SH("sh2sh","ThroughRelationship","Sh2Sh",AdmObjectType.SHAFT.getIndex(),AdmObjectType.SHAFT.getIndex(),false,true,false,false,false,false),
    /**低压配电普通连接-低压配电相关设备，沿电流方向-【调研录入参考资料CAD图纸】*/
    EQ2EQ_LUDISTRIBUTION_1("eq2eq_LUDistribution_1","LUDistribution","Normal",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**消防排烟-消防排烟相关设备，沿气流方向-*/
    EQ2EQ_FIREVENTNETWORK_1("eq2eq_FireVentNetwork_1","FireVentNetwork","Discharge",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**消防给水供水-消防给水供水相关设备，沿水流方向-*/
    EQ2EQ_FIREWATERNETWORK_1("eq2eq_FireWaterNetwork_1","FireWaterNetwork","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**高压变配电互备连接-分段主柜，分段辅柜-【调研录入参考资料CAD图纸】*/
    EQ2EQ_HUDISTRIBUTION_2("eq2eq_HUDistribution_2","HUDistribution","Backup",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**污水旁通-液体管道-*/
    EQ2EQ_DRAININGWATERNETWORK_2("eq2eq_DrainingWaterNetwork_2","DrainingWaterNetwork","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**楼层贯通关系-楼层-楼层-【建筑楼层管理】*/
    FL2FL("fl2fl","ThroughRelationship","Fl2Fl",AdmObjectType.FLOOR.getIndex(),AdmObjectType.FLOOR.getIndex(),false,true,false,false,false,false),
    /**多联机供回制冷剂-多联机室外机→多联机室内机-*/
    EQ2EQ_VRFNETWORK_1("eq2eq_VRFNetwork_1","VRFNetwork","SupplyReturn",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**低压配电互备连接-低压开关柜-母联柜-【调研录入参考资料CAD图纸】*/
    EQ2EQ_LUDISTRIBUTION_2("eq2eq_LUDistribution_2","LUDistribution","Backup",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**直饮水旁通-液体管道-*/
    EQ2EQ_DRINKINGWATERNETWORK_2("eq2eq_DrinkingWaterNetwork_2","DrinkingWaterNetwork","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**传感器测量空间关系-传感器→被测空间-【全部关系总览】*/
    EQ2SP_SENSORRELATIONSHIP_SS2SP("eq2sp_SensorRelationship_ss2sp","SensorRelationship","Ss2Sp",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SPACE.getIndex(),true,false,false,true,true,false),
    /**租户租用业务空间-租户→租赁业务空间-【租户台账】*/
    TN2SP("tn2sp","TenentInArch","Tn2Sp",AdmObjectType.PROPERTY.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,false,false),
    /**空调冷冻水旁通-供冷集水器-供冷分水器，液体管道-*/
    EQ2EQ_CHILLWATERLOOP_3("eq2eq_ChillWaterLoop_3","ChillWaterLoop","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**空调冷冻水回水-空调冷冻水回水相关设备，沿水流方向-*/
    EQ2EQ_CHILLWATERLOOP_2("eq2eq_ChillWaterLoop_2","ChillWaterLoop","Return",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**燃气供气-燃气供气相关设备，沿气流方向-*/
    EQ2EQ_GASNETWORK_1("eq2eq_GasNetwork_1","GasNetwork","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**系统服务于建筑-系统→建筑-【系统台账】*/
    SY2BD_FOR("sy2bd_for","MechForArch","Sy2Bd",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,true,false),
    /**新风送风-新风送风相关设备，沿气流方向-*/
    EQ2EQFRESHAIRNETWORK_1("eq2eqFreshAirNetwork_1","FreshAirNetwork","Fresh",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**空调冷却水补水-空调冷却水补水相关设备，沿水流方向-*/
    EQ2EQ_COOLINGWATERLOOP_4("eq2eq_CoolingWaterLoop_4","CoolingWaterLoop","Fill",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**设备所在竖井-设备→竖井-【竖井台账】*/
    EQ2SH("eq2sh","MechInArch","Eq2Sh",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SHAFT.getIndex(),false,false,false,false,false,false),
    /**空调冷冻水供水-空调冷冻水供水相关设备，沿水流方向-*/
    EQ2EQ_CHILLWATERLOOP_1("eq2eq_ChillWaterLoop_1","ChillWaterLoop","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**直饮水供水-直饮水供水相关设备，沿水流方向-*/
    EQ2EQ_DRINKINGWATERNETWORK_1("eq2eq_DrinkingWaterNetwork_1","DrinkingWaterNetwork","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**资产属于建筑-建筑→资产-【资产台账】*/
    PE2BD("pe2bd","PropertyInArch","Pe2Bd",AdmObjectType.PROPERTY.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,false,false),
    /**设备服务于竖井-设备→竖井-【竖井台账】*/
    EQ2SH_FOR("eq2sh_for","MechForArch","Eq2Sh",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SHAFT.getIndex(),false,false,false,false,true,false),
    /**空调冷却水回水-空调冷却水回水相关设备，沿水流方向-*/
    EQ2EQ_COOLINGWATERLOOP_2("eq2eq_CoolingWaterLoop_2","CoolingWaterLoop","Return",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**阀门限制系统关系-阀门→被限系统-【全部关系总览】*/
    EQ2SY_VALVERELATIONSHIP_VV2SY("eq2sy_ValveRelationship_vv2sy","ValveRelationship","Vv2Sy",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SYSTEM.getIndex(),false,false,false,false,true,false),
    /**普通交通-空间-空间-【全部关系总览】*/
    SP2SP_TRAFFICNETWORK_1("sp2sp_TrafficNetwork_1","TrafficNetwork","Normal",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,true,CollUtil.newHashSet("GeneralZone")),
    /**光照透明隔断-空间-空间-【全部关系总览】*/
    SP2SP_RADIATIONNETWORK_2("sp2sp_RadiationNetwork_2","RadiationNetwork","Transparent",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,true,CollUtil.newHashSet("LightingZone")),
    /**消防给水旁通-液体管道-*/
    EQ2EQ_FIREWATERNETWORK_2("eq2eq_FireWaterNetwork_2","FireWaterNetwork","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**空气自然对流-空间-空间-【全部关系总览】*/
    SP2SP_CONVECTIONNETWORK_1("sp2sp_ConvectionNetwork_1","ConvectionNetwork","Natural",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,true,CollUtil.newHashSet("AirConditioningZone")),
    /**通风送风-通风送风相关设备，沿气流方向-*/
    EQ2EQ_VENTNETWORK_1("eq2eq_VentNetwork_1","VentNetwork","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**消防常关交通-空间-空间-【全部关系总览】*/
    SP2SP_TRAFFICNETWORK_3("sp2sp_TrafficNetwork_3","TrafficNetwork","FFClose",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,true,CollUtil.newHashSet("GeneralZone")),
    /**系统所在楼层-系统→楼层-【系统台账】*/
    SY2FL("sy2fl","MechInArch","Sy2Fl",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.FLOOR.getIndex(),false,false,false,false,false,false),
    /**传感器测量设备关系-传感器→被测设备-【全部关系总览】*/
    EQ2EQ_SENSORRELATIONSHIP_SS2EQ("eq2eq_SensorRelationship_ss2eq","SensorRelationship","Ss2Eq",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,true,false,false),
    /**资产所在竖井-资产→竖井-*/
    PE2SH("pe2sh","PropertyInArch","Pe2Sh",AdmObjectType.PROPERTY.getIndex(),AdmObjectType.SHAFT.getIndex(),false,false,false,false,true,false),
    /**采暖水回水-采暖水回水相关设备，沿水流方向-*/
    EQ2EQ_HEATWATERLOOP_2("eq2eq_HeatWaterLoop_2","HeatWaterLoop","Return",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**设备控制关系-控制设备→被控设备-【全部关系总览】*/
    EQ2EQ_CONTROLRELATION_1("eq2eq_ControlRelation_1","MechCtrl","EqCtrl",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**光照连通-空间-空间-【全部关系总览】*/
    SP2SP_RADIATIONNETWORK_1("sp2sp_RadiationNetwork_1","RadiationNetwork","Connect",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,true,false,true,true,CollUtil.newHashSet("LightingZone")),
    /**竖井下的业务空间-竖井→空间-【竖井台账】*/
    SH2SP("sh2sp","ArchSubset","Sh2Sp",AdmObjectType.SHAFT.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,false,false),
    /**采暖水旁通-供暖集水器-供暖分水器，液体管道-*/
    EQ2EQ_HEATWATERLOOP_3("eq2eq_HeatWaterLoop_3","HeatWaterLoop","Bypass",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**空调冷却水供水-空调冷却水供水相关设备，沿水流方向-*/
    EQ2EQ_COOLINGWATERLOOP_1("eq2eq_CoolingWaterLoop_1","CoolingWaterLoop","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**建筑服务于建筑-建筑→建筑-*/
    BD2BD_ARCHFORARCH("bd2bd_ArchForArch","ArchForArch","Bd2Bd",AdmObjectType.BUILDING.getIndex(),AdmObjectType.BUILDING.getIndex(),false,true,false,false,true,false),
    /**竖井服务于楼层-竖井→楼层-*/
    SH2FL_ARCHFORARCH("sh2fl_ArchForArch","ArchForArch","Sh2Fl",AdmObjectType.SHAFT.getIndex(),AdmObjectType.FLOOR.getIndex(),false,false,false,false,true,false),
    /**竖井服务于竖井-竖井→竖井-*/
    SH2SH_ARCHFORARCH("sh2sh_ArchForArch","ArchForArch","Sh2Sh",AdmObjectType.SHAFT.getIndex(),AdmObjectType.SHAFT.getIndex(),false,true,false,false,true,false),
    /**竖井服务于空间-竖井→空间-*/
    SH2SP_ARCHFORARCH("sh2sp_ArchForArch","ArchForArch","Sh2Sp",AdmObjectType.SHAFT.getIndex(),AdmObjectType.SPACE.getIndex(),true,false,false,false,true,false),
    /**空间服务于建筑-空间→建筑-*/
    SP2BD_ARCHFORARCH("sp2bd_ArchForArch","ArchForArch","Sp2Bd",AdmObjectType.SPACE.getIndex(),AdmObjectType.BUILDING.getIndex(),true,false,false,false,true,false),
    /**空间服务于楼层-空间→楼层-*/
    SP2FL_ARCHFORARCH("sp2fl_ArchForArch","ArchForArch","Sp2Fl",AdmObjectType.SPACE.getIndex(),AdmObjectType.FLOOR.getIndex(),true,false,false,false,true,false),
    /**空间服务于竖井-空间→竖井-*/
    SP2SH_ARCHFORARCH("sp2sh_ArchForArch","ArchForArch","Sp2Sh",AdmObjectType.SPACE.getIndex(),AdmObjectType.SHAFT.getIndex(),true,false,false,false,true,false),
    /**空间服务于空间-空间→空间-*/
    SP2SP_ARCHFORARCH("sp2sp_ArchForArch","ArchForArch","Sp2Sp",AdmObjectType.SPACE.getIndex(),AdmObjectType.SPACE.getIndex(),true,true,false,false,true,false),
    /**建筑服务于楼层-建筑→楼层-*/
    BD2FL_ARCHFORARCH("bd2fl_ArchForArch","ArchForArch","Bd2Fl",AdmObjectType.BUILDING.getIndex(),AdmObjectType.FLOOR.getIndex(),false,false,false,false,true,false),
    /**建筑服务于竖井-建筑→竖井-*/
    BD2SH_ARCHFORARCH("bd2sh_ArchForArch","ArchForArch","Bd2Sh",AdmObjectType.BUILDING.getIndex(),AdmObjectType.SHAFT.getIndex(),false,false,false,false,true,false),
    /**建筑下的楼层-建筑→楼层-*/
    BD2FL_ARCHSUBSET("bd2fl_ArchSubset","ArchSubset","Bd2Fl",AdmObjectType.BUILDING.getIndex(),AdmObjectType.FLOOR.getIndex(),false,false,false,false,true,false),
    /**设备设施下的部件-设备设施→部件-*/
    EQ2EC_MECHSUBSET("eq2ec_MechSubset","MechSubset","Eq2Ec",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.COMPONENT.getIndex(),false,false,false,false,true,false),
    /**建筑下的竖井-建筑→竖井-【系统台账】*/
    BD2SH_ARCHSUBSET("bd2sh_ArchSubset","ArchSubset","Bd2Sh",AdmObjectType.BUILDING.getIndex(),AdmObjectType.SHAFT.getIndex(),false,false,false,false,false,false),
    /**建筑服务于空间-建筑→空间-*/
    BD2SP_ARCHFORARCH("bd2sp_ArchForArch","ArchForArch","Bd2Sp",AdmObjectType.BUILDING.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,true,false),
    /**楼层服务于建筑-楼层→建筑-*/
    FL2BD_ARCHFORARCH("fl2bd_ArchForArch","ArchForArch","Fl2Bd",AdmObjectType.FLOOR.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,true,false),
    /**楼层服务于楼层-楼层→楼层-*/
    FL2FL_ARCHFORARCH("fl2fl_ArchForArch","ArchForArch","Fl2Fl",AdmObjectType.FLOOR.getIndex(),AdmObjectType.FLOOR.getIndex(),false,true,false,false,true,false),
    /**楼层服务于竖井-楼层→竖井-*/
    FL2SH_ARCHFORARCH("fl2sh_ArchForArch","ArchForArch","Fl2Sh",AdmObjectType.FLOOR.getIndex(),AdmObjectType.SHAFT.getIndex(),false,false,false,false,true,false),
    /**楼层服务于空间-楼层→空间-*/
    FL2SP_ARCHFORARCH("fl2sp_ArchForArch","ArchForArch","Fl2Sp",AdmObjectType.FLOOR.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,true,false),
    /**竖井服务于建筑-竖井→建筑-*/
    SH2BD_ARCHFORARCH("sh2bd_ArchForArch","ArchForArch","Sh2Bd",AdmObjectType.SHAFT.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,true,false),
    /**系统所在空间-系统→业务空间-【系统台账】,【业务空间台账】*/
    SY2SP("sy2sp","MechInArch","Sy2Sp",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,false,false),
    /**设备所在建筑-设备→建筑*/
    EQ2BD("eq2bd","MechInArch","Eq2Bd",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,false,false),
    /**设备所在建筑-设备→建筑-【设备台账】*/
    SYEQ2BD("syeq2bd","MechInArch","Eq2Bd",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,false,false),
    /**系统服务于空间-系统→业务空间-【业务空间台账】*/
    SY2SP_FOR("sy2sp_for","MechForArch","Sy2Sp",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.SPACE.getIndex(),true,false,false,false,true,false),
    /**空调送风-空调送风相关设备，沿气流方向-*/
    EQ2EQ_ACAIRNETWORK_1("eq2eq_ACAirNetwork_1","ACAirNetwork","Supply",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**通风不确定-通风相关设备-*/
    EQ2EQ_VENTNETWORK_3("eq2eq_VentNetwork_3","VentNetwork","Uncertain",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**高压变配电普通连接-高压变配电相关设备，沿电流方向-【调研录入参考资料CAD图纸】*/
    EQ2EQ_HUDISTRIBUTION_1("eq2eq_HUDistribution_1","HUDistribution","Normal",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**设备常规电源-低/高压开关柜→用电设备-【全部关系总览】*/
    EQ2EQ_EQUIPPOWER_1("eq2eq_EquipPower_1","MechPower","EqNormal",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**设备备用电源-低/高压开关柜→用电设备-【全部关系总览】*/
    EQ2EQ_EQUIPPOWER_2("eq2eq_EquipPower_2","MechPower","EqBackup",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.EQUIPMENT.getIndex(),false,true,false,false,false,false),
    /**系统常规电源-低/高压开关柜→用电设备-【全部关系总览】*/
    EQ2EQ_EQUIPPOWER_3("eq2eq_EquipPower_3","MechPower","SyNormal",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SYSTEM.getIndex(),false,true,false,false,false,false),
    /**系统备用电源-低/高压开关柜→用电设备-【全部关系总览】*/
    EQ2EQ_EQUIPPOWER_4("eq2eq_EquipPower_4","MechPower","SyBackup",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.SYSTEM.getIndex(),false,true,false,false,false,false),
    /**
     *业务空间内的元空间关系 20210914新增-不对请修改
     */
    SP2SI("sp2si","MechInArch","Sp2Si","","",false,true,false,false,false,false);
    /**数据中心的关系类型*/
    private String relationType;
    /**图类型编码*/
    private String graphCode;
    /**边类型编码*/
    private String relCode;
    /**主对象分类*/
    private String masterObjType;
    /**从对象分类*/
    private String slaveObjType;
    /**拥有关系值的标识,true-有,false-无,一般空间对象分类有,为其class_code*/
    private Boolean hasRelValue;
    /**是否过滤主对象id,true-过滤,false-不过滤*/
    private Boolean hasFilterMasterId;
    /**是否过滤classCode,true-过滤,false-不过滤*/
    private Boolean hasFilterClassCode;
    /**是否检查传感器类型,true-检查,false-不检查*/
    private Boolean hasCheckSensor;
    /**是否检查CADID,true-检查,false-不检查*/
    private Boolean hasCheckCadId;
    /**是否检查classCode,true-检查,false-不检查*/
    private Boolean hasCheckClassCode;
    /**是否检查classCode使用的classCodes列表*/
    private Set<String> checkClassCodes;
    /**是否检查传感器使用的传感器类型*/
    private Set<String> checkSensorCodes;
    /**是否需要配置源末端,0-不需要,1-需要*/
    private Integer sourceFlag;
    /**是否自动计算类型,0-不自动计算,1-自动计算*/
    private Integer automaticFlag;
    /**手动计算类型 1 禁用  2提示引导 3手动维护*/
    private Integer manualFlag;
    /**风系统1,水系统0*/
    private Integer systemType;
    ///**业务分区类型*/
//    private String zoneType;

    /***
     * Description: 构造函数
     * @param relationType : 数据中心的关系类型
     * @param graphCode : 标准字典定义的图类型编码
     * @param relCode : 标准字典定义的边类型编码
     * @param hasRelValue : 拥有关系值的标识,true-有,false-无,一般空间对象分类有,为其class_code
     * @param hasFilterMasterId : 是否过滤主对象id,true-过滤,false-不过滤
     * @param hasCheckSensor : 是否检查传感器类型,true-检查,false-不检查
     * @param hasCheckCadId : 是否检查CADID,true-检查,false-不检查
     * @param hasCheckClassCode : 是否检查classCode,true-检查,false-不检查
     * @author : lijie
     * Update By lijie 2021/9/2 14:53
     */
    AdmRelationTypeEnum(String relationType, String graphCode, String relCode, String masterObjType, String slaveObjType,
                        Boolean hasRelValue, Boolean hasFilterMasterId, Boolean hasFilterClassCode,
                        Boolean hasCheckSensor, Boolean hasCheckCadId, Boolean hasCheckClassCode) {
        this.relationType = relationType;
        this.graphCode = graphCode;
        this.relCode = relCode;
        this.masterObjType = masterObjType;
        this.slaveObjType = slaveObjType;
        this.hasRelValue = hasRelValue;
        this.hasFilterMasterId = hasFilterMasterId;
        this.hasFilterClassCode = hasFilterClassCode;
        this.hasCheckSensor = hasCheckSensor;
        this.hasCheckCadId = hasCheckCadId;
        this.hasCheckClassCode = hasCheckClassCode;
        this.checkClassCodes = CollUtil.newHashSet(AdmObjectInfoConstant.CHECK_CLASS_CODES);
        this.checkSensorCodes = CollUtil.newHashSet(AdmObjectInfoConstant.CHECK_SENSOR_CODES);
        this.sourceFlag=null;
        if (AdmObjectInfoConstant.SOURCE_FLAG_FALSE.contains(relationType)){
            this.sourceFlag=0;
        }
        if (AdmObjectInfoConstant.SOURCE_FLAG_TRUE.contains(relationType)){
            this.sourceFlag=1;
        }
        this.automaticFlag=null;
        if (AdmObjectInfoConstant.AUTOMATIC_FLAG_FALSE.contains(relationType)){
            this.automaticFlag=0;
        }
        if (AdmObjectInfoConstant.AUTOMATIC_FLAG_TRUE.contains(relationType)){
            this.automaticFlag=1;
        }
        this.manualFlag=null;
        if (AdmObjectInfoConstant.MANUAL_FLAG_TWO.contains(relationType)){
            this.manualFlag=2;
        }
        if (AdmObjectInfoConstant.MANUAL_FLAG_THREE.contains(relationType)){
            this.manualFlag=3;
        }
        this.systemType=null;
        if (AdmObjectInfoConstant.SYSTEM_TYPE_FALSE.contains(relationType)){
            this.systemType=0;
        }
        if (AdmObjectInfoConstant.SYSTEM_TYPE_TRUE.contains(relationType)){
            this.systemType=1;
        }
    }
    /***
     * Description: 构造函数
     * @param relationType : 数据中心的关系类型
     * @param graphCode : 标准字典定义的图类型编码
     * @param relCode : 标准字典定义的边类型编码
     * @param hasRelValue : 拥有关系值的标识,true-有,false-无,一般空间对象分类有,为其class_code
     * @param hasFilterMasterId : 是否过滤主对象id,true-过滤,false-不过滤
     * @param hasCheckSensor : 是否检查传感器类型,true-检查,false-不检查
     * @param hasCheckCadId : 是否检查CADID,true-检查,false-不检查
     * @param hasCheckClassCode : 是否检查classCode,true-检查,false-不检查
     * @author : lijie
     * Update By lijie 2021/9/2 14:53
     */
    AdmRelationTypeEnum(String relationType, String graphCode, String relCode, String masterObjType, String slaveObjType,
                        Boolean hasRelValue, Boolean hasFilterMasterId, Boolean hasFilterClassCode,
                        Boolean hasCheckSensor, Boolean hasCheckCadId, Boolean hasCheckClassCode,
                        Set<String> checkClassCodes) {
        this.relationType = relationType;
        this.graphCode = graphCode;
        this.relCode = relCode;
        this.masterObjType = masterObjType;
        this.slaveObjType = slaveObjType;
        this.hasRelValue = hasRelValue;
        this.hasFilterMasterId = hasFilterMasterId;
        this.hasFilterClassCode = hasFilterClassCode;
        this.hasCheckSensor = hasCheckSensor;
        this.hasCheckCadId = hasCheckCadId;
        this.hasCheckClassCode = hasCheckClassCode;
        this.checkClassCodes = checkClassCodes;
        this.checkSensorCodes = CollUtil.newHashSet(AdmObjectInfoConstant.CHECK_SENSOR_CODES);
    }
    /***
     * Description: 获取枚举类的映射
     * @return : java.util.Map<java.lang.String,com.persagy.proxy.enumeration.AdmRelationTypeEnum>
     * @author : lijie
     * date :2021/9/2 17:22
     * Update By lijie 2021/9/2 17:22
     */
    public static Map<String,AdmRelationTypeEnum> getRelationTypeMap(){
        List<AdmRelationTypeEnum> enumList = EnumUtils.getEnumList(AdmRelationTypeEnum.class);
        return enumList.stream().collect(Collectors.toMap(AdmRelationTypeEnum::getRelationType,
                admRelationTypeEnum -> admRelationTypeEnum,(k1,k2)->k1));
    }
    
    /***
     * Description: 获取枚举类的映射
     * key: 图类型_边类型, value: enum
     * @return : java.util.Map<java.lang.String,com.persagy.proxy.enumeration.AdmRelationTypeEnum>
     * @author : lijie
     * date :2021/9/2 17:22
     * Update By lijie 2021/9/2 17:22
     */
    public static Map<String,AdmRelationTypeEnum> getGraphRelTypeMap(){
        List<AdmRelationTypeEnum> enumList = EnumUtils.getEnumList(AdmRelationTypeEnum.class);
        return enumList.stream().collect(Collectors.toMap(k -> (k.getGraphCode() + AdmCommonConstant.UNDERLINE + k.getRelCode()),
        		admRelationTypeEnum -> admRelationTypeEnum,(k1,k2)->k1));
    }
}
