feed_formula.proto 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. syntax = "proto3";
  2. package backend.operation;
  3. option go_package = ".;operationPb";
  4. import "backend/operation/pagination.proto";
  5. import "backend/operation/enum.proto";
  6. message AddFeedFormulaRequest {
  7. int32 id = 1;
  8. string name = 2; // 名称
  9. string encode_number = 3; // 编码
  10. string colour = 4; // 颜色
  11. CattleCategoryParent.Kind cattle_category_id = 5; // 畜牧类别id
  12. string cattle_category_name = 6; // 畜牧类型名称
  13. FormulaType.Kind formula_type_id = 7; // 配方类型id
  14. string formula_type_name = 8; // 配方类型名称
  15. DataSource.Kind data_source_id = 9; // 数据来源
  16. string data_source_name = 10; // 数据来源
  17. string remarks = 11; // 备注
  18. int32 version = 12; // 版本号
  19. IsShow.Kind is_show = 13; // 是否启用
  20. IsShow.Kind is_modify = 14; // 是否可修改
  21. int32 created_at = 15; // 创建时间
  22. string created_at_format = 16; // 创建时间格式化
  23. string pasture_name = 17; // 牧场名称
  24. }
  25. message SearchFeedFormulaRequest {
  26. int32 cattle_category_id = 1; // 分类id
  27. int32 formula_type_id = 2; // 配方类型id
  28. int32 data_source = 3; // 饲料来源
  29. IsShow.Kind is_show = 4; // 是否启用
  30. string name = 5; // 配方名称
  31. string remarks = 6; // 备注
  32. PaginationModel pagination = 7; // 分页
  33. }
  34. message SearchFeedFormulaListResponse {
  35. int32 code = 1;
  36. string msg = 2;
  37. SearchFeedFormulaListData data = 3;
  38. }
  39. message SearchFeedFormulaListData {
  40. int32 page = 1;
  41. int32 page_size = 2;
  42. int32 total = 3;
  43. repeated AddFeedFormulaRequest list = 4;
  44. }
  45. // 是否启用
  46. message IsShowModifyFeedFormula {
  47. int32 feed_formula_id = 1;
  48. IsShow.Kind is_show = 2;
  49. int32 edit_type = 3; // 1 更新是否启用 2 更新 modify
  50. }
  51. // 配方编码
  52. message UniqueID {
  53. int32 code = 1;
  54. string msg = 2;
  55. message UniqueData {
  56. string encode_number = 1;
  57. }
  58. UniqueData data = 3;
  59. }
  60. // DistributeFeedFormulaRequest 饲料配方下发
  61. message DistributeFeedFormulaRequest {
  62. repeated int32 pasture_ids = 1; // 牧场ids集合
  63. repeated int32 feed_formula_ids = 2; // 配方ids集合
  64. }
  65. // EditRecodeFeedFormulaRequest 饲料配方修改记录
  66. message EditRecodeFeedFormulaRequest {
  67. int32 pasture_id = 1; // 牧场id
  68. int32 feed_formula_id = 2; // 饲料配方id
  69. int32 start_time = 3; // 开始时间
  70. int32 end_time = 4; // 结束时间
  71. }
  72. // EditRecodeFeedFormulaResponse 饲料配方修改记录
  73. message EditRecodeFeedFormulaResponse {
  74. int32 code = 1;
  75. string msg = 2;
  76. repeated EditRecodeFeedFormulaData data = 3;
  77. }
  78. message EditRecodeFeedFormulaData {
  79. int32 pasture_id = 1;
  80. string pasture_name = 2;
  81. string modify_time = 3;
  82. string modify_detail = 4;
  83. }
  84. // GroupAddFeedFormulaDetail 配方添加饲料
  85. message GroupAddFeedFormulaDetail {
  86. int32 feed_formula_id = 1; // 配方id
  87. repeated AddFeedFormulaDetail list = 2; // 饲料详情
  88. }
  89. message AddFeedFormulaDetail {
  90. int32 feed_formula_id = 1; // 配方id
  91. int32 forage_id = 2; // 饲料id
  92. string forage_name = 3; // 饲料名称
  93. string forage_group_name = 4; // 饲料分组名称
  94. float weight = 5; // 重量
  95. int32 stir_delay = 6; // 搅拌延迟
  96. int32 allow_error = 7; // 允许误差
  97. int32 created_at = 8; // 创建时间
  98. string created_at_format = 9; // 创建时间格式化
  99. int32 id = 10;
  100. int32 sort = 11; // 排序
  101. int32 is_lock_cow_count_ratio = 12; // 是否锁定牛头数比例
  102. PaginationModel pagination = 13; // 分页
  103. int32 pre_fit = 14; // 预混料id
  104. IsShow.Kind is_modify = 15;
  105. }
  106. // FeedFormulaDetailRequest 饲料配方详情
  107. message FeedFormulaDetailRequest {
  108. int32 feed_formula_id = 1; // 配方id
  109. }
  110. // FeedFormulaDetailRequest 饲料配方详情
  111. message FeedFormulaDetailResponse {
  112. int32 code = 1;
  113. string msg = 2;
  114. repeated AddFeedFormulaDetail data = 3;
  115. }
  116. // 配方使用概况
  117. message FeedFormulaUsageRequest {
  118. int32 feed_formula_id = 1; // 饲料配方id
  119. string start_time = 2; // 开始时间
  120. string end_time = 3; // 结束时间
  121. int32 pasture_id = 4; // 牧场id
  122. }
  123. // 配方使用概况
  124. message FeedFormulaUsageResponse {
  125. int32 code = 1;
  126. string msg = 2;
  127. repeated FeedFormulaUsageList data = 3;
  128. }
  129. // 配方使用概况
  130. message FeedFormulaUsageList {
  131. int32 pasture_id = 1; // 牧场id
  132. string pasture_name = 2; // 牧场名称
  133. string mixed_fodder_accurate_ratio = 3; // 混料准确率
  134. string mixed_fodder_correct_ratio = 4; // 混料正确率
  135. string sprinkle_fodder_accurate_ratio = 5; // 撒料准确率
  136. string sprinkle_fodder_correct_ratio = 6; // 撒料正确率
  137. string add_feed_time = 7; // 加料时间
  138. string sprinkle_time = 8; // 撒料时间
  139. string stir_time = 9; // 搅拌延迟时间
  140. string last_edit_time = 10; // 最近一次修改配方时间
  141. }
  142. message PastureFeedFormulaUsageResponse {
  143. int32 code = 1;
  144. string msg = 2;
  145. PastureData data = 3;
  146. }
  147. message PastureData {
  148. string mixed_fodder_accurate_ratio = 3; // 混料准确率
  149. string mixed_fodder_correct_ratio = 4; // 混料正确率
  150. string sprinkle_fodder_accurate_ratio = 5; // 撒料准确率
  151. string sprinkle_fodder_correct_ratio = 6; // 撒料正确率
  152. string add_feed_time = 7; // 加料时间
  153. string sprinkle_time = 8; // 撒料时间
  154. string stir_time = 9; // 搅拌延迟时间
  155. string last_edit_time = 10; // 最近一次修改配方时间
  156. }
  157. message MixedFeedFormulaRequest {
  158. string name = 1; // 配方名称
  159. string colour = 2; // 颜色
  160. int32 cattle_category_id = 3; // 分类id
  161. string cattle_category_name = 4; // 分类名称
  162. FormulaType.Kind formula_type_id = 5; // 配方类型id
  163. string formula_type_name = 6; // 配方类型名称
  164. int32 data_source_id = 7; // 来源id
  165. string remarks = 8; // 备注
  166. int32 feed_formula_id = 9; // 配方id
  167. repeated AddFeedFormulaDetail feed_list = 10;
  168. }