using IStation.Calculation; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Application { /// /// 计划分析常量 /// public class ShysPlanHelper { /// /// 站点字典 /// public static StationInfo GetStationInfo(int SgFactoryId) { if (_dict == null) Inital(); if (!_dict.ContainsKey(SgFactoryId)) { return null; } return _dict[SgFactoryId]; } static Dictionary _dict; private static void Inital() { _dict = new Dictionary(); //_dict.Add(1, new StationInfo(2, new IStation.Calculation.shys长兴泵站())); //_dict.Add(2, new StationInfo(12, new IStation.Calculation.shys五号沟凌桥方向())); _dict.Add(5, new StationInfo(5, new shys五号沟严桥方向2())); //{ // {1,2},//长兴泵站 // {2,12},//五号沟凌桥方向 // {3,9},//五号沟金海方向 // {4,3},//五号沟严桥方向1 // {5,5},//五号沟严桥方向2 // {6,4},//严桥泵站 // {7,6},//临江1#泵站 // {8,7},//临江2#泵站 // {9,8},//徐泾泵站 // {10,10},//金海泵站 // {11,11},//南汇北泵站 // {12,15},//陈行一输 // {13,16},//陈行二输 // {14,17},//泰和泵站 // {15,19},//金泽泵站 // {16,20},//松江泵站 // {17,21},//大桥泵站 //}; } /// /// /// public class StationInfo { /// /// /// /// /// public StationInfo(long id, PlanAnaBaseCalculator calc) { ID = id; Calculator = calc; } /// /// /// public long ID { get; set; } /// /// /// public PlanAnaBaseCalculator Calculator { get; set; } } } }