AdoSmartOpsKpiTargetDtos.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. namespace Admin.NET.Plugin.AiDOP.Dto.SmartOps;
  2. public sealed class KpiTargetCreateDto
  3. {
  4. public string MetricCode { get; set; } = string.Empty;
  5. public long FactoryId { get; set; }
  6. public decimal TargetValue { get; set; }
  7. public DateTime EffectiveFrom { get; set; }
  8. public DateTime? EffectiveTo { get; set; }
  9. public bool ClosePrevious { get; set; }
  10. public string? Remark { get; set; }
  11. }
  12. public sealed class KpiTargetUpdateDto
  13. {
  14. public decimal? TargetValue { get; set; }
  15. public DateTime? EffectiveTo { get; set; }
  16. public string? Remark { get; set; }
  17. }
  18. public sealed class KpiTargetQueryDto
  19. {
  20. public string MetricCode { get; set; } = string.Empty;
  21. public long? FactoryId { get; set; }
  22. }
  23. public sealed class KpiTargetResolveResult
  24. {
  25. public string MetricCode { get; set; } = string.Empty;
  26. public long FactoryId { get; set; }
  27. public string BizDate { get; set; } = string.Empty;
  28. public decimal? TargetValue { get; set; }
  29. public long? TargetConfigId { get; set; }
  30. public string TargetSource { get; set; } = "MISSING";
  31. public string? ConfigSourceType { get; set; }
  32. public string? EffectiveFrom { get; set; }
  33. public string? EffectiveTo { get; set; }
  34. public DateTime ResolvedAt { get; set; }
  35. }
  36. public sealed class KpiTargetDto
  37. {
  38. public long Id { get; set; }
  39. public long FactoryId { get; set; }
  40. public string MetricCode { get; set; } = string.Empty;
  41. public decimal TargetValue { get; set; }
  42. public string EffectiveFrom { get; set; } = string.Empty;
  43. public string? EffectiveTo { get; set; }
  44. public string SourceType { get; set; } = string.Empty;
  45. public string? SourceBatchId { get; set; }
  46. public int Status { get; set; }
  47. public string? Remark { get; set; }
  48. public DateTime CreateTime { get; set; }
  49. public DateTime UpdateTime { get; set; }
  50. }
  51. public sealed class KpiTargetImportPreviewDto
  52. {
  53. public long BatchId { get; set; }
  54. public string BatchNo { get; set; } = string.Empty;
  55. public string Status { get; set; } = string.Empty;
  56. public int TotalRows { get; set; }
  57. public int ValidRows { get; set; }
  58. public int ErrorRows { get; set; }
  59. public List<KpiTargetImportErrorDto> Errors { get; set; } = new();
  60. }
  61. public sealed class KpiTargetImportCommitDto
  62. {
  63. public long BatchId { get; set; }
  64. }
  65. public sealed class KpiTargetImportErrorDto
  66. {
  67. public int RowNo { get; set; }
  68. public string? MetricCode { get; set; }
  69. public string Code { get; set; } = string.Empty;
  70. public string Message { get; set; } = string.Empty;
  71. }
  72. public sealed class KpiTargetImportRow
  73. {
  74. public int RowNo { get; set; }
  75. public string MetricCode { get; set; } = string.Empty;
  76. public long FactoryId { get; set; }
  77. public decimal TargetValue { get; set; }
  78. public DateTime EffectiveFrom { get; set; }
  79. public DateTime? EffectiveTo { get; set; }
  80. public string? Remark { get; set; }
  81. }
  82. public sealed class KpiTargetLegacyStatDto
  83. {
  84. public string TargetSource { get; set; } = string.Empty;
  85. public int Count { get; set; }
  86. }