package com.persagy.server.syn.utils

import java.util.*

/**
 * 参数对比工具类
 *
 * @author 张维新
 */
object ParamTools {

    /**
     * 物理世界 一级二级标签 编码
     *
     * @param name  标签名称
     */
    fun TwoLevelCode(name: String): String? {
        return when (name) {
            /** 一级 */
            "台账参数" -> "LedgerParam"
            "通讯参数" -> "CommParam"
            "技术参数" -> "TechParam"
            "技术参数" -> "TechParam"
            "运行参数" -> "RunParam"
            "设定参数" -> "SettingParam"
            "报警消息" -> "Alram"
            "结构信息" -> "StructureInfo"
            "人员信息" -> "PeopleInfo"
            "地理位置" -> "GeoInfo"
            "项目信息" -> "ProjectInfo"
            "商业信息" -> "CommercialInfo"
            "能源价格" -> "EnergyCost"
            "室外环境" -> "OutdoorEnv"
            "天气预报" -> "Weather"
            "能耗信息" -> "ConsumptionInfo"
            "建筑信息" -> "BuildingInfo"
            "建筑文档" -> "BuildingDoc"
            "工作历" -> "Schedule"
            "环境参数" -> "EnvParam"
            "租赁信息" -> "LeaseInfo"
            "租户信息" -> "TenantInfo"
            "温度传感器" -> "TempSensor"
            "技术参数-通用" -> "TechParamGeneral"
            "运行参数-通用" -> "RunParamGeneral"
            "速度传感器" -> "SpeedSensor"
            "声音传感器" -> "SoundSensor"
            "湿度传感器" -> "HumiditySensor"
            "压力传感器" -> "PressTransd"
            "热量传感器" -> "HeatSensor"
            "流量传感器" -> "FlowSensor"
            "电度传感器" -> "ElectricitySensor"
            "位移传感器" -> "DisplSensor"
            "浓度传感器" -> "ConcentSensor"
            "图像传感器" -> "ImageSensor"
            "运行状态"   -> "RunningState"
            "反馈参数"  ->  "FeedbackParam"
            "人流量传感器" -> "ManFlowSensor"
            "动态信息" -> "DynamicInfor"


            /** 二级 */
            "建筑类型" -> "BuildingType"
            "设计指标" -> "DesignIndex"
            "结构参数" -> "StructureParam"
            "面积信息" -> "AreaInfo"
            "工作作息" -> "WorkRest"
            "电" -> "Electric"
            "燃气" -> "Gas"
            "燃油" -> "Fuel"
            "自来水" -> "TapWater"
            "供热" -> "HeatSupply"
            "供冷" -> "Cooling"
            "生活热水" -> "DomesticHotWater"
            "季节" -> "Season"
            "空气质量" -> "AirQuality"
            "蒸汽" -> "Steam"
            "未来第1天" -> "DayOne"
            "未来第2天" -> "DayTwo"
            "未来第3天" -> "DayThree"
            "累计" -> "Cumulative"
            "逐时" -> "Hourly"
            "风速" -> "WindSpeed"
            "声强" -> "SoundIntensity"
            "光照" -> "Illumination"
            "温湿度" -> "TemperatureHumidity"
            "加热器" -> "Heater"
            "技术参数-噪声传感器" -> "NoiseSensor"
            "无负压稳流机组" -> "PressureSteadyFlow"
            "保险文件" -> "InsuranceDoc"
            "发射指标" -> "LaunchIndex"
            "毛发过滤器" -> "HairFilter"
            "压缩机" -> "Compressor"
            "烟气余热回收装置" -> "FlueGasWasteHeat"
            "膜处理系统" -> "MembraneProcessingSystem"
            "制动器" -> "Brake"
            "矩阵" -> "Matrix"
            "CPU状态" -> "CPUStates"
            "制冷工况" -> "RefrigCondition"
            "分支分配器" -> "BranchDis"
            "接线端子" -> "ConnectionTerminal"
            "输入" -> "Input"
            "漏电保护器" -> "LeakageProtector"
            "发热地膜设备" -> "FeverFilmEquip"
            "传输" -> "transmission"
            "整体" -> "Whole"
            "龙骨" -> "keel"
            "清水灭火器" -> "CleanWaterExting"
            "扁圆形风管" -> "FlatCircularDuct"
            "电加热" -> "ElectricHeating"
            "隔离/接地开关" -> "EarthingSwitch"
            "调节池" -> "RegulatingPool"
            "送风段" -> "AirSupply"
            "租户管理" -> "TenantManag"
            "通用电气指标" -> "GeneralElecIndex"
            "热回收段" -> "HeatRecoverySection"
            "备用电源" -> "EmergencySupply"
            "软件系统" -> "SoftwareSystem"
            "协议" -> "Agreement"
            "冷凝器" -> "condenser"
            "卤代烷灭火器" -> "HalogAgentExting"
            "加湿段" -> "HumidSection"
            "CD录放盘" -> "CDRecording"
            "泡沫灭火器" -> "FoamExtinguisher"
            "辅助设备" -> "AuxiliaryEquip"
            "客流探测" -> "PasseFlowDetec"
            "设备厂家" -> "EquipManufactor"
            "技术参数-热电偶温度传感器" -> "ThermTemperSensor"
            "水地暖设备" -> "WaterHeatingEquip"
            "柴油机" -> "DieselEngine"
            "排水" -> "Drainage"
            "通讯地址" -> "PostalAddress"
            "混合器" -> "Mixer"
            "性能" -> "performance"
            "运行维保" -> "OperationMainte"
            "核心层" -> "CoreLayer"
            "发热电缆设备" -> "ThermCableEquip"
            "车库出入口" -> "GarageEntraExit"
            "整机" -> "CompleteMachine"
            "电流" -> "ElectricCurrent"
            "供应购买" -> "SupplyPurchase"
            "塑料管" -> "PlasticPipe"
            "技术参数-录音" -> "SoundRecording"
            "现场安装" -> "Siteinstall"
            "技术参数" -> "TechParam"
            "累计指标" -> "CumulaIndex"
            "频率" -> "Freque"
            "活性炭罐" -> "Canister"
            "再热段" -> "ReheaSection"
            "接口" -> "Interf"
            "变频机组" -> "FrequeUnit"
            "调节阀" -> "RegulValve"
            "矩形风管" -> "RectDuct"
            "减速器" -> "Retarder"
            "加压泵" -> "PressPump"
            "圆形风管" -> "CircularDuct"
            "断路器" -> "CircuitBreaker"
            "电压互感器" -> "VoltageTrans"
            "止回阀" -> "CheckValve"
            "园林" -> "Gardens"
            "消毒设备" -> "DisinfeEquip"
            "总体" -> "Population"
            "发电机组" -> "GeneratorSet"
            "表冷段" -> "SurfaceCoolSection"
            "喷泉" -> "Fountain"
            "低压" -> "LowPress"
            "播放器" -> "Player"
            "玻璃破碎探测器" -> "GlassCrushDetec"
            "末端" -> "End"
            "密码键盘" -> "PasswordKeyb"
            "灯具" -> "LampsLanterns"
            "网络" -> "Network"
            "出口水质" -> "ExportWaterQuality"
            "输出" -> "Output"
            "排风" -> "ExhaustAir"
            "视频式" -> "VideoType"
            "显示屏" -> "Display"
            "总谐波" -> "TotalHarmonic"
            "混风段" -> "MixingSection"
            "电梯" -> "Elevator"
            "汇聚层" -> "DistriLayer"
            "摄像头" -> "Camera"
            "电池" -> "Battery"
            "电流互感器" -> "CurrentTrans"
            "技术参数-玻璃管式温度计" -> "GlassTubeTherm"
            "显示" -> "Display"
            "应急照明" -> "EmerLighting"
            "技术参数-压力式温度计" -> "PressureThermo"
            "空间辐射指标" -> "SpatialRadiIndex"
            "照片文档" -> "PhotoDoc"
            "其他设备" -> "OtherEquip"
            "指纹识别仪" -> "FingerIdent"
            "电压" -> "Voltage"
            "开关状态" -> "SwitchingState"
            "对讲系统" -> "IntercomSystem"
            "反渗透" -> "ReverseOsmosis"
            "电源" -> "PowerSupply"
            "接入层" -> "AccessLayer"
            "保温材料" -> "ThermalInsulMaterial"
            "高频头" -> "Tuner"
            "打印机" -> "Printer"
            "碳晶地暖设备" -> "CarCryGroHeatEquip"
            "干粉灭火器" -> "DryPowderExti"
            "技术参数-电阻温度传感器" -> "ResisTempeSensor"
            "瞬时参数" -> "InstantParam"
            "运行参数" -> "RunParam"
            "紫外线杀菌器" -> "UltravSteri"
            "吸收器" -> "Absorber"
            "前置功放" -> "Preamplifier"
            "通用" -> "Currency"
            "紫外线发生器" -> "UltravGener"
            "技术参数-声音通用" -> "GeneralVoice"
            "寻车" -> "CarSearching"
            "排放标准" -> "EmissStand"
            "水侧" -> "WaterSide"
            "塔盘水位" -> "TrayWater"
            "开关保护" -> "SwitchProte"
            "太阳能" -> "SolarEnergy"
            "蒸汽锅炉" -> "SteamBoiler"
            "继电器" -> "Relay"
            "疏散指示" -> "EvacuaInstr"
            "车位" -> "ParkingLot"
            "接收指标" -> "ReceiIndex"
            "臭氧发生器" -> "OzoneGenerator"
            "电视信号" -> "TVSignal"
            "畸变率" -> "DistortRate"
            "熔断器" -> "Fuse"
            "风机" -> "Fan"
            "技术参数-温度通用" -> "TempGeneral"
            "蒸汽冷凝水回收装置" -> "SteamConde"
            "内胆" -> "InternalBladder"
            "累计参数" -> "CumuParam"
            "主机" -> "Host"
            "消毒剂" -> "Disinf"
            "无线模块" -> "WirelessModule"
            "安全阀" -> "SafetyValve"
            "IC读卡机" -> "ICCardReader"
            "终端设备" -> "TerminalEquip"
            "无线" -> "Wireless"
            "新风段" -> "FreshAir"
            "触点" -> "Contact"
            "低压断路器（空气开关）" -> "LowBreaker"
            "前端" -> "FrontEnd"
            "红外探测器" -> "InfraredDetector"
            "供水" -> "WaterSupply"
            "柴发机组" -> "ChaiFa"
            "减压阀" -> "PressRreliefValve"
            "提升泵" -> "LiftingPump"
            "中水回用池" -> "ReclaWater"
            "监视器" -> "Monitor"
            "移动信号放大" -> "MobileSignal"
            "软件厂家" -> "SoftwareManu"
            "调制器" -> "Modulator"
            "水质要求" -> "WaterQuality"
            "接收器" -> "Receiver"
            "二氧化碳灭火器" -> "CarbonExting"
            "技术参数-红外测温仪" -> "InfraredTempInstru"
            "光端机" -> "OpticalTerminal"
            "水处理" -> "WaterTreatment"
            "空气侧" -> "AirSide"
            "热水锅炉" -> "HotWaterBoiler"
            "基本设定参数" -> "BasicSetParam"
            "蒸发器" -> "Evaporator"
            "发生器" -> "Generator"
            "高压" -> "HighPressure"
            "过滤器" -> "Filter"
            "节流元件" -> "ThrotElement"
            "外壳" -> "Shell"
            "瞬时状态" -> "InstanState"
            "配电柜" -> "PowerCabinet"
            "过滤段" -> "FilterSegment"
            "负荷开关" -> "LoadSwitch"
            "保护" -> "Protect"
            "功能" -> "Function"
            "保温层" -> "InsulLayer"
            "制热工况" -> "HeatingCondi"
            "接触器" -> "Contactor"
            "沉淀池" -> "SedimenTank"
            "身份证阅读器" -> "IDCardReader"
            "软化器" -> "Softener"
            "水泵" -> "WaterPump"
            "技术参数-IC温度传感器" -> "ICTempSensor"
            "组件" -> "Assembly"
            "技术参数-热敏电阻温度传感器" -> "ThermTempeSensor"
            "联轴器" -> "Coupling"
            "集热板" -> "CollectorPlate"
            "线圈" -> "Coil"
            "功放" -> "PowerAmpli"
            "嵌板" -> "Panel"
            "盘管" -> "Conduits"
            "换热器" -> "HeatExcha"
            "盖板" -> "CoverPlate"
            "VLAN" -> "Vlan"
            "储水箱" -> "WaterStoragetank"
            "施肥器" -> "FertiApplicator"
            "其他" -> "Other"
            "功率" -> "Power"
            "关键指标" -> "KeyIndic"
            "通断阀" -> "OnOffValve"
            "细格栅" -> "FineScreens"
            "电动机" -> "Motor"
            "瞬时指标" -> "InstanIndex"
            "压力" -> "Pressure"
            "工作历信息" -> "WorkCalendar"
            else -> {
                ""
            }
        }
    }

