文件名从 IStation.Service/05-service/01-analysis/AnalysisConclusion.cs 修改 |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public partial class AnalysisConclusion |
| | | public partial class AnalysisParameter |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private static Dictionary<string, List<Model.AnalysisConclusion>> GetDictCache() |
| | | public static Dictionary<string, List<Model.AnalysisParameter>> GetDictCache() |
| | | { |
| | | return AnalysisConclusionCacheHelper.GetSet(() => |
| | | return AnalysisParameterCacheHelper.GetSet(() => |
| | | { |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisConclusion>(); |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisParameter>(); |
| | | var entity_dict = dal.GetAllTable(); |
| | | if (entity_dict == null || !entity_dict.Any()) |
| | | { |
| | | return new Dictionary<string, List<Model.AnalysisConclusion>>(); |
| | | return new Dictionary<string, List<Model.AnalysisParameter>>(); |
| | | } |
| | | |
| | | var model_dict = new Dictionary<string, List<Model.AnalysisConclusion>>(); |
| | | var model_dict = new Dictionary<string, List<Model.AnalysisParameter>>(); |
| | | for (int i = 0; i < entity_dict.Count; i++) |
| | | { |
| | | var entity_item = entity_dict.ElementAt(i); |
| | |
| | | /// <summary> |
| | | /// 鏌ヨ |
| | | /// </summary> |
| | | public List<Model.AnalysisConclusion> GetList(string runFlag) |
| | | public List<Model.AnalysisParameter> GetList(string run_flag) |
| | | { |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisConclusion>(); |
| | | var tableName = dal.GetTableName(runFlag); |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisParameter>(); |
| | | var tableName = dal.GetTableName(run_flag); |
| | | var dict = GetDictCache(); |
| | | if (!dict.ContainsKey(tableName)) |
| | | return default; |
| | |
| | | /// <summary> |
| | | /// 鏌ヨ |
| | | /// </summary> |
| | | public List<Model.AnalysisConclusion> GetList(string runFlag, double targetHead) |
| | | public List<Model.AnalysisParameter> GetList(string run_flag, double pressure_diff) |
| | | { |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisConclusion>(); |
| | | var tableName = dal.GetTableName(runFlag); |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisParameter>(); |
| | | var tableName = dal.GetTableName(run_flag); |
| | | var dict = GetDictCache(); |
| | | if (!dict.ContainsKey(tableName)) |
| | | return default; |
| | | |
| | | return dict[tableName]? |
| | | .Where(x => x.Head == targetHead) |
| | | .Where(x => x.PressureDiff == pressure_diff) |
| | | .OrderBy(x => x.Power) |
| | | .ToList(); |
| | | } |
| | |
| | | /// <summary> |
| | | /// 鏌ヨ |
| | | /// </summary> |
| | | public Model.AnalysisConclusion GetMinHead(string runFlag) |
| | | public Model.AnalysisParameter GetMinPressureDiff(string run_flag) |
| | | { |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisConclusion>(); |
| | | var tableName = dal.GetTableName(runFlag); |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisParameter>(); |
| | | var tableName = dal.GetTableName(run_flag); |
| | | var dict = GetDictCache(); |
| | | if (!dict.ContainsKey(tableName)) |
| | | return default; |
| | | return dict[tableName]?.OrderBy(x => x.Head).FirstOrDefault(); |
| | | return dict[tableName]?.OrderBy(x => x.PressureDiff).FirstOrDefault(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 鏌ヨ |
| | | /// </summary> |
| | | public List<Model.AnalysisConclusion> GetList(string runFlag, double minHz, double maxHz, double targetHead) |
| | | public List<Model.AnalysisParameter> GetList(string run_flag, double min_hz, double max_hz, double pressure_diff) |
| | | { |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisConclusion>(); |
| | | var tableName = dal.GetTableName(runFlag); |
| | | var dal = DALCreateHelper.CreateDAL<IStation.DAL.IAnalysisParameter>(); |
| | | var tableName = dal.GetTableName(run_flag); |
| | | var dict = GetDictCache(); |
| | | if (!dict.ContainsKey(tableName)) |
| | | return default; |
| | | |
| | | return dict[tableName]? |
| | | .Where(x => x.Pump >= minHz && x.Pump <= maxHz && x.Head == targetHead) |
| | | .Where(x => x.Hz >= min_hz && x.Hz <= max_hz && x.PressureDiff == pressure_diff) |
| | | .OrderBy(x => x.Power) |
| | | .ToList(); |
| | | } |