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

@@ -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