feat: создана структура проекта, core, domain, infrastructure. Перенесены enum и task согласно архитектуры

This commit is contained in:
Mikhail Trubnikov
2026-04-13 16:58:30 +10:00
parent 0bbbac09fe
commit da83aff19c
160 changed files with 482 additions and 267 deletions

View File

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