pasture_data.go 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. package model
  2. import operationPb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/operation"
  3. type CancelDistributeFeedFormulaRequest struct {
  4. PastureId int64 `json:"pasture_id"`
  5. PastureDataId []int64 `json:"pasture_data_id"`
  6. }
  7. type PastureResponse struct {
  8. Code int32 `json:"code"`
  9. Msg string `json:"msg"`
  10. Data interface{} `json:"data"`
  11. }
  12. type PastureSuccess struct {
  13. Success bool `json:"success"`
  14. }
  15. type DashboardAccuracyRequest struct {
  16. CattleParentCategoryId int32 `json:"cattle_parent_category_id,omitempty"`
  17. FeedFormulaId int32 `json:"feed_formula_id"`
  18. StartDate string `json:"start_date"`
  19. EndDate string `json:"end_date"`
  20. PastureId int32 `json:"pasture_id"`
  21. }
  22. type FeedFormulaIsModifyRequest struct {
  23. PastureId int64 `json:"pasture_id"`
  24. FeedFormulaId int64 `json:"feed_formula_id"`
  25. IsModify int32 `json:"is_modify"`
  26. }
  27. type PastureAnalysisAccuracyResponse struct {
  28. Code int32 `json:"code"`
  29. Msg string `json:"msg"`
  30. Data *PastureAnalysisAccuracyData `json:"data"`
  31. }
  32. type PastureAnalysisAccuracyData struct {
  33. MixedFodderAccurateRatio []*PastureAnalysisAccuracyDataValue `json:"mixed_fodder_accurate_ratio"` // 混料准确率
  34. MixedFodderCorrectRatio []*PastureAnalysisAccuracyDataValue `json:"mixed_fodder_correct_ratio"` // 混料正确率
  35. SprinkleFodderAccurateRatio []*PastureAnalysisAccuracyDataValue `json:"sprinkle_fodder_accurate_ratio"` // 撒料准确率
  36. SprinkleFodderCorrectRatio []*PastureAnalysisAccuracyDataValue `json:"sprinkle_fodder_correct_ratio"` // 撒料正确率
  37. }
  38. type PastureAnalysisAccuracyDataValue struct {
  39. DayTime string `json:"day_time"`
  40. Ratio float64 `json:"ratio"`
  41. }
  42. type AccountDistribution struct {
  43. Account string `json:"account"`
  44. UserName string `json:"user_name"`
  45. Password string `json:"password"`
  46. Phone string `json:"phone"`
  47. PastureId int32 `json:"pasture_id"`
  48. PastureName string `json:"pasture_name"`
  49. Address string `json:"address"`
  50. }
  51. type CategoryRequest struct {
  52. PastureId int32 `json:"pasture_id"`
  53. ParentId int32 `json:"parent_id"`
  54. ParentName string `json:"parent_name"`
  55. Name string `json:"name"`
  56. Number string `json:"number"`
  57. IsShow int32 `json:"is_show"`
  58. GroupId int32 `json:"group_id"`
  59. }
  60. type CategoryDeleteRequest struct {
  61. PastureId int32 `json:"pasture_id"`
  62. GroupId int32 `json:"group_id"`
  63. IsDelete int32 `json:"is_delete"`
  64. }
  65. type FeedFormulaListRequest struct {
  66. PastureId int32 `json:"pasture_id"`
  67. Page int32 `json:"page"`
  68. PageSize int32 `json:"page_size"`
  69. }
  70. type FeedFormulaListResponse struct {
  71. Code int32 `json:"code"`
  72. Msg string `json:"msg"`
  73. Data *FeedFormulaData `json:"data"`
  74. }
  75. type FeedFormulaData struct {
  76. Total int32 `json:"total"`
  77. Page int32 `json:"page"`
  78. PageSize int32 `json:"page_size"`
  79. List []*FeedTemplate `json:"list"`
  80. }
  81. type FeedTemplate struct {
  82. Id int64 `json:"id"`
  83. PastureId int64 `json:"pasture_id"`
  84. TCode string `json:"t_code"`
  85. TName string `json:"t_name"`
  86. TColor string `json:"t_color"`
  87. CCid int64 `json:"c_cid"`
  88. CCName string `json:"cc_name"`
  89. FTType string `json:"ft_type"`
  90. FTTypeId int32 `json:"ft_type_id"`
  91. Source string `json:"source"`
  92. Remark string `json:"remark"`
  93. Enable int32 `json:"enable"`
  94. Sort int64 `json:"sort"`
  95. Owner string `json:"owner"`
  96. Weight float64 `json:"weight"`
  97. DryWeight float64 `json:"dry_weight"`
  98. IsDelete int32 `json:"is_delete"`
  99. Version int64 `json:"version"`
  100. SaveTime string `json:"save_time"`
  101. IsIssue int32 `json:"is_issue"`
  102. IssueVersion int32 `json:"issue_version"`
  103. IssueId int64 `json:"issue_id"`
  104. Backup1 string `json:"backup1"`
  105. Backup2 string `json:"backup2"`
  106. IsModify int32 `json:"is_modify"`
  107. }
  108. // MixedCategoryTmrNameParams tmr名称和混料类别
  109. type MixedCategoryTmrNameParams struct {
  110. PastureId string `json:"pastureid"` //牧场id
  111. StartTime string `json:"startdate,omitempty"`
  112. EndTime string `json:"enddate,omitempty"`
  113. }
  114. type FeedListResponse struct {
  115. Code int32 `json:"code"`
  116. Msg string `json:"msg"`
  117. Data *FeedData `json:"data"`
  118. }
  119. type FeedData struct {
  120. Total int32 `json:"total"`
  121. Page int32 `json:"page"`
  122. PageSize int32 `json:"page_size"`
  123. List []*Feed `json:"list"`
  124. }
  125. type Feed struct {
  126. Id int64 `xorm:"id" json:"id"`
  127. PastureId int64 `xorm:"pastureid" json:"pasture_id"`
  128. FeedCode string `xorm:"feedcode" json:"feed_code"`
  129. FName string `xorm:"fname" json:"f_name"`
  130. FClass string `xorm:"fclass" json:"f_class"`
  131. FClassId int64 `xorm:"fclassid" json:"f_class_id"`
  132. AllowRatio int64 `xorm:"allowratio" json:"allow_ratio"`
  133. PrintGroupId int64 `xorm:"printgroupid" json:"print_group_id"`
  134. PrintGroup string `xorm:"printgroup" json:"print_group"`
  135. UnitWeight int64 `xorm:"unitweight" json:"unit_weight"`
  136. UPrice float64 `xorm:"uprice" json:"u_price"`
  137. Dry float64 `xorm:"dry" json:"dry"`
  138. AutoZone int64 `xorm:"autozone" json:"auto_zone"`
  139. AutoSecond int64 `xorm:"autosecond" json:"auto_second"`
  140. AutoSecondName string `xorm:"autosecondname" json:"auto_second_name"`
  141. ConfirmStart int32 `xorm:"confirmstart" json:"confirm_start"`
  142. TrgAddress int32 `xorm:"trgaddress" json:"trg_address"`
  143. SmtMrId int64 `xorm:"smt_mr_id" json:"smt_mr_id"`
  144. SmtMrName string `xorm:"smtmrname" json:"smt_mr_name"`
  145. Sort int32 `xorm:"sort" json:"sort"`
  146. Enable int32 `xorm:"enable" json:"enable"`
  147. Jmp int32 `xorm:"jmp" json:"jmp"`
  148. Source string `xorm:"source"`
  149. Backup1 string `xorm:"backup1" json:"backup1"`
  150. Backup2 string `xorm:"backup2" json:"backup2"`
  151. Backup3 string `xorm:"backup3" json:"backup3"`
  152. }
  153. type FeedFormulaDetailListResponse struct {
  154. Code int32 `json:"code"`
  155. Msg string `json:"msg"`
  156. Data *FeedFormulaDetailData `json:"data"`
  157. }
  158. type FeedFormulaDetailData struct {
  159. Total int32 `json:"total"`
  160. Page int32 `json:"page"`
  161. PageSize int32 `json:"page_size"`
  162. List []*FeedTemplateDetail `json:"list"`
  163. }
  164. type FeedTemplateDetail struct {
  165. Id int64 `json:"id"`
  166. PastureId int64 `json:"pasture_id"`
  167. FtId int64 `json:"ft_id"`
  168. FId int64 `json:"f_id"`
  169. FName string `json:"f_name"`
  170. LWeight float64 `json:"l_weight"`
  171. FWeight float64 `json:"f_weight"`
  172. IsLockCount int32 `json:"is_lock_count"`
  173. IsFg int32 `json:"is_fg"`
  174. Sort int32 `json:"sort"`
  175. FeedGroup string `json:"feed_group"`
  176. PreFtId int64 `json:"pre_ft_id"`
  177. AutoSecond int32 `json:"auto_second"`
  178. AutoSecondName string `json:"auto_second_name"`
  179. SplitFtPreId int64 `json:"split_ft_pre_id"`
  180. Deviation int32 `json:"deviation"`
  181. }
  182. type FeedFormulaUpdateVersionRequest struct {
  183. FeedTemplateId int64 `json:"feed_template_id"` // 配方id
  184. Version int64 `json:"version"` // 版本号
  185. Belong int32 `json:"belong"` // 配方归属 0 无效 1 归属集团端 2 归属牧场端
  186. Data []*operationPb.AddFeedFormulaDetail `json:"data"`
  187. }
  188. type FeedFormulaUpdateVersionResponse struct {
  189. Code int32 `json:"code"`
  190. Msg string `json:"msg"`
  191. Data struct {
  192. Success bool `json:"success"`
  193. } `json:"data"`
  194. }