statistic.proto 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 SearchFormulaEstimateRequest {
  7. string start_time = 1; // 开始时间
  8. string end_time = 2; // 结束时间
  9. int32 search_type = 3; // 查询方式 1 安照配方 2 按照栏舍
  10. string name = 4; // 名称
  11. int32 pasture_id = 5; // 牧场id
  12. int32 template_id = 6; // 配方模板id
  13. int32 barn_id = 7; // 栏舍id
  14. PaginationModel pagination = 8; // 分页
  15. }
  16. // 首页 dashboard 准确性分析
  17. message SearchAnalysisAccuracyRequest {
  18. CattleCategoryParent.Kind cattle_parent_category_id = 1; // 牧畜分类id 泌乳牛
  19. int32 feed_formula_id = 2; // 配方id
  20. string start_date = 3; // 开始时间
  21. string end_date = 4; // 结束时间
  22. repeated int32 pasture_ids = 5; //牧场ids
  23. }
  24. message SearchAnalysisAccuracyResponse {
  25. int32 code = 1;
  26. string msg = 2;
  27. AnalysisAccuracy data = 3;
  28. }
  29. message AnalysisAccuracy {
  30. Chart chart = 1;
  31. Table table = 2;
  32. }
  33. message Chart {
  34. CommonValueRatio mixed_fodder_accurate_ratio = 4; // 混料准确率
  35. CommonValueRatio mixed_fodder_correct_ratio = 5; // 混料正确率
  36. CommonValueRatio sprinkle_fodder_accurate_ratio = 6; // 撒料准确率
  37. CommonValueRatio sprinkle_fodder_correct_ratio = 7; // 撒料正确率
  38. }
  39. message Table {
  40. message TableList {
  41. int32 id = 1;
  42. string name = 2;
  43. }
  44. repeated TableList table_list = 1;
  45. }
  46. message CommonValueRatio {
  47. string max_value = 1; // 最高值
  48. string middle_value = 2; // 中位值
  49. string min_value = 3; // 最低值
  50. repeated ValueRatio data_list = 4; // 数据集合
  51. repeated string pasture_name = 5; // 牧场名称集合
  52. repeated string date_day = 6; // 日期集合
  53. }
  54. message ValueRatio {
  55. repeated string value_ratio = 1;
  56. }