feat(api): Работы - управление автоконтролем и кол-вом связей

This commit is contained in:
Mikhail Trubnikov
2026-06-19 11:19:43 +10:00
parent 8151ea89b9
commit 4a8a67247d
9 changed files with 297 additions and 216 deletions

View File

@@ -1,79 +1,91 @@
namespace PARR.API.Contracts.V1.Requests
{
public class JobRequest
public record JobRequest
{
public required Guid TnkId { get; set; }
public required Guid TnkId { get; init; }
public required Guid GroupId { get; set; }
public required Guid GroupId { get; init; }
public required string Name { get; set; }
public required string Name { get; init; }
public int? MinValueRelationships { get; set; }
//public int? MinValueRelationships { get; init; }
public int? MaxValueRelationships { get; set; }
//public int? MaxValueRelationships { get; init; }
public bool? IsParentRelationships { get; set; }
//public bool? IsParentRelationships { get; init; }
public required string TemplateNameMask { get; set; }
public JobRelationships? Relationships { get; init; }
public required string WorkGroupMask { get; set; }
public required string TemplateNameMask { get; init; }
public required string WorkName { get; set; }
public required string WorkGroupMask { get; init; }
public required string ResponseAreaMask { get; set; }
public required string WorkName { get; init; }
#region AutoControl
public required string ResponseAreaMask { get; init; }
public bool IsEnableAutoControl { get; set; }
//#region AutoControl
public bool InitUsedTemplateState { get; set; }
//public bool IsEnableAutoControl { get; set; }
public bool InitUsedScheduleState { get; set; }
//public bool InitUsedTemplateState { get; set; }
#endregion
//public bool InitUsedScheduleState { get; set; }
public required List<UnitFilterRequest> UnitFilters { get; set; }
//#endregion
public JobAutoControlRequest? AutoControl { get; init; }
public required List<UnitFilterRequest> UnitFilters { get; init; }
}
public record JobRelationships
{
public int MinValueRelationships { get; init; }
public class UnitFilterRequest
public int MaxValueRelationships { get; init; }
public bool IsParentRelationships { get; init; }
}
public record UnitFilterRequest
{
///// <summary>
///// Id = null в методе Create, в Update обязателен
///// </summary>
//public Guid? Id { get; set; }
public required string UnitFilterMask { get; set; }
public required string UnitFilterMask { get; init; }
public List<FieldFilterRequest>? FieldFilters { get; set; }
public List<FieldFilterRequest>? FieldFilters { get; init; }
public List<RelationshipFilterRequest>? RelationshipFilters { get; set; }
public List<RelationshipFilterRequest>? RelationshipFilters { get; init; }
}
public class FieldFilterRequest
public record FieldFilterRequest
{
public Guid FieldId { get; set; }
public Guid FieldId { get; init; }
public string? ValueMask { get; set; }
public string? ValueMask { get; init; }
public bool IsInverse { get; set; } = false;
public bool IsInverse { get; init; } = false;
}
public class RelationshipFilterRequest
public record RelationshipFilterRequest
{
public Guid FieldId { get; set; }
public Guid FieldId { get; init; }
public bool? IsParent { get; set; }
public bool? IsParent { get; init; }
public string? ValueMask { get; set; }
public string? ValueMask { get; init; }
public bool? IsFullMatch { get; set; }
public bool? IsFullMatch { get; init; }
public bool? IsInverse { get; set; }
public bool? IsInverse { get; init; }
}
}

View File

@@ -40,6 +40,8 @@
/// </summary>
public bool IsAutoDistributionEnabled { get; set; }
public JobGroupAutoControlResponse? AutoControl { get; set; }
// public bool IsAgent { get; set; }
// public string? AgentName { get; set; }
@@ -68,8 +70,6 @@
/// </summary>
public ScheduleExcludeTypeCalendarResponse? ScheduleExcludeTypeCalendar { get; set; }
public JobGroupAutoControlResponse? AutoControl { get; set; }
///// <summary>
///// Настройки автораспределения
///// </summary>