diff --git a/AsbCloudApp/Repositories/IWellOperationCategoryRepository.cs b/AsbCloudApp/Repositories/IWellOperationCategoryRepository.cs index ecf915cd..044dbd44 100644 --- a/AsbCloudApp/Repositories/IWellOperationCategoryRepository.cs +++ b/AsbCloudApp/Repositories/IWellOperationCategoryRepository.cs @@ -12,6 +12,6 @@ namespace AsbCloudApp.Repositories /// список названий операций /// /// - IEnumerable Get(bool includeParents); + IEnumerable Get(bool includeParents, bool includeHidden = true); } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Repository/WellOperationCategoryRepository.cs b/AsbCloudInfrastructure/Repository/WellOperationCategoryRepository.cs index 927a424e..49d146bd 100644 --- a/AsbCloudInfrastructure/Repository/WellOperationCategoryRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellOperationCategoryRepository.cs @@ -19,11 +19,13 @@ public class WellOperationCategoryRepository : IWellOperationCategoryRepository this.memoryCache = memoryCache; } - public IEnumerable Get(bool includeParents) + public IEnumerable Get(bool includeParents, bool includeHidden = true) { var categories = memoryCache .GetOrCreateBasic(db.Set()); + categories = categories.Where(o => includeHidden ? true : o.IsHidden == false); + if (!includeParents) { var parentIds = categories diff --git a/AsbCloudInfrastructure/Services/WellOperations/Templates/WellOperationPlanTemplate.xlsx b/AsbCloudInfrastructure/Services/WellOperations/Templates/WellOperationPlanTemplate.xlsx index c5d53089..8d7abef6 100644 Binary files a/AsbCloudInfrastructure/Services/WellOperations/Templates/WellOperationPlanTemplate.xlsx and b/AsbCloudInfrastructure/Services/WellOperations/Templates/WellOperationPlanTemplate.xlsx differ diff --git a/AsbCloudWebApi/Controllers/WellOperationController.cs b/AsbCloudWebApi/Controllers/WellOperationController.cs index 90072dd3..245b1f17 100644 --- a/AsbCloudWebApi/Controllers/WellOperationController.cs +++ b/AsbCloudWebApi/Controllers/WellOperationController.cs @@ -172,7 +172,7 @@ public class WellOperationController : ControllerBase [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] public IActionResult GetCategories(bool includeParents = true) { - var result = wellOperationCategoryRepository.Get(includeParents); + var result = wellOperationCategoryRepository.Get(includeParents, false); return Ok(result); }