< Summary

Information
Class: Services.BitrixStockServices.BitrixStockSyncApplyArticleLogPageDto
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/BitrixStockServices/BitrixStockSyncApplyArticleLog.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 67
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Items()100%210%
get_TotalCount()100%210%
get_Page()100%210%
get_PageSize()100%210%
get_TotalPages()100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/BitrixStockServices/BitrixStockSyncApplyArticleLog.cs

#LineLine coverage
 1namespace Services.BitrixStockServices;
 2
 3/// <summary>Коды действий при приоритетном накате.</summary>
 4public static class ApplyArticleActionCodes
 5{
 6    public const string Apply           = "APPLY";           // накатить штатно
 7    public const string UnarchiveApply  = "UNARCHIVE_APPLY"; // разархивировать + накатить
 8    public const string Clear           = "CLEAR";           // обнулить (К2 уступает К1)
 9    public const string SkipNotFound    = "SKIP_NOTFOUND";   // не найден в Ozon
 10    public const string SkipArchived    = "SKIP_ARCHIVED";   // архивный — не трогаем
 11    public const string SkipAlreadyZero = "SKIP_ZERO";       // уже 0 — не нужно обнулять
 12    public const string SkipMatch       = "SKIP_MATCH";      // совпадает — накат не нужен
 13    public const string SkipPriorityK1Failed = "SKIP_K2_K1_FAILED"; // К2 пропущен: К1 упал (приоритет)
 14    public const string ClearDisabledLink    = "CLEAR_DISABLED_LINK"; // обнуление при отключении связи склада
 15    public const string SkipAlreadyMatches   = "SKIP_MATCH_QTY";     // целевой остаток уже совпадает с текущим
 16    public const string CleanupZero          = "CLEANUP_ZERO";       // этап 3: обнулён лишний склад
 17    public const string CleanupProtected     = "CLEANUP_PROTECTED";  // этап 3: склад сохранён
 18}
 19
 20public class ApplyArticleClientEntry
 21{
 22    public int?    ClientId      { get; set; }
 23    public string? ClientName    { get; set; }
 24    public int?    QtyBefore     { get; set; }
 25    public int?    QtyAfter      { get; set; }
 26    public bool?   WasArchived   { get; set; }
 27    public string? ActionCode    { get; set; }
 28    public string? ActionLabel   { get; set; }
 29}
 30
 31public class BitrixStockSyncApplyArticleLogEntry
 32{
 33    public long     Id           { get; set; }
 34    public string   ReportId     { get; set; } = string.Empty;
 35    public string   JobId        { get; set; } = string.Empty;
 36    public DateTime AppliedAtUtc { get; set; }
 37    public string   Article      { get; set; } = string.Empty;
 38    public string   OneCStore    { get; set; } = string.Empty;
 39    public int      OneCQty      { get; set; }
 40    public ApplyArticleClientEntry Client1 { get; set; } = new();
 41    public ApplyArticleClientEntry Client2 { get; set; } = new();
 42    public string?  Summary      { get; set; }
 43}
 44
 45public class BitrixStockSyncApplyArticleLogPageDto
 46{
 047    public List<BitrixStockSyncApplyArticleLogEntry> Items { get; set; } = new();
 048    public int TotalCount { get; set; }
 049    public int Page       { get; set; }
 050    public int PageSize   { get; set; }
 051    public int TotalPages { get; set; }
 52}
 53
 54public class BitrixStockSyncApplyLogAnalysisDto
 55{
 56    public int TotalRows { get; set; }
 57    public Dictionary<string, int> ClientTotals { get; set; } = new();
 58    public List<BitrixStockSyncApplyLogAnalysisItemDto> Items { get; set; } = new();
 59}
 60
 61public class BitrixStockSyncApplyLogAnalysisItemDto
 62{
 63    public string Article { get; set; } = string.Empty;
 64    public string OneCStore { get; set; } = string.Empty;
 65    public int OneCQty { get; set; }
 66    public List<ApplyArticleClientEntry> Clients { get; set; } = new();
 67}