feat: Из dal перенесены все модели в Domain. Из dal переименованы service в repository, вынесены в Core.

This commit is contained in:
Mikhail Trubnikov
2026-04-30 10:35:31 +10:00
parent f1ea69da1f
commit eb78dfd6a8
356 changed files with 1817 additions and 1985 deletions

View File

@@ -12,7 +12,7 @@ namespace PARR.AIHITMainSyncer
{
public static void InstallAihitMainSyncerServices(this IServiceCollection services, IConfiguration configuration)
{
services.InstallDalServices(configuration);
services.AddDalServices(configuration);
services.AddCoreServices(configuration);
services.AddInfrastructureServices(configuration);

View File

@@ -3,9 +3,9 @@ using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Linq;
using PARR.AIHITMainSyncer.Settings;
using PARR.Core.Common.Interfaces;
using PARR.DAL.Models.Unit;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Common.Rabbit.Messages;
using PARR.Domain.Entities.Unit;
namespace PARR.AIHITMainSyncer.Services
{
@@ -13,17 +13,17 @@ namespace PARR.AIHITMainSyncer.Services
{
private readonly ILogger<SyncerService> logger;
private readonly ITransformService transformService;
private readonly IUnitService unitService;
private readonly IUnitFieldService unitFieldService;
private readonly IUnitFieldValueService unitFieldValueService;
private readonly IUnitRepository unitService;
private readonly IUnitFieldRepository unitFieldService;
private readonly IUnitFieldValueRepository unitFieldValueService;
private readonly FieldValueReplacementsSettings fieldValueReplacementsSettings;
public SyncerService(
ILogger<SyncerService> logger,
ITransformService transformService,
IUnitService unitService,
IUnitFieldService unitFieldService,
IUnitFieldValueService unitFieldValueService,
IUnitRepository unitService,
IUnitFieldRepository unitFieldService,
IUnitFieldValueRepository unitFieldValueService,
FieldValueReplacementsSettings fieldValueReplacementsSettings
)
{

View File

@@ -15,7 +15,7 @@ namespace PARR.AIHITRelationshipsSyncer
{
public static void InstallAihitRelationshpsSyncerServices(this IServiceCollection services, IConfiguration configuration)
{
services.InstallDalServices(configuration);
services.AddDalServices(configuration);
services.AddCoreServices(configuration);
services.AddInfrastructureServices(configuration);

View File

@@ -3,20 +3,20 @@ using Microsoft.Extensions.Logging;
using PARR.AIHITRelationshipsSyncer.Models;
using PARR.AIHITRelationshipsSyncer.Services.Interfaces;
using PARR.AIHITRelationshipsSyncer.Settings;
using PARR.DAL.Models.Unit;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Entities.Unit;
namespace PARR.AIHITRelationshipsSyncer.Services.Implementations
{
internal class RelationshipsSyncService : IRelationshipsSyncService
{
private readonly ILogger<RelationshipsSyncService> logger;
private readonly IUnitService unitService;
private readonly IUnitRepository unitService;
private readonly WorkerSettings workerSettings;
public RelationshipsSyncService(
ILogger<RelationshipsSyncService> logger,
IUnitService unitService,
IUnitRepository unitService,
WorkerSettings workerSettings
)
{

View File

@@ -11,11 +11,11 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -25,22 +25,22 @@ namespace PARR.API.Controllers.V1
public class AgentHistoryController : BaseApiController
{
private readonly IValidator<AgentHistoryRequest> validator;
private readonly IAgentHistoryService agentHistoryService;
private readonly IAgentHistoryRepository agentHistoryService;
private readonly IUriService uriService;
private readonly IMapper mapper;
private readonly ITemplateService templateService;
private readonly ITemplateRepository templateService;
private readonly IClientService clientService;
private readonly IUnitService unitService;
private readonly IUnitRepository unitService;
private readonly ILogger<AgentHistoryController> logger;
public AgentHistoryController(
IValidator<AgentHistoryRequest> validator,
IAgentHistoryService agentHistoryService,
IAgentHistoryRepository agentHistoryService,
IUriService uriService,
IMapper mapper,
ITemplateService templateService,
ITemplateRepository templateService,
IClientService clientService,
IUnitService unitService,
IUnitRepository unitService,
ILogger<AgentHistoryController> logger
)
{

View File

@@ -4,8 +4,8 @@ using PARR.API.Contracts.V1;
using PARR.API.Contracts.V1.Requests.Queries;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -17,15 +17,15 @@ namespace PARR.API.Controllers.V1
public class AgentTaskController : BaseApiController
{
private readonly IClientService clientService;
private readonly ITemplateService templateService;
private readonly IUnitService unitService;
private readonly ITemplateRepository templateService;
private readonly IUnitRepository unitService;
//private readonly IEsppScheduleTransformService esppScheduleTransformService;
private readonly ILogger<AgentTaskController> logger;
public AgentTaskController(
IClientService clientService,
ITemplateService templateService,
IUnitService unitService,
ITemplateRepository templateService,
IUnitRepository unitService,
//IEsppScheduleTransformService esppScheduleTransformService,
ILogger<AgentTaskController> logger
)

View File

@@ -6,7 +6,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.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -17,11 +17,11 @@ namespace PARR.API.Controllers.V1
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class DistributionPeriodController : BaseApiController
{
private readonly IDistributionPeriodService distributionPeriodService;
private readonly IDistributionPeriodRepository distributionPeriodService;
private readonly IMapper mapper;
public DistributionPeriodController(
IDistributionPeriodService distributionPeriodService,
IDistributionPeriodRepository distributionPeriodService,
IMapper mapper
)
{

View File

@@ -6,7 +6,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.Services.Interfaces;
using PARR.Core.Repositories.Interfaces.Schedule;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1
public class EsppScheduleTypeScheduleController : BaseApiController
{
private readonly IMapper mapper;
private readonly IEsppSchTypeScheduleService esppSchTypeScheduleService;
private readonly IEsppSchTypeScheduleRepository esppSchTypeScheduleService;
public EsppScheduleTypeScheduleController(
IMapper mapper,
IEsppSchTypeScheduleService esppSchTypeScheduleService
IEsppSchTypeScheduleRepository esppSchTypeScheduleService
)
{
this.mapper = mapper;

View File

@@ -1,16 +1,5 @@
using AutoMapper;
using FluentValidation;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1;
using PARR.API.Contracts.V1.Requests;
using PARR.API.Contracts.V1.Responses;
using PARR.API.Contracts.V1.Responses.Base;
using Microsoft.AspNetCore.Authorization;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1

View File

@@ -12,20 +12,19 @@ using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.API.Settings;
using PARR.BLL.Helpers;
using PARR.Core.Common.Helpers;
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.DAL.Extensions;
using PARR.DAL.Models.Job;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Rabbit.Messages;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Entities.Job;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1
@@ -39,29 +38,29 @@ namespace PARR.API.Controllers.V1
private readonly ILogger<JobController> logger;
private readonly IMapper mapper;
private readonly IUriService uriService;
private readonly IJobService jobService;
private readonly ITemplateService templateService;
private readonly IJobRepository jobService;
private readonly ITemplateRepository templateService;
private readonly IValidator<JobRequest> jobValidator;
private readonly IRabbitService mqService;
private readonly MqSettings mqSettings;
private readonly IClientService clientService;
private readonly IJobAutoControlService jobAutoControlService;
private readonly IJobAutoControlRepository jobAutoControlService;
private readonly IMatchingStatusService matchingStatusService;
public JobController(
ILogger<JobController> logger,
IMapper mapper,
IUriService uriService,
IJobService jobService,
ITemplateService templateService,
IJobGroupService jobGroupService,
IJobRepository jobService,
ITemplateRepository templateService,
IJobGroupRepository jobGroupService,
IValidator<JobRequest> jobValidator,
IUnitFilterService unitFilterService,
IUnitService unitService,
IUnitRepository unitService,
IRabbitService mqService,
MqSettings mqSettings,
IClientService clientService,
IJobAutoControlService jobAutoControlService,
IJobAutoControlRepository jobAutoControlService,
IMatchingStatusService matchingStatusService
)
{

View File

@@ -12,19 +12,17 @@ using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.API.Settings;
using PARR.BLL.Helpers;
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.DAL.Models;
using PARR.DAL.Models.Job;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Schedule;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Rabbit.Messages;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Entities.Job;
using PARR.Domain.Entities.Schedule;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1
@@ -38,13 +36,13 @@ namespace PARR.API.Controllers.V1
private readonly ILogger<JobController> logger;
private readonly IMapper mapper;
private readonly IUriService uriService;
private readonly IJobGroupService groupService;
private readonly IJobService jobService;
private readonly IEsppSchTypeConfigService esppConfigService;
private readonly IJobGroupRepository groupService;
private readonly IJobRepository jobService;
private readonly IEsppSchTypeConfigRepository esppConfigService;
private readonly IValidator<JobGroupRequest> validator;
private readonly IJobGroupTypeService jobGroupTypeService;
private readonly IJobGroupTypeRepository jobGroupTypeService;
private readonly IMatchingStatusService matchingStatusService;
private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService;
private readonly IRabbitService mqService;
private readonly MqSettings mqSettings;
@@ -52,13 +50,13 @@ namespace PARR.API.Controllers.V1
ILogger<JobController> logger,
IMapper mapper,
IUriService uriService,
IJobGroupService groupService,
IJobService jobService,
IEsppSchTypeConfigService esppConfigService,
IJobGroupRepository groupService,
IJobRepository jobService,
IEsppSchTypeConfigRepository esppConfigService,
IValidator<JobGroupRequest> validator,
IJobGroupTypeService jobGroupTypeService,
IJobGroupTypeRepository jobGroupTypeService,
IMatchingStatusService matchingStatusService,
IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService,
IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService,
IRabbitService mqService,
MqSettings mqSettings
)

View File

@@ -6,7 +6,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.Services.Interfaces.Job;
using PARR.Core.Repositories.Interfaces.Job;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -17,11 +17,11 @@ namespace PARR.API.Controllers.V1
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class JobGroupTypeController : BaseApiController
{
private readonly IJobGroupTypeService jobGroupTypeService;
private readonly IJobGroupTypeRepository jobGroupTypeService;
private readonly IMapper mapper;
public JobGroupTypeController(
IJobGroupTypeService jobGroupTypeService,
IJobGroupTypeRepository jobGroupTypeService,
IMapper mapper
)
{

View File

@@ -6,7 +6,7 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Settings;
using PARR.Core.Common.Interfaces.RabbitServices;
using PARR.DAL.Services.Interfaces.Job;
using PARR.Core.Repositories.Interfaces.Job;
using PARR.Domain.Common.Rabbit.Messages;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities.Base.History;
@@ -22,12 +22,12 @@ namespace PARR.API.Controllers.V1
{
private readonly IRabbitService mqService;
private readonly MqSettings mqSettings;
private readonly IJobGroupService jobGroupService;
private readonly IJobGroupRepository jobGroupService;
public JobGroupUpdateNextRunController(
IRabbitService mqService,
MqSettings mqSettings,
IJobGroupService jobGroupService
IJobGroupRepository jobGroupService
)
{
this.mqService = mqService;

View File

@@ -8,11 +8,11 @@ using PARR.API.Contracts.V1.Requests;
using PARR.API.Contracts.V1.Responses;
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.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Domain.Common.Roles;
using Job = PARR.DAL.Models.Job.Job;
using Job = PARR.Domain.Entities.Job.Job;
namespace PARR.API.Controllers.V1
{
@@ -25,16 +25,16 @@ namespace PARR.API.Controllers.V1
private readonly ILogger<JobUnitPreviewController> logger;
private readonly IUnitFilterService unitFilterService;
private readonly IValidator<JobRequest> jobValidator;
private readonly IUnitService unitService;
private readonly IJobGroupService jobGroupService;
private readonly IUnitRepository unitService;
private readonly IJobGroupRepository jobGroupService;
private readonly IMapper mapper;
public JobUnitPreviewController(
ILogger<JobUnitPreviewController> logger,
IUnitFilterService unitFilterService,
IValidator<JobRequest> jobValidator,
IUnitService unitService,
IJobGroupService jobGroupService,
IUnitRepository unitService,
IJobGroupRepository jobGroupService,
IMapper mapper
)
{

View File

@@ -6,7 +6,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.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1
public class KiiUnitController : BaseApiController
{
private readonly IMapper mapper;
private readonly IUnitKiiUnitService unitKiiUnitService;
private readonly IUnitKiiUnitRepository unitKiiUnitService;
public KiiUnitController(
IMapper mapper,
IUnitKiiUnitService unitKiiUnitService
IUnitKiiUnitRepository unitKiiUnitService
)
{
this.mapper = mapper;

View File

@@ -8,10 +8,10 @@ using PARR.API.Contracts.V1.Responses;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -22,11 +22,11 @@ namespace PARR.API.Controllers.V1
public class OrderController : BaseApiController
{
private readonly IMapper mapper;
private readonly IOrderService orderService;
private readonly IOrderRepository orderService;
public OrderController(
IMapper mapper,
IOrderService orderService
IOrderRepository orderService
)
{
this.mapper = mapper;

View File

@@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -26,14 +26,14 @@ namespace PARR.API.Controllers.V1
{
private readonly ILogger<ProcessController> logger;
private readonly IMapper mapper;
private readonly IProcessService processService;
private readonly IProcessRepository processService;
private readonly IValidator<ProcessRequest> validator;
private readonly IUriService uriService;
public ProcessController(
ILogger<ProcessController> logger,
IMapper mapper,
IProcessService processService,
IProcessRepository processService,
IValidator<ProcessRequest> validator,
IUriService uriService
)

View File

@@ -6,7 +6,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.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1
public class RegionalEkPtkGroupController : BaseApiController
{
private readonly IMapper mapper;
private readonly IUnitRegionalEkPtkGroupService unitRegionalEkPtkGroupService;
private readonly IUnitRegionalEkPtkGroupRepository unitRegionalEkPtkGroupService;
public RegionalEkPtkGroupController(
IMapper mapper,
IUnitRegionalEkPtkGroupService unitRegionalEkPtkGroupService
IUnitRegionalEkPtkGroupRepository unitRegionalEkPtkGroupService
)
{
this.mapper = mapper;

View File

@@ -6,7 +6,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.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -15,11 +15,11 @@ namespace PARR.API.Controllers.V1
public class RobotController : BaseApiController
{
private readonly IMapper mapper;
private readonly IRobotService robotService;
private readonly IRobotRepository robotService;
public RobotController(
IMapper mapper,
IRobotService robotService
IRobotRepository robotService
)
{
this.mapper = mapper;

View File

@@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -25,19 +25,19 @@ namespace PARR.API.Controllers.V1
private readonly IMapper mapper;
private readonly IUriService uriService;
private readonly IRobotHistoryService robotHistoryService;
private readonly IRobotConfigurationService robotConfigurationService;
private readonly IRobotHistoryRepository robotHistoryService;
private readonly IRobotConfigurationRepository robotConfigurationService;
private readonly IClientService clientService;
private readonly IUserService userService;
private readonly IUserRepository userService;
public RobotHistoryController(
IValidator<RobotHistoryRequest> validator,
IMapper mapper,
IUriService uriService,
IRobotHistoryService robotHistoryService,
IRobotConfigurationService robotConfigurationService,
IRobotHistoryRepository robotHistoryService,
IRobotConfigurationRepository robotConfigurationService,
IClientService clientService,
IUserService userService
IUserRepository userService
)
{
this.validator = validator;

View File

@@ -6,7 +6,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.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -15,11 +15,11 @@ namespace PARR.API.Controllers.V1
public class RobotHistoryLevelController : BaseApiController
{
private readonly IMapper mapper;
private readonly IRobotHistoryLevelService robotHistoryLevelService;
private readonly IRobotHistoryLevelRepository robotHistoryLevelService;
public RobotHistoryLevelController(
IMapper mapper,
IRobotHistoryLevelService robotHistoryLevelService
IRobotHistoryLevelRepository robotHistoryLevelService
)
{
this.mapper = mapper;

View File

@@ -9,12 +9,12 @@ using PARR.API.Contracts.V1.Responses.Base;
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.Models;
using PARR.DAL.NextRunServices;
using PARR.DAL.Services.Interfaces;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
@@ -25,11 +25,11 @@ namespace PARR.API.Controllers.V1
{
private readonly IMapper mapper;
private readonly SettingsFromDb settingsFromDb;
private readonly IRobotConfigurationService robotConfigurationService;
private readonly IRobotConfigurationRepository robotConfigurationService;
//private readonly IEsppScheduleTransformService esppScheduleTransformService;
private readonly ILogger<RobotTaskController> logger;
private readonly IClientService clientService;
private readonly IRobotHistoryService robotHistoryService;
private readonly IRobotHistoryRepository robotHistoryService;
private readonly IShortcodesService shortcodesService;
private readonly INextRunService nextRunService;
//private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
@@ -37,11 +37,11 @@ namespace PARR.API.Controllers.V1
public RobotTaskController(
IMapper mapper,
SettingsFromDb settingsFromDb,
IRobotConfigurationService robotConfigurationService,
IRobotConfigurationRepository robotConfigurationService,
//IEsppScheduleTransformService esppScheduleTransformService,
ILogger<RobotTaskController> logger,
IClientService clientService,
IRobotHistoryService robotHistoryService,
IRobotHistoryRepository robotHistoryService,
IShortcodesService shortcodesService,
INextRunService nextRunService
//IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService

View File

@@ -8,10 +8,9 @@ using PARR.API.Contracts.V1.Responses;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1
@@ -19,14 +18,14 @@ namespace PARR.API.Controllers.V1
[Authorize(Roles = ParrRoles.EsppRobot.RoleOrAdmin)]
public class RobotTaskRobotStatusController : BaseApiController
{
private readonly IRobotConfigurationService robotConfigurationService;
private readonly IRobotHistoryService robotHistoryService;
private readonly IRobotConfigurationRepository robotConfigurationService;
private readonly IRobotHistoryRepository robotHistoryService;
private readonly IMapper mapper;
private readonly IClientService clientService;
public RobotTaskRobotStatusController(
IRobotConfigurationService robotConfigurationService,
IRobotHistoryService robotHistoryService,
IRobotConfigurationRepository robotConfigurationService,
IRobotHistoryRepository robotHistoryService,
IMapper mapper,
IClientService clientService
)

View File

@@ -6,7 +6,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.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -14,11 +14,11 @@ namespace PARR.API.Controllers.V1
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class RoleController : BaseApiController
{
private readonly IRoleService roleService;
private readonly IRoleRepository roleService;
private readonly IMapper mapper;
public RoleController(
IRoleService roleService,
IRoleRepository roleService,
IMapper mapper
)
{

View File

@@ -6,7 +6,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.Services.Interfaces.Schedule;
using PARR.Core.Repositories.Interfaces.Schedule;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1
public class ScheduleExcludeTypeCalendarController : BaseApiController
{
private readonly IMapper mapper;
private readonly IScheduleExcludeTypeCalendarService scheduleExcludeTypeCalendarService;
private readonly IScheduleExcludeTypeCalendarRepository scheduleExcludeTypeCalendarService;
public ScheduleExcludeTypeCalendarController(
IMapper mapper,
IScheduleExcludeTypeCalendarService scheduleExcludeTypeCalendarService
IScheduleExcludeTypeCalendarRepository scheduleExcludeTypeCalendarService
)
{
this.mapper = mapper;

View File

@@ -6,7 +6,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.Services.Interfaces.Schedule;
using PARR.Core.Repositories.Interfaces.Schedule;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1
public class ScheduleExcludeTypeController : BaseApiController
{
private readonly IMapper mapper;
private readonly IScheduleExcludeTypeService scheduleExcludeTypeService;
private readonly IScheduleExcludeTypeRepository scheduleExcludeTypeService;
public ScheduleExcludeTypeController(
IMapper mapper,
IScheduleExcludeTypeService scheduleExcludeTypeService
IScheduleExcludeTypeRepository scheduleExcludeTypeService
)
{
this.mapper = mapper;

View File

@@ -5,8 +5,8 @@ using PARR.API.Contracts.V1.Requests;
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.DAL.Services.Interfaces;
namespace PARR.API.Controllers.V1
{
@@ -14,12 +14,12 @@ namespace PARR.API.Controllers.V1
{
private readonly ILogger<ShortcodeController> logger;
private readonly IShortcodesService shortcodesService;
private readonly ITemplateService templateService;
private readonly ITemplateRepository templateService;
public ShortcodeApplyController(
ILogger<ShortcodeController> logger,
IShortcodesService shortcodesService,
ITemplateService templateService
ITemplateRepository templateService
)
{
this.logger = logger;

View File

@@ -9,8 +9,8 @@ using PARR.API.Contracts.V1.Responses.Base;
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.DAL.Services.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1.Statistics
@@ -21,14 +21,14 @@ namespace PARR.API.Controllers.V1.Statistics
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class StatOrderController : BaseApiController
{
private readonly IOrderService orderService;
private readonly IOrderStatusService orderStatusService;
private readonly IOrderRepository orderService;
private readonly IOrderStatusRepository orderStatusService;
private readonly IMapper mapper;
private readonly INextRunService nextRunService;
public StatOrderController(
IOrderService orderService,
IOrderStatusService orderStatusService,
IOrderRepository orderService,
IOrderStatusRepository orderStatusService,
IMapper mapper,
INextRunService nextRunService
)

View File

@@ -10,7 +10,7 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Contracts.V1.Responses.Statistics;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1.Statistics
@@ -21,13 +21,13 @@ namespace PARR.API.Controllers.V1.Statistics
[Authorize(Roles = ParrRoles.EsppRobot.RoleOrAdmin)]
public class StatResponseAreaWorkLoadController : BaseApiController
{
private readonly ITemplateService templateService;
private readonly ITemplateRepository templateService;
//private readonly IResponseAreaService responseAreaService;
private readonly IMapper mapper;
private readonly IWorkLoadService workLoadService;
public StatResponseAreaWorkLoadController(
ITemplateService templateService,
ITemplateRepository templateService,
//IResponseAreaService responseAreaService,
IMapper mapper,
IWorkLoadService workLoadService

View File

@@ -10,9 +10,9 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Contracts.V1.Responses.Statistics;
using PARR.API.Controllers.V1.Base;
using PARR.API.Helpers;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1.Statistics
{
@@ -22,13 +22,13 @@ namespace PARR.API.Controllers.V1.Statistics
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class StatRobotHistoryController : BaseApiController
{
private readonly IRobotHistoryService robotHistoryService;
private readonly IRobotHistoryLevelService robotHistoryLevelService;
private readonly IRobotHistoryRepository robotHistoryService;
private readonly IRobotHistoryLevelRepository robotHistoryLevelService;
private readonly IMapper mapper;
public StatRobotHistoryController(
IRobotHistoryService robotHistoryService,
IRobotHistoryLevelService robotHistoryLevelService,
IRobotHistoryRepository robotHistoryService,
IRobotHistoryLevelRepository robotHistoryLevelService,
IMapper mapper
)
{

View File

@@ -15,7 +15,7 @@ using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.API.Settings;
using PARR.Core.Common.Interfaces;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
using PARR.Domain.Enums;
using PARR.Domain.Settings;
@@ -33,7 +33,7 @@ namespace PARR.API.Controllers.V1.Statistics
private readonly InfluxDbSettings influxDbSettings;
private readonly MonitoringSettings monitoringSettings;
private readonly IClientService clientService;
private readonly IUserService userService;
private readonly IUserRepository userService;
private readonly IMapper mapper;
public StatRobotStateController(
@@ -42,7 +42,7 @@ namespace PARR.API.Controllers.V1.Statistics
InfluxDbSettings influxDbSettings,
MonitoringSettings monitoringSettings,
IClientService clientService,
IUserService userService,
IUserRepository userService,
IMapper mapper
)
{

View File

@@ -7,7 +7,7 @@ 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.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1.Statistics
@@ -18,15 +18,15 @@ namespace PARR.API.Controllers.V1.Statistics
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class StatRobotStatusController : BaseApiController
{
private readonly IRobotService robotService;
private readonly IRobotConfigurationService robotConfigurationService;
private readonly IRobotStatusService robotStatusService;
private readonly IRobotRepository robotService;
private readonly IRobotConfigurationRepository robotConfigurationService;
private readonly IRobotStatusRepository robotStatusService;
private readonly IMapper mapper;
public StatRobotStatusController(
IRobotService robotService,
IRobotConfigurationService robotConfigurationService,
IRobotStatusService robotStatusService,
IRobotRepository robotService,
IRobotConfigurationRepository robotConfigurationService,
IRobotStatusRepository robotStatusService,
IMapper mapper
)
{

View File

@@ -8,8 +8,8 @@ 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.DAL.Services.Interfaces;
using PARR.Domain.Common.Roles;
using PARR.Domain.Enums;
@@ -21,17 +21,17 @@ namespace PARR.API.Controllers.V1.Statistics
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class StatRobotTaskController : BaseApiController
{
private readonly IRobotService robotService;
private readonly IRobotConfigurationService robotConfigurationService;
private readonly ITaskStatusService taskStatusService;
private readonly IRobotHistoryService robotHistoryService;
private readonly IRobotRepository robotService;
private readonly IRobotConfigurationRepository robotConfigurationService;
private readonly ITaskStatusRepository taskStatusService;
private readonly IRobotHistoryRepository robotHistoryService;
private readonly IMapper mapper;
public StatRobotTaskController(
IRobotService robotService,
IRobotConfigurationService robotConfigurationService,
ITaskStatusService taskStatusService,
IRobotHistoryService robotHistoryService,
IRobotRepository robotService,
IRobotConfigurationRepository robotConfigurationService,
ITaskStatusRepository taskStatusService,
IRobotHistoryRepository robotHistoryService,
IMapper mapper
)
{

View File

@@ -7,7 +7,7 @@ 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.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1.Statistics
@@ -18,13 +18,13 @@ namespace PARR.API.Controllers.V1.Statistics
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class StatStatusTypeTemplates : BaseApiController
{
private readonly ITemplateService templateService;
private readonly ITemplateStatusTypeService templateStatusTypeService;
private readonly ITemplateRepository templateService;
private readonly ITemplateStatusTypeRepository templateStatusTypeService;
private readonly IMapper mapper;
public StatStatusTypeTemplates(
ITemplateService templateService,
ITemplateStatusTypeService templateStatusTypeService,
ITemplateRepository templateService,
ITemplateStatusTypeRepository templateStatusTypeService,
IMapper mapper
)
{

View File

@@ -6,21 +6,21 @@ using PARR.API.Contracts.V1.Responses.Base;
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.DAL.Services.Interfaces;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1.Statistics
{
public class StatTemplateAutoControlController : BaseApiController
{
private readonly ITemplateService templateService;
private readonly ITemplateHistoryService templateHistoryService;
private readonly ITemplateRepository templateService;
private readonly ITemplateHistoryRepository templateHistoryService;
private readonly INextRunService nextRunService;
public StatTemplateAutoControlController(
ITemplateService templateService,
ITemplateHistoryService templateHistoryService,
ITemplateRepository templateService,
ITemplateHistoryRepository templateHistoryService,
INextRunService nextRunService
)
{

View File

@@ -7,9 +7,9 @@ using PARR.API.Contracts.V1.Responses.Base;
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.DAL.Services.Interfaces;
using PARR.Domain.Common.Roles;
using PARR.Domain.Enums;
@@ -21,11 +21,11 @@ namespace PARR.API.Controllers.V1.Statistics
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class StatTemplateController : BaseApiController
{
private readonly ITemplateService templateService;
private readonly ITemplateRepository templateService;
private readonly INextRunService nextRunService;
public StatTemplateController(
ITemplateService templateService,
ITemplateRepository templateService,
INextRunService nextRunService
)
{

View File

@@ -8,14 +8,14 @@ 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.Core.Repositories.Interfaces.Job;
using PARR.Core.Repositories.Interfaces.Schedule;
using PARR.DAL.DomainServices.Shortcodes;
using PARR.DAL.Models;
using PARR.DAL.Models.Job;
using PARR.DAL.NextRunServices;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Schedule;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
using PARR.Domain.Entities.Job;
using PARR.Domain.Enums;
namespace PARR.API.Controllers.V1.Statistics
@@ -26,22 +26,22 @@ namespace PARR.API.Controllers.V1.Statistics
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class StatTemplateDistributionController : BaseApiController
{
private readonly ITemplateService templateService;
private readonly IJobGroupService jobGroupService;
private readonly ITemplateRepository templateService;
private readonly IJobGroupRepository jobGroupService;
private readonly IMapper mapper;
private readonly IShortcodesService shortcodesService;
private readonly INextRunService nextRunService;
private readonly ILogger<StatTemplateDistributionController> logger;
private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService;
public StatTemplateDistributionController(
ITemplateService templateService,
IJobGroupService jobGroupService,
ITemplateRepository templateService,
IJobGroupRepository jobGroupService,
IMapper mapper,
IShortcodesService shortcodesService,
INextRunService nextRunService,
ILogger<StatTemplateDistributionController> logger,
IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService
IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService
)
{
this.templateService = templateService;

View File

@@ -7,8 +7,8 @@ using PARR.API.Contracts.V1.Responses.Base;
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.DAL.Services.Interfaces.Unit;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1.Statistics
@@ -19,11 +19,11 @@ namespace PARR.API.Controllers.V1.Statistics
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class StatUnitController : BaseApiController
{
private readonly IUnitService unitService;
private readonly IUnitRepository unitService;
private readonly INextRunService nextRunService;
public StatUnitController(
IUnitService unitService,
IUnitRepository unitService,
INextRunService nextRunService
)
{

View File

@@ -6,9 +6,8 @@ using PARR.API.Contracts.V1.Requests.BaseRequests;
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.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1.Statistics
@@ -20,14 +19,14 @@ namespace PARR.API.Controllers.V1.Statistics
public class StatUnitFieldValuesController : BaseApiController
{
//private readonly IApplicationService applicationService;
private readonly IUnitFieldValueService unitFieldValueService;
private readonly IUnitFieldValueRepository unitFieldValueService;
private readonly INextRunService nextRunService;
//private readonly ICalendarService calendarService;
public StatUnitFieldValuesController(
//IApplicationService applicationService,
IUnitFieldValueService unitFieldValueService,
IUnitFieldValueRepository unitFieldValueService,
//ICalendarService calendarService
INextRunService nextRunService
)

View File

@@ -9,7 +9,7 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Contracts.V1.Responses.Statistics;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
namespace PARR.API.Controllers.V1.Statistics
{
@@ -18,14 +18,14 @@ namespace PARR.API.Controllers.V1.Statistics
/// </summary>
public class StatWorkGroupWorkLoadController : BaseApiController
{
private readonly ITemplateService templateService;
private readonly ITemplateRepository templateService;
private readonly IWorkLoadService workLoadService;
//private readonly IWorkGroupService workGroupService;
private readonly IMapper mapper;
private readonly ILogger<StatWorkGroupWorkLoadController> logger;
public StatWorkGroupWorkLoadController(
ITemplateService templateService,
ITemplateRepository templateService,
IWorkLoadService workLoadService,
//IWorkGroupService workGroupService,
IMapper mapper,

View File

@@ -1,16 +1,7 @@
using AutoMapper;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1;
using PARR.API.Contracts.V1.Requests;
using PARR.API.Contracts.V1.Requests.Queries;
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.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
namespace PARR.API.Controllers.V1.Statistics
{
@@ -19,14 +10,14 @@ namespace PARR.API.Controllers.V1.Statistics
/// </summary>
public class StatWorkWorkLoadController : BaseApiController
{
private readonly ITemplateService templateService;
private readonly ITemplateRepository templateService;
private readonly IWorkLoadService workLoadService;
private readonly IMapper mapper;
private readonly ILogger<StatWorkWorkLoadController> logger;
//private readonly IWorkGroupService workGroupService;
public StatWorkWorkLoadController(
ITemplateService templateService,
ITemplateRepository templateService,
IWorkLoadService workLoadService,
IMapper mapper,
ILogger<StatWorkWorkLoadController> logger

View File

@@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -26,14 +26,14 @@ namespace PARR.API.Controllers.V1
{
private readonly ILogger<SubprocessController> logger;
private readonly IMapper mapper;
private readonly ISubprocessService subprocessService;
private readonly ISubprocessRepository subprocessService;
private readonly IValidator<SubprocessRequest> validator;
private readonly IUriService uriService;
public SubprocessController(
ILogger<SubprocessController> logger,
IMapper mapper,
ISubprocessService subprocessService,
ISubprocessRepository subprocessService,
IValidator<SubprocessRequest> validator,
IUriService uriService
)

View File

@@ -6,7 +6,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.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -15,11 +15,11 @@ namespace PARR.API.Controllers.V1
public class TaskStatusController : BaseApiController
{
private readonly IMapper mapper;
private readonly IStatusTemplateService statusTemplateService;
private readonly IStatusTemplateRepository statusTemplateService;
public TaskStatusController(
IMapper mapper,
IStatusTemplateService statusTemplateService
IStatusTemplateRepository statusTemplateService
)
{
this.mapper = mapper;

View File

@@ -8,7 +8,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.Services.Interfaces.Job;
using PARR.Core.Repositories.Interfaces.Job;
using PARR.Domain.Common.Rabbit.Messages;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities.Base.History;
@@ -26,7 +26,7 @@ namespace PARR.API.Controllers.V1
private readonly IRabbitService mqService;
private readonly IUriService uriService;
private readonly MqSettings mqSettings;
private readonly IJobService jobService;
private readonly IJobRepository jobService;
private readonly IClientService clientService;
public TemplateActivatorController(
@@ -34,7 +34,7 @@ namespace PARR.API.Controllers.V1
IRabbitService mqService,
IUriService uriService,
MqSettings mqSettings,
IJobService jobService,
IJobRepository jobService,
IClientService clientService
)
{

View File

@@ -12,13 +12,13 @@ using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
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.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Schedule;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Enums;
@@ -31,25 +31,25 @@ namespace PARR.API.Controllers.V1
public class TemplateController : BaseApiController
{
private readonly IMapper mapper;
private readonly ITemplateService templateService;
private readonly IRobotConfigurationService robotConfigurationService;
private readonly ITemplateRepository templateService;
private readonly IRobotConfigurationRepository robotConfigurationService;
private readonly IClientService clientService;
private readonly ILogger<TemplateController> logger;
private readonly IShortcodesService shortcodesService;
private readonly IOrderService orderService;
private readonly IOrderRepository orderService;
private readonly SettingsFromDb settingsFromDb;
private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService;
public TemplateController(
IMapper mapper,
ITemplateService templateService,
IRobotConfigurationService robotConfigurationService,
ITemplateRepository templateService,
IRobotConfigurationRepository robotConfigurationService,
IClientService clientService,
ILogger<TemplateController> logger,
IShortcodesService shortcodesService,
IOrderService orderService,
IOrderRepository orderService,
SettingsFromDb settingsFromDb,
IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService
IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService
)
{
this.mapper = mapper;

View File

@@ -8,10 +8,10 @@ using PARR.API.Contracts.V1.Responses;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -22,11 +22,11 @@ namespace PARR.API.Controllers.V1
public class TemplateHistoryController : BaseApiController
{
private readonly IMapper mapper;
private readonly ITemplateHistoryService templateHistoryService;
private readonly ITemplateHistoryRepository templateHistoryService;
public TemplateHistoryController(
IMapper mapper,
ITemplateHistoryService templateHistoryService
ITemplateHistoryRepository templateHistoryService
)
{
this.mapper = mapper;

View File

@@ -8,7 +8,7 @@ using PARR.API.Contracts.V1.Responses;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -19,13 +19,13 @@ namespace PARR.API.Controllers.V1
[Authorize(Roles = ParrRoles.EsppRobot.RoleOrAdmin)]
public class TemplateScheduleEspp : BaseApiController
{
private readonly ITemplateService templateService;
private readonly ITemplateRepository templateService;
private readonly IMapper mapper;
private readonly IValidator<TemplateScheduleEsppIdRequest> validator;
private readonly IUriService uriService;
public TemplateScheduleEspp(
ITemplateService templateService,
ITemplateRepository templateService,
IMapper mapper,
IValidator<TemplateScheduleEsppIdRequest> validator,
IUriService uriService

View File

@@ -6,7 +6,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.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -18,11 +18,11 @@ namespace PARR.API.Controllers.V1
public class TemplateStatusTypeController : BaseApiController
{
private readonly IMapper mapper;
private readonly ITemplateStatusTypeService templateStatusTypeService;
private readonly ITemplateStatusTypeRepository templateStatusTypeService;
public TemplateStatusTypeController(
IMapper mapper,
ITemplateStatusTypeService templateStatusTypeService
ITemplateStatusTypeRepository templateStatusTypeService
)
{
this.mapper = mapper;

View File

@@ -6,8 +6,8 @@ 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.Core.Repositories.Interfaces;
using PARR.DAL.Contracts;
using PARR.DAL.Services.Interfaces;
using PARR.Domain.Common.Roles;
using PARR.Domain.Enums;
@@ -20,14 +20,14 @@ namespace PARR.API.Controllers.V1
public class TemplateSyncStateController : BaseApiController
{
private readonly IMapper mapper;
private readonly ITemplateService templateService;
private readonly IRobotConfigurationService robotConfigurationService;
private readonly ITemplateRepository templateService;
private readonly IRobotConfigurationRepository robotConfigurationService;
private readonly ILogger<TemplateController> logger;
public TemplateSyncStateController(
IMapper mapper,
ITemplateService templateService,
IRobotConfigurationService robotConfigurationService,
ITemplateRepository templateService,
IRobotConfigurationRepository robotConfigurationService,
ILogger<TemplateController> logger
)
{

View File

@@ -6,8 +6,8 @@ using PARR.API.Controllers.V1.Base;
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.DAL.Services.Interfaces;
namespace PARR.API.Controllers.V1
@@ -18,13 +18,13 @@ namespace PARR.API.Controllers.V1
private readonly IClientService clientService;
private readonly IRedisCacheService redisCacheService;
private readonly INextRunService nextRunService;
private readonly ITemplateService templateService;
private readonly ITemplateRepository templateService;
public TestController(
IClientService clientService,
IRedisCacheService redisCacheService,
INextRunService nextRunService,
ITemplateService templateService,
ITemplateRepository templateService,
MqSettings mqSettings
)
{

View File

@@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -26,14 +26,14 @@ namespace PARR.API.Controllers.V1
{
private readonly ILogger<TnkController> logger;
private readonly IMapper mapper;
private readonly ITnkService tnkService;
private readonly ITnkRepository tnkService;
private readonly IValidator<TnkRequest> validator;
private readonly IUriService uriService;
public TnkController(
ILogger<TnkController> logger,
IMapper mapper,
ITnkService tnkService,
ITnkRepository tnkService,
IValidator<TnkRequest> validator,
IUriService uriService
)

View File

@@ -8,12 +8,11 @@ using PARR.API.Contracts.V1.Responses;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.BLL.Helpers;
using PARR.Core.Common.Helpers;
using PARR.DAL.Models.Unit;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities.Unit;
namespace PARR.API.Controllers.V1
{
@@ -21,11 +20,11 @@ namespace PARR.API.Controllers.V1
public class UnitController : BaseApiController
{
private readonly IMapper mapper;
private readonly IUnitService unitService;
private readonly IUnitRepository unitService;
public UnitController(
IMapper mapper,
IUnitService unitService
IUnitRepository unitService
)
{
this.mapper = mapper;

View File

@@ -6,7 +6,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.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Common.Roles;
namespace PARR.API.Controllers.V1
@@ -17,11 +17,11 @@ namespace PARR.API.Controllers.V1
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class UnitFieldController : BaseApiController
{
private readonly IUnitFieldService unitFieldService;
private readonly IUnitFieldRepository unitFieldService;
private readonly IMapper mapper;
public UnitFieldController(
IUnitFieldService unitFieldService,
IUnitFieldRepository unitFieldService,
IMapper mapper
)
{

View File

@@ -8,12 +8,11 @@ using PARR.API.Contracts.V1.Responses;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.BLL.Helpers;
using PARR.Core.Common.Helpers;
using PARR.DAL.Models.Unit;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities.Unit;
namespace PARR.API.Controllers.V1
{
@@ -24,13 +23,13 @@ namespace PARR.API.Controllers.V1
public class UnitFieldValueController : BaseApiController
{
private readonly IMapper mapper;
private readonly IUnitFieldValueService unitFieldValueService;
private readonly IUnitInValueService unitInValueService;
private readonly IUnitFieldValueRepository unitFieldValueService;
private readonly IUnitInValueRepository unitInValueService;
public UnitFieldValueController(
IMapper mapper,
IUnitFieldValueService unitFieldValueService,
IUnitInValueService unitInValueService
IUnitFieldValueRepository unitFieldValueService,
IUnitInValueRepository unitInValueService
)
{
this.mapper = mapper;

View File

@@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -25,14 +25,14 @@ namespace PARR.API.Controllers.V1
public class UserController : BaseApiController
{
private readonly IMapper mapper;
private readonly IUserService userService;
private readonly IUserRepository userService;
private readonly IValidator<UserRequest> validator;
private readonly IUriService uriService;
private readonly ILogger<UserController> logger;
public UserController(
IMapper mapper,
IUserService userService,
IUserRepository userService,
IValidator<UserRequest> validator,
IUriService uriService,
ILogger<UserController> logger

View File

@@ -8,9 +8,9 @@ using PARR.API.Contracts.V1.Responses;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -20,18 +20,18 @@ namespace PARR.API.Controllers.V1
[Authorize(Roles = ParrRoles.Administrator.Role)]
public class UserRoleController : BaseApiController
{
private readonly IUserService userService;
private readonly IUserRepository userService;
private readonly IMapper mapper;
private readonly ILogger<UserRoleController> logger;
private readonly IRoleService roleService;
private readonly IRoleRepository roleService;
private readonly IAuthService authService;
private readonly IUriService uriService;
public UserRoleController(
IUserService userService,
IUserRepository userService,
IMapper mapper,
ILogger<UserRoleController> logger,
IRoleService roleService,
IRoleRepository roleService,
IAuthService authService,
IUriService uriService
)

View File

@@ -11,10 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Common.Roles;
using PARR.Domain.Entities;
namespace PARR.API.Controllers.V1
{
@@ -25,13 +25,13 @@ namespace PARR.API.Controllers.V1
public class WeekendController : BaseApiController
{
private readonly IMapper mapper;
private readonly IWeekendDayService weekendDayService;
private readonly IWeekendDayRepository weekendDayService;
private readonly IUriService uriService;
private readonly IValidator<WeekendRequest> validator;
public WeekendController(
IMapper mapper,
IWeekendDayService weekendDayService,
IWeekendDayRepository weekendDayService,
IUriService uriService,
IValidator<WeekendRequest> validator
)

View File

@@ -2,12 +2,13 @@
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.DAL.Models;
using PARR.DAL.Models.Job;
using PARR.DAL.Models.Schedule;
using PARR.DAL.Models.Unit;
using PARR.Domain.Entities;
using PARR.Domain.Entities.Base.History;
using PARR.Domain.Entities.Job;
using PARR.Domain.Entities.Schedule;
using PARR.Domain.Entities.Unit;
namespace PARR.API.MappingProfiles
{
@@ -69,7 +70,7 @@ namespace PARR.API.MappingProfiles
.ForMember(d => d.Script, o => o.MapFrom(s => s.AgentScript))
.ForMember(d => d.TimeOutSec, o => o.MapFrom(s => s.AgentTimeOutSec));
CreateMap<DAL.Models.TaskStatus, TaskStatusResponse>();
CreateMap<PARR.Domain.Entities.TaskStatus, TaskStatusResponse>();
#region ScheduleResponseAreaTimeOffsetResponse
@@ -236,7 +237,7 @@ namespace PARR.API.MappingProfiles
CreateMap<Robot, RobotResponse>();
CreateMap<DAL.Models.TaskStatus, TaskStatusResponse>();
CreateMap<PARR.Domain.Entities.TaskStatus, TaskStatusResponse>();
CreateMap<RobotConfiguration, RobotConfigurationResponse>()
.ForMember(d => d.Robot, o => o.MapFrom(s => s.Robot))

View File

@@ -1,8 +1,8 @@
using AutoMapper;
using PARR.API.Contracts.V1.Requests;
using PARR.API.Contracts.V1.Requests.Queries;
using PARR.DAL.Models.Job;
using PARR.Domain.Common.Pagination;
using PARR.Domain.Entities.Job;
namespace PARR.API.MappingProfiles
{

View File

@@ -1,16 +1,16 @@
using AutoMapper;
using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Entities.Base.History;
namespace PARR.API.MappingProfiles.Resolvers
{
public class HistoryInitiatorParrComponentResolver : IValueResolver<IHistoryInitiator, HistoryInitiatorResponse, ParrComponentResponse?>
{
private readonly IParrComponentService parrComponentService;
private readonly IParrComponentRepository parrComponentService;
public HistoryInitiatorParrComponentResolver(IParrComponentService parrComponentService)
public HistoryInitiatorParrComponentResolver(IParrComponentRepository parrComponentService)
{
this.parrComponentService = parrComponentService;
}

View File

@@ -1,16 +1,16 @@
using AutoMapper;
using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
using PARR.Domain.Entities.Base.History;
namespace PARR.API.MappingProfiles.Resolvers
{
public class HistoryInitiatorUserResolver : IValueResolver<IHistoryInitiator, HistoryInitiatorResponse, UserBaseResponse?>
{
private readonly IUserService userService;
private readonly IUserRepository userService;
public HistoryInitiatorUserResolver(IUserService userService)
public HistoryInitiatorUserResolver(IUserRepository userService)
{
this.userService = userService;
}

View File

@@ -1,26 +1,25 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.Core.Repositories.Interfaces.Schedule;
using PARR.DAL.Contracts;
using PARR.DAL.Models.Job;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Schedule;
using PARR.Domain.Entities.Job;
namespace PARR.API.MappingProfiles.Resolvers
{
public class JobGroupScheduleResolver : IValueResolver<JobGroup, JobGroupResponse, JobGroupScheduleResponse?>
{
private readonly IEsppSchTypeConfigService esppConfigService;
private readonly IEsppSchTypeConfigRepository esppConfigService;
private readonly ILogger<JobGroupScheduleResolver> logger;
private readonly IMapper mapper;
private readonly SettingsFromDb settingsFromDb;
private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService;
public JobGroupScheduleResolver(
IEsppSchTypeConfigService esppConfigService,
IEsppSchTypeConfigRepository esppConfigService,
ILogger<JobGroupScheduleResolver> logger,
IMapper mapper,
SettingsFromDb settingsFromDb,
IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService
IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService
)
{
this.esppConfigService = esppConfigService;

View File

@@ -1,9 +1,4 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
namespace PARR.API.MappingProfiles.Resolvers
namespace PARR.API.MappingProfiles.Resolvers
{
//public class RobotTaskScheduleExcludeCalendarResolver : IValueResolver<RobotConfiguration, RobotTaskScheduleResponse, string?>
//{

View File

@@ -1,9 +1,4 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
namespace PARR.API.MappingProfiles.Resolvers
namespace PARR.API.MappingProfiles.Resolvers
{
//public class RobotTaskScheduleExcludeResolver : IValueResolver<RobotConfiguration, RobotTaskScheduleResponse, string>
//{

View File

@@ -1,11 +1,4 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.BLL.Helpers;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
namespace PARR.API.MappingProfiles.Resolvers
namespace PARR.API.MappingProfiles.Resolvers
{
//public class RobotTaskScheduleGenerationTimeResolver : IValueResolver<RobotConfiguration, RobotTaskScheduleResponse, string>
//{

View File

@@ -1,11 +1,4 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.BLL.Helpers;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces.Schedule;
namespace PARR.API.MappingProfiles.Resolvers
namespace PARR.API.MappingProfiles.Resolvers
{
//public class RobotTaskScheduleNextStartResolver : IValueResolver<RobotConfiguration, RobotTaskScheduleResponse, string>
//{

View File

@@ -1,7 +1,7 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.Domain.Entities;
namespace PARR.API.MappingProfiles.Resolvers
{

View File

@@ -1,18 +1,18 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces.Schedule;
using PARR.Domain.Entities;
namespace PARR.API.MappingProfiles.Resolvers
{
public class RobotTaskScheduleSchResolver : IValueResolver<RobotConfiguration, RobotTaskScheduleResponse, List<RobotTaskScheduleSchResponse>?>
{
private readonly IEsppSchTypeConfigService esppConfigService;
private readonly IEsppSchTypeConfigRepository esppConfigService;
private readonly ILogger<RobotTaskScheduleSchResolver> logger;
public RobotTaskScheduleSchResolver(
IEsppSchTypeConfigService esppConfigService,
IEsppSchTypeConfigRepository esppConfigService,
ILogger<RobotTaskScheduleSchResolver> logger
)
{

View File

@@ -1,9 +1,4 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
namespace PARR.API.MappingProfiles.Resolvers
namespace PARR.API.MappingProfiles.Resolvers
{
//public class RobotTaskScheduleTimezoneResolver : IValueResolver<RobotConfiguration, RobotTaskScheduleResponse, string>
//{

View File

@@ -1,7 +1,7 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.Domain.Entities;
namespace PARR.API.MappingProfiles.Resolvers
{

View File

@@ -1,7 +1,7 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.Domain.Entities;
namespace PARR.API.MappingProfiles.Resolvers
{

View File

@@ -1,7 +1,7 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.Domain.Entities;
namespace PARR.API.MappingProfiles.Resolvers
{

View File

@@ -1,7 +1,7 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.Domain.Entities;
namespace PARR.API.MappingProfiles.Resolvers
{

View File

@@ -1,7 +1,7 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.Domain.Entities;
namespace PARR.API.MappingProfiles.Resolvers
{

View File

@@ -1,7 +1,7 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.Domain.Entities;
namespace PARR.API.MappingProfiles.Resolvers
{

View File

@@ -1,26 +1,25 @@
using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.Core.Repositories.Interfaces.Schedule;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Schedule;
using PARR.Domain.Entities;
namespace PARR.API.MappingProfiles.Resolvers
{
public class TemplateScheduleResolver : IValueResolver<Template, TemplateResponse, EsppScheduleResponse?>
{
private readonly IEsppSchTypeConfigService esppConfigService;
private readonly IEsppSchTypeConfigRepository esppConfigService;
private readonly ILogger<TemplateScheduleResolver> logger;
private readonly IMapper mapper;
private readonly SettingsFromDb settingsFromDb;
private readonly IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService;
private readonly IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService;
public TemplateScheduleResolver(
IEsppSchTypeConfigService esppConfigService,
IEsppSchTypeConfigRepository esppConfigService,
ILogger<TemplateScheduleResolver> logger,
IMapper mapper,
SettingsFromDb settingsFromDb,
IScheduleResponseAreaTimeOffsetService scheduleResponseAreaTimeOffsetService
IScheduleResponseAreaTimeOffsetRepository scheduleResponseAreaTimeOffsetService
)
{
this.esppConfigService = esppConfigService;

View File

@@ -24,7 +24,7 @@ builder.Host.UseSerilog((context, config) =>
builder.Services.InstallSettings(builder.Configuration);
// Add services to the container.
builder.Services.InstallDalServices(builder.Configuration);
builder.Services.AddDalServices(builder.Configuration);
//---- new ----
builder.Services.AddCoreServices(builder.Configuration);
builder.Services.AddTaskManagement(mqSettingsFactory: (provider, taskType) =>

View File

@@ -4,8 +4,8 @@ using PARR.API.Domain.InfluxDbModels;
using PARR.API.Services.Interfaces;
using PARR.API.Settings;
using PARR.Core.Common.Interfaces;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Common.Roles;
using PARR.Domain.Settings;
@@ -14,21 +14,21 @@ namespace PARR.API.Services.Implementations
public class AuthService : IAuthService
{
private readonly IRedisCacheService cacheService;
private readonly IUserService userService;
private readonly IUserRepository userService;
private readonly UserCacheSettings userCacheSettings;
private readonly IClientService clientService;
private readonly IInfluxDbService influxDbService;
private readonly InfluxDbSettings influxDbSettings;
private readonly IUnitService unitService;
private readonly IUnitRepository unitService;
public AuthService(
IRedisCacheService cacheService,
IUserService userService,
IUserRepository userService,
UserCacheSettings userCacheSettings,
IClientService clientService,
IInfluxDbService influxDbService,
InfluxDbSettings influxDbSettings,
IUnitService unitService
IUnitRepository unitService
)
{
this.cacheService = cacheService;

View File

@@ -1,7 +1,4 @@
using PARR.API.Contracts.V1.Requests.Queries;
using PARR.DAL.Models;
namespace PARR.API.Services.Interfaces
namespace PARR.API.Services.Interfaces
{
/// <summary>
/// Сервисы по формированию статистики загрузки рабочих групп/ЗО, и тд регламентными работами

View File

@@ -1,13 +1,13 @@
using FluentValidation;
using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Services.Interfaces.Job;
using PARR.Core.Repositories.Interfaces.Job;
namespace PARR.API.Validators
{
public class DistributeRequestValidator : AbstractValidator<DistributeRequest>
{
public DistributeRequestValidator(IJobGroupService jobGroupService)
public DistributeRequestValidator(IJobGroupRepository jobGroupService)
{
RuleFor(t => t.JobGroupId).NotEmpty().MustAsync(async (entity, value, c) =>
{

View File

@@ -1,12 +1,10 @@
using FluentValidation;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json.Linq;
using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Contracts;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Schedule;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces;
using PARR.Core.Repositories.Interfaces.Job;
using PARR.Core.Repositories.Interfaces.Schedule;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Enums;
namespace PARR.API.Validators
@@ -14,11 +12,11 @@ namespace PARR.API.Validators
public class JobGroupValidator : AbstractValidator<JobGroupRequest>
{
public JobGroupValidator(
IJobGroupTypeService jobGroupTypeService,
IUnitFieldService unitFieldService,
IScheduleExcludeTypeService scheduleExcludeTypeService,
IScheduleExcludeTypeCalendarService scheduleExcludeTypeCalendarService,
IDistributionPeriodService distributionPeriodService
IJobGroupTypeRepository jobGroupTypeService,
IUnitFieldRepository unitFieldService,
IScheduleExcludeTypeRepository scheduleExcludeTypeService,
IScheduleExcludeTypeCalendarRepository scheduleExcludeTypeCalendarService,
IDistributionPeriodRepository distributionPeriodService
)
{
RuleFor(t => t.Name)

View File

@@ -1,25 +1,25 @@
using FluentValidation;
using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Models.Job;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.Core.Repositories.Interfaces;
using PARR.Core.Repositories.Interfaces.Job;
using PARR.Core.Repositories.Interfaces.Unit;
using PARR.Domain.Entities.Job;
namespace PARR.API.Validators
{
public class JobRequestValidator : AbstractValidator<JobRequest>
{
private readonly ITnkService tnkService;
private readonly IJobGroupService jobGroupService;
private readonly IJobService jobService;
private readonly IUnitFieldService unitFieldService;
private readonly ITnkRepository tnkService;
private readonly IJobGroupRepository jobGroupService;
private readonly IJobRepository jobService;
private readonly IUnitFieldRepository unitFieldService;
private JobGroup? jobGroup;
public JobRequestValidator(
ITnkService tnkService,
IJobGroupService jobGroupService,
IJobService jobService,
IUnitFieldService unitFieldService
ITnkRepository tnkService,
IJobGroupRepository jobGroupService,
IJobRepository jobService,
IUnitFieldRepository unitFieldService
)
{
this.tnkService = tnkService;

View File

@@ -1,16 +1,16 @@
using FluentValidation;
using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
namespace PARR.API.Validators
{
public class SubprocessValidator : AbstractValidator<SubprocessRequest>
{
private readonly IProcessService processService;
private readonly IProcessRepository processService;
private bool? isValid = null;
public SubprocessValidator(
IProcessService processService
IProcessRepository processService
)
{
this.processService = processService;

View File

@@ -1,7 +1,7 @@
using FluentValidation;
using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job;
using PARR.Core.Repositories.Interfaces;
using PARR.Core.Repositories.Interfaces.Job;
using PARR.Domain.Enums;
namespace PARR.API.Validators
@@ -9,9 +9,9 @@ namespace PARR.API.Validators
public class TemplateActivatorRequestValidator : AbstractValidator<TemplateActivatorRequest>
{
public TemplateActivatorRequestValidator(
ITemplateService templateService,
IJobService jobService,
IJobGroupService jobGroupService
ITemplateRepository templateService,
IJobRepository jobService,
IJobGroupRepository jobGroupService
)
{
RuleFor(t => t.EntityType).Must(type =>

View File

@@ -1,16 +1,16 @@
using FluentValidation;
using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
namespace PARR.API.Validators
{
public class TnkRequestValidator : AbstractValidator<TnkRequest>
{
private readonly ISubprocessService subprocessService;
private readonly ISubprocessRepository subprocessService;
private bool? isValid = null;
public TnkRequestValidator(
ISubprocessService subprocessService
ISubprocessRepository subprocessService
)
{
this.subprocessService = subprocessService;

View File

@@ -1,15 +1,15 @@
using FluentValidation;
using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
namespace PARR.API.Validators
{
public class WeekendRequestValidator : AbstractValidator<WeekendRequest>
{
private readonly IWeekendDayService weekendDayService;
private readonly IWeekendDayRepository weekendDayService;
public WeekendRequestValidator(IWeekendDayService weekendDayService)
public WeekendRequestValidator(IWeekendDayRepository weekendDayService)
{
this.weekendDayService = weekendDayService;

View File

@@ -1,17 +1,17 @@
using FluentValidation;
using PARR.API.Contracts.V1.Requests;
using PARR.DAL.Services.Interfaces;
using PARR.Core.Repositories.Interfaces;
namespace PARR.API.Validators
{
public class WorkRequestValidator : AbstractValidator<WorkRequest>
{
private readonly ITnkService tnkService;
private readonly ITnkRepository tnkService;
private bool? isValid = null;
public WorkRequestValidator(
ITnkService tnkService
ITnkRepository tnkService
//ITemplateMaskValidator templateMaskValidator
)
{

View File

@@ -0,0 +1,9 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IAgentHistoryRepository : IBaseRepository<AgentHistory>
{
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IDistributionPeriodRepository : IBaseRepository<DistributionPeriod>
{
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IOrderRepository : IBaseRepository<Order>
{
}
}

View File

@@ -1,10 +1,9 @@
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.Domain.Entities;
using PARR.Domain.Enums;
namespace PARR.DAL.Services.Interfaces
namespace PARR.Core.Repositories.Interfaces
{
public interface IOrderStatusService
public interface IOrderStatusRepository
{
IQueryable<OrderStatus> Get();
OrderStatusEnum GetOrderStatusByName(string statusName);

View File

@@ -0,0 +1,9 @@
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IParrComponentRepository
{
IQueryable<ParrComponent> Get();
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IProcessRepository : IBaseRepository<Process>
{
}
}

View File

@@ -1,10 +1,10 @@
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces.Base;
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities;
using PARR.Domain.Enums;
namespace PARR.DAL.Services.Interfaces
namespace PARR.Core.Repositories.Interfaces
{
public interface IRobotConfigurationService : IBaseService<RobotConfiguration>
public interface IRobotConfigurationRepository : IBaseRepository<RobotConfiguration>
{
/// <summary>
/// Обновить статус работы робота

View File

@@ -0,0 +1,9 @@
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IRobotHistoryLevelRepository
{
IQueryable<RobotHistoryLevel> Get();
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IRobotHistoryRepository : IBaseRepository<RobotHistory>
{
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IRobotRepository
{
IQueryable<Robot> Get();
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IRobotStatusRepository
{
IQueryable<RobotStatus> Get();
}
}

View File

@@ -0,0 +1,9 @@
using PARR.Core.Repositories.Base;
using PARR.Domain.Entities;
namespace PARR.Core.Repositories.Interfaces
{
public interface IRoleRepository : IBaseRepository<Role>
{
}
}

View File

@@ -0,0 +1,7 @@
namespace PARR.Core.Repositories.Interfaces
{
public interface IStatusTemplateRepository
{
IQueryable<Domain.Entities.TaskStatus> Get();
}
}

Some files were not shown because too many files have changed in this diff Show More