InventoryBalanceModels.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. namespace Admin.NET.Plugin.AiDOP.MaterialWarehouse;
  2. public static class InventoryDataSources
  3. {
  4. public const string Live165 = "LIVE_165";
  5. public const string Std = "STD";
  6. }
  7. public sealed class InventoryBalanceQuery
  8. {
  9. public long TenantId { get; init; }
  10. public string Domain { get; init; } = "";
  11. public string? Type { get; init; }
  12. public string? Location { get; init; }
  13. public string? MaterialCode { get; init; }
  14. public string? BatchNo { get; init; }
  15. public decimal? StockGt { get; init; }
  16. public decimal? UnrestrictedGt { get; init; }
  17. public decimal? QcStockGt { get; init; }
  18. public decimal? FrozenGt { get; init; }
  19. public int Page { get; init; } = 1;
  20. public int PageSize { get; init; } = 10;
  21. }
  22. public sealed class InventoryBalanceRow
  23. {
  24. public string? Type { get; set; }
  25. public string? Location { get; set; }
  26. public string? LocationName { get; set; }
  27. public string? MaterialCode { get; set; }
  28. public string? MaterialName { get; set; }
  29. public string? BatchNo { get; set; }
  30. public string? Shelf { get; set; }
  31. public string? Version { get; set; }
  32. public decimal UnrestrictedStock { get; set; }
  33. public decimal QcStock { get; set; }
  34. public decimal FrozenStock { get; set; }
  35. public decimal QtyOnHand { get; set; }
  36. public string? Unit { get; set; }
  37. public string? Supplier { get; set; }
  38. }
  39. public sealed class InventoryBalancePage
  40. {
  41. public int Total { get; init; }
  42. public int Page { get; init; }
  43. public int PageSize { get; init; }
  44. public IReadOnlyList<InventoryBalanceRow> List { get; init; } = Array.Empty<InventoryBalanceRow>();
  45. public decimal GrandTotalQtyOnHand { get; init; }
  46. public decimal GrandUnrestricted { get; init; }
  47. public decimal GrandQc { get; init; }
  48. public decimal GrandFrozen { get; init; }
  49. public string DataSource { get; init; } = InventoryDataSources.Std;
  50. public DateTime AsOf { get; init; }
  51. public bool IsRealtime { get; init; }
  52. }
  53. public sealed class InventoryTransactionQuery
  54. {
  55. public long TenantId { get; init; }
  56. public string Domain { get; init; } = "";
  57. public string? MaterialCode { get; init; }
  58. public string? Location { get; init; }
  59. public string? BatchNo { get; init; }
  60. public string? WorkOrderNo { get; init; }
  61. public string? TransType { get; init; }
  62. public string? CreateTime { get; init; }
  63. public string? CreateUser { get; init; }
  64. public int Page { get; init; } = 1;
  65. public int PageSize { get; init; } = 10;
  66. }
  67. public sealed class InventoryTransactionRow
  68. {
  69. public DateTime? TransTime { get; set; }
  70. public string? MaterialCode { get; set; }
  71. public string? MaterialName { get; set; }
  72. public string? Location { get; set; }
  73. public string? LocationName { get; set; }
  74. public string? BatchNo { get; set; }
  75. public decimal BeginQty { get; set; }
  76. public decimal InQty { get; set; }
  77. public decimal OutQty { get; set; }
  78. public decimal EndQty { get; set; }
  79. public string? Unit { get; set; }
  80. public string? TransType { get; set; }
  81. public string? WorkOrderNo { get; set; }
  82. public string? DeliveryNo { get; set; }
  83. public string? DeliveryType { get; set; }
  84. public string? Remark { get; set; }
  85. public string? CreateUser { get; set; }
  86. }
  87. public sealed class InventoryTransactionPage
  88. {
  89. public int Total { get; init; }
  90. public int Page { get; init; }
  91. public int PageSize { get; init; }
  92. public IReadOnlyList<InventoryTransactionRow> List { get; init; } = Array.Empty<InventoryTransactionRow>();
  93. public DateTime AsOf { get; init; }
  94. public DateTime HistoryFrom { get; init; }
  95. }