diff --git a/RhSolutions.Api/Services/BlackPipeQueryModifier.cs b/RhSolutions.Api/Services/BlackPipeQueryModifier.cs index ae4012e..f630f54 100644 --- a/RhSolutions.Api/Services/BlackPipeQueryModifier.cs +++ b/RhSolutions.Api/Services/BlackPipeQueryModifier.cs @@ -2,13 +2,13 @@ namespace RhSolutions.Api.Services { public class BlackPipeQueryModifier : FlexPipeQueryModifier { - protected override string diameterPattern => @"16|20|25"; + protected override string diameterPattern => @"\b(16|20|25)\b"; protected override string pipeName => "Black"; protected override Dictionary diameterNames => new() { ["16"] = "16х2,2", ["20"] = "20х2,8", - ["25"] = "25х3,5" + ["25"] = "25х3,5" }; } } diff --git a/RhSolutions.Api/Services/FlexPipeQueryModifier.cs b/RhSolutions.Api/Services/FlexPipeQueryModifier.cs index cd9e7bf..1dda435 100644 --- a/RhSolutions.Api/Services/FlexPipeQueryModifier.cs +++ b/RhSolutions.Api/Services/FlexPipeQueryModifier.cs @@ -6,8 +6,8 @@ namespace RhSolutions.Api.Services { public class FlexPipeQueryModifier : IProductQueryModifier { - protected virtual string diameterPattern { get; } = @"16|20|25|32|40|50|63"; - protected virtual string typePattern { get; } = @"(бухт)|(отр)"; + protected virtual string diameterPattern { get; } = @"\b(16|20|25|32|40|50|63)\b"; + protected virtual string typePattern { get; } = @"бухт|отр|штанг"; protected virtual string pipeName { get; } = "Flex"; protected virtual Dictionary diameterNames { get; } = new() { @@ -47,13 +47,13 @@ namespace RhSolutions.Api.Services if (typeMatches.Count > 0) { var type = typeMatches.First().Value; - if (type.StartsWith("бухт")) + if (type.StartsWith("отр") || type.StartsWith("штанг")) { - sb.Append("бухта"); + sb.Append("прям.отрезки"); } else { - sb.Append("прям.отрезки"); + sb.Append("бухта"); } } else if (int.Parse(diameter) < 32) diff --git a/RhSolutions.Api/Services/StabilPipeQueryModifier.cs b/RhSolutions.Api/Services/StabilPipeQueryModifier.cs index 035b914..42c8bf9 100644 --- a/RhSolutions.Api/Services/StabilPipeQueryModifier.cs +++ b/RhSolutions.Api/Services/StabilPipeQueryModifier.cs @@ -2,7 +2,7 @@ namespace RhSolutions.Api.Services { public class StabilPipeQueryModifier : FlexPipeQueryModifier { - protected override string diameterPattern => @"16|20|25|32|40"; + protected override string diameterPattern => @"\b(16|20|25|32|40)\b"; protected override string pipeName => "Stabil -PLATINUM"; protected override Dictionary diameterNames => new() {