    /**
     *字典默认不显示
     */
    fun dicConfigureVisible():HashMap<String,Boolean>{
        val map = HashMap<String,Boolean>()

        return map
    }

    /**
     * 默认不可编辑的
     */
    fun dicConfigureEditable():HashMap<String,Boolean>{
        val map = HashMap<String,Boolean>()
        map["ProjID"] = false
        map["BuildID"] = false
        map["FloorID"] = false

        map["ShaftID"] = false
        map["ShaftName"] = false

        map["SysID"] = false
        map["SysName"] = false

        map["EquipID"] = false
        map["EquipName"] = false
        map["EquipQRCode"] = false
        map["BIMID"] = false
//        map["BIMLocation"] = false
        map["QRCodePic"] = false
        map["DefaultQRCode"] = false

        map["EquipLocalID"] = false
        map["EquipLocalName"] = false

        map["BIMFamilyName"] = false
        map["BIMFamilySymbol"] = false

        map["RoomID"] = false
        map["RoomName"] = false
        map["RoomQRCode"] = false

        map["TenantID"] = false
        map["TenantName"] = false

        map["Outline"] = false
        return map
    }

    /**
     * 默认不可编辑的
     */
    fun dicConfigure():HashMap<String,Boolean>{
        val map = HashMap<String,Boolean>()
        map["ProjLocalID"] = false
        map["ProjLocalName"] = false

        map["BuildLocalID"] = false
        map["BuildLocalName"] = false

        map["FloorLocalID"] = false
        map["FloorLocalName"] = false
        map["FloorLocalID"] = false
        map["ModelID"] = false

        map["RoomLocalID"] = false
        map["RoomLocalName"] = false

        map["SysLocalID"] = false
        map["SysLocalName"] = false

        map["ShaftLocalID"] = false
        map["ShaftLocalName"] = false

        map["EquipLocalID"] = false
        map["EquipLocalName"] = false

        map["TenantLocalID"] = false
        map["TenantLocalName"] = false

        return map
    }


} // Object ParamTools