feat(aihitRelationshipsSyncer): Реализована логика синхронизации связей между Unit+CI/CD

This commit is contained in:
Mikhail Kuznetsov
2025-05-27 11:32:05 +10:00
parent cc52818d29
commit 078c8b540f
33 changed files with 4389 additions and 6 deletions

View File

@@ -55,6 +55,8 @@
public const string IsWorkDay = Base + "/tests/is-work-day/";
public const string TestHandler = Base + "/tests/test/";
public const string GetWorkDay = Base + "/tests/get-work-day/{date}";
public const string paramDate = "{lastRunDate}";

View File

@@ -1,11 +1,13 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using PARR.API.Contracts.V1;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.DAL.CacheServices;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Unit;
using PARR.DAL.TransformServices;
namespace PARR.API.Controllers.V1
@@ -17,18 +19,21 @@ namespace PARR.API.Controllers.V1
private readonly IEsppScheduleTransformService esppScheduleTransformService;
private readonly IRedisCacheService redisCacheService;
private readonly IWeekendDayService weekendDayService;
private readonly IUnitService unitService;
public TestController(
IClientService clientService,
IEsppScheduleTransformService esppScheduleTransformService,
IRedisCacheService redisCacheService,
IWeekendDayService weekendDayService
IWeekendDayService weekendDayService,
IUnitService unitService
)
{
this.clientService = clientService;
this.esppScheduleTransformService = esppScheduleTransformService;
this.redisCacheService = redisCacheService;
this.weekendDayService = weekendDayService;
this.unitService = unitService;
}
@@ -103,6 +108,22 @@ namespace PARR.API.Controllers.V1
}
/// <summary>
/// Тестовый метод
/// </summary>
/// <returns></returns>
[HttpGet(ApiRoutes.Test.TestHandler)]
public async Task<IActionResult> Test()
{
//var unit = await unitService.Get().Include(t => t.Parents).Include(t => t.Childs).FirstOrDefaultAsync(t => t.Id == Guid.Parse("01fda0bd-3423-4b12-965b-2947153d1d87"));
//var parent = unit?.Parents;
//var child = unit?.Childs;
return Ok();
}
//[HttpGet(ApiRoutes.Test.GetWorkDay)]
//public async Task<IActionResult> GetWorkDay([FromRoute] DateTimeOffset date)
//{