feat(api,dal): tbl TemplateStatusType - добавлен новый тип Error. В API добавлен метод просмотра статистики распределения StatTemplateDistributionController
This commit is contained in:
@@ -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