analysis_accuracy.go 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. package model
  2. import (
  3. operationPb "gitee.com/xuyiping_admin/go_proto/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 SearchAnalysisAccuracyResponse1 struct {
  27. Code int32 `json:"code"`
  28. Msg string `json:"msg"`
  29. Data *AnalysisAccuracyData1 `json:"data"`
  30. }
  31. type AnalysisAccuracyData1 struct {
  32. Table *Table `json:"table"`
  33. Chart *Chart1 `json:"chart"`
  34. }
  35. type Chart1 struct {
  36. MixedFodderAccurateRatio *PastureTopData1 `json:"mixed_fodder_accurate_ratio"`
  37. MixedFodderCorrectRatio *PastureTopData1 `json:"mixed_fodder_correct_ratio"`
  38. SprinkleFodderAccurateRatio *PastureTopData1 `json:"sprinkle_fodder_accurate_ratio"`
  39. SprinkleFodderCorrectRatio *PastureTopData1 `json:"sprinkle_fodder_correct_ratio"`
  40. }
  41. type PastureTopData1 struct {
  42. MaxValue string `json:"max_value"` // 最高值
  43. MiddleValue string `json:"middle_value"` // 中位值
  44. MinValue string `json:"min_value"` // 最低值
  45. TopOneName string `json:"top_one_name"` // 最高值牧场名称
  46. Title []string `json:"title"`
  47. Ratio []float64 `json:"ratio"`
  48. }
  49. type SearchAnalysisAccuracyResponse struct {
  50. Code int32 `json:"code"`
  51. Msg string `json:"msg"`
  52. Data *AnalysisAccuracyData `json:"data"`
  53. }
  54. type AnalysisAccuracyData struct {
  55. Chart *Chart `json:"chart"`
  56. Table *Table `json:"table"`
  57. }
  58. type Table struct {
  59. TitleList []*TableList `json:"title_list"`
  60. DataList *DataList `json:"data_list"`
  61. }
  62. type TableList struct {
  63. Name string `json:"name"`
  64. Value string `json:"value"`
  65. }
  66. type DataList struct {
  67. MixedFodderAccurateRatio []map[string]string `json:"mixed_fodder_accurate_ratio"`
  68. MixedFodderCorrectRatio []map[string]string `json:"mixed_fodder_correct_ratio"`
  69. SprinkleFodderAccurateRatio []map[string]string `json:"sprinkle_fodder_accurate_ratio"`
  70. SprinkleFodderCorrectRatio []map[string]string `json:"sprinkle_fodder_correct_ratio"`
  71. }
  72. type Chart struct {
  73. MixedFodderAccurateRatio *CommonValueRatio `json:"mixed_fodder_accurate_ratio"`
  74. MixedFodderCorrectRatio *CommonValueRatio `json:"mixed_fodder_correct_ratio"`
  75. SprinkleFodderAccurateRatio *CommonValueRatio `json:"sprinkle_fodder_accurate_ratio"`
  76. SprinkleFodderCorrectRatio *CommonValueRatio `json:"sprinkle_fodder_correct_ratio"`
  77. }
  78. type CommonValueRatio struct {
  79. MaxValue string `json:"max_value"` // 最高值
  80. MiddleValue string `json:"middle_value"` // 中位值
  81. MinValue string `json:"min_value"` // 最低值
  82. TopOneName string `json:"top_one_name"` // 最高值牧场名称
  83. DataList [][]string `json:"data_list"` // 数据集合
  84. PastureName []string `json:"pasture_name"` // 牧场名称集合
  85. PastureIds []int32 `json:"pasture_ids"`
  86. DateDay []string `json:"date_day"` // 日期集合
  87. }
  88. type GetPastureTopResponse struct {
  89. Code int32 `json:"code"`
  90. Msg string `json:"msg"`
  91. Data *PastureTop `json:"data"`
  92. }
  93. type PastureTop struct {
  94. MixedFodderAccurateRatio []*PastureTopData `json:"mixed_fodder_accurate_ratio"`
  95. MixedFodderCorrectRatio []*PastureTopData `json:"mixed_fodder_correct_ratio"`
  96. SprinkleFodderAccurateRatio []*PastureTopData `json:"sprinkle_fodder_accurate_ratio"`
  97. SprinkleFodderCorrectRatio []*PastureTopData `json:"sprinkle_fodder_correct_ratio"`
  98. }
  99. type PastureTopData struct {
  100. PastureId int64 `json:"pasture_id"`
  101. PastureName string `json:"pasture_name"`
  102. Ratio float64 `json:"ratio"`
  103. }
  104. type ExecTimeResponse struct {
  105. Code int32 `json:"code"`
  106. Msg string `json:"msg"`
  107. Data *ExecTimeDataList `json:"data"`
  108. }
  109. type ExecTimeDataList struct {
  110. Chart *ExecTimeDataListChart `json:"chart"`
  111. TableList []map[string]string `json:"table_list"`
  112. }
  113. type ExecTimeDataListChart struct {
  114. Title []string `json:"title"`
  115. AddFeedTime [][]string `json:"add_feed_time"`
  116. SprinkleTime [][]string `json:"sprinkle_time"`
  117. StirTime [][]string `json:"stir_time"`
  118. }
  119. type PastureExecTimeData struct {
  120. Code int32 `json:"code"`
  121. Msg string `json:"msg"`
  122. Data *ExecTimeData `json:"data"`
  123. }
  124. type ExecTimeData struct {
  125. AddFeedTime *ExecTimeDetail `json:"add_feed_time"`
  126. SprinkleTime *ExecTimeDetail `json:"sprinkle_time"`
  127. StirTime *ExecTimeDetail `json:"stir_time"`
  128. }
  129. type ExecTimeDetail struct {
  130. MaxValue string `json:"max_value"`
  131. MinValue string `json:"min_value"`
  132. MiddleValue string `json:"middle_value"`
  133. DownMiddleValue string `json:"down_middle_value"`
  134. UpMiddleValue string `json:"up_middle_value"`
  135. }
  136. type SprinkleFeedTimeResponse struct {
  137. Code int32 `json:"code"`
  138. Msg string `json:"msg"`
  139. Data *SprinkleFeedTimeData `json:"data"`
  140. }
  141. type SprinkleFeedTimeData struct {
  142. Chart *SprinkleFeedTimeChart `json:"chart"`
  143. TableList []*SprinkleFeedTimeTable `json:"table_list"`
  144. }
  145. type SprinkleFeedTimeChart struct {
  146. Title []string `json:"title"`
  147. SprinkleNumberList [][]int32 `json:"sprinkle_number_list"`
  148. }
  149. type SprinkleFeedTimeTable struct {
  150. PastureName string `json:"pasture_name"` // 牧场名称
  151. BarnName string `json:"barn_name"` // 栏舍名称
  152. ClassNumber string `json:"class_number"` // 班次名称
  153. RealitySprinkleFeedTime string `json:"reality_sprinkle_feed_time"` // 时间撒料时间
  154. }
  155. type PastureSprinkleStatisticsDataList struct {
  156. Code int32 `json:"code"`
  157. Msg string `json:"msg"`
  158. Data []*SprinkleStatisticsDataList `json:"data"`
  159. }
  160. type SprinkleStatisticsDataList struct {
  161. FBarId int32 `json:"f_bar_id"`
  162. FName string `json:"f_name"`
  163. InTime string `json:"in_time"`
  164. ProcessTime string `json:"process_time"`
  165. Times int32 `json:"times"`
  166. }
  167. type PastureDayTimeRatio struct {
  168. PastureId int64 `json:"pasture_id"`
  169. PastureName string `json:"pasture_name"`
  170. DayTime string `json:"day_time"`
  171. Ratio float64 `json:"ratio"`
  172. }