/*
 * *********************************************************************************************************************
 *
 *          !!
 *        .F88X
 *        X8888Y
 *      .}888888N;
 *        i888888N;        .:!              .I$WI:
 *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
 *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
 *            +888888N;  .8888888Y                                  "&&8Y.}8,
 *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
 *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
 *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
 *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
 *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
 *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
 *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
 *      .:R888888I
 *      .&888888I                                          Copyright (c) 2009-2020.  博锐尚格科技股份有限公司
 *        ~8888'
 *        .!88~                                                                     All rights reserved.
 *
 * *********************************************************************************************************************
 */

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