line_feature.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. package response
  2. import (
  3. "eta/eta_api/models/data_manage"
  4. "eta/eta_api/models/data_manage/line_feature/request"
  5. )
  6. // PreviewMultipleGraphConfigResp 预览
  7. type PreviewMultipleGraphConfigResp struct {
  8. CurveData interface{} `description:"曲线图数据"`
  9. StandardDeviationData interface{} `description:"标准差数据"`
  10. PercentileData interface{} `description:"百分位数据"`
  11. FrequencyDistributionData interface{} `description:"频率分布数据"`
  12. }
  13. type CurveResp struct {
  14. ChartInfo data_manage.ChartInfoView
  15. EdbInfoList []data_manage.ChartEdbInfoMapping
  16. DataResp interface{}
  17. }
  18. // LineFeatureDataResp 曲线图的一些数据返回
  19. type LineFeatureDataResp struct {
  20. MaxData float64
  21. MinData float64
  22. LatestDate string `description:"真实数据的最后日期"`
  23. EdbInfoCategoryType int
  24. ChartColor string
  25. ChartStyle string
  26. PredictChartColor string
  27. ChartType int
  28. ChartWidth float64
  29. EdbName string
  30. EdbNameEn string
  31. Unit string
  32. UnitEn string
  33. IsAxis int
  34. DataList []data_manage.EdbDataList
  35. }
  36. // FrequencyDistributionResp 频率分布图数据
  37. type FrequencyDistributionResp struct {
  38. LeftMinValue float64
  39. LeftMaxValue float64
  40. RightMinValue float64
  41. RightMaxValue float64
  42. DataList []FrequencyDistributionData
  43. }
  44. // FrequencyDistributionData 频率分布的值
  45. type FrequencyDistributionData struct {
  46. Name string `description:"别名"`
  47. NameEn string `description:"英文别名"`
  48. Unit string `description:"单位"`
  49. UnitEn string `description:"单位别名"`
  50. Value interface{} `description:"每个指标的值"`
  51. Color string `description:"数据颜色"`
  52. IsAxis int `description:"1:左轴,0:右轴"`
  53. }
  54. // FrequencyDistributionYData 频率分布的实际数据
  55. type FrequencyDistributionYData struct {
  56. X float64
  57. Y float64
  58. }
  59. type ChartInfoResp struct {
  60. List []ChartDataResp `description:"数据列表"`
  61. }
  62. // ChartDataResp 图表数据
  63. type ChartDataResp struct {
  64. LatestDate string `description:"真实数据的日期"`
  65. Name string `description:"名称"`
  66. NameEn string `description:"英文名称"`
  67. EdbInfoCategoryType int `description:"普通数据还是预测数据,0:普通,1:预测"`
  68. MaxData float64 `description:"最大值"`
  69. MinData float64 `description:"最小值"`
  70. DataList []data_manage.EdbDataList
  71. }
  72. // MultipleGraphConfigDetailResp 配置详情接口返回
  73. type MultipleGraphConfigDetailResp struct {
  74. MultipleGraphConfigId int
  75. Curve request.CurveConfig `description:"曲线图配置"`
  76. StandardDeviation request.StandardDeviation `description:"标准差配置"`
  77. Percentile request.Percentile `description:"百分位配置"`
  78. FrequencyDistribution request.FrequencyDistribution `description:"频率分布配置"`
  79. EdbInfoList []*data_manage.ChartEdbInfoMapping
  80. ChartMappingList []MultipleGraphConfigChartMapping `description:"关联图表"`
  81. EdbMappingList []MultipleGraphConfigEdbMapping `description:"关联指标"`
  82. }
  83. type MultipleGraphConfigChartMapping struct {
  84. ChartInfoId int `description:"图表id"`
  85. Source int `description:"来源,1:曲线图,8:标准差图表;9:百分位图表;10:频率分布图表;"`
  86. MultipleLocationSource int `description:"来源,1:曲线图,8:标准差图表;9:百分位图表;10:频率分布图表;"`
  87. ChartName string `description:"图表名称"`
  88. ChartClassifyId int `description:"图表分类id"`
  89. }
  90. type MultipleGraphConfigEdbMapping struct {
  91. EdbInfoId int `description:"图表id"`
  92. Source int `description:"来源,1:曲线图,8:标准差图表;9:百分位图表;10:频率分布图表;"`
  93. MultipleLocationSource int `description:"来源,1:曲线图,8:标准差图表;9:百分位图表;10:频率分布图表;"`
  94. }