| | |
| | | Vmo.AssetsPipeMainVmo vmo = null; |
| | | |
| | | var nameMatching = pipeLineMainVmos.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) |
| | | { |
| | |
| | | return true; |
| | | } |
| | | var nameMatching = threelinkVmos.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) |
| | | { |
| | |
| | | } |
| | | Vmo.AssetsSprinklerMainVmo vmo = null; |
| | | var nameMatching = sprinklerVmos.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) |
| | | { |
| | |
| | | } |
| | | Vmo.AssetsBluntheadMainVmo vmo = null; |
| | | var nameMatching = bluntheadVmos.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) |
| | | { |
| | |
| | | } |
| | | Vmo.AssetsHydrantMainVmo vmo = null; |
| | | var nameMatching = hydrantVmos.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) |
| | | { |
| | |
| | | input.MatchingBendingAngle = elbow.Angle; |
| | | } |
| | | input.MatchingElbowType = (Yw.WinFrmUI.eElbowType)(int)elbow.ElbowType; |
| | | // input.MatchingElbowType = Yw.WinFrmUI.eElbowType.Short; |
| | | if (input.Material == null || input.Material == string.Empty) |
| | | { |
| | | input.MatchingMaterial = elbow.Material; |
| | |
| | | } |
| | | Vmo.AssetsTranslationMainVmo vmo = null; |
| | | var nameMatching = translationVmos.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) |
| | | { |