analysis_accuracy.go 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. package model
  2. import (
  3. operationPb "kpt-tmr-group/proto/go/backend/operation"
  4. )
  5. type AnalysisAccuracy struct {
  6. Id int64 `json:"id"`
  7. PastureId int64 `json:"pasture_id"`
  8. PastureName string `json:"pasture_name"`
  9. FeedFormulaId int64 `json:"feed_formula_id"`
  10. FeedFormulaName string `json:"feed_formula_name"`
  11. CattleParentCategoryId operationPb.CattleCategoryParent_Kind `json:"cattle_parent_category_id"`
  12. CattleParentCategoryName string `json:"cattle_parent_category_name"`
  13. IWeight int64 `json:"iweight"`
  14. LWeight int64 `json:"lweight"`
  15. OWeight int64 `json:"oweight"`
  16. ActualWeightMinus int64 `json:"actual_weight_minus"`
  17. AllowRatio int64 `json:"allow_ratio"`
  18. Alweight int64 `json:"alweight"`
  19. DateDay string `json:"date_day"`
  20. CreatedAt int64 `json:"created_at"`
  21. UpdateAt int64 `json:"update_at"`
  22. }
  23. func (c *AnalysisAccuracy) TableName() string {
  24. return "analysis_accuracy"
  25. }
  26. type SearchAnalysisAccuracyResponse struct {
  27. Code int32 `json:"code"`
  28. Msg string `json:"msg"`
  29. Data *AnalysisAccuracyData `json:"data"`
  30. }
  31. type AnalysisAccuracyData struct {
  32. Chart *Chart `json:"chart"`
  33. Table *Table `json:"table"`
  34. }
  35. type Table struct {
  36. TitleList []*TableList `json:"title_list"`
  37. DataList *DataList `json:"data_list"`
  38. }
  39. type TableList struct {
  40. Name string `json:"name"`
  41. Value string `json:"value"`
  42. }
  43. type DataList struct {
  44. MixedFodderAccurateRatio []map[string]string `json:"mixed_fodder_accurate_ratio"`
  45. MixedFodderCorrectRatio []map[string]string `json:"mixed_fodder_correct_ratio"`
  46. SprinkleFodderAccurateRatio []map[string]string `json:"sprinkle_fodder_accurate_ratio"`
  47. SprinkleFodderCorrectRatio []map[string]string `json:"sprinkle_fodder_correct_ratio"`
  48. }
  49. type Chart struct {
  50. MixedFodderAccurateRatio *CommonValueRatio `json:"mixed_fodder_accurate_ratio"`
  51. MixedFodderCorrectRatio *CommonValueRatio `json:"mixed_fodder_correct_ratio"`
  52. SprinkleFodderAccurateRatio *CommonValueRatio `json:"sprinkle_fodder_accurate_ratio"`
  53. SprinkleFodderCorrectRatio *CommonValueRatio `json:"sprinkle_fodder_correct_ratio"`
  54. }
  55. type CommonValueRatio struct {
  56. MaxValue string `json:"max_value"` // 最高值
  57. MiddleValue string `json:"middle_value"` // 中位值
  58. MinValue string `json:"min_value"` // 最低值
  59. TopOneName string `json:"top_one_name"` // 最高值牧场名称
  60. DataList [][]string `json:"data_list"` // 数据集合
  61. PastureName []string `json:"pasture_name"` // 牧场名称集合
  62. PastureIds []int32 `json:"pasture_ids"`
  63. DateDay []string `json:"date_day"` // 日期集合
  64. }
  65. type GetPastureTopResponse struct {
  66. Code int32 `json:"code"`
  67. Msg string `json:"msg"`
  68. Data *PastureTop `json:"data"`
  69. }
  70. type PastureTop struct {
  71. MixedFodderAccurateRatio []*PastureTopData `json:"mixed_fodder_accurate_ratio"`
  72. MixedFodderCorrectRatio []*PastureTopData `json:"mixed_fodder_correct_ratio"`
  73. SprinkleFodderAccurateRatio []*PastureTopData `json:"sprinkle_fodder_accurate_ratio"`
  74. SprinkleFodderCorrectRatio []*PastureTopData `json:"sprinkle_fodder_correct_ratio"`
  75. }
  76. type PastureTopData struct {
  77. PastureName string `json:"pasture_name"`
  78. Ratio float64 `json:"ratio"`
  79. }
  80. type ExecTimeResponse struct {
  81. Code int32 `json:"code"`
  82. Msg string `json:"msg"`
  83. Data *ExecTimeDataList `json:"data"`
  84. }
  85. type ExecTimeDataList struct {
  86. Chart *ExecTimeDataListChart `json:"chart"`
  87. TableList []map[string]string `json:"table_list"`
  88. }
  89. type ExecTimeDataListChart struct {
  90. Title []string `json:"title"`
  91. AddFeedTime [][]string `json:"add_feed_time"`
  92. SprinkleTime [][]string `json:"sprinkle_time"`
  93. StirTime [][]string `json:"stir_time"`
  94. }
  95. type PastureExecTimeData struct {
  96. Code int32 `json:"code"`
  97. Msg string `json:"msg"`
  98. Data *ExecTimeData `json:"data"`
  99. }
  100. type ExecTimeData struct {
  101. AddFeedTime *ExecTimeDetail `json:"add_feed_time"`
  102. SprinkleTime *ExecTimeDetail `json:"sprinkle_time"`
  103. StirTime *ExecTimeDetail `json:"stir_time"`
  104. }
  105. type ExecTimeDetail struct {
  106. MaxValue string `json:"max_value"`
  107. MinValue string `json:"min_value"`
  108. MiddleValue string `json:"middle_value"`
  109. DownMiddleValue string `json:"down_middle_value"`
  110. UpMiddleValue string `json:"up_middle_value"`
  111. }
  112. type SprinkleFeedTimeResponse struct {
  113. Code int32 `json:"code"`
  114. Msg string `json:"msg"`
  115. Data *SprinkleFeedTimeData `json:"data"`
  116. }
  117. type SprinkleFeedTimeData struct {
  118. Chart *SprinkleFeedTimeChart `json:"chart"`
  119. TableList []*SprinkleFeedTimeTable `json:"table_list"`
  120. }
  121. type SprinkleFeedTimeChart struct {
  122. Title []string `json:"title"`
  123. SprinkleNumberList [][]int32 `json:"sprinkle_number_list"`
  124. }
  125. type SprinkleFeedTimeTable struct {
  126. PastureName string `json:"pasture_name"` // 牧场名称
  127. BarnName string `json:"barn_name"` // 栏舍名称
  128. ClassNumber string `json:"class_number"` // 班次名称
  129. RealitySprinkleFeedTime string `json:"reality_sprinkle_feed_time"` // 时间撒料时间
  130. }
  131. type PastureSprinkleStatisticsDataList struct {
  132. Code int32 `json:"code"`
  133. Msg string `json:"msg"`
  134. Data []*SprinkleStatisticsDataList `json:"data"`
  135. }
  136. type SprinkleStatisticsDataList struct {
  137. FBarId int32 `json:"f_bar_id"`
  138. FName string `json:"f_name"`
  139. InTime string `json:"in_time"`
  140. ProcessTime string `json:"process_time"`
  141. Times int32 `json:"times"`
  142. }