feed_formula.proto 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. message AddFeedFormulaDetail {
  84. int32 feed_formula_id = 1; // 配方id
  85. int32 forage_id = 2; // 饲料id
  86. string forage_name = 3; // 饲料名称
  87. string forage_group_name = 4; // 饲料分组名称
  88. float weight = 5; // 重量
  89. int32 stir_delay = 6; // 搅拌延迟
  90. int32 allow_error = 7; // 允许误差
  91. int32 created_at = 8; // 创建时间
  92. string created_at_format = 9; // 创建时间格式化
  93. int32 id = 10;
  94. }
  95. // FeedFormulaDetailRequest 饲料配方详情
  96. message FeedFormulaDetailRequest {
  97. int32 feed_formula_id = 1; // 配方id
  98. }
  99. // FeedFormulaDetailRequest 饲料配方详情
  100. message FeedFormulaDetailResponse {
  101. int32 code = 1;
  102. string msg = 2;
  103. repeated AddFeedFormulaDetail data = 3;
  104. }
  105. // 配方使用概况
  106. message FeedFormulaUsageRequest {
  107. int32 feed_formula_id = 1; // 饲料配方id
  108. string start_time = 2; // 开始时间
  109. string end_time = 3; // 结束时间
  110. int32 pasture_id = 4; // 牧场id
  111. }
  112. // 配方使用概况
  113. message FeedFormulaUsageResponse {
  114. int32 code = 1;
  115. string msg = 2;
  116. repeated FeedFormulaUsageList data = 3;
  117. }
  118. // 配方使用概况
  119. message FeedFormulaUsageList {
  120. int32 pasture_id = 1; // 牧场id
  121. string pasture_name = 2; // 牧场名称
  122. string mixed_fodder_accurate_ratio = 3; // 混料准确率
  123. string mixed_fodder_correct_ratio = 4; // 混料正确率
  124. string sprinkle_fodder_accurate_ratio = 5; // 撒料准确率
  125. string sprinkle_fodder_correct_ratio = 6; // 撒料正确率
  126. string add_feed_time = 7; // 加料时间
  127. string sprinkle_time = 8; // 撒料时间
  128. string stir_time = 9; // 搅拌延迟时间
  129. string last_edit_time = 10; // 最近一次修改配方时间
  130. }
  131. message PastureFeedFormulaUsageResponse {
  132. int32 code = 1;
  133. string msg = 2;
  134. PastureData data = 3;
  135. }
  136. message PastureData {
  137. string mixed_fodder_accurate_ratio = 3; // 混料准确率
  138. string mixed_fodder_correct_ratio = 4; // 混料正确率
  139. string sprinkle_fodder_accurate_ratio = 5; // 撒料准确率
  140. string sprinkle_fodder_correct_ratio = 6; // 撒料正确率
  141. string add_feed_time = 7; // 加料时间
  142. string sprinkle_time = 8; // 撒料时间
  143. string stir_time = 9; // 搅拌延迟时间
  144. string last_edit_time = 10; // 最近一次修改配方时间
  145. }