group_data.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. package models
  2. import (
  3. "time"
  4. operationPb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/operation"
  5. )
  6. type CancelDistributeFeedFormulaRequest struct {
  7. PastureId int64 `json:"pasture_id"`
  8. PastureDataId []int64 `json:"pasture_data_id"`
  9. }
  10. type FeedFormula struct {
  11. Id int64 `json:"id"`
  12. Name string `json:"name"`
  13. Colour string `json:"colour"`
  14. EncodeNumber string `json:"encode_number"`
  15. CattleCategoryId int32 `json:"cattle_category_id"`
  16. CattleCategoryName string `json:"cattle_category_name"`
  17. FormulaTypeId int32 `json:"formula_type_id"`
  18. FormulaTypeName string `json:"formula_type_name"`
  19. DataSourceId int32 `json:"data_source_id"`
  20. DataSourceName string `json:"data_source_name"`
  21. Remarks string `json:"remarks"`
  22. Version int64 `json:"version"`
  23. PastureId int64 `json:"pasture_id"`
  24. PastureName string `json:"pasture_name"`
  25. IsShow int32 `json:"is_show"`
  26. IsModify int32 `json:"is_modify"`
  27. IsDelete int32 `json:"is_delete"`
  28. CreatedAt int64 `json:"created_at"`
  29. UpdatedAt int64 `json:"updated_at"`
  30. }
  31. type FeedFormulaDetail struct {
  32. Id int64 `json:"id"`
  33. PastureId int64 `json:"pasture_id"`
  34. PastureName string `json:"pasture_name"`
  35. PastureDataId int64 `json:"pasture_data_id"`
  36. FeedFormulaId int64 `json:"feed_formula_id"`
  37. ForageId int64 `json:"forage_id"`
  38. ForageName string `json:"forage_name"`
  39. ForageGroupName string `json:"forage_group_name"`
  40. Weight int32 `json:"weight"`
  41. StirDelay int32 `json:"stir_delay"`
  42. AllowError int32 `json:"allow_error"`
  43. Prefit int64 `json:"prefit"`
  44. IsShow int32 `json:"is_show"`
  45. IsModify int32 `json:"is_modify"`
  46. IsLockCowCountRatio int32 `json:"is_lock_cow_count_ratio"`
  47. Sort int32 `json:"sort"`
  48. CreatedAt int64 `json:"created_at"`
  49. UpdatedAt int64 `json:"updated_at"`
  50. }
  51. type PastureFeedFormulaIsModifyRequest struct {
  52. PastureId int64 `json:"pasture_id"`
  53. FeedFormulaId int64 `json:"feed_formula_id"`
  54. IsModify int32 `json:"is_modify"`
  55. }
  56. type AnalysisAccuracyRequest struct {
  57. CattleParentCategoryId int32 `json:"cattle_parent_category_Id"`
  58. FeedFormulaId int32 `json:"feed_formula_id"`
  59. StartDate string `json:"start_date"`
  60. EndDate string `json:"end_date"` // 结束时间
  61. PastureId int32 `json:"pasture_id"` //牧场id
  62. }
  63. type MixedFodderDataList struct {
  64. PlanTime time.Time `xorm:"plan_time" json:"plan_time"`
  65. MixedFodderAccurateRatio float64 `xorm:"mixed_fodder_accurate_ratio" json:"mixed_fodder_accurate_ratio"`
  66. MixedFodderCorrectRatio float64 `xorm:"mixed_fodder_correct_ratio" json:"mixed_fodder_correct_ratio"`
  67. }
  68. type SprinkleFodderDataList struct {
  69. PlanTime time.Time `xorm:"plan_time" json:"plan_time"`
  70. SprinkleFodderAccurateRatio float64 `xorm:"sprinkle_fodder_accurate_ratio" json:"sprinkle_fodder_accurate_ratio"`
  71. SprinkleFodderCorrectRatio float64 `xorm:"sprinkle_fodder_correct_ratio" json:"sprinkle_fodder_correct_ratio"`
  72. }
  73. type AnalysisAccuracyResponse struct {
  74. MixedFodderAccurateRatio []*PastureAnalysisAccuracyDataValue `json:"mixed_fodder_accurate_ratio"` // 混料准确率
  75. MixedFodderCorrectRatio []*PastureAnalysisAccuracyDataValue `json:"mixed_fodder_correct_ratio"` // 混料正确率
  76. SprinkleFodderAccurateRatio []*PastureAnalysisAccuracyDataValue `json:"sprinkle_fodder_accurate_ratio"` // 撒料准确率
  77. SprinkleFodderCorrectRatio []*PastureAnalysisAccuracyDataValue `json:"sprinkle_fodder_correct_ratio"` // 撒料正确率
  78. }
  79. type PastureAnalysisAccuracyDataValue struct {
  80. DayTime string `json:"day_time"`
  81. Ratio float64 `json:"ratio"`
  82. }
  83. type ProcessAnalysisResponse struct {
  84. AddFeedTime *ProcessAnalysisDataValue `json:"add_feed_time"` // 加料时间
  85. SprinkleTime *ProcessAnalysisDataValue `json:"sprinkle_time"` // 撒料时间
  86. StirTime *ProcessAnalysisDataValue `json:"stir_time"` // 搅拌延迟时间
  87. }
  88. type ProcessAnalysisDataValue struct {
  89. MaxValue string `json:"max_value"` // 最大时间
  90. MinValue string `json:"min_value"` // 最小时间
  91. MiddleValue string `json:"middle_value"` // 中位值时间
  92. DownMiddleValue string `json:"down_middle_value"` // 下4分位值
  93. UpMiddleValue string `json:"up_middle_value"` // 上4分位值
  94. }
  95. type ProcessData struct {
  96. Id int64 `xorm:"id" json:"id"`
  97. Pid int64 `xorm:"pid" json:"pid"`
  98. PlanType int32 `xorm:"plan_type" json:"plan_type"`
  99. TmrName string `xorm:"tmr_name" json:"tmr_name"`
  100. CCid int32 `xorm:"c_cid" json:"c_cid"`
  101. PastureId int64 `xorm:"pasture_id" json:"pasture_id"`
  102. }
  103. type ProcessTimeList struct {
  104. ProcessTime string `xorm:"process_time" json:"process_time"`
  105. }
  106. type SprinkleStatisticsRequest struct {
  107. FeedFormulaId int32 `json:"feed_formula_id"`
  108. StartDate string `json:"start_date"`
  109. EndDate string `json:"end_date"` // 结束时间
  110. PastureId int32 `json:"pasture_id"` //牧场id
  111. }
  112. type SprinkleStatisticsDataList struct {
  113. FBarId int32 `xorm:"fbarid" json:"f_bar_id"`
  114. FName string `xorm:"fname" json:"f_name"`
  115. InTime time.Time `xorm:"intime" json:"in_time"`
  116. ProcessTime string `xorm:"processtime" json:"process_time"`
  117. Times int32 `xorm:"times" json:"times"`
  118. }
  119. type AccountDistributionRequest struct {
  120. Account string `json:"account"`
  121. UserName string `json:"user_name"`
  122. Password string `json:"password"`
  123. Phone string `json:"phone"`
  124. PastureId int32 `json:"pasture_id"`
  125. PastureName string `json:"pasture_name"`
  126. Address string `json:"address"`
  127. }
  128. type CategoryRequest struct {
  129. KeyWord string `json:"key_word"`
  130. PastureId int32 `json:"pasture_id"`
  131. ParentId int32 `json:"parent_id"`
  132. ParentName string `json:"parent_name"`
  133. Name string `json:"name"`
  134. Number string `json:"number"`
  135. IsShow int32 `json:"is_show"`
  136. GroupId int32 `json:"group_id"`
  137. }
  138. // CategoryDeleteRequest 集团端删除分类数据同步牧场端request
  139. type CategoryDeleteRequest struct {
  140. PastureId int32 `json:"pasture_id"`
  141. GroupId int32 `json:"group_id"`
  142. IsDelete int32 `json:"is_delete"`
  143. }
  144. // GroupCategoryDeleteRequest 牧场端删除分类数据同步集团端request
  145. type GroupCategoryDeleteRequest struct {
  146. KeyWord string `json:"key_word"`
  147. PastureId int32 `json:"pasture_id"`
  148. DataId int32 `json:"data_id"`
  149. }
  150. type GroupCateGoryRequest struct {
  151. PastureId int32 `json:"pasture_id"`
  152. ParentName string `json:"parent_name"`
  153. ParentId int32 `json:"parent_id"`
  154. IsShow int32 `json:"is_show"`
  155. CategoryName string `json:"category_name"`
  156. CategoryNumber string `json:"category_number"`
  157. }
  158. type GroupCommonResponse struct {
  159. Code int32 `json:"code"`
  160. Msg string `json:"msg"`
  161. Data interface{} `json:"data"`
  162. }
  163. type FeedListRequest struct {
  164. PastureId int32 `json:"pasture_id"`
  165. Page int32 `json:"page"`
  166. PageSize int32 `json:"page_size"`
  167. }
  168. type FeedFormulaData struct {
  169. Total int32 `json:"total"`
  170. Page int32 `json:"page"`
  171. PageSize int32 `json:"page_size"`
  172. List []*FeedTemplate `json:"list"`
  173. }
  174. type FeedData struct {
  175. Total int32 `json:"total"`
  176. Page int32 `json:"page"`
  177. PageSize int32 `json:"page_size"`
  178. List []*Feed `json:"list"`
  179. }
  180. type FeedDetailData struct {
  181. Total int32 `json:"total"`
  182. Page int32 `json:"page"`
  183. PageSize int32 `json:"page_size"`
  184. List []*FeedTemplateDetail `json:"list"`
  185. }
  186. type FeedFormulaUsageRequest struct {
  187. PastureId int32 `json:"pasture_id"`
  188. FeedFormulaId int32 `json:"feed_formula_id"`
  189. StartTime string `json:"start_time"`
  190. EndTime string `json:"end_time"`
  191. }
  192. type FeedFormulaUsageResponse struct {
  193. MixedFodderAccurateRatio string `json:"mixed_fodder_accurate_ratio"` // 混料准确率
  194. MixedFodderCorrectRatio string `json:"mixed_fodder_correct_ratio"` // 混料正确率
  195. SprinkleFodderAccurateRatio string `json:"sprinkle_fodder_accurate_ratio"` // 撒料准确率
  196. SprinkleFodderCorrectRatio string `json:"sprinkle_fodder_correct_ratio"` // 撒料正确率
  197. AddFeedTime string `json:"add_feed_time"` // 加料时间
  198. SprinkleTime string `json:"sprinkle_time"` // 撒料时间
  199. StirTime string `json:"stir_time"` // 加料延迟时间
  200. LastEditTime string `json:"last_edit_time"` // 最后修改时间
  201. }
  202. type MixedDetail struct {
  203. PlanTime string `json:"plan_time"` // 计划时间
  204. FeedFormulaId int32 `json:"feed_formula_id"` // 配方id
  205. FeedFormulaName string `json:"feed_formula_name"` // 配方名称
  206. LWeight float64 `json:"l_weight"` // 理论重量
  207. RealityWeight float64 `json:"reality_weight"` // 实际重量
  208. PlanMixedOpts int32 `json:"plan_mixed_opts"` // 计划混料操作数
  209. RealityMixedOpts int32 `json:"reality_mixed_opts"` // 已混料操作数
  210. MixedOpsRatio float64 `json:"mixed_ops_ratio"` // 混料操作率
  211. MixedAutoJumpNumber int32 `json:"mixed_auto_jump_number"` // 混料自动跳转次数
  212. MixedManualJumpNumber int32 `json:"mixed_manual_jump_number"` // 混料手动跳转次数
  213. MixErrorNumber float64 `json:"mix_error_number"` // 混料误差值
  214. MixedFodderAccurateRatio float64 `json:"mixed_fodder_accurate_ratio"` // 混料准确率
  215. Hlzq float64 `json:"hlzq"`
  216. CancelNumber int32 `json:"cancel_number"` // 取消次数
  217. VarianceRatio float64 `json:"variance_ratio"` // 方差
  218. MixedFodderCorrectNumber string `json:"mixed_fodder_correct_number"` // 混料正确数
  219. MixedFodderCorrectRatio float64 `json:"mixed_fodder_correct_ratio"` // 混料正确率
  220. Hlzql float64 `json:"hlzql"`
  221. Pid int32 `json:"pid"`
  222. RemoveCancelCorrectRatio float64 `json:"remove_cancel_correct_ratio"` // 去除取消正确率
  223. }
  224. type SprinkleDetail struct {
  225. PlanTime string `json:"plan_time"` // 计划时间
  226. FeedFormulaId int32 `json:"feed_formula_id"` // 配方id
  227. FeedFormulaName string `json:"feed_formula_name"` // 配方名称
  228. TmrName string `json:"tmr_name"` // tmr名称
  229. MixedTime string `json:"mixed_time"` // 混料时间
  230. WaitTime string `json:"wait_time"` // 等待时间
  231. LWeight float64 `json:"l_weight"` // 理论重量
  232. RealityWeight float64 `json:"reality_weight"` // 实际重量
  233. PlanSprinkleOpts int32 `json:"plan_sprinkle_opts"` // 计划撒料操作数
  234. RealitySprinkleOpts int32 `json:"reality_sprinkle_opts"` // 已撒料操作数
  235. SprinkleOpsRatio float64 `json:"sprinkle_ops_ratio"` // 撒料操作率
  236. SprinkleAutoJumpNumber int32 `json:"sprinkle_auto_jump_number"` // 撒料自动跳转次数
  237. SprinkleManualJumpNumber int32 `json:"sprinkle_manual_jump_number"` // 撒料手动跳转次数
  238. SprinkleErrorNumber float64 `json:"sprinkle_error_number"` // 撒料误差值
  239. SprinkleFodderAccurateRatio float64 `json:"sprinkle_fodder_accurate_ratio"` // 撒料准确率
  240. Slzq float64 `json:"slzq"`
  241. CancelNumber int32 `json:"cancel_number"` // 取消次数
  242. VarianceRatio float64 `json:"variance_ratio"` // 方差
  243. SprinkleFodderCorrectNumber int32 `json:"sprinkle_fodder_correct_number"` // 撒料正确数
  244. SprinkleFodderCorrectRatio float64 `json:"sprinkle_fodder_correct_ratio"` // 撒料正确率
  245. Slzql float64 `json:"slzql"`
  246. Pid int32 `json:"pid"`
  247. RemoveCancelCorrectRatio float64 `json:"remove_cancel_correct_ratio"` // 去除取消正确率
  248. }
  249. type SearchFeedTemplateRequest struct {
  250. CattleCategoryId operationPb.CattleCategoryParent_Kind `json:"cattle_category_id"`
  251. Feed
  252. }
  253. type FeedFormulaUpdateVersionRequest struct {
  254. FeedTemplateId int64 `json:"feed_template_id"` // 配方id
  255. Version int32 `json:"version"` // 版本号
  256. Belong int32 `json:"belong"` // 配方归属 0 无效 1 归属集团端 2 归属牧场端
  257. Data []*operationPb.AddFeedFormulaDetail `json:"data"`
  258. }