Explorar el Código

Merge branch 'feature/bug-list' of xuyiping/kpt-tmr-group into develop

xuyiping hace 1 año
padre
commit
4d0c8c4daa

+ 13 - 4
backend/operation/feed_formula.proto

@@ -81,12 +81,21 @@ message FeedFormulaUsageRequest {
 
 // 配方使用概况
 message FeedFormulaUsageResponse {
-  repeated FeedFormulaUsageList list = 1;
+  int32 code = 1;
+  string msg = 2;
+  repeated FeedFormulaUsageList data = 3;
 }
 
 // 配方使用概况
 message FeedFormulaUsageList {
-  int32 pasture_id = 1;
-  string pasture_name = 2;
-
+  int32 pasture_id = 1;                        // 牧场id
+  string pasture_name = 2;                     // 牧场名称
+  string mixed_fodder_accurate_ratio = 3;      // 混料准确率
+  string mixed_fodder_correct_ratio = 4;       // 混料正确率
+  string sprinkle_fodder_accurate_ratio = 5;   // 撒料准确率
+  string sprinkle_fodder_correct_ratio = 6;    // 撒料正确率
+  string add_feed_time = 7;                    // 加料时间
+  string sprinkle_time = 8;                    // 撒料时间
+  string stir_time = 9;                        // 搅拌延迟时间
+  string last_edit_time = 10;                  // 最近一次修改配方时间
 }

+ 9 - 1
backend/operation/statistic.proto

@@ -264,4 +264,12 @@ message SprinkleFeedTimeRequest {
   string end_date = 3;         // 结束时间
   repeated int32 pasture_ids = 4;   //牧场ids
   int32 data_type = 5;       // 过滤的数据类型 0 不过滤 1 正常 2 异常
-}
+}
+
+// MixedCategoryTmrName tmr名称和混料类别
+message MixedCategoryTmrName  {
+  string api_name   = 1;
+  int32 pasture_id = 2;
+  string start_time = 3;
+  string end_time = 4;
+}

+ 23 - 0
http/handler/statistic/analysis.go

@@ -491,3 +491,26 @@ func TrainNumber(c *gin.Context) {
 	}
 	ginutil.JSONResp(c, res)
 }
