statistic.proto 9.4 KB

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