| | |
| | | var AssetsHydrantMain = new BLL.AssetsHydrantMain(); |
| | | var AssetsPressmeterMain = new BLL.AssetsPressmeterMain(); |
| | | var AssetsTranslationMain = new BLL.AssetsTranslationMain(); |
| | | var AssetsCoolingMain = new BLL.AssetsCoolingMain(); |
| | | try |
| | | { |
| | | var allPump = Task.Run(async () => await AssetsPumpMain.GetAll()).Result; |
| | |
| | | var allHydrantMain = Task.Run(async () => await AssetsHydrantMain.GetAll()).Result; |
| | | var allPressmeterMain = Task.Run(async () => await AssetsPressmeterMain.GetAll()).Result; |
| | | var allTranslationMain = Task.Run(async () => await AssetsTranslationMain.GetAll()).Result; |
| | | var allCoolingMain = Task.Run(async () => await AssetsCoolingMain.GetAll()).Result; |
| | | //泵匹配 |
| | | foreach (var item in assetsAutoMatchingView.Pumps) |
| | | { |
| | |
| | | foreach (var item in assetsAutoMatchingView.Nozzles) |
| | | { |
| | | if (MatchingSprinkler(item, allSprinkler)) |
| | | { |
| | | IsMaching = true; |
| | | } |
| | | } |
| | | |
| | | //喷头匹配 |
| | | foreach (var item in assetsAutoMatchingView.Coolings) |
| | | { |
| | | if (Matching(item, allCoolingMain)) |
| | | { |
| | | IsMaching = true; |
| | | } |
| | |
| | | InputModel.MatchingCurveQE.Add(new HydroCurvePointViewModel(item.X, item.Y)); |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | } |
| | | Vmo.AssetsTankMainVmo vmo = null; |
| | | var nameMatching = tankVmos.Where(x => |
| | | (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || |
| | | (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 |
| | | (x.KeyWords != null && x.KeyWords.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || |
| | | (x.KeyWords == null || !x.KeyWords.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 |
| | | ) //先进行筛选,后进行从大到小排序 |
| | | .OrderByDescending(x => |
| | | (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || |
| | | (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); |
| | | (x.KeyWords != null && x.KeyWords.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || |
| | | (x.KeyWords == null || !x.KeyWords.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); |
| | | |
| | | if (nameMatching.Count > 1) |
| | | { |