statistic.proto 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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; // 查询方式 1 安照配方 2 按照栏舍
  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. // SearchFeedStatisticsRequest 饲喂效率-效率统计
  38. message SearchFeedStatisticsRequest {
  39. string start_time = 1; // 开始时间
  40. string api_name = 2; // 牧场端接口标识名称
  41. int32 pasture_id = 3; // 牧场id
  42. string formula_template = 4; // 配方模板名称
  43. string barn_name = 5; // 栏舍名称
  44. string cattle_category_name = 6; // 畜牧类别名称
  45. int32 class_number = 7; // 班次
  46. PaginationModel pagination = 8; // 分页
  47. }
  48. // FeedChartStatisticsRequest 饲喂效率chart图表
  49. message FeedChartStatisticsRequest {
  50. string start_time = 1; // 开始时间
  51. string end_time = 2; // 结束时间
  52. int32 pasture_id = 3; // 牧场id
  53. int32 status = 4;
  54. string api_type = 5; // mr 泌乳牛干物质采食量 sl 牛栏剩料率 hl 混料时间统计 zh 转化率 cbft 成本分析
  55. }
  56. // 首页 dashboard 准确性分析
  57. message SearchAnalysisAccuracyRequest {
  58. CattleCategoryParent.Kind cattle_parent_category_id = 1; // 牧畜分类id 泌乳牛
  59. int32 feed_formula_id = 2; // 配方id
  60. string start_date = 3; // 开始时间
  61. string end_date = 4; // 结束时间
  62. repeated int32 pasture_ids = 5; //牧场ids
  63. }
  64. message SearchAnalysisAccuracyResponse {
  65. int32 code = 1;
  66. string msg = 2;
  67. AnalysisAccuracy data = 3;
  68. }
  69. message AnalysisAccuracy {
  70. Chart chart = 1;
  71. Table table = 2;
  72. }
  73. message Chart {
  74. CommonValueRatio mixed_fodder_accurate_ratio = 4; // 混料准确率
  75. CommonValueRatio mixed_fodder_correct_ratio = 5; // 混料正确率
  76. CommonValueRatio sprinkle_fodder_accurate_ratio = 6; // 撒料准确率
  77. CommonValueRatio sprinkle_fodder_correct_ratio = 7; // 撒料正确率
  78. }
  79. message Table {
  80. message TableList {
  81. int32 id = 1;
  82. string name = 2;
  83. }
  84. repeated TableList table_list = 1;
  85. }
  86. message CommonValueRatio {
  87. string max_value = 1; // 最高值
  88. string middle_value = 2; // 中位值
  89. string min_value = 3; // 最低值
  90. repeated ValueRatio data_list = 4; // 数据集合
  91. repeated string pasture_name = 5; // 牧场名称集合
  92. repeated string date_day = 6; // 日期集合
  93. }
  94. message ValueRatio {
  95. repeated string value_ratio = 1;
  96. }