feed_formula.proto 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. // 配方使用概况
  66. message FeedFormulaUsageRequest {
  67. int32 feed_formula_id = 1; // 饲料配方id
  68. string start_time = 2; // 开始时间
  69. string end_time = 3; // 结束时间
  70. int32 pasture_id = 4; // 牧场id
  71. }
  72. // 配方使用概况
  73. message FeedFormulaUsageResponse {
  74. int32 code = 1;
  75. string msg = 2;
  76. repeated FeedFormulaUsageList data = 3;
  77. }
  78. // 配方使用概况
  79. message FeedFormulaUsageList {
  80. int32 pasture_id = 1; // 牧场id
  81. string pasture_name = 2; // 牧场名称
  82. string mixed_fodder_accurate_ratio = 3; // 混料准确率
  83. string mixed_fodder_correct_ratio = 4; // 混料正确率
  84. string sprinkle_fodder_accurate_ratio = 5; // 撒料准确率
  85. string sprinkle_fodder_correct_ratio = 6; // 撒料正确率
  86. string add_feed_time = 7; // 加料时间
  87. string sprinkle_time = 8; // 撒料时间
  88. string stir_time = 9; // 搅拌延迟时间
  89. string last_edit_time = 10; // 最近一次修改配方时间
  90. }
  91. message PastureFeedFormulaUsageResponse {
  92. int32 code = 1;
  93. string msg = 2;
  94. PastureData data = 3;
  95. }
  96. message PastureData {
  97. string mixed_fodder_accurate_ratio = 3; // 混料准确率
  98. string mixed_fodder_correct_ratio = 4; // 混料正确率
  99. string sprinkle_fodder_accurate_ratio = 5; // 撒料准确率
  100. string sprinkle_fodder_correct_ratio = 6; // 撒料正确率
  101. string add_feed_time = 7; // 加料时间
  102. string sprinkle_time = 8; // 撒料时间
  103. string stir_time = 9; // 搅拌延迟时间
  104. string last_edit_time = 10; // 最近一次修改配方时间
  105. }