feat(api): Вынес логику формирования расписания в сервис IEsppSchTypeConfigService. В респонс шаблона добавил отображение расписания. Получение шаблона по ИД.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.API.MappingProfiles.Resolvers;
|
||||
using PARR.BLL.Helpers;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Models.V1;
|
||||
|
||||
@@ -42,7 +43,8 @@ namespace PARR.API.MappingProfiles
|
||||
.ForMember(d => d.Initiator, o => o.MapFrom<TemplateInitiatorResolver>())
|
||||
.ForMember(d => d.ClosingCode, o => o.MapFrom<TemplateClosingCodeResolver>())
|
||||
.ForMember(d => d.Category, o => o.MapFrom<TemplateCategoryResolver>())
|
||||
.ForMember(d => d.SyncStatus, o => o.MapFrom(s => s.RobotConfigurations));
|
||||
.ForMember(d => d.SyncStatus, o => o.MapFrom(s => s.RobotConfigurations))
|
||||
.ForMember(d => d.Schedule, o => o.MapFrom<TemplateScheduleResolver>());
|
||||
// === Template ===
|
||||
|
||||
CreateMap<Template, TemplateScheduleEsppIdResponse>();
|
||||
@@ -130,6 +132,19 @@ namespace PARR.API.MappingProfiles
|
||||
.ForMember(d => d.RobotStatus, o => o.MapFrom(s => s.RobotStatus));
|
||||
|
||||
|
||||
// --- EsppSch ---
|
||||
CreateMap<EsppSchTypeSchedule, EsppScheduleTypeScheduleResponse>();
|
||||
|
||||
CreateMap<EsppSchType, EsppScheduleTypeResponse>();
|
||||
|
||||
CreateMap<EsppSchTypeValue, EsppScheduleTypeValueResponse>();
|
||||
|
||||
CreateMap<EsppScheduleValDto, EsppScheduleValResponse>()
|
||||
.ForMember(d => d.Order, o => o.MapFrom(s => s.Order))
|
||||
.ForMember(d => d.Value, o => o.MapFrom(s => s.Value))
|
||||
.ForMember(d => d.Type, o => o.MapFrom(s => s.Type));
|
||||
// === EsppSch ===
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user