feat(api,dal): tbl TemplateStatusType - добавлен новый тип Error. В API добавлен метод просмотра статистики распределения StatTemplateDistributionController
This commit is contained in:
@@ -281,7 +281,7 @@
|
||||
|
||||
public static class StatTemplateDistribution
|
||||
{
|
||||
public const string Get = BaseStat + "/template-distribution/{applicationInWorkId}";
|
||||
public const string Get = BaseStat + "/template-distribution/{jobGroupId}";
|
||||
}
|
||||
|
||||
public static class StatResponseAreaWorkLoad
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
// public string? AgentScript { get; set; }
|
||||
}
|
||||
|
||||
public class JobGroupResponse : JobGroupBaseResponse
|
||||
public class JobGroupResponse : JobGroupWithDistributionConfigResponse //: JobGroupBaseResponse
|
||||
{
|
||||
//public List<JobResponse>? Jobs { get; set; }
|
||||
public int JobsCount { get; set; }
|
||||
@@ -58,11 +58,10 @@
|
||||
/// </summary>
|
||||
public ScheduleExcludeTypeCalendarResponse? ScheduleExcludeTypeCalendar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Настройки автораспределения
|
||||
/// </summary>
|
||||
public JobGroupDistributionConfigResponse? DistributionConfig { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// Настройки автораспределения
|
||||
///// </summary>
|
||||
//public JobGroupDistributionConfigResponse? DistributionConfig { get; set; }
|
||||
}
|
||||
|
||||
public class JobGroupScheduleResponse
|
||||
@@ -74,5 +73,13 @@
|
||||
public List<EsppScheduleValResponse>? Values { get; set; }
|
||||
}
|
||||
|
||||
public class JobGroupWithDistributionConfigResponse : JobGroupBaseResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Настройки автораспределения
|
||||
/// </summary>
|
||||
public JobGroupDistributionConfigResponse? DistributionConfig { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,23 +2,50 @@
|
||||
{
|
||||
public class StatTemplateDistributorResponse
|
||||
{
|
||||
public WorkGroupResponse? WorkGroup { get; set; }
|
||||
public required JobGroupWithDistributionConfigResponse JobGroup { get; set; }
|
||||
|
||||
public int AllCount { get; set; }
|
||||
/// <summary>
|
||||
/// Всего шаблонов
|
||||
/// </summary>
|
||||
public int AllCount => ItemsList?.Sum(t => t.AllCount) ?? 0;
|
||||
|
||||
public int IsActivatedAllCount { get; set; }
|
||||
/// <summary>
|
||||
/// Всего шаблонов с активированными шаблонами и расписаниями
|
||||
/// </summary>
|
||||
public int IsActivatedAllCount => ItemsList?.Sum(t => t.IsActivatedCount) ?? 0;
|
||||
|
||||
public int IsDeactivatedAllCount { get; set; }
|
||||
/// <summary>
|
||||
/// Всего шаблонов с деактивированными шаблонами и/или расписаниями
|
||||
/// </summary>
|
||||
public int IsDeactivatedAllCount => ItemsList?.Sum(t => t.IsDeactivatedCount) ?? 0;
|
||||
|
||||
public List<StatDistributorItemResponse>? ItemsList { get; set; }
|
||||
}
|
||||
|
||||
public List<StatTemplateDistributorDateStat>? Stat { get; set; }
|
||||
public class StatDistributorItemResponse
|
||||
{
|
||||
public string? WorkGroupName { get; set; }
|
||||
|
||||
public int AllCount => Statistics?.Sum(t => t.AllCount) ?? 0;
|
||||
public int IsActivatedCount => Statistics?.Sum(t => t.IsActivatedCount) ?? 0;
|
||||
public int IsDeactivatedCount => Statistics?.Sum(t => t.IsDeactivatedCount) ?? 0;
|
||||
|
||||
public List<StatTemplateDistributorDateStat>? Statistics { get; set; }
|
||||
}
|
||||
|
||||
public class StatTemplateDistributorDateStat
|
||||
{
|
||||
public DateTimeOffset Date { get; set; }
|
||||
public DateOnly Date { get; set; }
|
||||
public int AllCount { get; set; }
|
||||
public int IsActivatedCount { get; set; }
|
||||
public int IsDeactivatedCount { get;set; }
|
||||
public int IsDeactivatedCount { get; set; }
|
||||
public List<StatTempleteDistribItem>? Templates { get; set; }
|
||||
}
|
||||
|
||||
public class StatTempleteDistribItem
|
||||
{
|
||||
public required string Name { get; set; }
|
||||
public bool IsActiveTemplate { get; set; }
|
||||
public bool IsActiveSchedular { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user