feat(api,core,domain): Изменен контроллер RobotTaskRobotStatusController, метод изменения статуса задания вынесен в сервисы. Добавлена логика успрешного переименования шаблона.

This commit is contained in:
Mikhail Trubnikov
2026-07-23 14:39:55 +10:00
parent 58b4d98b16
commit b3879062a6
17 changed files with 313 additions and 55 deletions

View File

@@ -0,0 +1,17 @@
using AutoMapper;
using PARR.Domain.DTOs.RobotTaskRobotStatus;
using PARR.Domain.Entities;
namespace PARR.Core.Infrastructure.Mapping.RobotTaskRobotStatus
{
internal class RobotConfigurationResultMappingProfile : Profile
{
public RobotConfigurationResultMappingProfile()
{
CreateMap<RobotConfiguration, RobotConfigurationResult>()
.ForMember(d => d.Robot, o => o.MapFrom(s => s.Robot))
.ForMember(d => d.TaskStatus, o => o.MapFrom(s => s.TaskStatus))
.ForMember(d => d.RobotStatus, o => o.MapFrom(s => s.RobotStatus));
}
}
}

View File

@@ -0,0 +1,14 @@
using AutoMapper;
using PARR.Domain.DTOs.Shared;
using PARR.Domain.Entities.RobotEntities;
namespace PARR.Core.Infrastructure.Mapping.Shared
{
public class RobotDtoMappingProfile : Profile
{
public RobotDtoMappingProfile()
{
CreateMap<Robot, RobotDto>();
}
}
}

View File

@@ -0,0 +1,14 @@
using AutoMapper;
using PARR.Domain.DTOs.Shared;
using PARR.Domain.Entities.RobotEntities;
namespace PARR.Core.Infrastructure.Mapping.Shared
{
public class RobotStatusDtoMappingProfile : Profile
{
public RobotStatusDtoMappingProfile()
{
CreateMap<RobotStatus, RobotStatusDto>();
}
}
}

View File

@@ -0,0 +1,13 @@
using AutoMapper;
using PARR.Domain.DTOs.Shared;
namespace PARR.Core.Infrastructure.Mapping.Shared
{
public class RobotTaskStatusDtoMappingProfile : Profile
{
public RobotTaskStatusDtoMappingProfile()
{
CreateMap<PARR.Domain.Entities.RobotEntities.TaskStatus, RobotTaskStatusDto>();
}
}
}