analysis_accuracy.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 OptionsAnalysisAccuracy struct {
  27. PastureId int64 `json:"pasture_id"`
  28. PastureName string `json:"pasture_name"`
  29. AllIweight int64 `json:"all_iweight"`
  30. AllLweight int64 `json:"all_lweight"`
  31. AllOweight int64 `json:"all_oweight"`
  32. AllActualWeightMinus int64 `json:"all_actual_weight_minus"`
  33. AllAllowRatio int64 `json:"all_allow_ratio"`
  34. AllAlweight int64 `json:"all_alweight"`
  35. DateDay string `json:"date_day"`
  36. }
  37. type SearchAnalysisAccuracyResponse struct {
  38. Code int32 `json:"code"`
  39. Msg string `json:"msg"`
  40. Data *AnalysisAccuracyData `json:"data"`
  41. }
  42. type AnalysisAccuracyData struct {
  43. Chart *Chart `json:"chart"`
  44. Table *Table `json:"table"`
  45. }
  46. type Table struct {
  47. TitleList []*TableList `json:"title_list"`
  48. DataList []*interface{} `json:"data_list"`
  49. }
  50. type TableList struct {
  51. Name string `json:"name"`
  52. Value string `json:"value"`
  53. }
  54. type Chart struct {
  55. MixedFodderAccurateRatio *CommonValueRatio `json:"mixed_fodder_accurate_ratio"`
  56. MixedFodderCorrectRatio *CommonValueRatio `json:"mixed_fodder_correct_ratio"`
  57. SprinkleFodderAccurateRatio *CommonValueRatio `json:"sprinkle_fodder_accurate_ratio"`
  58. SprinkleFodderCorrectRatio *CommonValueRatio `json:"sprinkle_fodder_correct_ratio"`
  59. }
  60. type CommonValueRatio struct {
  61. MaxValue string `json:"max_value"` // 最高值
  62. MiddleValue string `json:"middle_value"` // 中位值
  63. MinValue string `json:"min_value"` // 最低值
  64. DataList [][]string `json:"data_list"` // 数据集合
  65. PastureName []string `json:"pasture_name"` // 牧场名称集合
  66. PastureIds []int32 `json:"pasture_ids"`
  67. DateDay []string `json:"date_day"` // 日期集合
  68. }