| | | 1 | | namespace Services.BitrixStockServices; |
| | | 2 | | |
| | | 3 | | /// <summary>Коды действий при приоритетном накате.</summary> |
| | | 4 | | public 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 | | |
| | | 20 | | public 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 | | |
| | | 31 | | public class BitrixStockSyncApplyArticleLogEntry |
| | | 32 | | { |
| | 0 | 33 | | public long Id { get; set; } |
| | 0 | 34 | | public string ReportId { get; set; } = string.Empty; |
| | 0 | 35 | | public string JobId { get; set; } = string.Empty; |
| | 0 | 36 | | public DateTime AppliedAtUtc { get; set; } |
| | 0 | 37 | | public string Article { get; set; } = string.Empty; |
| | 0 | 38 | | public string OneCStore { get; set; } = string.Empty; |
| | 0 | 39 | | public int OneCQty { get; set; } |
| | 0 | 40 | | public ApplyArticleClientEntry Client1 { get; set; } = new(); |
| | 0 | 41 | | public ApplyArticleClientEntry Client2 { get; set; } = new(); |
| | 0 | 42 | | public string? Summary { get; set; } |
| | | 43 | | } |
| | | 44 | | |
| | | 45 | | public class BitrixStockSyncApplyArticleLogPageDto |
| | | 46 | | { |
| | | 47 | | public List<BitrixStockSyncApplyArticleLogEntry> Items { get; set; } = new(); |
| | | 48 | | public int TotalCount { get; set; } |
| | | 49 | | public int Page { get; set; } |
| | | 50 | | public int PageSize { get; set; } |
| | | 51 | | public int TotalPages { get; set; } |
| | | 52 | | } |
| | | 53 | | |
| | | 54 | | public 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 | | |
| | | 61 | | public 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 | | } |