feat(api,dal): исключения расписаний ЕСПП привязаны к JobGroup, удалены константы из настроек. Кол-во шаблонов в Job считается только used. В JobFieldFilter добавлено поле IsInverse.
This commit is contained in:
@@ -6,6 +6,7 @@ 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;
|
||||
|
||||
namespace PARR.API.MappingProfiles
|
||||
@@ -39,7 +40,10 @@ namespace PARR.API.MappingProfiles
|
||||
.ForMember(d => d.LastRun, o => o.MapFrom(s => s.LastRun))
|
||||
.ForMember(d => d.OrderCount, o => o.MapFrom(s => s.Orders.Count()))
|
||||
.ForMember(d => d.IsAutoDistributionEnabled, o => o.MapFrom(s => s.Job!.Group!.IsAutoDistributionEnabled))
|
||||
.ForMember(d => d.StatusType, o => o.MapFrom(s => s.StatusType));
|
||||
.ForMember(d => d.StatusType, o => o.MapFrom(s => s.StatusType))
|
||||
.ForMember(d => d.ScheduleExcludeType, o => o.MapFrom(s => s.Job!.Group!.ScheduleExcludeType))
|
||||
.ForMember(d => d.ScheduleExcludeTypeCalendar, o => o.MapFrom(s => s.Job!.Group!.ScheduleExcludeTypeCalendar))
|
||||
;
|
||||
// === Template ===
|
||||
|
||||
|
||||
@@ -353,6 +357,7 @@ namespace PARR.API.MappingProfiles
|
||||
#endregion
|
||||
|
||||
#region JobGroup
|
||||
|
||||
CreateMap<JobGroup, JobGroupBaseResponse>()
|
||||
.Include<JobGroup, JobGroupResponse>()
|
||||
.ForMember(d => d.GroupType, o => o.MapFrom(s => s.GroupType))
|
||||
@@ -361,9 +366,23 @@ namespace PARR.API.MappingProfiles
|
||||
CreateMap<JobGroup, JobGroupBaseResponse>()
|
||||
.ForMember(d => d.Name, o => o.MapFrom(s => s.GroupName));
|
||||
|
||||
CreateMap<JobGroup, JobGroupResponse>();
|
||||
CreateMap<JobGroup, JobGroupResponse>()
|
||||
.ForMember(d => d.ScheduleExcludeType, o => o.MapFrom(s => s.ScheduleExcludeType))
|
||||
.ForMember(d => d.ScheduleExcludeTypeCalendar, o => o.MapFrom(s => s.ScheduleExcludeTypeCalendar));
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region ScheduleExcludeTypeCalendarResponse
|
||||
|
||||
CreateMap<ScheduleExcludeTypeCalendar, ScheduleExcludeTypeCalendarResponse>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region ScheduleExcludeTypeResponse
|
||||
|
||||
CreateMap<ScheduleExcludeType, ScheduleExcludeTypeResponse>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region JobGroupType
|
||||
|
||||
Reference in New Issue
Block a user