feat: создана структура проекта, core, domain, infrastructure. Перенесены enum и task согласно архитектуры
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using PARR.Constants;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
|
||||
@@ -9,10 +9,9 @@ using PARR.API.Services.Interfaces;
|
||||
using PARR.API.Settings;
|
||||
using PARR.BLL.Domain.Mq;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -9,9 +9,9 @@ using PARR.API.Services.Interfaces;
|
||||
using PARR.API.Settings;
|
||||
using PARR.BLL.Domain.Mq;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using System.Text.Json;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -15,10 +15,7 @@ using PARR.API.Settings;
|
||||
using PARR.BLL.Domain.Mq;
|
||||
using PARR.BLL.Helpers;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Cache.Services;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
@@ -27,7 +24,8 @@ using PARR.DAL.Models.Job;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
using PARR.DAL.Services.Interfaces.Unit;
|
||||
using System.Text.Json;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -15,9 +15,7 @@ using PARR.API.Settings;
|
||||
using PARR.BLL.Domain.Mq;
|
||||
using PARR.BLL.Helpers;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.DAL.Models;
|
||||
@@ -25,6 +23,8 @@ 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.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -7,10 +7,10 @@ using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Settings;
|
||||
using PARR.BLL.Domain.Mq;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
using Serilog.Core;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -9,7 +9,6 @@ using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Services.Interfaces;
|
||||
using PARR.BLL.Helpers;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
@@ -17,6 +16,8 @@ using PARR.DAL.Models;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.DAL.Services.Interfaces.Schedule;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@ using PARR.API.Controllers.V1.Base;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1.Statistics
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ using PARR.API.Helpers;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1.Statistics
|
||||
{
|
||||
@@ -50,7 +51,7 @@ namespace PARR.API.Controllers.V1.Statistics
|
||||
|
||||
var templates = await templateService.Get()
|
||||
.Where(t =>
|
||||
t.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl
|
||||
t.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl
|
||||
&&
|
||||
((
|
||||
// измененные
|
||||
@@ -87,7 +88,7 @@ namespace PARR.API.Controllers.V1.Statistics
|
||||
//&& t.DateCreated.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date <= endPeriod.Date
|
||||
t.DateCreated.UtcDateTime >= utcStartPeriod
|
||||
&& t.DateCreated.UtcDateTime <= utcEndPeriod
|
||||
&& t.TemplateHistories.Any(x => x.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl)
|
||||
&& t.TemplateHistories.Any(x => x.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl)
|
||||
)
|
||||
.ToListAsync();
|
||||
|
||||
@@ -97,14 +98,14 @@ namespace PARR.API.Controllers.V1.Statistics
|
||||
x.InitiatorComment != null
|
||||
&& !x.InitiatorComment.Contains(TemplateActivatorActionsEnum.ActivateAllForAutoControl.ToString())
|
||||
&& !x.InitiatorComment.Contains(TemplateActivatorActionsEnum.DeactivateAllForAutoControl.ToString())
|
||||
&& x.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl
|
||||
&& x.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl
|
||||
)).ToList();
|
||||
//TODO: createdTemplatesAndMoveToHistory - возможно тут ошибка. Не убираются дубли шаблонов из template
|
||||
#endregion
|
||||
|
||||
var history = await templateHistoryService.Get()
|
||||
.Where(t =>
|
||||
t.InitiatorParrComponentId == Constants.ParrComponentsEnum.JobAutoControl
|
||||
t.InitiatorParrComponentId == ParrComponentsEnum.JobAutoControl
|
||||
&& t.DateModified.HasValue
|
||||
//&& t.DateModified.Value.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date >= startPeriod.Date
|
||||
//&& t.DateModified.Value.DateTime.AddHours(timeZoneQuery.TimeZoneOffsetHours).Date <= endPeriod.Date
|
||||
|
||||
@@ -11,6 +11,7 @@ using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1.Statistics
|
||||
{
|
||||
|
||||
@@ -7,11 +7,9 @@ using PARR.API.Services.Interfaces;
|
||||
using PARR.API.Settings;
|
||||
using PARR.BLL.Domain.Mq;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Cache.Services;
|
||||
using PARR.DAL.DomainServices.Interfaces;
|
||||
using System.Text.Json;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -9,10 +9,10 @@ using PARR.API.Services.Interfaces;
|
||||
using PARR.API.Settings;
|
||||
using PARR.BLL.Domain.Mq;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
using System.Text.Json;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Extensions;
|
||||
using PARR.API.Services.Interfaces;
|
||||
using PARR.BLL.Helpers;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainModels;
|
||||
@@ -19,6 +18,8 @@ using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.DAL.Services.Interfaces.Schedule;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ using PARR.API.Controllers.V1.Base;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Controllers.V1
|
||||
{
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
using PARR.API.Authentication.Models;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.API.MappingProfiles.Resolvers;
|
||||
using PARR.Common.Domain;
|
||||
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.Base.History;
|
||||
|
||||
namespace PARR.API.MappingProfiles
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using AutoMapper;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using AutoMapper;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
|
||||
namespace PARR.API.MappingProfiles.Resolvers
|
||||
{
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.BLL\PARR.BLL.csproj" />
|
||||
<ProjectReference Include="..\PARR.Core\PARR.Core.csproj" />
|
||||
<ProjectReference Include="..\PARR.DAL\PARR.DAL.csproj" />
|
||||
<ProjectReference Include="..\PARR.Infrastructure\PARR.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -4,7 +4,9 @@ using Microsoft.AspNetCore.HttpOverrides;
|
||||
using PARR.API.Authentication;
|
||||
using PARR.API.Installers;
|
||||
using PARR.BLL;
|
||||
using PARR.Core;
|
||||
using PARR.DAL;
|
||||
using PARR.Infrastructure;
|
||||
using Serilog;
|
||||
using System.Reflection;
|
||||
|
||||
@@ -22,6 +24,8 @@ builder.Host.UseSerilog((context, config) =>
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.InstallDalServices(builder.Configuration);
|
||||
builder.Services.AddCoreServices(builder.Configuration);
|
||||
builder.Services.AddInfrastructureServices(builder.Configuration);
|
||||
builder.Services.InstallBllServices(builder.Configuration);
|
||||
builder.Services.InstallApiServices(builder.Configuration);
|
||||
builder.Services.InstallSettings(builder.Configuration);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using PARR.BLL.Contracts.Interfaces;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Settings
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using FluentValidation;
|
||||
using PARR.API.Contracts.V1.Requests;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Validators
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using FluentValidation;
|
||||
using PARR.API.Contracts.V1.Requests;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Validators
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ 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.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Validators
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using FluentValidation;
|
||||
using PARR.API.Contracts.V1.Requests;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Validators
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using FluentValidation;
|
||||
using PARR.API.Contracts.V1.Requests;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.API.Validators
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user