feed_formula.proto 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. int32 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 start_time = 2; // 开始时间
  69. int32 end_time = 3; // 结束时间
  70. }
  71. // EditRecodeFeedFormulaResponse 饲料配方修改记录
  72. message EditRecodeFeedFormulaResponse {
  73. int32 code = 1;
  74. string msg = 2;
  75. repeated FeedFormulaUsageList data = 3;
  76. }
  77. message EditRecodeFeedFormulaData {
  78. int32 pasture_id = 1;
  79. string pasture_name = 2;
  80. string modify_time = 3;
  81. string modify_detail = 4;
  82. }
  83. // GroupAddFeedFormulaDetail 配方添加饲料
  84. message GroupAddFeedFormulaDetail {
  85. int32 feed_formula_id = 1; // 配方id
  86. repeated AddFeedFormulaDetail list = 2; // 饲料详情
  87. }
  88. message AddFeedFormulaDetail {
  89. int32 feed_formula_id = 1; // 配方id
  90. int32 forage_id = 2; // 饲料id
  91. string forage_name = 3; // 饲料名称
  92. string forage_group_name = 4; // 饲料分组名称
  93. float weight = 5; // 重量
  94. int32 stir_delay = 6; // 搅拌延迟
  95. int32 allow_error = 7; // 允许误差
  96. int32 created_at = 8; // 创建时间
  97. string created_at_format = 9; // 创建时间格式化
  98. int32 id = 10;
  99. int32 sort = 11; // 排序
  100. }
  101. // FeedFormulaDetailRequest 饲料配方详情
  102. message FeedFormulaDetailRequest {
  103. int32 feed_formula_id = 1; // 配方id
  104. }
  105. // FeedFormulaDetailRequest 饲料配方详情
  106. message FeedFormulaDetailResponse {
  107. int32 code = 1;
  108. string msg = 2;
  109. repeated AddFeedFormulaDetail data = 3;
  110. }
  111. // 配方使用概况
  112. message FeedFormulaUsageRequest {
  113. int32 feed_formula_id = 1; // 饲料配方id
  114. string start_time = 2; // 开始时间
  115. string end_time = 3; // 结束时间
  116. int32 pasture_id = 4; // 牧场id
  117. }
  118. // 配方使用概况
  119. message FeedFormulaUsageResponse {
  120. int32 code = 1;
  121. string msg = 2;
  122. repeated FeedFormulaUsageList data = 3;
  123. }
  124. // 配方使用概况
  125. message FeedFormulaUsageList {
  126. int32 pasture_id = 1; // 牧场id
  127. string pasture_name = 2; // 牧场名称
  128. string mixed_fodder_accurate_ratio = 3; // 混料准确率
  129. string mixed_fodder_correct_ratio = 4; // 混料正确率
  130. string sprinkle_fodder_accurate_ratio = 5; // 撒料准确率
  131. string sprinkle_fodder_correct_ratio = 6; // 撒料正确率
  132. string add_feed_time = 7; // 加料时间
  133. string sprinkle_time = 8; // 撒料时间
  134. string stir_time = 9; // 搅拌延迟时间
  135. string last_edit_time = 10; // 最近一次修改配方时间
  136. }
  137. message PastureFeedFormulaUsageResponse {
  138. int32 code = 1;
  139. string msg = 2;
  140. PastureData data = 3;
  141. }
  142. message PastureData {
  143. string mixed_fodder_accurate_ratio = 3; // 混料准确率
  144. string mixed_fodder_correct_ratio = 4; // 混料正确率
  145. string sprinkle_fodder_accurate_ratio = 5; // 撒料准确率
  146. string sprinkle_fodder_correct_ratio = 6; // 撒料正确率
  147. string add_feed_time = 7; // 加料时间
  148. string sprinkle_time = 8; // 撒料时间
  149. string stir_time = 9; // 搅拌延迟时间
  150. string last_edit_time = 10; // 最近一次修改配方时间
  151. }
  152. message MixedFeedFormulaRequest {
  153. string name = 1; // 配方名称
  154. string colour = 2; // 颜色
  155. int32 cattle_category_id = 3; // 分类id
  156. string cattle_category_name = 4; // 分类名称
  157. int32 formula_type_id = 5; // 配方类型id
  158. string formula_type_name = 6; // 配方类型名称
  159. int32 data_source_id = 7; // 来源id
  160. string remarks = 8; // 备注
  161. repeated AddFeedFormulaDetail feed_list = 9;
  162. }