| | |
| | | private Dictionary<string, List<Yw.Model.HydroParterPropStatusInfo>> _dict = null;//字典 |
| | | |
| | | /// <summary> |
| | | /// 获取属性状态信息 |
| | | /// </summary> |
| | | public HydroParterPropStatusInfo GetPropStatusInfo(string code, string propNameInfo) |
| | | { |
| | | if (string.IsNullOrEmpty(code)) |
| | | { |
| | | return default; |
| | | } |
| | | if (string.IsNullOrEmpty(propNameInfo)) |
| | | { |
| | | return default; |
| | | } |
| | | if (_dict == null) |
| | | { |
| | | _dict = new Dictionary<string, List<Model.HydroParterPropStatusInfo>>(); |
| | | } |
| | | if (!_dict.ContainsKey(code)) |
| | | { |
| | | _dict.Add(code, new List<Model.HydroParterPropStatusInfo>()); |
| | | } |
| | | if (_dict[code] == null) |
| | | { |
| | | _dict[code] = new List<Model.HydroParterPropStatusInfo>(); |
| | | } |
| | | var list = _dict[code]; |
| | | var propStatusInfo = list.Find(x => x.PropName == propNameInfo); |
| | | return propStatusInfo; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取属性状态Db列表 |
| | | /// </summary> |
| | | public List<Yw.Model.HydroParterPropStatusInfo> GetPropStatusDbList() |