feat(dal,core): Перенесены оставшиеся объекты из dal в core.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using PARR.DAL.Contracts;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
public class ApplicationQuery
|
||||
{
|
||||
|
||||
@@ -14,12 +14,12 @@ using PARR.API.Services.Interfaces;
|
||||
using PARR.API.Settings;
|
||||
using PARR.Core.Common.Helpers;
|
||||
using PARR.Core.Common.Interfaces.RabbitServices;
|
||||
using PARR.Core.Extensions;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
using PARR.DAL.Extensions;
|
||||
using PARR.Core.Services.MatchingStatusService;
|
||||
using PARR.Core.Services.UnitFilterService;
|
||||
using PARR.Domain.Common.Pagination;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Common.Roles;
|
||||
|
||||
@@ -16,7 +16,7 @@ using PARR.Core.Common.Helpers;
|
||||
using PARR.Core.Common.Interfaces.RabbitServices;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.Core.Services.MatchingStatusService;
|
||||
using PARR.Domain.Common.Pagination;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Common.Roles;
|
||||
|
||||
@@ -10,7 +10,7 @@ using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
using PARR.Core.Services.UnitFilterService;
|
||||
using PARR.Domain.Common.Roles;
|
||||
using Job = PARR.Domain.Entities.Job.Job;
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Services.Interfaces;
|
||||
using PARR.BLL.Helpers;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Domain.Common.Roles;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using PARR.API.Contracts.V1;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Domain.Common.Roles;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
|
||||
@@ -10,7 +10,7 @@ using PARR.API.Contracts.V1.Responses.Statistics;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Helpers;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Domain.Common.Roles;
|
||||
|
||||
namespace PARR.API.Controllers.V1.Statistics
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NodaTime.Extensions;
|
||||
using PARR.API.Contracts.V1;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Contracts.V1.Responses.Statistics;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Common.Roles;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using PARR.API.Contracts.V1.Responses.Statistics;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Helpers;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1.Statistics
|
||||
|
||||
@@ -8,8 +8,7 @@ using PARR.API.Contracts.V1.Responses.Statistics;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Helpers;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Domain.Common.Roles;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ using PARR.API.Controllers.V1.Base;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Domain.Common.Roles;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Job;
|
||||
|
||||
@@ -8,7 +8,7 @@ using PARR.API.Contracts.V1.Responses.Statistics;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Helpers;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Domain.Common.Roles;
|
||||
|
||||
namespace PARR.API.Controllers.V1.Statistics
|
||||
|
||||
@@ -7,7 +7,7 @@ using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Contracts.V1.Responses.Statistics;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Domain.Common.Roles;
|
||||
|
||||
namespace PARR.API.Controllers.V1.Statistics
|
||||
|
||||
@@ -6,7 +6,7 @@ using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Services.Interfaces;
|
||||
using PARR.API.Settings;
|
||||
using PARR.Core.Common.Interfaces.RabbitServices;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.Core.Services.MatchingStatusService;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
@@ -14,13 +14,13 @@ using PARR.BLL.Helpers;
|
||||
using PARR.Core.Common.Helpers;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Domain.Common.Pagination;
|
||||
using PARR.Domain.Common.Roles;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@ using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Common.Roles;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@ using PARR.API.Services.Interfaces;
|
||||
using PARR.API.Settings;
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.NextRunServices;
|
||||
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -3,7 +3,8 @@ using PARR.API.Authentication.Models;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.API.MappingProfiles.Resolvers;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.Domain.DTOs.Matching;
|
||||
using PARR.Domain.DTOs.Shortcode;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Entities.Job;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using AutoMapper;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using AutoMapper;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using AutoMapper;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using AutoMapper;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using AutoMapper;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using AutoMapper;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using AutoMapper;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using AutoMapper;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using AutoMapper;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using FluentValidation;
|
||||
using PARR.API.Contracts.V1.Requests;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Validators
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using FluentValidation;
|
||||
using PARR.API.Contracts.V1.Requests;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Validators
|
||||
|
||||
@@ -3,12 +3,18 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using PARR.Core.Common.Implementations;
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Services.MatchingStatusService;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices.Subservices;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Core.Services.TaskServices.Handlers;
|
||||
using PARR.Core.Services.TaskServices.Handlers.Factory;
|
||||
using PARR.Core.Services.TaskServices.Implementations;
|
||||
using PARR.Core.Services.TaskServices.Interfaces;
|
||||
using PARR.Core.Services.TaskServices.Providers;
|
||||
using PARR.Core.Services.TaskServices.ReconciliationHosted;
|
||||
using PARR.Core.Services.UnitFilterService;
|
||||
using PARR.Core.Services.UnitFilterService.Models;
|
||||
using PARR.Core.Services.Workload.Implementations;
|
||||
using PARR.Core.Services.Workload.Interfaces;
|
||||
using PARR.Domain.Enums;
|
||||
@@ -65,9 +71,31 @@ namespace PARR.Core
|
||||
|
||||
#region Services
|
||||
|
||||
services.AddTransient<IShortcodesService, ShortcodesService>();
|
||||
services.AddTransient<IMatchingStatusService, MatchingStatusService>();
|
||||
|
||||
|
||||
//services.AddScoped<IUserService, UserService>();
|
||||
//services.AddTransient<IShortcodesService, ShortcodesService>();
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region NextRun
|
||||
|
||||
services.AddTransient<IEsppScheduleTransformService, EsppScheduleTransformService>();
|
||||
services.AddTransient<ITemplateDistributor, TemplateDistributor>();
|
||||
services.AddTransient<INextRunService, NextRunService>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region UnitFilterService
|
||||
|
||||
services.AddTransient<IUnitFilterService, UnitFilterService>();
|
||||
services.Configure<UnitFilterServiceOptions>(options =>
|
||||
{
|
||||
options.LoadBatchSize = 50;
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Unicode;
|
||||
|
||||
namespace PARR.DAL.Extensions
|
||||
namespace PARR.Core.Extensions
|
||||
{
|
||||
public static class GeneralExtesions
|
||||
{
|
||||
@@ -15,6 +15,7 @@
|
||||
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.5.2" />
|
||||
<PackageReference Include="InfluxDB.Client" Version="4.17.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.20" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.20" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
4
PARR.Core/Properties/AssemblyInfo.cs
Normal file
4
PARR.Core/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("PARR.DAL.Tests")]
|
||||
[assembly: InternalsVisibleTo("PARR.DAL.IntegrationTests")]
|
||||
@@ -24,5 +24,7 @@ namespace PARR.Core.Repositories.Interfaces.Unit
|
||||
Task<string?> GetMostFrequentValueForFieldAsync(List<Guid> unitIds, string fieldName);
|
||||
|
||||
IQueryable<UnitInValue> Get();
|
||||
|
||||
IQueryable<Guid> GetMatchingTargetIds(Guid fieldId, string valueMask);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,18 @@ namespace PARR.Core.Repositories.Interfaces.Unit
|
||||
{
|
||||
public interface IUnitRepository : IBaseRepository<Domain.Entities.Unit.Unit>
|
||||
{
|
||||
IQueryable<Guid> GetInitialUnitIds(string dbValueMask);
|
||||
|
||||
/// <summary>
|
||||
/// Получить юниты по Id атрибута и маски значения
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="fieldId"></param>
|
||||
/// <param name="valueMask"></param>
|
||||
/// <param name="isInverse">true - не содержит, false - содержит</param>
|
||||
/// <returns></returns>
|
||||
IQueryable<Domain.Entities.Unit.Unit> GetUnitByFieldAndValue(IQueryable<Domain.Entities.Unit.Unit> query, Guid fieldId, string valueMask, bool isInverse = false);
|
||||
|
||||
IQueryable<Domain.Entities.Unit.Unit> GetWithIncludes();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.Domain.Cache.Models;
|
||||
using PARR.Domain.Cache.Models;
|
||||
using PARR.Domain.DTOs.Matching;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.DAL.DomainServices.Interfaces
|
||||
namespace PARR.Core.Services.MatchingStatusService
|
||||
{
|
||||
/// <summary>
|
||||
/// Сервис по управлению статусом Matching`a
|
||||
@@ -1,12 +1,11 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.Domain.Cache.Models;
|
||||
using PARR.Domain.DTOs.Matching;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.DAL.DomainServices.Implementations
|
||||
namespace PARR.Core.Services.MatchingStatusService
|
||||
{
|
||||
internal class MatchingStatusService : IMatchingStatusService
|
||||
{
|
||||
@@ -1,8 +1,8 @@
|
||||
using PARR.DAL.NextRunServices.Models;
|
||||
using PARR.Core.Services.NextRunServices.Models;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.DAL.NextRunServices
|
||||
namespace PARR.Core.Services.NextRunServices
|
||||
{
|
||||
public interface INextRunService
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.NextRunServices.Models
|
||||
namespace PARR.Core.Services.NextRunServices.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Модель шаблона, для расчета NextRun
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.NextRunServices.Models
|
||||
namespace PARR.Core.Services.NextRunServices.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Модель, результат распределения шаблона
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.NextRunServices.Models
|
||||
namespace PARR.Core.Services.NextRunServices.Models
|
||||
{
|
||||
internal record TemplateWithWorkGroupDto(Guid Id, DateTimeOffset? NextRun, string WorkGroup);
|
||||
|
||||
@@ -3,15 +3,15 @@ using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.NextRunServices.Models;
|
||||
using PARR.DAL.NextRunServices.Subservices;
|
||||
using PARR.Core.Services.NextRunServices.Models;
|
||||
using PARR.Core.Services.NextRunServices.Subservices;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Enums;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.DAL.NextRunServices
|
||||
namespace PARR.Core.Services.NextRunServices
|
||||
{
|
||||
internal class NextRunService : INextRunService
|
||||
{
|
||||
@@ -1,10 +1,8 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.Domain.Enums;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace PARR.DAL.NextRunServices.Subservices
|
||||
namespace PARR.Core.Services.NextRunServices.Subservices
|
||||
{
|
||||
internal class EsppScheduleTransformService : IEsppScheduleTransformService
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.NextRunServices.Subservices
|
||||
namespace PARR.Core.Services.NextRunServices.Subservices
|
||||
{
|
||||
/// <summary>
|
||||
/// Сервис трансформации расписания ЕСПП в дату/расписание
|
||||
@@ -1,6 +1,6 @@
|
||||
using PARR.DAL.NextRunServices.Models;
|
||||
using PARR.Core.Services.NextRunServices.Models;
|
||||
|
||||
namespace PARR.DAL.NextRunServices.Subservices
|
||||
namespace PARR.Core.Services.NextRunServices.Subservices
|
||||
{
|
||||
internal interface ITemplateDistributor
|
||||
{
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.NextRunServices.Models;
|
||||
using PARR.Core.Services.NextRunServices.Models;
|
||||
|
||||
namespace PARR.DAL.NextRunServices.Subservices
|
||||
namespace PARR.Core.Services.NextRunServices.Subservices
|
||||
{
|
||||
/// <summary>
|
||||
/// Распределитель шаблонов с поддержкой часовых поясов.
|
||||
@@ -1,8 +1,8 @@
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.Domain.DTOs.Shortcode;
|
||||
using PARR.Domain.Entities;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace PARR.DAL.DomainServices.Shortcodes
|
||||
namespace PARR.Core.Services.Shortcodes
|
||||
{
|
||||
public interface IShortcodesService
|
||||
{
|
||||
@@ -4,18 +4,18 @@ using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
using PARR.Core.Services.UnitFilterService;
|
||||
using PARR.Domain.Cache.Models;
|
||||
using PARR.Domain.Common.Template;
|
||||
using PARR.Domain.DTOs.Shortcode;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Enums;
|
||||
using PARR.Domain.Settings;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace PARR.DAL.DomainServices.Shortcodes
|
||||
namespace PARR.Core.Services.Shortcodes
|
||||
{
|
||||
/// <summary>
|
||||
/// Сервис для подстановки шорткодов в строке на основе данных шаблона.
|
||||
@@ -1,7 +1,7 @@
|
||||
using PARR.DAL.DomainServices.UnitFilterService.Models;
|
||||
using PARR.Core.Services.UnitFilterService.Models;
|
||||
using PARR.Domain.Entities.Job;
|
||||
|
||||
namespace PARR.DAL.DomainServices.UnitFilterService
|
||||
namespace PARR.Core.Services.UnitFilterService
|
||||
{
|
||||
public interface IUnitFilterService
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.DomainServices.UnitFilterService.Models
|
||||
namespace PARR.Core.Services.UnitFilterService.Models
|
||||
{
|
||||
internal class FilteredUnitContext
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.DomainServices.UnitFilterService.Models
|
||||
namespace PARR.Core.Services.UnitFilterService.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Связанный юнит с его значениями
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.DomainServices.UnitFilterService.Models
|
||||
namespace PARR.Core.Services.UnitFilterService.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Результат фильтрации Unit'ов с полной информацией для синхронизаторов.
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.DomainServices.UnitFilterService.Models
|
||||
namespace PARR.Core.Services.UnitFilterService.Models
|
||||
{
|
||||
internal class UnitFilterServiceOptions
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.DomainServices.UnitFilterService.Models
|
||||
namespace PARR.Core.Services.UnitFilterService.Models
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -4,14 +4,14 @@ using Microsoft.Extensions.Options;
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.DomainServices.UnitFilterService.Models;
|
||||
using PARR.Core.Services.UnitFilterService.Models;
|
||||
using PARR.Domain.Cache.Models;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Entities.Unit;
|
||||
using PARR.Domain.Enums;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace PARR.DAL.DomainServices.UnitFilterService;
|
||||
namespace PARR.Core.Services.UnitFilterService;
|
||||
|
||||
internal class UnitFilterService : IUnitFilterService
|
||||
{
|
||||
@@ -294,18 +294,20 @@ internal class UnitFilterService : IUnitFilterService
|
||||
logger.LogDebug(" FieldFilter #{Index}: Поле='{FieldName}', Маска='{Mask}', IsInverse={IsInverse}",
|
||||
filterIndex, fieldName, dbValueMask, fieldFilter.IsInverse);
|
||||
|
||||
if (fieldFilter.IsInverse)
|
||||
{
|
||||
query = query.Where(u => !u.UnitValues.Any(v =>
|
||||
v.FieldId == fieldFilter.FieldId &&
|
||||
EF.Functions.ILike(v.Value.Value, dbValueMask)));
|
||||
}
|
||||
else
|
||||
{
|
||||
query = query.Where(u => u.UnitValues.Any(v =>
|
||||
v.FieldId == fieldFilter.FieldId &&
|
||||
EF.Functions.ILike(v.Value.Value, dbValueMask)));
|
||||
}
|
||||
//if (fieldFilter.IsInverse)
|
||||
//{
|
||||
// query = query.Where(u => !u.UnitValues.Any(v =>
|
||||
// v.FieldId == fieldFilter.FieldId &&
|
||||
// EF.Functions.ILike(v.Value.Value, dbValueMask)));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// query = query.Where(u => u.UnitValues.Any(v =>
|
||||
// v.FieldId == fieldFilter.FieldId &&
|
||||
// EF.Functions.ILike(v.Value.Value, dbValueMask)));
|
||||
//}
|
||||
|
||||
query = unitService.GetUnitByFieldAndValue(query, fieldFilter.FieldId, fieldFilter.ValueMask!, fieldFilter.IsInverse);
|
||||
|
||||
#if DEBUG
|
||||
if (unitIds.Contains(targetUnitId))
|
||||
@@ -836,13 +838,16 @@ internal class UnitFilterService : IUnitFilterService
|
||||
isParentDirection ? "Parent" : "Child",
|
||||
fieldName, dbValueMask, relFilter.IsInverse, relFilter.IsFullMatch);
|
||||
|
||||
var matchingTargetIds = await unitInValueService.Get()
|
||||
.AsNoTracking()
|
||||
.Where(uiv => uiv.FieldId == relFilter.FieldId)
|
||||
.Where(uiv => EF.Functions.ILike(uiv.Value.Value, dbValueMask))
|
||||
.Select(uiv => uiv.UnitId)
|
||||
.Distinct()
|
||||
.ToListAsync(cancellationToken);
|
||||
//var matchingTargetIds = await unitInValueService.Get()
|
||||
// .AsNoTracking()
|
||||
// .Where(uiv => uiv.FieldId == relFilter.FieldId)
|
||||
// .Where(uiv => EF.Functions.ILike(uiv.Value.Value, dbValueMask))
|
||||
// .Select(uiv => uiv.UnitId)
|
||||
// .Distinct()
|
||||
// .ToListAsync(cancellationToken);
|
||||
|
||||
var matchingTargetIds = await unitInValueService.GetMatchingTargetIds(relFilter.FieldId, dbValueMask)
|
||||
.ToListAsync(cancellationToken);
|
||||
|
||||
var filteredMatchingTargetIds = matchingTargetIds
|
||||
.Intersect(allTargetIds)
|
||||
@@ -974,10 +979,12 @@ internal class UnitFilterService : IUnitFilterService
|
||||
|
||||
var dbValueMask = NormalizeLikeMask(filter.UnitFilter);
|
||||
|
||||
var initialUnitIds = await unitService.Get().AsNoTracking()
|
||||
.Where(unit => EF.Functions.ILike(unit.Name, dbValueMask))
|
||||
.Select(u => u.Id)
|
||||
.ToListAsync(cancellationToken);
|
||||
//var initialUnitIds = await unitService.Get().AsNoTracking()
|
||||
// .Where(unit => EF.Functions.ILike(unit.Name, dbValueMask))
|
||||
// .Select(u => u.Id)
|
||||
// .ToListAsync(cancellationToken);
|
||||
|
||||
var initialUnitIds = await unitService.GetInitialUnitIds(dbValueMask).ToListAsync(cancellationToken);
|
||||
|
||||
var toCache = new UnitFilterIds
|
||||
{
|
||||
@@ -4,8 +4,8 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.Core.Services.UnitFilterService;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
using PARR.DAL.Repositories.Job;
|
||||
using PARR.DAL.Repositories.Unit;
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.Core\PARR.Core.csproj" />
|
||||
<ProjectReference Include="..\PARR.DAL\PARR.DAL.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Entities.Unit;
|
||||
using PARR.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace PARR.DAL.IntegrationTests
|
||||
{
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
using Moq;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Core.Services.UnitFilterService;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.DAL.Tests.DomainServices.Implementations
|
||||
{
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Entities.Unit;
|
||||
using PARR.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace PARR.DAL.Tests
|
||||
{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Moq;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.NextRunServices.Subservices;
|
||||
using PARR.Core.Services.NextRunServices.Subservices;
|
||||
using PARR.Domain.Entities.Schedule;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.DAL.Configurations.DbSettings
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Extensions;
|
||||
using PARR.Core.Extensions;
|
||||
using PARR.Domain.Common.Roles;
|
||||
using PARR.Domain.Common.Template;
|
||||
using PARR.Domain.Entities;
|
||||
@@ -9,6 +8,7 @@ using PARR.Domain.Entities.Schedule;
|
||||
using PARR.Domain.Entities.TaskEntities;
|
||||
using PARR.Domain.Entities.Unit;
|
||||
using PARR.Domain.Enums;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.DAL.Context
|
||||
{
|
||||
|
||||
@@ -9,14 +9,6 @@ using PARR.Core.Repositories.Interfaces.TaskRepositories;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.Configurations.DbSettings;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainServices.Implementations;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
using PARR.DAL.DomainServices.UnitFilterService.Models;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.DAL.NextRunServices.Subservices;
|
||||
using PARR.DAL.Repositories;
|
||||
using PARR.DAL.Repositories.Job;
|
||||
using PARR.DAL.Repositories.Schedule;
|
||||
@@ -130,22 +122,22 @@ namespace PARR.DAL
|
||||
|
||||
#region NextRun Services
|
||||
|
||||
services.AddTransient<IEsppScheduleTransformService, EsppScheduleTransformService>();
|
||||
services.AddTransient<ITemplateDistributor, TemplateDistributor>();
|
||||
services.AddTransient<INextRunService, NextRunService>();
|
||||
//services.AddTransient<IEsppScheduleTransformService, EsppScheduleTransformService>();
|
||||
//services.AddTransient<ITemplateDistributor, TemplateDistributor>();
|
||||
//services.AddTransient<INextRunService, NextRunService>();
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region DomainServces
|
||||
services.AddTransient<IShortcodesService, ShortcodesService>();
|
||||
services.AddTransient<IUnitFilterService, UnitFilterService>();
|
||||
services.AddTransient<IMatchingStatusService, MatchingStatusService>();
|
||||
//services.AddTransient<IShortcodesService, ShortcodesService>();
|
||||
//services.AddTransient<IUnitFilterService, UnitFilterService>();
|
||||
//services.AddTransient<IMatchingStatusService, MatchingStatusService>();
|
||||
|
||||
services.Configure<UnitFilterServiceOptions>(options =>
|
||||
{
|
||||
options.LoadBatchSize = 50;
|
||||
});
|
||||
//services.Configure<UnitFilterServiceOptions>(options =>
|
||||
//{
|
||||
// options.LoadBatchSize = 50;
|
||||
//});
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
using PARR.Domain.Entities.Schedule;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities.Schedule;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.DAL.Repositories.Schedule
|
||||
{
|
||||
|
||||
@@ -127,6 +127,29 @@ namespace PARR.DAL.Repositories.Unit
|
||||
logger.LogDebug("Наиболее частое значение для поля '{FieldName}': {Value}", fieldName, mostFrequentValue);
|
||||
return mostFrequentValue;
|
||||
}
|
||||
|
||||
|
||||
public IQueryable<Guid> GetMatchingTargetIds(Guid fieldId, string valueMask)
|
||||
{
|
||||
//TODO: Вынесено из UnitFilterService
|
||||
|
||||
//var matchingTargetIds = await unitInValueService.Get()
|
||||
// .AsNoTracking()
|
||||
// .Where(uiv => uiv.FieldId == relFilter.FieldId)
|
||||
// .Where(uiv => EF.Functions.ILike(uiv.Value.Value, dbValueMask))
|
||||
// .Select(uiv => uiv.UnitId)
|
||||
// .Distinct()
|
||||
// .ToListAsync(cancellationToken);
|
||||
|
||||
return Get()
|
||||
.AsNoTracking()
|
||||
.Where(uiv => uiv.FieldId == fieldId)
|
||||
.Where(uiv => EF.Functions.ILike(uiv.Value.Value, valueMask))
|
||||
.Select(uiv => uiv.UnitId)
|
||||
.Distinct();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
|
||||
|
||||
namespace PARR.DAL.Repositories.Unit
|
||||
{
|
||||
internal class UnitRepository : BaseRepository<Domain.Entities.Unit.Unit>, IUnitRepository
|
||||
@@ -19,5 +20,42 @@ namespace PARR.DAL.Repositories.Unit
|
||||
.Include(t => t.UnitValues)
|
||||
.ThenInclude(t => t.Value);
|
||||
}
|
||||
|
||||
|
||||
public IQueryable<PARR.Domain.Entities.Unit.Unit> GetUnitByFieldAndValue(IQueryable<PARR.Domain.Entities.Unit.Unit> query, Guid fieldId, string valueMask, bool isInverse = false)
|
||||
{
|
||||
//TODO: вынесено из UnitFilterService
|
||||
|
||||
if (isInverse)
|
||||
{
|
||||
query = query.Where(u => !u.UnitValues.Any(v =>
|
||||
v.FieldId == fieldId &&
|
||||
EF.Functions.ILike(v.Value.Value, valueMask)));
|
||||
}
|
||||
else
|
||||
{
|
||||
query = query.Where(u => u.UnitValues.Any(v =>
|
||||
v.FieldId == fieldId &&
|
||||
EF.Functions.ILike(v.Value.Value, valueMask)));
|
||||
}
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
public IQueryable<Guid> GetInitialUnitIds(string dbValueMask)
|
||||
{
|
||||
//TODO: вынесено из UnitFilterService
|
||||
|
||||
//var initialUnitIds = await unitService.Get().AsNoTracking()
|
||||
//.Where(unit => EF.Functions.ILike(unit.Name, dbValueMask))
|
||||
//.Select(u => u.Id)
|
||||
//.ToListAsync(cancellationToken);
|
||||
|
||||
return Get().AsNoTracking()
|
||||
.Where(unit => EF.Functions.ILike(unit.Name, dbValueMask))
|
||||
.Select(u => u.Id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Repositories.Base;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
|
||||
namespace PARR.DAL.Repositories
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using PARR.Domain.Cache.Models;
|
||||
|
||||
namespace PARR.DAL.DomainModels
|
||||
namespace PARR.Domain.DTOs.Matching
|
||||
{
|
||||
/// <summary>
|
||||
/// Статус matching`a
|
||||
@@ -1,6 +1,6 @@
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.DAL.DomainModels
|
||||
namespace PARR.Domain.DTOs.Shortcode
|
||||
{
|
||||
public class ShortcodeInfoDto
|
||||
{
|
||||
@@ -1,7 +1,10 @@
|
||||
namespace PARR.DAL.Contracts
|
||||
namespace PARR.Domain.Settings
|
||||
{
|
||||
public class AIHTITSettings
|
||||
{
|
||||
//TODO: AIHTITSettings - не используется???
|
||||
|
||||
|
||||
public const string RespAreaGroupName = "ResponsibleArea";
|
||||
public const string StatusGroupName = "Status";
|
||||
public const string Delimiters = "Delimiters";
|
||||
@@ -1,9 +1,10 @@
|
||||
using PARR.DAL.Extensions;
|
||||
using PARR.Domain.Common.Template;
|
||||
using PARR.Domain.Common.Template;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
using System.Text.Unicode;
|
||||
|
||||
namespace PARR.DAL.Contracts
|
||||
namespace PARR.Domain.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// Настройки из БД
|
||||
@@ -62,7 +63,19 @@ namespace PARR.DAL.Contracts
|
||||
set
|
||||
{
|
||||
if (value != null)
|
||||
TemplateNameConstantParts = value.ToJson() ?? string.Empty;
|
||||
{
|
||||
//TemplateNameConstantParts = value.ToJson() ?? string.Empty;
|
||||
try
|
||||
{
|
||||
TemplateNameConstantParts = JsonSerializer.Serialize(value, new JsonSerializerOptions { Encoder = JavaScriptEncoder.Create(UnicodeRanges.All, UnicodeRanges.Cyrillic) });
|
||||
}
|
||||
catch
|
||||
{
|
||||
TemplateNameConstantParts = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Settings;
|
||||
using PARR.EsppApi;
|
||||
using PARR.EsppApi.Models;
|
||||
using PARR.EsppApi.Models.Query;
|
||||
|
||||
@@ -5,11 +5,11 @@ using PARR.BLL.Helpers;
|
||||
using PARR.Core.Common.Interfaces.RabbitServices;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Schedule;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
using PARR.Domain.Settings;
|
||||
using PARR.EsppScheduleSync.Domain;
|
||||
using PARR.EsppScheduleSync.Settings;
|
||||
using PARR.EsppSync;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Common.Interfaces.RabbitServices;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Settings;
|
||||
using PARR.EsppSync;
|
||||
using PARR.EsppTemplateSync.Domain;
|
||||
using PARR.EsppTemplateSync.Settings;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
|
||||
@@ -4,8 +4,8 @@ using PARR.Core.Common.Interfaces.RabbitServices;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
using PARR.Core.Services.MatchingStatusService;
|
||||
using PARR.Core.Services.UnitFilterService;
|
||||
using PARR.Domain.Cache.Models;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Entities;
|
||||
|
||||
@@ -5,16 +5,16 @@ using PARR.Core.Common.Interfaces.RabbitServices;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
using PARR.Core.Services.MatchingStatusService;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Core.Services.UnitFilterService;
|
||||
using PARR.Domain.Cache.Models;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Entities.Job;
|
||||
using PARR.Domain.Enums;
|
||||
using PARR.Domain.Settings;
|
||||
using PARR.TemplateMatcher.Services.Interfaces;
|
||||
using PARR.TemplateMatcher.Settings;
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
using PARR.Domain.Settings;
|
||||
using PARR.TemplateMatcher.Services.Interfaces;
|
||||
using PARR.TemplateMatcher.Settings;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.TemplateMatcher.Services.Interfaces;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Extensions;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces.Job;
|
||||
using PARR.Core.Repositories.Interfaces.Unit;
|
||||
using PARR.DAL.Extensions;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Domain.Common.Rabbit.Messages;
|
||||
using PARR.Domain.Entities;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.DAL.NextRunServices.Models;
|
||||
using PARR.Core.Services.NextRunServices;
|
||||
using PARR.Core.Services.NextRunServices.Models;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
|
||||
namespace PARR.Test.NextRun
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user