+
+func FeedMixedAndTmrName(c *gin.Context) {
+	var req operationPb.MixedCategoryTmrName
+	if err := ginutil.BindProto(c, &req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := valid.ValidateStruct(&req,
+		valid.Field(&req.ApiName, valid.Required, valid.Length(1, 100)),
+		valid.Field(&req.PastureId, valid.Required),
+	); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	res, err := middleware.BackendOperation(c).OpsService.FeedMixedAndTmrName(c, &req)
+	if err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+	c.JSON(http.StatusOK, res)
+}

+ 1 - 0
http/route/ops_api.go

@@ -80,6 +80,7 @@ func OpsAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
 		opsRoute.POST("/accuracy/data_by_name", statistic.GetDataByName)
 		opsRoute.POST("/process/analysis", statistic.SearchProcessAnalysis)
 		opsRoute.POST("/statistics/train_number", statistic.TrainNumber)
+		opsRoute.POST("/statistics/mixed_category_tmr_name", statistic.FeedMixedAndTmrName)
 
 		// 首页仪表盘
 		opsRoute.POST("/dashboard/accuracy", dashboard.AnalysisAccuracy)

+ 1 - 0
model/group_pasture.go

@@ -67,6 +67,7 @@ const (
 	CattleCategoryDistributionURl = "pasture/cattle_category/distribute"
 	CattleCategoryDeleteURl       = "pasture/cattle_category/delete"
 	ForageCategoryDeleteURl       = "pasture/cattle_category/delete"
+	FeedUsageURl                  = "pasture/feed/usage"
 )
 
 var (

+ 7 - 0
model/pasture_data.go

@@ -115,3 +115,10 @@ type FeedTemplate struct {
 	Backup2      string  `xorm:"backup2"`
 	IsModify     int32   `xorm:"is_modify"`
 }
+
+// MixedCategoryTmrNameParams tmr名称和混料类别
+type MixedCategoryTmrNameParams struct {
+	PastureId string `json:"pastureid"` //牧场id
+	StartTime string `json:"startdate,omitempty"`
+	EndTime   string `json:"enddate,omitempty"`
+}

+ 17 - 0
module/backend/dashboard_service.go

@@ -567,6 +567,23 @@ func (s *StoreEntry) SprinkleFeedTime(ctx context.Context, req *operationPb.Spri
 	return res, nil
 }
 
+func (s *StoreEntry) FeedMixedAndTmrName(ctx context.Context, req *operationPb.MixedCategoryTmrName) (*model.PastureCommonResponse, error) {
+	body := &model.PastureCommonRequest{
+		Name:       req.ApiName,
+		ReturnType: "Map",
+		ParamMaps: &model.MixedCategoryTmrNameParams{
+			PastureId: fmt.Sprintf("%d", req.PastureId),
+			StartTime: req.StartTime,
+			EndTime:   req.EndTime,
+		},
+	}
+	response := &model.PastureCommonResponse{Data: &model.PastureCommonData{}}
+	if _, err := s.PastureHttpClient(ctx, model.UrlDataByName, int64(req.PastureId), body, response); err != nil {
+		return nil, xerr.WithStack(err)
+	}
+	return response, nil
+}
+
 func sprinkleExecTimeAnalysis(sprinkleFeedTimeList map[int32]map[int32][]int64) (int32, int32) {
 	var infoSprinkleNumber, errorSprinkleNumber int32 = 0, 0
 	if len(sprinkleFeedTimeList) <= 0 {

+ 13 - 1
module/backend/feed_service.go

@@ -397,7 +397,7 @@ func (s *StoreEntry) FeedFormulaUsage(ctx context.Context, req *operationPb.Feed
 	feedFormulaDistributeLogList := make([]*model.FeedFormulaDistributeLog, 0)
 	if err := s.DB.Model(new(model.FeedFormulaDistributeLog)).
 		Where("feed_formula_id = ?", req.FeedFormulaId).
-		Where("is_show = ?", operationPb.IsShow_OK).
+		Where("is_show = ?", operationPb.IsShow_OK).Group("pasture_id").
 		Find(&feedFormulaDistributeLogList).Error; err != nil {
 		return xerr.WithStack(err)
 	}
@@ -408,6 +408,18 @@ func (s *StoreEntry) FeedFormulaUsage(ctx context.Context, req *operationPb.Feed
 	for _, list := range feedFormulaDistributeLogList {
 		go func(l *model.FeedFormulaDistributeLog) {
 			defer wg.Done()
+			groupDetail, err := s.PastureDetailById(ctx, l.PastureId)
+			if err != nil {
+				zaplog.Error("FeedFormulaUsage", zap.Any("PastureDetailById", err))
+				return
+			}
+
+			response := &operationPb.FeedFormulaUsageList{}
+			if _, err = s.PastureHttpClient(ctx, model.FeedUsageURl, groupDetail.Id, nil, response); err != nil {
+				zaplog.Error("FeedFormulaUsage", zap.Any("PastureDetailById", err))
+				return
+			}
+
 		}(list)
 	}
 

+ 1 - 0
module/backend/interface.go

@@ -154,6 +154,7 @@ type StatisticService interface {
 	TopPasture(ctx context.Context, req *operationPb.SearchAnalysisAccuracyRequest) (*model.GetPastureTopResponse, error)
 	ExecutionTime(ctx context.Context, req *operationPb.SearchAnalysisAccuracyRequest) (*model.ExecTimeResponse, error)
 	SprinkleFeedTime(ctx context.Context, req *operationPb.SprinkleFeedTimeRequest) (*model.SprinkleFeedTimeResponse, error)
+	FeedMixedAndTmrName(ctx context.Context, req *operationPb.MixedCategoryTmrName) (*model.PastureCommonResponse, error)
 }
 
 type WxAppletService interface {

+ 1 - 1
module/backend/statistic_service.go

@@ -743,7 +743,7 @@ func (s *StoreEntry) SearchProcessAnalysis(ctx context.Context, req *operationPb
 		},
 	}
 	response := &model.PastureCommonResponse{Data: &model.PastureCommonData{}}
-	if _, err := s.PastureHttpClient(ctx, model.UrlProcess, int64(req.PastureId), body, response); err != nil {
+	if _, err = s.PastureHttpClient(ctx, model.UrlProcess, int64(req.PastureId), body, response); err != nil {
 		return nil, xerr.WithStack(err)
 	}
 	return response, nil

+ 126 - 18
proto/go/backend/operation/feed_formula.pb.go

@@ -678,7 +678,9 @@ type FeedFormulaUsageResponse struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	List []*FeedFormulaUsageList `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+	Code int32                   `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
+	Msg  string                  `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
+	Data []*FeedFormulaUsageList `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
 }
 
 func (x *FeedFormulaUsageResponse) Reset() {
@@ -713,9 +715,23 @@ func (*FeedFormulaUsageResponse) Descriptor() ([]byte, []int) {
 	return file_backend_operation_feed_formula_proto_rawDescGZIP(), []int{8}
 }
 
-func (x *FeedFormulaUsageResponse) GetList() []*FeedFormulaUsageList {
+func (x *FeedFormulaUsageResponse) GetCode() int32 {
 	if x != nil {
-		return x.List
+		return x.Code
+	}
+	return 0
+}
+
+func (x *FeedFormulaUsageResponse) GetMsg() string {
+	if x != nil {
+		return x.Msg
+	}
+	return ""
+}
+
+func (x *FeedFormulaUsageResponse) GetData() []*FeedFormulaUsageList {
+	if x != nil {
+		return x.Data
 	}
 	return nil
 }
@@ -726,8 +742,16 @@ type FeedFormulaUsageList struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	PastureId   int32  `protobuf:"varint,1,opt,name=pasture_id,json=pastureId,proto3" json:"pasture_id,omitempty"`
-	PastureName string `protobuf:"bytes,2,opt,name=pasture_name,json=pastureName,proto3" json:"pasture_name,omitempty"`
+	PastureId                   int32  `protobuf:"varint,1,opt,name=pasture_id,json=pastureId,proto3" json:"pasture_id,omitempty"`                                                          // 牧场id
+	PastureName                 string `protobuf:"bytes,2,opt,name=pasture_name,json=pastureName,proto3" json:"pasture_name,omitempty"`                                                     // 牧场名称
+	MixedFodderAccurateRatio    string `protobuf:"bytes,3,opt,name=mixed_fodder_accurate_ratio,json=mixedFodderAccurateRatio,proto3" json:"mixed_fodder_accurate_ratio,omitempty"`          // 混料准确率
+	MixedFodderCorrectRatio     string `protobuf:"bytes,4,opt,name=mixed_fodder_correct_ratio,json=mixedFodderCorrectRatio,proto3" json:"mixed_fodder_correct_ratio,omitempty"`             // 混料正确率
+	SprinkleFodderAccurateRatio string `protobuf:"bytes,5,opt,name=sprinkle_fodder_accurate_ratio,json=sprinkleFodderAccurateRatio,proto3" json:"sprinkle_fodder_accurate_ratio,omitempty"` // 撒料准确率
+	SprinkleFodderCorrectRatio  string `protobuf:"bytes,6,opt,name=sprinkle_fodder_correct_ratio,json=sprinkleFodderCorrectRatio,proto3" json:"sprinkle_fodder_correct_ratio,omitempty"`    // 撒料正确率
+	AddFeedTime                 string `protobuf:"bytes,7,opt,name=add_feed_time,json=addFeedTime,proto3" json:"add_feed_time,omitempty"`                                                   // 加料时间
+	SprinkleTime                string `protobuf:"bytes,8,opt,name=sprinkle_time,json=sprinkleTime,proto3" json:"sprinkle_time,omitempty"`                                                  // 撒料时间
+	StirTime                    string `protobuf:"bytes,9,opt,name=stir_time,json=stirTime,proto3" json:"stir_time,omitempty"`                                                              // 搅拌延迟时间
+	LastEditTime                string `protobuf:"bytes,10,opt,name=last_edit_time,json=lastEditTime,proto3" json:"last_edit_time,omitempty"`                                               // 最近一次修改配方时间
 }
 
 func (x *FeedFormulaUsageList) Reset() {
@@ -776,6 +800,62 @@ func (x *FeedFormulaUsageList) GetPastureName() string {
 	return ""
 }
 
+func (x *FeedFormulaUsageList) GetMixedFodderAccurateRatio() string {
+	if x != nil {
+		return x.MixedFodderAccurateRatio
+	}
+	return ""
+}
+
+func (x *FeedFormulaUsageList) GetMixedFodderCorrectRatio() string {
+	if x != nil {
+		return x.MixedFodderCorrectRatio
+	}
+	return ""
+}
+
+func (x *FeedFormulaUsageList) GetSprinkleFodderAccurateRatio() string {
+	if x != nil {
+		return x.SprinkleFodderAccurateRatio
+	}
+	return ""
+}
+
+func (x *FeedFormulaUsageList) GetSprinkleFodderCorrectRatio() string {
+	if x != nil {
+		return x.SprinkleFodderCorrectRatio
+	}
+	return ""
+}
+
+func (x *FeedFormulaUsageList) GetAddFeedTime() string {
+	if x != nil {
+		return x.AddFeedTime
+	}
+	return ""
+}
+
+func (x *FeedFormulaUsageList) GetSprinkleTime() string {
+	if x != nil {
+		return x.SprinkleTime
+	}
+	return ""
+}
+
+func (x *FeedFormulaUsageList) GetStirTime() string {
+	if x != nil {
+		return x.StirTime
+	}
+	return ""
+}
+
+func (x *FeedFormulaUsageList) GetLastEditTime() string {
+	if x != nil {
+		return x.LastEditTime
+	}
+	return ""
+}
+
 type UniqueID_UniqueData struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -953,19 +1033,47 @@ var file_backend_operation_feed_formula_proto_rawDesc = []byte{
 	0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
 	0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64,
 	0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64,
-	0x54, 0x69, 0x6d, 0x65, 0x22, 0x57, 0x0a, 0x18, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x6d,
+	0x54, 0x69, 0x6d, 0x65, 0x22, 0x7d, 0x0a, 0x18, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x6d,
 	0x75, 0x6c, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
-	0x12, 0x3b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
-	0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
-	0x6f, 0x6e, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x55, 0x73,
-	0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x58, 0x0a,
-	0x14, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x55, 0x73, 0x61, 0x67,
-	0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65,
-	0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x73, 0x74, 0x75,
-	0x72, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x5f,
-	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x73, 0x74,
-	0x75, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x6f, 0x70, 0x65,
-	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
+	0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03,
+	0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f,
+	0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72,
+	0x6d, 0x75, 0x6c, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x61, 0x22, 0xe8, 0x03, 0x0a, 0x14, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x6d,
+	0x75, 0x6c, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a,
+	0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
+	0x52, 0x09, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70,
+	0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x0b, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d,
+	0x0a, 0x1b, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x64, 0x64, 0x65, 0x72, 0x5f, 0x61,
+	0x63, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x18, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x46, 0x6f, 0x64, 0x64, 0x65, 0x72,
+	0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x3b, 0x0a,
+	0x1a, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x64, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f,
+	0x72, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x17, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x46, 0x6f, 0x64, 0x64, 0x65, 0x72, 0x43, 0x6f,
+	0x72, 0x72, 0x65, 0x63, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x43, 0x0a, 0x1e, 0x73, 0x70,
+	0x72, 0x69, 0x6e, 0x6b, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x64, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x63,
+	0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x1b, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x6b, 0x6c, 0x65, 0x46, 0x6f, 0x64, 0x64,
+	0x65, 0x72, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12,
+	0x41, 0x0a, 0x1d, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x6b, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x64, 0x64,
+	0x65, 0x72, 0x5f, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f,
+	0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x6b, 0x6c, 0x65,
+	0x46, 0x6f, 0x64, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x52, 0x61, 0x74,
+	0x69, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x5f, 0x74,
+	0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x46, 0x65,
+	0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x6b,
+	0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73,
+	0x70, 0x72, 0x69, 0x6e, 0x6b, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73,
+	0x74, 0x69, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+	0x73, 0x74, 0x69, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74,
+	0x5f, 0x65, 0x64, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x64, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x0f,
+	0x5a, 0x0d, 0x2e, 0x3b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62,
+	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -1009,7 +1117,7 @@ var file_backend_operation_feed_formula_proto_depIdxs = []int32{
 	0,  // 7: backend.operation.SearchFeedFormulaListData.list:type_name -> backend.operation.AddFeedFormulaRequest
 	13, // 8: backend.operation.IsShowModifyFeedFormula.is_show:type_name -> backend.operation.IsShow.Kind
 	10, // 9: backend.operation.UniqueID.data:type_name -> backend.operation.UniqueID.UniqueData
-	9,  // 10: backend.operation.FeedFormulaUsageResponse.list:type_name -> backend.operation.FeedFormulaUsageList
+	9,  // 10: backend.operation.FeedFormulaUsageResponse.data:type_name -> backend.operation.FeedFormulaUsageList
 	11, // [11:11] is the sub-list for method output_type
 	11, // [11:11] is the sub-list for method input_type
 	11, // [11:11] is the sub-list for extension type_name

+ 119 - 26
proto/go/backend/operation/statistic.pb.go

@@ -2283,6 +2283,78 @@ func (x *SprinkleFeedTimeRequest) GetDataType() int32 {
 	return 0
 }
 
+// MixedCategoryTmrName tmr名称和混料类别
+type MixedCategoryTmrName struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ApiName   string `protobuf:"bytes,1,opt,name=api_name,json=apiName,proto3" json:"api_name,omitempty"`
+	PastureId int32  `protobuf:"varint,2,opt,name=pasture_id,json=pastureId,proto3" json:"pasture_id,omitempty"`
+	StartTime string `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
+	EndTime   string `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
+}
+
+func (x *MixedCategoryTmrName) Reset() {
+	*x = MixedCategoryTmrName{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_statistic_proto_msgTypes[23]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MixedCategoryTmrName) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MixedCategoryTmrName) ProtoMessage() {}
+
+func (x *MixedCategoryTmrName) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_statistic_proto_msgTypes[23]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use MixedCategoryTmrName.ProtoReflect.Descriptor instead.
+func (*MixedCategoryTmrName) Descriptor() ([]byte, []int) {
+	return file_backend_operation_statistic_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *MixedCategoryTmrName) GetApiName() string {
+	if x != nil {
+		return x.ApiName
+	}
+	return ""
+}
+
+func (x *MixedCategoryTmrName) GetPastureId() int32 {
+	if x != nil {
+		return x.PastureId
+	}
+	return 0
+}
+
+func (x *MixedCategoryTmrName) GetStartTime() string {
+	if x != nil {
+		return x.StartTime
+	}
+	return ""
+}
+
+func (x *MixedCategoryTmrName) GetEndTime() string {
+	if x != nil {
+		return x.EndTime
+	}
+	return ""
+}
+
 type Table_TableList struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -2295,7 +2367,7 @@ type Table_TableList struct {
 func (x *Table_TableList) Reset() {
 	*x = Table_TableList{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_backend_operation_statistic_proto_msgTypes[23]
+		mi := &file_backend_operation_statistic_proto_msgTypes[24]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -2308,7 +2380,7 @@ func (x *Table_TableList) String() string {
 func (*Table_TableList) ProtoMessage() {}
 
 func (x *Table_TableList) ProtoReflect() protoreflect.Message {
-	mi := &file_backend_operation_statistic_proto_msgTypes[23]
+	mi := &file_backend_operation_statistic_proto_msgTypes[24]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -2755,9 +2827,17 @@ var file_backend_operation_statistic_proto_rawDesc = []byte{
 	0x73, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52,
 	0x0a, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x64,
 	0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
-	0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x6f, 0x70,
-	0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x33,
+	0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x4d, 0x69, 0x78,
+	0x65, 0x64, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x54, 0x6d, 0x72, 0x4e, 0x61, 0x6d,
+	0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x69, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
+	0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
+	0x52, 0x09, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73,
+	0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e,
+	0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e,
+	0x64, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x6f, 0x70, 0x65, 0x72, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -2772,7 +2852,7 @@ func file_backend_operation_statistic_proto_rawDescGZIP() []byte {
 	return file_backend_operation_statistic_proto_rawDescData
 }
 
-var file_backend_operation_statistic_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
+var file_backend_operation_statistic_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
 var file_backend_operation_statistic_proto_goTypes = []interface{}{
 	(*SearchFormulaEstimateRequest)(nil),         // 0: backend.operation.SearchFormulaEstimateRequest
 	(*SearchInventoryStatisticsRequest)(nil),     // 1: backend.operation.SearchInventoryStatisticsRequest
@@ -2797,27 +2877,28 @@ var file_backend_operation_statistic_proto_goTypes = []interface{}{
 	(*CommonValueRatio)(nil),                     // 20: backend.operation.CommonValueRatio
 	(*ValueRatio)(nil),                           // 21: backend.operation.ValueRatio
 	(*SprinkleFeedTimeRequest)(nil),              // 22: backend.operation.SprinkleFeedTimeRequest
-	(*Table_TableList)(nil),                      // 23: backend.operation.Table.TableList
-	(*PaginationModel)(nil),                      // 24: backend.operation.PaginationModel
-	(*FormulaOptionEnum)(nil),                    // 25: backend.operation.FormulaOptionEnum
-	(CattleCategoryParent_Kind)(0),               // 26: backend.operation.CattleCategoryParent.Kind
-	(DashboardTopType_Kind)(0),                   // 27: backend.operation.DashboardTopType.Kind
+	(*MixedCategoryTmrName)(nil),                 // 23: backend.operation.MixedCategoryTmrName
+	(*Table_TableList)(nil),                      // 24: backend.operation.Table.TableList
+	(*PaginationModel)(nil),                      // 25: backend.operation.PaginationModel
+	(*FormulaOptionEnum)(nil),                    // 26: backend.operation.FormulaOptionEnum
+	(CattleCategoryParent_Kind)(0),               // 27: backend.operation.CattleCategoryParent.Kind
+	(DashboardTopType_Kind)(0),                   // 28: backend.operation.DashboardTopType.Kind
 }
 var file_backend_operation_statistic_proto_depIdxs = []int32{
-	24, // 0: backend.operation.SearchFormulaEstimateRequest.pagination:type_name -> backend.operation.PaginationModel
-	24, // 1: backend.operation.SearchInventoryStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
-	24, // 2: backend.operation.SearchUserMaterialsStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
-	24, // 3: backend.operation.SearchPriceStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
-	24, // 4: backend.operation.SearchFeedStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
-	24, // 5: backend.operation.CowsAnalysisRequest.pagination:type_name -> backend.operation.PaginationModel
-	24, // 6: backend.operation.MixFeedStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
-	24, // 7: backend.operation.SprinkleStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
-	24, // 8: backend.operation.ProcessAnalysisRequest.pagination:type_name -> backend.operation.PaginationModel
-	24, // 9: backend.operation.TrainNumberRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 0: backend.operation.SearchFormulaEstimateRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 1: backend.operation.SearchInventoryStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 2: backend.operation.SearchUserMaterialsStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 3: backend.operation.SearchPriceStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 4: backend.operation.SearchFeedStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 5: backend.operation.CowsAnalysisRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 6: backend.operation.MixFeedStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 7: backend.operation.SprinkleStatisticsRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 8: backend.operation.ProcessAnalysisRequest.pagination:type_name -> backend.operation.PaginationModel
+	25, // 9: backend.operation.TrainNumberRequest.pagination:type_name -> backend.operation.PaginationModel
 	14, // 10: backend.operation.TrainNumberResponse.data:type_name -> backend.operation.TrainNumberData
-	25, // 11: backend.operation.TrainNumberData.list:type_name -> backend.operation.FormulaOptionEnum
-	26, // 12: backend.operation.SearchAnalysisAccuracyRequest.cattle_parent_category_id:type_name -> backend.operation.CattleCategoryParent.Kind
-	27, // 13: backend.operation.SearchAnalysisAccuracyRequest.dashboard_top_type:type_name -> backend.operation.DashboardTopType.Kind
+	26, // 11: backend.operation.TrainNumberData.list:type_name -> backend.operation.FormulaOptionEnum
+	27, // 12: backend.operation.SearchAnalysisAccuracyRequest.cattle_parent_category_id:type_name -> backend.operation.CattleCategoryParent.Kind
+	28, // 13: backend.operation.SearchAnalysisAccuracyRequest.dashboard_top_type:type_name -> backend.operation.DashboardTopType.Kind
 	17, // 14: backend.operation.SearchAnalysisAccuracyResponse.data:type_name -> backend.operation.AnalysisAccuracy
 	18, // 15: backend.operation.AnalysisAccuracy.chart:type_name -> backend.operation.Chart
 	19, // 16: backend.operation.AnalysisAccuracy.table:type_name -> backend.operation.Table
@@ -2825,7 +2906,7 @@ var file_backend_operation_statistic_proto_depIdxs = []int32{
 	20, // 18: backend.operation.Chart.mixed_fodder_correct_ratio:type_name -> backend.operation.CommonValueRatio
 	20, // 19: backend.operation.Chart.sprinkle_fodder_accurate_ratio:type_name -> backend.operation.CommonValueRatio
 	20, // 20: backend.operation.Chart.sprinkle_fodder_correct_ratio:type_name -> backend.operation.CommonValueRatio
-	23, // 21: backend.operation.Table.table_list:type_name -> backend.operation.Table.TableList
+	24, // 21: backend.operation.Table.table_list:type_name -> backend.operation.Table.TableList
 	21, // 22: backend.operation.CommonValueRatio.data_list:type_name -> backend.operation.ValueRatio
 	23, // [23:23] is the sub-list for method output_type
 	23, // [23:23] is the sub-list for method input_type
@@ -3120,6 +3201,18 @@ func file_backend_operation_statistic_proto_init() {
 			}
 		}
 		file_backend_operation_statistic_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MixedCategoryTmrName); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_backend_operation_statistic_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*Table_TableList); i {
 			case 0:
 				return &v.state
@@ -3138,7 +3231,7 @@ func file_backend_operation_statistic_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_backend_operation_statistic_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   24,
+			NumMessages:   25,
 			NumExtensions: 0,
 			NumServices:   0,
 		},