statistic.proto 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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. // SearchFormulaEstimateRequest 配方评估
  7. message SearchFormulaEstimateRequest {
  8. string start_time = 1; // 开始时间
  9. string end_time = 2; // 结束时间
  10. int32 search_type = 3; // 查询方式 0 安照配方 1 按照栏舍
  11. string api_name = 4; // 牧场端接口标识名称
  12. int32 pasture_id = 5; // 牧场id
  13. int32 template_id = 6; // 配方模板id
  14. int32 barn_id = 7; // 栏舍id
  15. PaginationModel pagination = 8; // 分页
  16. }
  17. // SearchInventoryStatisticsRequest 库存管理-库存统计
  18. message SearchInventoryStatisticsRequest {
  19. string start_time = 1; // 开始时间
  20. string end_time = 2; // 结束时间
  21. string api_name = 3; // 牧场端接口标识名称
  22. string feed_name = 4; // 饲料名称
  23. int32 pasture_id = 5; // 牧场id
  24. PaginationModel pagination = 6; // 分页
  25. }
  26. // SearchUserMaterialsStatisticsRequest 库存管理-用料分析
  27. message SearchUserMaterialsStatisticsRequest {
  28. string start_time = 1; // 开始时间
  29. string end_time = 2; // 结束时间
  30. string api_name = 3; // 牧场端接口标识名称
  31. int32 pasture_id = 4; // 牧场id
  32. int32 error_check = 5; // 误差是否选中 0 未选中 1 选中
  33. int32 type_check = 6; // 返回实际或理论 1 理论 2 实际
  34. string feed_name = 7; // 名称
  35. PaginationModel pagination = 8; // 分页
  36. }
  37. // SearchPriceStatisticsRequest 库存管理-价格分析
  38. message SearchPriceStatisticsRequest {
  39. string start_time = 1; // 开始时间
  40. string end_time = 2; // 结束时间
  41. string api_name = 3; // 牧场端接口标识名称
  42. int32 pasture_id = 4; // 牧场id
  43. string feed_name = 5; // 名称
  44. PaginationModel pagination = 6; // 分页
  45. }
  46. // SearchFeedStatisticsRequest 饲喂效率-效率统计
  47. message SearchFeedStatisticsRequest {
  48. string start_time = 1; // 开始时间
  49. string api_name = 2; // 牧场端接口标识名称
  50. int32 pasture_id = 3; // 牧场id
  51. string formula_template = 4; // 配方模板名称
  52. string barn_name = 5; // 栏舍名称
  53. string cattle_category_name = 6; // 畜牧类别名称
  54. int32 class_number = 7; // 班次
  55. PaginationModel pagination = 8; // 分页
  56. }
  57. // FeedChartStatisticsRequest 饲喂效率chart图表
  58. message FeedChartStatisticsRequest {
  59. string start_time = 1; // 开始时间
  60. string end_time = 2; // 结束时间
  61. int32 pasture_id = 3; // 牧场id
  62. int32 status = 4;
  63. string api_type = 5; // mr 泌乳牛干物质采食量 sl 牛栏剩料率 hl 混料时间统计 zh 转化率 cbft 成本分析
  64. }
  65. // CowsAnalysisRequest 饲喂效率-牛群评估
  66. message CowsAnalysisRequest {
  67. string start_time = 1; // 开始时间
  68. string api_name = 2; // 牧场端接口标识名称
  69. int32 pasture_id = 3; // 牧场id
  70. PaginationModel pagination = 4; // 分页
  71. }
  72. // AccuracyAggStatisticsRequest 准确性分析-汇总统计
  73. message AccuracyAggStatisticsRequest {
  74. string start_time = 1; // 开始时间
  75. string end_time = 2; // 结束时间
  76. int32 pasture_id = 3; // 牧场id
  77. string fname = 4; // 查询名称
  78. string sort = 5;
  79. string status = 6;
  80. int32 genre = 7;
  81. int32 isdate = 8;
  82. int32 hlwc1 = 9;
  83. int32 hlwc2 = 10;
  84. int32 hlzq1 = 11;
  85. int32 hlzq2 = 12;
  86. int32 hlzql1 = 13;
  87. int32 hlzql2 = 14;
  88. int32 slwc1 = 15;
  89. int32 slwc2 = 16;
  90. int32 slzq1 = 17;
  91. int32 slzq2 = 18;
  92. int32 slzql1 = 19;
  93. int32 slzql2 = 20;
  94. string projname = 21;
  95. string Times = 22;
  96. bool is_error = 23;
  97. }
  98. // MixFeedStatisticsRequest 准确性分析-混料统计
  99. message MixFeedStatisticsRequest {
  100. string start_time = 1; // 开始时间
  101. string end_time = 2; // 结束时间
  102. string api_name = 3; // 牧场端接口标识名称
  103. int32 pasture_id = 4; // 牧场id
  104. string equipment_name = 5; // 设备名称
  105. string train_number = 6; // 车次
  106. int32 class_number = 7; // 班次
  107. string formulation_name = 8; // 配方名称
  108. int32 jump_type = 9; // 跳转方式 0 手动跳转 1 自动跳转
  109. int32 hlwc1 = 10; // 混料误差值1
  110. int32 hlwc2 = 11; // 混料误差值2
  111. int32 hlzq1 = 12; // 混料准确率1
  112. int32 hlzq2 = 13; // 混料准确率2
  113. int32 hlzql1 = 14; // 混料正确率1
  114. int32 hlzql2 = 15; // 混料正确率2
  115. bool is_error = 16; // 只看超出预设值数据
  116. string button_type = 17;
  117. string is_use = 18;
  118. PaginationModel pagination = 19; // 分页
  119. }
  120. // SprinkleStatisticsRequest 准确性分析-撒料统计
  121. message SprinkleStatisticsRequest {
  122. string start_time = 1; // 开始时间
  123. string end_time = 2; // 结束时间
  124. string api_name = 3; // 牧场端接口标识名称
  125. int32 pasture_id = 4; // 牧场id
  126. string equipment_name = 5; // tmr设备名称
  127. string train_number = 6; // 车次
  128. int32 class_number = 7; // 班次
  129. string formulation_name = 8; // 配方名称
  130. string barn_name = 9; // 栏舍名称
  131. int32 jump_type = 10; // 跳转方式 0 手动跳转 1 自动跳转
  132. int32 slwc1 = 11; // 撒料误差值1
  133. int32 slwc2 = 12; // 撒料误差值2
  134. int32 slzq1 = 13; // 撒料准确率1
  135. int32 slzq2 = 14; // 撒料准确率2
  136. int32 slzql1 = 15; // 撒料正确率1
  137. int32 slzql2 = 16; // 撒料正确率2
  138. bool is_error = 17; // 只看超出预设值数据
  139. string button_type = 18;
  140. string is_use = 19;
  141. PaginationModel pagination = 20; // 分页
  142. }
  143. // ProcessAnalysisRequest 过程分析
  144. message ProcessAnalysisRequest {
  145. string start_time = 1; // 开始时间
  146. string end_time = 2; // 结束时间
  147. string api_name = 3; // 牧场端接口标识名称
  148. int32 pasture_id = 4; // 牧场id
  149. int32 plan_type = 5; // 计划类型
  150. repeated string tmr_name = 6; // TMR名称
  151. string error_range = 7; // 误差筛选范围
  152. string work_status = 8; // 工作状态
  153. string mix_feed_type = 9; // 混料类别
  154. int32 hlwc1 = 10; // 混料误差值1
  155. int32 hlwc2 = 11; // 混料误差值2
  156. int32 hlzq1 = 12; // 混料准确率1
  157. int32 hlzq2 = 13; // 混料准确率2
  158. int32 slwc1 = 14; // 撒料误差值1
  159. int32 slwc2 = 15; // 撒料误差值2
  160. int32 slzq1 = 16; // 撒料准确率1
  161. int32 slzq2 = 17; // 撒料准确率2
  162. PaginationModel pagination = 18; // 分页
  163. }
  164. // 首页 dashboard 准确性分析
  165. message SearchAnalysisAccuracyRequest {
  166. CattleCategoryParent.Kind cattle_parent_category_id = 1; // 牧畜分类id 泌乳牛
  167. int32 feed_formula_id = 2; // 配方id
  168. string start_date = 3; // 开始时间
  169. string end_date = 4; // 结束时间
  170. repeated int32 pasture_ids = 5; //牧场ids
  171. }
  172. message SearchAnalysisAccuracyResponse {
  173. int32 code = 1;
  174. string msg = 2;
  175. AnalysisAccuracy data = 3;
  176. }
  177. message AnalysisAccuracy {
  178. Chart chart = 1;
  179. Table table = 2;
  180. }
  181. message Chart {
  182. CommonValueRatio mixed_fodder_accurate_ratio = 4; // 混料准确率
  183. CommonValueRatio mixed_fodder_correct_ratio = 5; // 混料正确率
  184. CommonValueRatio sprinkle_fodder_accurate_ratio = 6; // 撒料准确率
  185. CommonValueRatio sprinkle_fodder_correct_ratio = 7; // 撒料正确率
  186. }
  187. message Table {
  188. message TableList {
  189. int32 id = 1;
  190. string name = 2;
  191. }
  192. repeated TableList table_list = 1;
  193. }
  194. message CommonValueRatio {
  195. string max_value = 1; // 最高值
  196. string middle_value = 2; // 中位值
  197. string min_value = 3; // 最低值
  198. repeated ValueRatio data_list = 4; // 数据集合
  199. repeated string pasture_name = 5; // 牧场名称集合
  200. repeated string date_day = 6; // 日期集合
  201. }
  202. message ValueRatio {
  203. repeated string value_ratio = 1;
  204. }