public override void InitData() { LogHelper.Info("初始化{0}数据", RedisKey); AddEntity("wenshi", "温室类", "", ""); AddEntity("wenshi-" + PinYin.Get("花卉"), "花卉", "wenshi", ""); AddEntity("wenshi-" + PinYin.Get("蔬菜"), "蔬菜", "wenshi", ""); AddEntity("datian", "大田类", "", ""); AddEntity("datian-" + PinYin.Get("水稻"), "水稻", "datian", ""); AddEntity("datian-" + PinYin.Get("小麦"), "小麦", "datian", ""); AddEntity("datian-" + PinYin.Get("茶叶"), "茶叶", "datian", ""); AddEntity("bird", "禽类", "", ""); AddEntity("bird-" + PinYin.Get("鸡舍"), "鸡舍", "bird", ""); AddEntity("bird-" + PinYin.Get("鸭舍"), "鸭舍", "bird", ""); AddEntity("livestock", "畜牧类", "", ""); AddEntity("livestock-" + PinYin.Get("猪舍"), "猪舍", "livestock", ""); AddEntity("livestock-" + PinYin.Get("羊舍"), "羊舍", "livestock", ""); AddEntity("aquatic", "水产类", "", ""); AddEntity("aquatic-" + PinYin.Get("虾"), "虾", "aquatic", ""); AddEntity("aquatic-" + PinYin.Get("蟹"), "蟹", "aquatic", ""); AddEntity("aquatic-" + PinYin.Get("鱼"), "鱼", "aquatic", ""); var result = Repository.Commit(); LogHelper.Info("共初始化设施类型数据{0}条", result); }
/// <summary> /// 初始化设施类型数据 /// </summary> /// <returns></returns> public override void InitData() { AddEntity("wenshi", "温室类", "", ""); AddEntity("wenshi-" + PinYin.Get("花卉"), "花卉", "wenshi", ""); AddEntity("wenshi-" + PinYin.Get("蔬菜"), "蔬菜", "wenshi", ""); AddEntity("datian", "大田类", "", ""); AddEntity("datian-" + PinYin.Get("水稻"), "水稻", "datian", ""); AddEntity("datian-" + PinYin.Get("小麦"), "小麦", "datian", ""); AddEntity("datian-" + PinYin.Get("茶叶"), "茶叶", "datian", ""); AddEntity("bird", "禽类", "", ""); AddEntity("bird-" + PinYin.Get("鸡舍"), "鸡舍", "bird", ""); AddEntity("bird-" + PinYin.Get("鸭舍"), "鸭舍", "bird", ""); AddEntity("livestock", "畜牧类", "", ""); AddEntity("livestock-" + PinYin.Get("猪舍"), "猪舍", "livestock", ""); AddEntity("livestock-" + PinYin.Get("羊舍"), "羊舍", "livestock", ""); AddEntity("aquatic", "水产类", "", ""); AddEntity("aquatic-" + PinYin.Get("虾"), "虾", "aquatic", ""); AddEntity("aquatic-" + PinYin.Get("蟹"), "蟹", "aquatic", ""); AddEntity("aquatic-" + PinYin.Get("鱼"), "鱼", "aquatic", ""); }
/// <summary> /// 初始化设备类型 /// </summary> /// <returns></returns> public override void InitData() { LogHelper.Info("初始化{0}数据", RedisKey); AddEntity("collect", "采集", "", "采集设备类型"); //设施类 AddEntity("collect-facility", "采集-设施类", "collect", "设施类"); AddEntity("collect-facility-" + PinYin.Get("温度"), "温度", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("湿度"), "湿度", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("空气温度"), "空气温度", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("空气相对湿度"), "空气相对湿度", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("光照"), "光照", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("光合有效辐射"), "光合有效辐射", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("日照时数"), "日照时数", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("二氧化碳"), "二氧化碳", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("一氧化碳"), "一氧化碳", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("氨气"), "氨气", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("硫化氢"), "硫化氢", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("土壤温度"), "土壤温度", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("土壤湿度"), "土壤湿度", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("土壤湿度-模拟量"), "土壤湿度", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("电导率"), "电导率", "collect-facility", "设施类"); AddEntity("collect-facility-" + PinYin.Get("设施类备用1"), "设施类备用1", "collect-facility", "设施类", "Default"); AddEntity("collect-facility-" + PinYin.Get("设施类备用2"), "设施类备用2", "collect-facility", "设施类", "Default"); AddEntity("collect-facility-" + PinYin.Get("设施类备用3"), "设施类备用3", "collect-facility", "设施类", "Default"); //气象站 AddEntity("collect-weather", "采集-气象站", "collect", "气象站"); AddEntity("collect-weather-" + PinYin.Get("温度"), "温度", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("湿度"), "湿度", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("光照"), "光照", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("风速"), "风速", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("风向"), "风向", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("土壤温度"), "土壤温度", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("土壤湿度"), "土壤湿度", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("光合有效辐射"), "光合有效辐射", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("日照时数"), "日照时数", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("雨雪感知"), "雨雪感知", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("降雨量"), "降雨量", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("气压"), "气压", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("电导率"), "电导率", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("蒸发"), "蒸发", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("二氧化碳"), "二氧化碳", "collect-weather", "气象站"); AddEntity("collect-weather-" + PinYin.Get("气象站备用1"), "气象站备用1", "collect-weather", "气象站", "Default"); AddEntity("collect-weather-" + PinYin.Get("气象站备用2"), "气象站备用2", "collect-weather", "气象站", "Default"); AddEntity("collect-weather-" + PinYin.Get("气象站备用3"), "气象站备用3", "collect-weather", "气象站", "Default"); //水产类 AddEntity("collect-aquatic", "采集-水产类", "collect", "水产类"); AddEntity("collect-aquatic-" + PinYin.Get("溶解氧"), "溶解氧", "collect-aquatic", "水产类"); AddEntity("collect-aquatic-" + PinYin.Get("PH"), "PH", "collect-aquatic", "水产类"); AddEntity("collect-aquatic-" + PinYin.Get("氨氮"), "氨氮", "collect-aquatic", "水产类"); AddEntity("collect-aquatic-" + PinYin.Get("水温"), "水温", "collect-aquatic", "水产类", "Shuiwen"); AddEntity("collect-aquatic-" + PinYin.Get("水位"), "水位", "collect-aquatic", "水产类", "ShuiWei"); AddEntity("collect-aquatic-" + PinYin.Get("重金属"), "重金属", "collect-aquatic", "水产类"); AddEntity("collect-aquatic-" + PinYin.Get("亚硝酸盐"), "亚硝酸盐", "collect-aquatic", "水产类"); AddEntity("collect-aquatic-" + PinYin.Get("水产类备用1"), "水产类备用1", "collect-aquatic", "水产类", "Default"); AddEntity("collect-aquatic-" + PinYin.Get("水产类备用2"), "水产类备用2", "collect-aquatic", "水产类", "Default"); AddEntity("collect-aquatic-" + PinYin.Get("水产类备用3"), "水产类备用3", "collect-aquatic", "水产类", "Default"); AddEntity("control", "控制", "", "控制设备类型"); //设施 AddEntity("control-facility", "控制-设施类", "control", "设施类"); AddEntity("control-facility-" + PinYin.Get("风机"), "风机", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("循环风机"), "循环风机", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("湿帘"), "湿帘", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("内遮阳"), "内遮阳", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("内保温"), "内保温", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("外遮阳"), "外遮阳", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("侧窗"), "侧窗", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("天窗"), "天窗", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("水泵"), "水泵", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("加湿器"), "加湿器", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("加热空调"), "加热空调", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("降温空调"), "降温空调", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("喷灌"), "喷灌", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("滴灌"), "滴灌", "control-facility", "设施类"); AddEntity("control-facility-" + PinYin.Get("设施类备用1"), "设施类备用1", "control-facility", "设施类", "Default"); AddEntity("control-facility-" + PinYin.Get("设施类备用2"), "设施类备用2", "control-facility", "设施类", "Default"); AddEntity("control-facility-" + PinYin.Get("设施类备用3"), "设施类备用3", "control-facility", "设施类", "Default"); //水产 AddEntity("control-aquatic", "控制-水产类", "control", "水产类"); AddEntity("control-aquatic-" + PinYin.Get("增氧设备"), "增氧设备", "control-aquatic", "水产类"); AddEntity("control-aquatic-" + PinYin.Get("投料机"), "投料机", "control-aquatic", "水产类"); AddEntity("control-aquatic-" + PinYin.Get("水产类备用1"), "水产类备用1", "control-aquatic", "水产类", "Default"); AddEntity("control-aquatic-" + PinYin.Get("水产类备用2"), "水产类备用2", "control-aquatic", "水产类", "Default"); AddEntity("control-aquatic-" + PinYin.Get("水产类备用3"), "水产类备用3", "control-aquatic", "水产类", "Default"); var result = Repository.Commit(); LogHelper.Info("共初始化设备类型数据{0}条", result); }