using System.Collections.Generic; using System.IO; using System.Linq; namespace IStation { /// /// 全局辅助类 /// public class GlobalHelperW { #region 默认配置 #region 泵标志 #region 一输 public readonly static int Flag11 = 11; public readonly static int Flag12 = 12; public readonly static int Flag13 = 13; public readonly static int Flag14 = 14; public readonly static int Flag15 = 15; public readonly static int Flag16 = 16; public readonly static int Flag17 = 17; public readonly static int Flag18 = 18; public readonly static List Station1FlagList = new List() { Flag11, Flag12, Flag13, Flag14, Flag15, Flag16, Flag17, Flag18 }; public readonly static List Station1SameTypeFlagGroupFirst = new List() { Flag11, Flag12, Flag13, Flag14, Flag16, Flag17, Flag18 }; public readonly static List Station1SameTypeFlagGroupSecond = new List() { Flag15 }; #endregion #region 二输 public readonly static int Flag21 = 21; public readonly static int Flag22 = 22; public readonly static int Flag23 = 23; public readonly static int Flag24 = 24; public readonly static int Flag25 = 25; public readonly static int Flag26 = 26; public readonly static int Flag27 = 27; public readonly static List Station2FlagList = new List() { Flag21, Flag22, Flag23, Flag24, Flag25, Flag26, Flag27 }; public readonly static List Station2SameTypeFlagGroupFirst = new List() { Flag22, Flag23, Flag24, Flag25, Flag26 }; public readonly static List Station2SameTypeFlagGroupSecond = new List() { Flag21, Flag27 }; #endregion /// /// 是否变频 /// /// /// public static bool IsFrequency(int flag) { if (flag == Flag15 || flag == Flag16) { return false; } return true; } /// /// 是否是1输水 /// /// /// public static bool IsStation1(IEnumerable flags) { if (flags == null || !flags.Any()) { return false; } var flag = flags.FirstOrDefault(); if (!Station1FlagList.Contains(flag)) { return false; } return true; } /// /// 是否是2输水 /// /// /// public static bool IsStation2(IEnumerable flags) { if (flags == null || !flags.Any()) { return false; } var flag = flags.FirstOrDefault(); if (!Station2FlagList.Contains(flag)) { return false; } return true; } #endregion #region 众毅Scada对接标签 #region 二取 public readonly static string 长江水位 = "10001"; public readonly static string 二取前池液位 = "10002"; public readonly static string 陈行水库水位 = "10003"; public readonly static string 二取1泵_有功功率 = "10090"; public readonly static string 二取2泵_有功功率 = "10091"; public readonly static string 二取3泵_有功功率 = "10092"; public readonly static string 二取4泵_有功功率 = "10093"; public readonly static string 二取5泵_有功功率 = "10094"; public readonly static string 二取1泵_出口压力 = "10014"; public readonly static string 二取2泵_出口压力 = "10015"; public readonly static string 二取3泵_出口压力 = "10016"; public readonly static string 二取4泵_出口压力 = "10017"; public readonly static string 二取5泵_出口压力 = "10018"; public readonly static string 二取1泵_水泵_运行状态 = "10072"; public readonly static string 二取2泵_水泵_运行状态 = "10073"; public readonly static string 二取3泵_水泵_运行状态 = "10074"; public readonly static string 二取4泵_水泵_运行状态 = "10075"; public readonly static string 二取5泵_水泵_运行状态 = "10076"; public readonly static string 二取1泵_有功电能 = "10109"; public readonly static string 二取2泵_有功电能 = "10110"; public readonly static string 二取3泵_有功电能 = "10111"; public readonly static string 二取4泵_有功电能 = "10112"; public readonly static string 二取5泵_有功电能 = "10113"; public readonly static string 二取1泵_累计流量 = "10054"; public readonly static string 二取2泵_累计流量 = "10055"; public readonly static string 二取3泵_累计流量 = "10056"; public readonly static string 二取4泵_累计流量 = "10057"; public readonly static string 二取5泵_累计流量 = "10058"; public readonly static string 二取1泵_瞬时流量 = "10034"; public readonly static string 二取2泵_瞬时流量 = "10035"; public readonly static string 二取3泵_瞬时流量 = "10036"; public readonly static string 二取4泵_瞬时流量 = "10037"; public readonly static string 二取5泵_瞬时流量 = "10038"; public readonly static string 二取1泵_累计运行时间 = "10167"; public readonly static string 二取2泵_累计运行时间 = "10168"; public readonly static string 二取3泵_累计运行时间 = "10169"; public readonly static string 二取4泵_累计运行时间 = "10170"; public readonly static string 二取5泵_累计运行时间 = "10171"; public readonly static string 二取1泵_检修状态 = "10191"; public readonly static string 二取2泵_检修状态 = "10192"; public readonly static string 二取3泵_检修状态 = "10193"; public readonly static string 二取4泵_检修状态 = "10194"; public readonly static string 二取5泵_检修状态 = "10195"; public readonly static string 二取1泵_累计运行时间_历史 = "二取水1号主水泵.累计运行时间"; public readonly static string 二取2泵_累计运行时间_历史 = "二取水2号主水泵.累计运行时间"; public readonly static string 二取3泵_累计运行时间_历史 = "二取水3号主水泵.累计运行时间"; public readonly static string 二取4泵_累计运行时间_历史 = "二取水4号主水泵.累计运行时间"; public readonly static string 二取5泵_累计运行时间_历史 = "二取水5号主水泵.累计运行时间"; #endregion #region 一输 public readonly static string 嘉定1线_瞬时流量 = "10138"; public readonly static string 嘉定2线_瞬时流量 = "10139"; public readonly static string 嘉定3线_瞬时流量 = "10140"; public readonly static string 嘉定1线_瞬时流量_长江管网图 = "10159"; public readonly static string 嘉定2线_瞬时流量_长江管网图 = "10160"; public readonly static string 嘉定3线_瞬时流量_长江管网图 = "10161"; public readonly static string 嘉定1线_表头累计 = "10143"; public readonly static string 嘉定2线_表头累计 = "10144"; public readonly static string 嘉定3线_表头累计 = "10145"; public readonly static string 嘉定1线_累计流量_长江管网图 = "10164"; public readonly static string 嘉定2线_累计流量_长江管网图 = "10165"; public readonly static string 嘉定3线_累计流量_长江管网图 = "10166"; public readonly static string 嘉定1线_压力 = "10128"; public readonly static string 嘉定2线_压力 = "10129"; public readonly static string 嘉定3线_压力 = "10130"; public readonly static string 嘉定1线_压力_长江管网图 = "10154"; public readonly static string 嘉定2线_压力_长江管网图 = "10155"; public readonly static string 嘉定3线_压力_长江管网图 = "10156"; public readonly static string 一输_老前池南侧液位 = "10011"; public readonly static string 一输_老前池北侧液位 = "10012"; public readonly static string 一输_新前池液位 = "10013"; public readonly static string 一输11泵_出口压力 = "10026"; public readonly static string 一输12泵_出口压力 = "10027"; public readonly static string 一输13泵_出口压力 = "10028"; public readonly static string 一输14泵_出口压力 = "10029"; public readonly static string 一输15泵_出口压力 = "10030"; public readonly static string 一输16泵_出口压力 = "10031"; public readonly static string 一输17泵_出口压力 = "10032"; public readonly static string 一输18泵_出口压力 = "10033"; public readonly static string 一输11泵_转速 = "10084"; public readonly static string 一输12泵_转速 = "10085"; public readonly static string 一输13泵_转速 = "10086"; public readonly static string 一输14泵_转速 = "10087"; public readonly static string 一输17泵_转速 = "10088"; public readonly static string 一输18泵_转速 = "10089"; public readonly static string 一输11泵_频率 = "10066"; public readonly static string 一输12泵_频率 = "10067"; public readonly static string 一输13泵_频率 = "10068"; public readonly static string 一输14泵_频率 = "10069"; public readonly static string 一输17泵_频率 = "10070"; public readonly static string 一输18泵_频率 = "10071"; public readonly static string 一输11泵_运行状态 = "10046"; public readonly static string 一输12泵_运行状态 = "10047"; // 10150 is null public readonly static string 一输13泵_运行状态 = "10048"; public readonly static string 一输14泵_运行状态 = "10049"; public readonly static string 一输15泵_运行状态 = "10050"; public readonly static string 一输16泵_运行状态 = "10051"; public readonly static string 一输17泵_运行状态 = "10052"; public readonly static string 一输18泵_运行状态 = "10053"; public readonly static string 一输11泵_运行时间 = "10172"; public readonly static string 一输12泵_运行时间 = "10173"; public readonly static string 一输13泵_运行时间 = "10174"; public readonly static string 一输14泵_运行时间 = "10175"; public readonly static string 一输11泵_累计运行时间 = "10187"; public readonly static string 一输12泵_累计运行时间 = "10188"; public readonly static string 一输13泵_累计运行时间 = "10189"; public readonly static string 一输14泵_累计运行时间 = "10190"; public readonly static string 一输15泵_累计运行时间 = "10176"; public readonly static string 一输16泵_累计运行时间 = "10177"; public readonly static string 一输17泵_累计运行时间 = "10178"; public readonly static string 一输18泵_累计运行时间 = "10179"; public readonly static string 一输11泵_有功功率 = "10101"; public readonly static string 一输12泵_有功功率 = "10102"; public readonly static string 一输13泵_有功功率 = "10103"; public readonly static string 一输14泵_有功功率 = "10104"; public readonly static string 一输15泵_有功功率 = "10105"; public readonly static string 一输16泵_有功功率 = "10106"; public readonly static string 一输17泵_有功功率 = "10107"; public readonly static string 一输18泵_有功功率 = "10108"; public readonly static string 一输11泵_累计运行时间_历史 = "一输水泵11号变频单泵.水泵累计运行时间"; public readonly static string 一输12泵_累计运行时间_历史 = "一输水泵12号变频单泵1.水泵运行时间"; public readonly static string 一输13泵_累计运行时间_历史 = "一输水泵13号变频单泵.水泵累计运行时间"; public readonly static string 一输14泵_累计运行时间_历史 = "一输水泵14号变频单泵.水泵累计运行时间"; public readonly static string 一输15泵_累计运行时间_历史 = "HF一输水15号工频控制图.水泵累计运行时间"; public readonly static string 一输16泵_累计运行时间_历史 = "HF一输水16号工频控制图.水泵累计运行时间"; public readonly static string 一输17泵_累计运行时间_历史 = "一输水泵17号变频单泵.水泵累计运行时间"; public readonly static string 一输18泵_累计运行时间_历史 = "一输水泵18号变频单泵.水泵累计运行时间"; #endregion #region 二输 public readonly static string DN2400_出厂压力 = "10141"; public readonly static string DN2700_出厂压力 = "10142"; public readonly static string DN2400_出厂压力_长江管网图 = "10152"; public readonly static string DN2700_出厂压力_长江管网图 = "10153"; public readonly static string DN2400总管_瞬时流量 = "10146"; public readonly static string DN2700总管_瞬时流量 = "10147"; public readonly static string DN2400总管_瞬时流量_长江管网图 = "10157"; public readonly static string DN2700总管_瞬时流量_长江管网图 = "10158"; public readonly static string DN2400总管_实际累计流量 = "10148"; public readonly static string DN2700总管_实际累计流量 = "10149"; public readonly static string DN2400总管_累计流量_长江管网图 = "10162"; public readonly static string DN2700总管_累计流量_长江管网图 = "10163"; public readonly static string 二输21泵_泵井液位 = "10004"; public readonly static string 二输22泵_泵井液位 = "10005"; public readonly static string 二输23泵_泵井液位 = "10006"; public readonly static string 二输24泵_泵井液位 = "10007"; public readonly static string 二输25泵_泵井液位 = "10008"; public readonly static string 二输26泵_泵井液位 = "10009"; public readonly static string 二输27泵_泵井液位 = "10010"; public readonly static string 二输21泵_出水压力 = "10019"; public readonly static string 二输22泵_出水压力 = "10020"; public readonly static string 二输23泵_出水压力 = "10021"; public readonly static string 二输24泵_出水压力 = "10022"; public readonly static string 二输25泵_出水压力 = "10023"; public readonly static string 二输26泵_出水压力 = "10024"; public readonly static string 二输27泵_出水压力 = "10025"; public readonly static string 二输21泵_瞬时流量 = "10039"; public readonly static string 二输22泵_瞬时流量 = "10040"; public readonly static string 二输23泵_瞬时流量 = "10041"; public readonly static string 二输24泵_瞬时流量 = "10042"; public readonly static string 二输25泵_瞬时流量 = "10043"; public readonly static string 二输26泵_瞬时流量 = "10044"; public readonly static string 二输27泵_瞬时流量 = "10045"; public readonly static string 二输21泵_累计流量 = "10059"; public readonly static string 二输22泵_累计流量 = "10060"; public readonly static string 二输23泵_累计流量 = "10061"; public readonly static string 二输24泵_累计流量 = "10062"; public readonly static string 二输25泵_累计流量 = "10063"; public readonly static string 二输26泵_累计流量 = "10064"; public readonly static string 二输27泵_累计流量 = "10065"; public readonly static string 二输21泵_有功电能 = "10131"; public readonly static string 二输22泵_有功电能 = "10132"; public readonly static string 二输23泵_有功电能 = "10133"; public readonly static string 二输24泵_有功电能 = "10134"; public readonly static string 二输25泵_有功电能 = "10135"; public readonly static string 二输26泵_有功电能 = "10136"; public readonly static string 二输27泵_有功电能 = "10137"; public readonly static string 二输22泵_频率 = "10095"; public readonly static string 二输23泵_频率 = "10096"; public readonly static string 二输24泵_频率 = "10097"; public readonly static string 二输25泵_频率 = "10098"; public readonly static string 二输26泵_频率 = "10099"; public readonly static string 二输27泵_频率 = "10100"; public readonly static string 二输21泵_转速 = "10114"; public readonly static string 二输22泵_转速 = "10115"; public readonly static string 二输23泵_转速 = "10116"; public readonly static string 二输24泵_转速 = "10117"; public readonly static string 二输25泵_转速 = "10118"; public readonly static string 二输26泵_转速 = "10119"; public readonly static string 二输27泵_转速 = "10120"; public readonly static string 二输21泵_有功功率 = "10121"; public readonly static string 二输22泵_有功功率 = "10122"; public readonly static string 二输23泵_有功功率 = "10123"; public readonly static string 二输24泵_有功功率 = "10124"; public readonly static string 二输25泵_有功功率 = "10125"; public readonly static string 二输26泵_有功功率 = "10126"; // "10151"; is null public readonly static string 二输27泵_有功功率 = "10127"; public readonly static string 二输21泵_运行状态 = "10077"; public readonly static string 二输22泵_运行状态 = "10078"; public readonly static string 二输23泵_运行状态 = "10079"; public readonly static string 二输24泵_运行状态 = "10080"; public readonly static string 二输25泵_运行状态 = "10081"; public readonly static string 二输26泵_运行状态 = "10082"; public readonly static string 二输27泵_运行状态 = "10083"; public readonly static string 二输21泵_运行时间 = "10180"; public readonly static string 二输22泵_运行时间 = "10181"; public readonly static string 二输23泵_运行时间 = "10182"; public readonly static string 二输24泵_运行时间 = "10183"; public readonly static string 二输25泵_运行时间 = "10184"; public readonly static string 二输26泵_运行时间 = "10185"; public readonly static string 二输27泵_运行时间 = "10186"; public readonly static string 二输21泵_检修状态 = "10196"; public readonly static string 二输22泵_检修状态 = "10197"; public readonly static string 二输23泵_检修状态 = "10198"; public readonly static string 二输24泵_检修状态 = "10199"; public readonly static string 二输25泵_检修状态 = "10200"; public readonly static string 二输26泵_检修状态 = "10201"; public readonly static string 二输27泵_检修状态 = "10202"; public readonly static string 二输21泵_累计运行时间_历史 = "二输水21号水泵运行参数.运行时间"; public readonly static string 二输22泵_累计运行时间_历史 = "二输水22号水泵运行参数.运行时间"; public readonly static string 二输23泵_累计运行时间_历史 = "二输水23号水泵运行参数.运行时间"; public readonly static string 二输24泵_累计运行时间_历史 = "二输水24号水泵运行参数.运行时间"; public readonly static string 二输25泵_累计运行时间_历史 = "二输水25号水泵运行参数.运行时间"; public readonly static string 二输26泵_累计运行时间_历史 = "二输水26号水泵运行参数.运行时间"; public readonly static string 二输27泵_累计运行时间_历史 = "二输水27号水泵运行参数.运行时间"; #endregion #endregion #region 泵标志 和 众毅Scada对接标签 映射 /// /// 泵标志运行状态映射字典 1输水 /// public readonly static Dictionary FlagRunStatusMappingDict1 = new Dictionary() { {Flag11, 一输11泵_运行状态}, {Flag12, 一输12泵_运行状态}, {Flag13, 一输13泵_运行状态}, {Flag14, 一输14泵_运行状态}, {Flag15, 一输15泵_运行状态}, {Flag16, 一输16泵_运行状态}, {Flag17, 一输17泵_运行状态}, {Flag18, 一输18泵_运行状态} }; /// /// 泵标志运行状态映射字典 2输水 /// public readonly static Dictionary FlagRunStatusMappingDict2 = new Dictionary() { {Flag21, 二输21泵_运行状态}, {Flag22, 二输22泵_运行状态}, {Flag23, 二输23泵_运行状态}, {Flag24, 二输24泵_运行状态}, {Flag25, 二输25泵_运行状态}, {Flag26, 二输26泵_运行状态}, {Flag27, 二输27泵_运行状态} }; /// /// 泵标志进口水位映射字典 1输水 /// public readonly static Dictionary FlagInletWaterLevelMappingDict1 = new Dictionary() { {Flag11, 一输_老前池南侧液位}, {Flag12, 一输_老前池南侧液位}, {Flag13, 一输_老前池南侧液位}, {Flag14, 一输_老前池北侧液位}, {Flag15, 一输_老前池北侧液位}, {Flag16, 一输_新前池液位}, {Flag17, 一输_新前池液位}, {Flag18, 一输_新前池液位} }; /// /// 泵标志进口水位映射字典 2输水 /// public readonly static Dictionary FlagInletWaterLevelMappingDict2 = new Dictionary() { {Flag21, 二输21泵_泵井液位}, {Flag22, 二输22泵_泵井液位}, {Flag23, 二输23泵_泵井液位}, {Flag24, 二输24泵_泵井液位}, {Flag25, 二输25泵_泵井液位}, {Flag26, 二输26泵_泵井液位}, {Flag27, 二输27泵_泵井液位} }; /// /// 泵标志出口压力映射字典 1输水 /// public readonly static Dictionary FlagOutletPressureMappingDict1 = new Dictionary() { {Flag11, 一输11泵_出口压力}, {Flag12, 一输12泵_出口压力}, {Flag13, 一输13泵_出口压力}, {Flag14, 一输14泵_出口压力}, {Flag15, 一输15泵_出口压力}, {Flag16, 一输16泵_出口压力}, {Flag17, 一输17泵_出口压力}, {Flag18, 一输18泵_出口压力} }; /// /// 泵标志出口压力映射字典 2输水 /// public readonly static Dictionary FlagOutletPressureMappingDict2 = new Dictionary() { {Flag21, 二输21泵_出水压力}, {Flag22, 二输22泵_出水压力}, {Flag23, 二输23泵_出水压力}, {Flag24, 二输24泵_出水压力}, {Flag25, 二输25泵_出水压力}, {Flag26, 二输26泵_出水压力}, {Flag27, 二输27泵_出水压力} }; /// /// 泵标志出口压力映射字典 2输水 /// public readonly static Dictionary FlagOutletFlowMappingDict2 = new Dictionary() { {Flag21, 二输21泵_瞬时流量}, {Flag22, 二输22泵_瞬时流量}, {Flag23, 二输23泵_瞬时流量}, {Flag24, 二输24泵_瞬时流量}, {Flag25, 二输25泵_瞬时流量}, {Flag26, 二输26泵_瞬时流量}, {Flag27, 二输27泵_瞬时流量} }; /// /// 泵标志转速映射字典 1输水 /// public readonly static Dictionary FlagNrMappingDict1 = new Dictionary() { {Flag11, 一输11泵_转速}, {Flag12, 一输12泵_转速}, {Flag13, 一输13泵_转速}, {Flag14, 一输14泵_转速}, {Flag15, 一输15泵_运行状态}, {Flag16, 一输16泵_运行状态}, {Flag17, 一输17泵_转速}, {Flag18, 一输18泵_转速} }; /// /// 泵标志转速映射字典 2输水 /// public readonly static Dictionary FlagNrMappingDict2 = new Dictionary() { {Flag21, 二输21泵_转速}, {Flag22, 二输22泵_转速}, {Flag23, 二输23泵_转速}, {Flag24, 二输24泵_转速}, {Flag25, 二输25泵_转速}, {Flag26, 二输26泵_转速}, {Flag27, 二输27泵_转速} }; /// /// 泵标志检修状态映射字典 2输水 /// public readonly static Dictionary FlagMaintenanceMappingDict2 = new Dictionary() { {Flag21, 二输21泵_检修状态}, {Flag22, 二输22泵_检修状态}, {Flag23, 二输23泵_检修状态}, {Flag24, 二输24泵_检修状态}, {Flag25, 二输25泵_检修状态}, {Flag26, 二输26泵_检修状态}, {Flag27, 二输27泵_检修状态} }; /// /// 泵标志累计时间映射字典 1输水 (分钟单位) /// public readonly static Dictionary FlagCumulativeRuntimeMappingDict1 = new Dictionary() { {一输11泵_累计运行时间_历史,Flag11}, {一输12泵_累计运行时间_历史,Flag12}, {一输13泵_累计运行时间_历史,Flag13}, {一输14泵_累计运行时间_历史,Flag14}, {一输15泵_累计运行时间_历史,Flag15}, {一输16泵_累计运行时间_历史,Flag16}, {一输17泵_累计运行时间_历史,Flag17}, {一输18泵_累计运行时间_历史,Flag18} }; /// /// 泵标志累计时间映射字典 2输水 (小时单位) /// public readonly static Dictionary FlagCumulativeRuntimeMappingDict2 = new Dictionary() { {二输21泵_累计运行时间_历史,Flag21}, {二输22泵_累计运行时间_历史,Flag22}, {二输23泵_累计运行时间_历史,Flag23}, {二输24泵_累计运行时间_历史,Flag24}, {二输25泵_累计运行时间_历史,Flag25}, {二输26泵_累计运行时间_历史,Flag26}, {二输27泵_累计运行时间_历史,Flag27} }; #endregion #region 模型映射 /// /// 总管流量点映射字典 /// public readonly static List Pipe1FlowIdList = new List{ "SFJD1" , "SFJD2" , "SFJD3" }; /// /// 总管流量点映射字典 /// public readonly static List Pipe2FlowIdList = new List{ "SFDN2400", "SFDN2700", }; public static List GetPipeFlowIdList(int station_index) { var list = new List(); if (station_index == 1) { list = Pipe1FlowIdList; } else { list = Pipe2FlowIdList; } return list; } /// /// 总管压力点映射字典 /// public readonly static List Pipe1PressureIdList = new List{ "SPJD1" , "SPJD2" , "SPJD3" }; /// /// 总管压力点映射字典 /// public readonly static List Pipe2PressureIdList = new List{ "SPDN2400" , "SPDN2700" , }; public static List GetPipePressureIdList(int station_index) { var list = new List(); if (station_index == 1) { list = Pipe1PressureIdList; } else { list = Pipe2PressureIdList; } return list; } /// /// 模型流量点映射字典 /// public readonly static Dictionary ModelFlowIdMappingDict = new Dictionary(){ { "Pjd1", 嘉定1线_瞬时流量_长江管网图}, { "Pjd2", 嘉定2线_瞬时流量_长江管网图}, { "Pjd3", 嘉定3线_瞬时流量_长江管网图}, { "Pdn2400", DN2400总管_瞬时流量_长江管网图}, { "Pdn2700", DN2700总管_瞬时流量_长江管网图}, { "Ppump21", 二输21泵_瞬时流量}, { "Ppump22", 二输22泵_瞬时流量}, { "Ppump23", 二输23泵_瞬时流量}, { "Ppump24", 二输24泵_瞬时流量}, { "Ppump25", 二输25泵_瞬时流量}, { "Ppump26", 二输26泵_瞬时流量}, { "Ppump27", 二输27泵_瞬时流量} }; /// /// 模型压力点映射字典 /// public readonly static Dictionary ModelPressureIdMappingDict = new Dictionary() { { "Jjd1", 嘉定1线_压力_长江管网图}, { "Jjd2", 嘉定2线_压力_长江管网图}, { "Jjd3", 嘉定3线_压力_长江管网图}, { "Jpump11", 一输11泵_出口压力}, { "Jpump12", 一输12泵_出口压力}, { "Jpump13", 一输13泵_出口压力}, { "Jpump14", 一输14泵_出口压力}, { "Jpump15", 一输15泵_出口压力}, { "Jpump16", 一输16泵_出口压力}, { "Jpump17", 一输17泵_出口压力}, { "Jpump18", 一输18泵_出口压力}, { "Jdn2400", DN2400_出厂压力_长江管网图}, { "Jdn2700", DN2700_出厂压力_长江管网图}, { "Jpump21", 二输21泵_出水压力}, { "Jpump22", 二输22泵_出水压力}, { "Jpump23", 二输23泵_出水压力}, { "Jpump24", 二输24泵_出水压力}, { "Jpump25", 二输25泵_出水压力}, { "Jpump26", 二输26泵_出水压力}, { "Jpump27", 二输27泵_出水压力} }; /// /// 模型模式点映射字典 /// public readonly static Dictionary ModelPatternIdMappingDict = new Dictionary() { {"Pump11", 一输11泵_转速}, {"Pump12", 一输12泵_转速}, {"Pump13", 一输13泵_转速}, {"Pump14", 一输14泵_转速}, {"Pump15", 一输15泵_运行状态}, {"Pump16", 一输16泵_运行状态}, {"Pump17", 一输17泵_转速}, {"Pump18", 一输18泵_转速}, {"R3", 一输_老前池南侧液位}, {"R2", 一输_老前池北侧液位 }, {"R1", 一输_新前池液位}, {"SFJD1", 嘉定1线_瞬时流量_长江管网图}, {"SFJD2", 嘉定2线_瞬时流量_长江管网图}, {"SFJD3", 嘉定3线_瞬时流量_长江管网图}, {"RPump21", 二输21泵_泵井液位}, {"RPump22", 二输22泵_泵井液位}, {"RPump23", 二输23泵_泵井液位}, {"RPump24", 二输24泵_泵井液位}, {"RPump25", 二输25泵_泵井液位}, {"RPump26", 二输26泵_泵井液位}, {"RPump27", 二输27泵_泵井液位}, {"SFPump21", 二输21泵_瞬时流量}, {"SFPump22", 二输22泵_瞬时流量}, {"SFPump23", 二输23泵_瞬时流量}, {"SFPump24", 二输24泵_瞬时流量}, {"SFPump25", 二输25泵_瞬时流量}, {"SFPump26", 二输26泵_瞬时流量}, {"SFPump27", 二输27泵_瞬时流量}, {"Pump21", 二输21泵_转速}, {"Pump22", 二输22泵_转速}, {"Pump23", 二输23泵_转速}, {"Pump24", 二输24泵_转速}, {"Pump25", 二输25泵_转速}, {"Pump26", 二输26泵_转速}, {"Pump27", 二输27泵_转速}, {"SFDN2400", DN2400总管_瞬时流量_长江管网图}, {"SFDN2700", DN2700总管_瞬时流量_长江管网图} }; /// /// 模型压力点(kPa)列表 /// public readonly static List ModelPressureIdkPaList = new List() { 嘉定1线_压力, 嘉定2线_压力, 嘉定3线_压力, 嘉定1线_压力_长江管网图, 嘉定2线_压力_长江管网图, 嘉定3线_压力_长江管网图, 一输11泵_出口压力, 一输12泵_出口压力, 一输13泵_出口压力, 一输14泵_出口压力, 一输15泵_出口压力, 一输16泵_出口压力, 一输17泵_出口压力, 一输18泵_出口压力 }; /// /// 模型泵转速字典 /// public static readonly Dictionary ModelPumpNrDict = new Dictionary() { { "Pump11",590}, { "Pump12",590}, { "Pump13",590}, { "Pump14",590}, { "Pump15",590}, { "Pump16",590}, { "Pump17",590}, { "Pump18",590}, { "Pump21",740}, { "Pump22",495}, { "Pump23",495}, { "Pump24",495}, { "Pump25",495}, { "Pump26",495}, { "Pump27",740} }; /// /// 模型泵标识映射字典 /// public static readonly Dictionary ModelPumpIdMappingDict = new Dictionary() { { Flag11,"Pump11"}, { Flag12,"Pump12"}, { Flag13,"Pump13"}, { Flag14,"Pump14"}, { Flag15,"Pump15"}, { Flag16,"Pump16"}, { Flag17,"Pump17"}, { Flag18,"Pump18"}, { Flag21,"Pump21"}, { Flag22,"Pump22"}, { Flag23,"Pump23"}, { Flag24,"Pump24"}, { Flag25,"Pump25"}, { Flag26,"Pump26"}, { Flag27,"Pump27"} }; /// /// 模型泵标识映射字典 /// public static readonly Dictionary ModelCurveIdMappingDict = new Dictionary() { { Flag11,"11"}, { Flag12,"12"}, { Flag13,"13"}, { Flag14,"14"}, { Flag15,"15"}, { Flag16,"16"}, { Flag17,"17"}, { Flag18,"18"}, { Flag21,"21"}, { Flag22,"22"}, { Flag23,"23"}, { Flag24,"24"}, { Flag25,"25"}, { Flag26,"26"}, { Flag27,"27"} }; #endregion #endregion #region 获取 配置字典 /// /// 获取 泵标志运行状态映射字典 /// public static Dictionary GetFlagRunStatusMappingDict() { var flag_run_status_mapping_dict = new Dictionary(); foreach (var item in FlagRunStatusMappingDict1) { flag_run_status_mapping_dict.Add(item.Key, item.Value); } foreach (var item in FlagRunStatusMappingDict2) { flag_run_status_mapping_dict.Add(item.Key, item.Value); } return flag_run_status_mapping_dict; } /// /// 获取 泵标志转速映射字典 /// public static Dictionary GetFlagNrMappingDict() { var flag_nr_mapping_dict = new Dictionary(); foreach (var item in FlagNrMappingDict1) { flag_nr_mapping_dict.Add(item.Key, item.Value); } foreach (var item in FlagNrMappingDict2) { flag_nr_mapping_dict.Add(item.Key, item.Value); } return flag_nr_mapping_dict; } #endregion /// /// 获取泵进口水位字典 /// public static Dictionary GetFlagInletWaterLevelDict(int station_index, Dictionary record_dict) { if (station_index == 1) { var flagInletWaterLevelMappingDict1 = new Dictionary() { {Flag11, "R3"}, {Flag12, "R3"}, {Flag13, "R3"}, {Flag14, "R2"}, {Flag15, "R2"}, {Flag16, "R1"}, {Flag17, "R1"}, {Flag18, "R1"} }; var station1_flag_inlet_water_level_dict = new Dictionary(); foreach (var mapping in flagInletWaterLevelMappingDict1) { var flag = mapping.Key; var code = mapping.Value; var water_level = 0d; water_level = record_dict[code]; station1_flag_inlet_water_level_dict.Add(flag, water_level); } return station1_flag_inlet_water_level_dict; } else { var flagInletWaterLevelMappingDict2 = new Dictionary() { {Flag21, "RPump21"}, {Flag22, "RPump22"}, {Flag23, "RPump23"}, {Flag24, "RPump24"}, {Flag25, "RPump25"}, {Flag26, "RPump26"}, {Flag27, "RPump27"} }; var station2_flag_inlet_water_level_dict = new Dictionary(); foreach (var mapping in flagInletWaterLevelMappingDict2) { var flag = mapping.Key; var code = mapping.Value; var water_level = 0d; water_level = record_dict[code]; station2_flag_inlet_water_level_dict.Add(flag, water_level); } return station2_flag_inlet_water_level_dict; } } private class ChScheduleConfig { /// /// 一输水 /// public Dto.ScheduleConfig Station1 { get; set; } /// /// 二输水 /// public Dto.ScheduleConfig Station2 { get; set; } } private static ChScheduleConfig _config = null; /// /// 获取泵进口水位字典 /// public static Dto.ScheduleConfig GetScheduleConfig(int station_index) { if (_config == null) { var filePath = $"{DAL.FileHelper.GetDataFolder()}\\ScheduleConfig.json"; if (!File.Exists(filePath)) return default; var json = File.ReadAllText(filePath); _config = JsonHelper.Json2Object(json); } if (station_index == 1) { return _config.Station1; } else { return _config.Station2; } } } }