group_data.go 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. package models
  2. import (
  3. "time"
  4. )
  5. type PastureBodyRequest struct {
  6. PastureId int64 `json:"pasture_id"`
  7. Body []*FeedFormula `json:"body"`
  8. }
  9. type FeedFormula struct {
  10. Id int64 `json:"id"`
  11. Name string `json:"name"`
  12. Colour string `json:"colour"`
  13. EncodeNumber string `json:"encode_number"`
  14. CattleCategoryId int32 `json:"cattle_category_id"`
  15. CattleCategoryName string `json:"cattle_category_name"`
  16. FormulaTypeId int32 `json:"formula_type_id"`
  17. FormulaTypeName string `json:"formula_type_name"`
  18. DataSourceId int32 `json:"data_source_id"`
  19. DataSourceName string `json:"data_source_name"`
  20. Remarks string `json:"remarks"`
  21. Version int64 `json:"version"`
  22. PastureId int64 `json:"pasture_id"`
  23. PastureName string `json:"pasture_name"`
  24. IsShow int32 `json:"is_show"`
  25. IsModify int32 `json:"is_modify"`
  26. IsDelete int32 `json:"is_delete"`
  27. CreatedAt int64 `json:"created_at"`
  28. UpdatedAt int64 `json:"updated_at"`
  29. }
  30. type PastureFeedFormulaIsModifyRequest struct {
  31. PastureId int64 `json:"pasture_id"`
  32. FeedFormulaId int64 `json:"feed_formula_id"`
  33. IsModify int32 `json:"is_modify"`
  34. }
  35. type AnalysisAccuracyRequest struct {
  36. CattleParentCategoryId int32 `json:"cattle_Parent_Category_Id"`
  37. FeedFormulaId int32 `json:"feed_formula_id"`
  38. StartDate string `json:"start_date"`
  39. EndDate string `json:"end_date"` // 结束时间
  40. PastureId int32 `json:"pasture_id"` //牧场id
  41. }
  42. type MixedFodderDataList struct {
  43. Iweight int64 `xorm:"iweight" json:"iweight"`
  44. Oweight int64 `xorm:"oweight" json:"oweight"`
  45. Lweight float64 `xorm:"lweight" json:"lweight"`
  46. MyDate time.Time `xorm:"mydate" json:"mydate"`
  47. }
  48. type MixedFodderCorrectDataList struct {
  49. UseMixedFodderOptionNumber int32 `xorm:"use_mixed_fodder_option_number" json:"use_mixed_fodder_option_number"` // 已混料操作数
  50. Date string `xorm:"date" json:"date"` // 日期
  51. MixedCorrectNumber int32 `xorm:"mixed_correct_number" json:"mixed_correct_number"` // 混料正确数
  52. }
  53. type SprinkleFodderCorrectDataList struct {
  54. UseSprinkleOptionNumber int32 `xorm:"use_sprinkle_option_number" json:"use_sprinkle_option_number"` // 已撒料操作数
  55. Date string `xorm:"date" json:"date"` // 日期
  56. SprinkleCorrectNumber int32 `xorm:"sprinkle_correct_number" json:"sprinkle_correct_number"` // 撒料正确数
  57. }
  58. type AnalysisAccuracyResponse struct {
  59. MixedFodderAccurateRatio []*PastureAnalysisAccuracyDataValue `json:"mixed_fodder_accurate_ratio"` // 混料准确率
  60. MixedFodderCorrectRatio []*PastureAnalysisAccuracyDataValue `json:"mixed_fodder_correct_ratio"` // 混料正确率
  61. SprinkleFodderAccurateRatio []*PastureAnalysisAccuracyDataValue `json:"sprinkle_fodder_accurate_ratio"` // 撒料准确率
  62. SprinkleFodderCorrectRatio []*PastureAnalysisAccuracyDataValue `json:"sprinkle_fodder_correct_ratio"` // 撒料正确率
  63. }
  64. type PastureAnalysisAccuracyDataValue struct {
  65. DayTime string `json:"day_time"`
  66. Ratio float64 `json:"ratio"`
  67. }
  68. type ProcessAnalysisResponse struct {
  69. AddFeedTime *ProcessAnalysisDataValue `json:"add_feed_time"` // 加料时间
  70. SprinkleTime *ProcessAnalysisDataValue `json:"sprinkle_time"` // 撒料时间
  71. StirTime *ProcessAnalysisDataValue `json:"stir_time"` // 搅拌延迟时间
  72. }
  73. type ProcessAnalysisDataValue struct {
  74. MaxValue string `json:"max_value"` // 最大时间
  75. MinValue string `json:"min_value"` // 最小时间
  76. MiddleValue string `json:"middle_value"` // 中位值时间
  77. DownMiddleValue string `json:"down_middle_value"` // 下4分位值
  78. UpMiddleValue string `json:"up_middle_value"` // 上4分位值
  79. }
  80. type ProcessData struct {
  81. Id int64 `xorm:"id" json:"id"`
  82. ExecBeginTime time.Time `xorm:"exec_begin_time" json:"exec_begin_time"`
  83. ExecEndTime time.Time `xorm:"exec_end_time" json:"exec_end_time"`
  84. ExecProcessTime string `xorm:"exec_process_time" json:"exec_process_time"`
  85. ExecStirDelay int `xorm:"exec_stir_delay" json:"exec_stir_delay"`
  86. L2BeginTime time.Time `xorm:"l2_begin_time" json:"l2_begin_time"`
  87. L2EndTime time.Time `xorm:"l2_end_time" json:"l2_end_time"`
  88. L2ProcessTime string `xorm:"l2_process_time" json:"l2_process_time"`
  89. }
  90. type SprinkleStatisticsRequest struct {
  91. FeedFormulaId int32 `json:"feed_formula_id"`
  92. StartDate string `json:"start_date"`
  93. EndDate string `json:"end_date"` // 结束时间
  94. PastureId int32 `json:"pasture_id"` //牧场id
  95. }
  96. type SprinkleStatisticsDataList struct {
  97. FBarId int32 `xorm:"fbarid" json:"f_bar_id"`
  98. FName string `xorm:"fname" json:"f_name"`
  99. InTime time.Time `xorm:"intime" json:"in_time"`
  100. ProcessTime string `xorm:"processtime" json:"process_time"`
  101. Times int32 `xorm:"times" json:"times"`
  102. }
  103. type AccountDistributionRequest struct {
  104. Account string `json:"account"`
  105. UserName string `json:"user_name"`
  106. Password string `json:"password"`
  107. Phone string `json:"phone"`
  108. PastureId int32 `json:"pasture_id"`
  109. PastureName string `json:"pasture_name"`
  110. Address string `json:"address"`
  111. }
  112. type CategoryRequest struct {
  113. KeyWord string `json:"key_word"`
  114. PastureId int32 `json:"pasture_id"`
  115. ParentId int32 `json:"parent_id"`
  116. ParentName string `json:"parent_name"`
  117. Name string `json:"name"`
  118. Number string `json:"number"`
  119. IsShow int32 `json:"is_show"`
  120. }
  121. type GroupCateGoryRequest struct {
  122. PastureId int32 `json:"pasture_id"`
  123. ParentName string `json:"parent_name"`
  124. ParentId int32 `json:"parent_id"`
  125. IsShow int32 `json:"is_show"`
  126. CategoryName string `json:"category_name"`
  127. CategoryNumber string `json:"category_number"`
  128. }
  129. type GroupCommonResponse struct {
  130. Code int32 `json:"code"`
  131. Msg string `json:"msg"`
  132. Data interface{} `json:"data"`
  133. }