瀏覽代碼

storage: 库存管理

Yi 1 年之前
父節點
當前提交
083ee8acc2

+ 10 - 1
backend/operation/enum.proto

@@ -20,7 +20,7 @@ message CattleCategoryParent {
     FATTEN_CAW = 2;        // 育肥牛
     RESERVE_CAW  = 3;      // 后备牛
     DRY_CAW = 4;           // 干奶牛
-    PERINATAL_CAW  = 5;    // 泌乳
+    PERINATAL_CAW  = 5;    // 围产
     OTHER_CAW = 6;         // 其他
   }
 }
@@ -72,3 +72,12 @@ message DataSource {
     FROM_PASTURE = 3;     // 来自牧场
   }
 }
+
+message FormulaType {
+  enum Kind {
+    INVALID = 0;                    // 无
+    FEED_FORMULA = 1;              // 饲喂配方
+    PREMIXED_FORMULA = 2;          // 预混配方
+    SUPPLEMENTARY_FORMULA = 3;     // 补料配方
+  }
+}

+ 20 - 1
backend/operation/pasture.proto

@@ -85,7 +85,8 @@ message SearchCattleCategoryResponse {
 message SearchCattleCategoryData {
   int32 page = 1;
   int32 total = 2;
-  repeated AddCattleCategoryRequest list = 3;
+  int32 page_size = 3;
+  repeated AddCattleCategoryRequest list = 4;
 }
 
 // 添加饲料分类
@@ -177,6 +178,12 @@ message IsShowForage {
   IsShow.Kind is_show = 2;
 }
 
+message ForageEnumListResponse {
+  int32 code = 1;
+  string msg = 2;
+  ForageEnumList data = 3;
+}
+
 message ForageEnumList {
   repeated ForageSourceEnum forage_source = 1;
   repeated ForagePlanTypeEnum forage_plan_type = 2;
@@ -184,6 +191,8 @@ message ForageEnumList {
   repeated CattleParentCategoryEnum cattle_parent_category = 4;
   repeated ForageParentCategoryEnum forage_parent_category = 5;
   repeated IsShowEnum is_show = 6;
+  repeated FormulaTypeEnum formula_type = 7;
+  repeated FormulaOptionEnum formula_list = 8;
 }
 
 message ForageSourceEnum {
@@ -214,4 +223,14 @@ message ForageParentCategoryEnum {
 message IsShowEnum {
   IsShow.Kind value = 1;
   string label = 2;
+}
+
+message FormulaTypeEnum {
+  FormulaType.Kind value = 1;
+  string label = 2;
+}
+
+message FormulaOptionEnum {
+  int32 value = 1;
+  string label = 2;
 }

+ 3 - 1
http/route/app_api.go

@@ -95,7 +95,7 @@ func AppAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
 		opsRoute.POST("/feed_formula/add", feed.AddFeedFormula)
 		opsRoute.POST("/feed_formula/edit", feed.EditFeedFormula)
 		opsRoute.POST("/feed_formula/list", feed.SearchFeedFormulaList)
-		opsRoute.POST("/feed_formula/delete/:feed_formula_id", feed.DeleteFeedFormula)
+		opsRoute.DELETE("/feed_formula/delete/:feed_formula_id", feed.DeleteFeedFormula)
 		opsRoute.POST("/feed_formula/is_modify_show", feed.IsShowModifyFeedFormula)
 		opsRoute.POST("/feed_formula/excel_export", feed.ExcelExportFeedFormula)
 		opsRoute.POST("/feed_formula/excel_import", feed.ExcelImportFeedFormula)
@@ -103,6 +103,8 @@ func AppAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
 
 		//统计分析 statistic analysis
 		opsRoute.POST("/feed_estimate/list", statistic.SearchFormulaEstimateList)
+
+		// 其他
 	}
 }
 

+ 2 - 0
model/feed_formula.go

@@ -60,6 +60,8 @@ func (f FeedFormulaSlice) ToPB() []*operationPb.AddFeedFormulaRequest {
 		res[i] = &operationPb.AddFeedFormulaRequest{
 			Id:                 int32(v.Id),
 			Name:               v.Name,
+			Colour:             v.Colour,
+			EncodeNumber:       v.EncodeNumber,
 			CattleCategoryId:   v.CattleCategoryId,
 			CattleCategoryName: v.CattleCategoryName,
 			FormulaTypeId:      v.FormulaTypeId,

+ 3 - 1
model/forage.go

@@ -6,7 +6,9 @@ import (
 )
 
 type Forage struct {
-	Id                 int64                           `json:"int_64"`
+	Id                 int64                           `json:"id"`
+	PastureId          int64                           `json:"pasture_id"`
+	PastureName        string                          `json:"pasture_name"`
 	Name               string                          `json:"name"`
 	CategoryId         int64                           `json:"category_id"`
 	MaterialType       int64                           `json:"material_type"`

+ 4 - 4
module/backend/feed_service.go

@@ -30,7 +30,7 @@ func (s *StoreEntry) CreateFeedFormula(ctx context.Context, req *operationPb.Add
 func (s *StoreEntry) EditFeedFormula(ctx context.Context, req *operationPb.AddFeedFormulaRequest) error {
 
 	forage := model.FeedFormula{Id: int64(req.Id)}
-	if err := s.DB.Where("is_delete = ?", operationPb.IsShow_OK).First(forage).Error; err != nil {
+	if err := s.DB.Where("is_delete = ?", operationPb.IsShow_OK).First(&forage).Error; err != nil {
 		if errors.Is(err, gorm.ErrRecordNotFound) {
 			return xerr.Custom("该数据不存在")
 		}
@@ -50,7 +50,7 @@ func (s *StoreEntry) EditFeedFormula(ctx context.Context, req *operationPb.AddFe
 		IsShow:             req.IsShow,
 	}
 
-	if err := s.DB.Model(new(model.Forage)).
+	if err := s.DB.Model(new(model.FeedFormula)).
 		Omit("is_show", "is_delete", "encode_number", "formula_type_id", "formula_type_name", "data_source", "version", "is_modify").
 		Where("id = ?", req.Id).
 		Updates(updateData).Error; err != nil {
@@ -65,7 +65,7 @@ func (s *StoreEntry) SearchFeedFormulaList(ctx context.Context, req *operationPb
 	feedFormula := make([]*model.FeedFormula, 0)
 	var count int64 = 0
 
-	pref := s.DB.Model(new(model.Forage)).Where("is_delete = ?", operationPb.IsShow_OK)
+	pref := s.DB.Model(new(model.FeedFormula)).Where("is_delete = ?", operationPb.IsShow_OK)
 	if req.Name != "" {
 		pref.Where("name like ?", fmt.Sprintf("%s%s%s", "%", req.Name, "%"))
 	}
@@ -137,7 +137,7 @@ func (s *StoreEntry) DeleteFeedFormula(ctx context.Context, feedFormulaId int64)
 		return xerr.WithStack(err)
 	}
 
-	if err := s.DB.Model(new(model.FeedFormula)).Where("id = ?", feedFormula).Update("is_delete", operationPb.IsShow_NO).Error; err != nil {
+	if err := s.DB.Model(new(model.FeedFormula)).Where("id = ?", feedFormula.Id).Update("is_delete", operationPb.IsShow_NO).Error; err != nil {
 		return xerr.WithStack(err)
 	}
 	return nil

+ 1 - 1
module/backend/interface.go

@@ -71,7 +71,7 @@ type PastureService interface {
 	CreateForage(ctx context.Context, req *operationPb.AddForageRequest) error
 	EditForage(ctx context.Context, req *operationPb.AddForageRequest) error
 	SearchForageList(ctx context.Context, req *operationPb.SearchForageListRequest) (*operationPb.SearchForageListResponse, error)
-	ForageEnumList(ctx context.Context) *operationPb.ForageEnumList
+	ForageEnumList(ctx context.Context) *operationPb.ForageEnumListResponse
 	DeleteForageList(ctx context.Context, ids []int64) error
 	IsShowForage(ctx context.Context, req *operationPb.IsShowForage) error
 	ExcelImportForage(ctx context.Context, req io.Reader) error

+ 110 - 12
module/backend/pasture_service.go

@@ -278,9 +278,10 @@ func (s *StoreEntry) SearchCattleCategoryList(ctx context.Context, req *operatio
 		Code: http.StatusOK,
 		Msg:  "ok",
 		Data: &operationPb.SearchCattleCategoryData{
-			Page:  req.Pagination.Page,
-			Total: int32(count),
-			List:  model.CattleCategorySlice(cattleCategory).ToPB(),
+			Page:     req.Pagination.Page,
+			PageSize: req.Pagination.PageSize,
+			Total:    int32(count),
+			List:     model.CattleCategorySlice(cattleCategory).ToPB(),
 		},
 	}, nil
 }
@@ -486,17 +487,24 @@ func (s *StoreEntry) SearchForageList(ctx context.Context, req *operationPb.Sear
 	}, nil
 }
 
-func (s *StoreEntry) ForageEnumList(ctx context.Context) *operationPb.ForageEnumList {
-	res := &operationPb.ForageEnumList{
-		JumpDelaType:         make([]*operationPb.JumpDelaTypeEnum, 0),
-		ForageSource:         make([]*operationPb.ForageSourceEnum, 0),
-		ForagePlanType:       make([]*operationPb.ForagePlanTypeEnum, 0),
-		CattleParentCategory: make([]*operationPb.CattleParentCategoryEnum, 0),
-		ForageParentCategory: make([]*operationPb.ForageParentCategoryEnum, 0),
-		IsShow:               make([]*operationPb.IsShowEnum, 0),
+func (s *StoreEntry) ForageEnumList(ctx context.Context) *operationPb.ForageEnumListResponse {
+	res := &operationPb.ForageEnumListResponse{
+		Code: http.StatusOK,
+		Msg:  "ok",
+		Data: &operationPb.ForageEnumList{
+			JumpDelaType:         make([]*operationPb.JumpDelaTypeEnum, 0),
+			ForageSource:         make([]*operationPb.ForageSourceEnum, 0),
+			ForagePlanType:       make([]*operationPb.ForagePlanTypeEnum, 0),
+			CattleParentCategory: make([]*operationPb.CattleParentCategoryEnum, 0),
+			ForageParentCategory: make([]*operationPb.ForageParentCategoryEnum, 0),
+			IsShow:               make([]*operationPb.IsShowEnum, 0),
+			FormulaType:          make([]*operationPb.FormulaTypeEnum, 0),
+			FormulaList:          make([]*operationPb.FormulaOptionEnum, 0),
+		},
 	}
 
-	res.JumpDelaType = append(res.JumpDelaType, &operationPb.JumpDelaTypeEnum{
+	// 跳转延迟
+	res.Data.JumpDelaType = append(res.Data.JumpDelaType, &operationPb.JumpDelaTypeEnum{
 		Value: operationPb.JumpDelaType_INVALID,
 		Label: "禁用",
 	}, &operationPb.JumpDelaTypeEnum{
@@ -507,6 +515,96 @@ func (s *StoreEntry) ForageEnumList(ctx context.Context) *operationPb.ForageEnum
 		Label: "6秒",
 	})
 
+	// 饲料来源
+	res.Data.ForageSource = append(res.Data.ForageSource, &operationPb.ForageSourceEnum{
+		Value: operationPb.ForageSource_SYSTEM_BUILT_IN,
+		Label: "系统内置",
+	}, &operationPb.ForageSourceEnum{
+		Value: operationPb.ForageSource_USER_DEFINED,
+		Label: "用户自定义",
+	})
+
+	// 计划类型
+	res.Data.ForagePlanType = append(res.Data.ForagePlanType, &operationPb.ForagePlanTypeEnum{
+		Value: operationPb.ForagePlanType_FORKLIFT,
+		Label: "铲车",
+	}, &operationPb.ForagePlanTypeEnum{
+		Value: operationPb.ForagePlanType_CONCENTRATE,
+		Label: "精料",
+	})
+
+	// 畜牧类别
+	res.Data.CattleParentCategory = append(res.Data.CattleParentCategory, &operationPb.CattleParentCategoryEnum{
+		Value: operationPb.CattleCategoryParent_LACTATION_CAW,
+		Label: "泌乳牛",
+	}, &operationPb.CattleParentCategoryEnum{
+		Value: operationPb.CattleCategoryParent_FATTEN_CAW,
+		Label: "育肥牛",
+	}, &operationPb.CattleParentCategoryEnum{
+		Value: operationPb.CattleCategoryParent_RESERVE_CAW,
+		Label: "后备牛",
+	}, &operationPb.CattleParentCategoryEnum{
+		Value: operationPb.CattleCategoryParent_DRY_CAW,
+		Label: "干奶牛",
+	}, &operationPb.CattleParentCategoryEnum{
+		Value: operationPb.CattleCategoryParent_PERINATAL_CAW,
+		Label: "围产牛",
+	}, &operationPb.CattleParentCategoryEnum{
+		Value: operationPb.CattleCategoryParent_OTHER_CAW,
+		Label: "其他",
+	})
+
+	// 饲料类别
+	res.Data.ForageParentCategory = append(res.Data.ForageParentCategory, &operationPb.ForageParentCategoryEnum{
+		Value: operationPb.ForageCategoryParent_ROUGHAGE,
+		Label: "粗料",
+	}, &operationPb.ForageParentCategoryEnum{
+		Value: operationPb.ForageCategoryParent_CONCENTRATE,
+		Label: "精料",
+	}, &operationPb.ForageParentCategoryEnum{
+		Value: operationPb.ForageCategoryParent_HALF_ROUGHAGE_HALF_CONCENTRATE,
+		Label: "粗料精料参半",
+	}, &operationPb.ForageParentCategoryEnum{
+		Value: operationPb.ForageCategoryParent_OTHER,
+		Label: "其他",
+	})
+
+	res.Data.IsShow = append(res.Data.IsShow, &operationPb.IsShowEnum{
+		Value: operationPb.IsShow_OK,
+		Label: "是",
+	}, &operationPb.IsShowEnum{
+		Value: operationPb.IsShow_NO,
+		Label: "否",
+	})
+
+	res.Data.FormulaType = append(res.Data.FormulaType, &operationPb.FormulaTypeEnum{
+		Value: operationPb.FormulaType_FEED_FORMULA,
+		Label: "饲喂配方",
+	}, &operationPb.FormulaTypeEnum{
+		Value: operationPb.FormulaType_PREMIXED_FORMULA,
+		Label: "预混配方",
+	}, &operationPb.FormulaTypeEnum{
+		Value: operationPb.FormulaType_SUPPLEMENTARY_FORMULA,
+		Label: "补料配方",
+	})
+
+	res.Data.FormulaList = append(res.Data.FormulaList, &operationPb.FormulaOptionEnum{
+		Value: 0,
+		Label: "所有",
+	})
+	formulaList := make([]*model.FeedFormula, 0)
+	if err := s.DB.Where("is_delete = ?", operationPb.IsShow_OK).Find(&formulaList).Error; err != nil {
+		zaplog.Error("OptionFormula", zap.Any("Err", err))
+		return res
+	}
+
+	for _, v := range formulaList {
+		res.Data.FormulaList = append(res.Data.FormulaList, &operationPb.FormulaOptionEnum{
+			Value: int32(v.Id),
+			Label: v.Name,
+		})
+	}
+
 	return res
 }
 

+ 125 - 15
proto/go/backend/operation/enum.pb.go

@@ -77,7 +77,7 @@ const (
 	CattleCategoryParent_FATTEN_CAW    CattleCategoryParent_Kind = 2 // 育肥牛
 	CattleCategoryParent_RESERVE_CAW   CattleCategoryParent_Kind = 3 // 后备牛
 	CattleCategoryParent_DRY_CAW       CattleCategoryParent_Kind = 4 // 干奶牛
-	CattleCategoryParent_PERINATAL_CAW CattleCategoryParent_Kind = 5 // 泌乳
+	CattleCategoryParent_PERINATAL_CAW CattleCategoryParent_Kind = 5 // 围产
 	CattleCategoryParent_OTHER_CAW     CattleCategoryParent_Kind = 6 // 其他
 )
 
@@ -387,6 +387,58 @@ func (DataSource_Kind) EnumDescriptor() ([]byte, []int) {
 	return file_backend_operation_enum_proto_rawDescGZIP(), []int{6, 0}
 }
 
+type FormulaType_Kind int32
+
+const (
+	FormulaType_INVALID               FormulaType_Kind = 0 // 无
+	FormulaType_FEED_FORMULA          FormulaType_Kind = 1 // 饲喂配方
+	FormulaType_PREMIXED_FORMULA      FormulaType_Kind = 2 // 预混配方
+	FormulaType_SUPPLEMENTARY_FORMULA FormulaType_Kind = 3 // 补料配方
+)
+
+// Enum value maps for FormulaType_Kind.
+var (
+	FormulaType_Kind_name = map[int32]string{
+		0: "INVALID",
+		1: "FEED_FORMULA",
+		2: "PREMIXED_FORMULA",
+		3: "SUPPLEMENTARY_FORMULA",
+	}
+	FormulaType_Kind_value = map[string]int32{
+		"INVALID":               0,
+		"FEED_FORMULA":          1,
+		"PREMIXED_FORMULA":      2,
+		"SUPPLEMENTARY_FORMULA": 3,
+	}
+)
+
+func (x FormulaType_Kind) Enum() *FormulaType_Kind {
+	p := new(FormulaType_Kind)
+	*p = x
+	return p
+}
+
+func (x FormulaType_Kind) String() string {
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FormulaType_Kind) Descriptor() protoreflect.EnumDescriptor {
+	return file_backend_operation_enum_proto_enumTypes[7].Descriptor()
+}
+
+func (FormulaType_Kind) Type() protoreflect.EnumType {
+	return &file_backend_operation_enum_proto_enumTypes[7]
+}
+
+func (x FormulaType_Kind) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use FormulaType_Kind.Descriptor instead.
+func (FormulaType_Kind) EnumDescriptor() ([]byte, []int) {
+	return file_backend_operation_enum_proto_rawDescGZIP(), []int{7, 0}
+}
+
 // 字段类型
 type IsShow struct {
 	state         protoimpl.MessageState
@@ -658,6 +710,44 @@ func (*DataSource) Descriptor() ([]byte, []int) {
 	return file_backend_operation_enum_proto_rawDescGZIP(), []int{6}
 }
 
+type FormulaType struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+}
+
+func (x *FormulaType) Reset() {
+	*x = FormulaType{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_enum_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *FormulaType) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FormulaType) ProtoMessage() {}
+
+func (x *FormulaType) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_enum_proto_msgTypes[7]
+	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 FormulaType.ProtoReflect.Descriptor instead.
+func (*FormulaType) Descriptor() ([]byte, []int) {
+	return file_backend_operation_enum_proto_rawDescGZIP(), []int{7}
+}
+
 var File_backend_operation_enum_proto protoreflect.FileDescriptor
 
 var file_backend_operation_enum_proto_rawDesc = []byte{
@@ -702,9 +792,15 @@ var file_backend_operation_enum_proto_rawDesc = []byte{
 	0x49, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x41, 0x43, 0x4b, 0x47, 0x52, 0x4f, 0x55,
 	0x4e, 0x44, 0x5f, 0x41, 0x44, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x58, 0x43, 0x45,
 	0x4c, 0x5f, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x52,
-	0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x54, 0x55, 0x52, 0x45, 0x10, 0x03, 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,
+	0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x54, 0x55, 0x52, 0x45, 0x10, 0x03, 0x22, 0x65, 0x0a, 0x0b,
+	0x46, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x54, 0x79, 0x70, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x4b,
+	0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00,
+	0x12, 0x10, 0x0a, 0x0c, 0x46, 0x45, 0x45, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x55, 0x4c, 0x41,
+	0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x45, 0x4d, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x46,
+	0x4f, 0x52, 0x4d, 0x55, 0x4c, 0x41, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x55, 0x50, 0x50,
+	0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x52, 0x59, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x55, 0x4c,
+	0x41, 0x10, 0x03, 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 (
@@ -719,8 +815,8 @@ func file_backend_operation_enum_proto_rawDescGZIP() []byte {
 	return file_backend_operation_enum_proto_rawDescData
 }
 
-var file_backend_operation_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
-var file_backend_operation_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_backend_operation_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 8)
+var file_backend_operation_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
 var file_backend_operation_enum_proto_goTypes = []interface{}{
 	(IsShow_Kind)(0),               // 0: backend.operation.IsShow.Kind
 	(CattleCategoryParent_Kind)(0), // 1: backend.operation.CattleCategoryParent.Kind
@@ -729,13 +825,15 @@ var file_backend_operation_enum_proto_goTypes = []interface{}{
 	(JumpDelaType_Kind)(0),         // 4: backend.operation.JumpDelaType.Kind
 	(ForagePlanType_Kind)(0),       // 5: backend.operation.ForagePlanType.Kind
 	(DataSource_Kind)(0),           // 6: backend.operation.DataSource.Kind
-	(*IsShow)(nil),                 // 7: backend.operation.IsShow
-	(*CattleCategoryParent)(nil),   // 8: backend.operation.CattleCategoryParent
-	(*ForageCategoryParent)(nil),   // 9: backend.operation.ForageCategoryParent
-	(*ForageSource)(nil),           // 10: backend.operation.ForageSource
-	(*JumpDelaType)(nil),           // 11: backend.operation.JumpDelaType
-	(*ForagePlanType)(nil),         // 12: backend.operation.ForagePlanType
-	(*DataSource)(nil),             // 13: backend.operation.DataSource
+	(FormulaType_Kind)(0),          // 7: backend.operation.FormulaType.Kind
+	(*IsShow)(nil),                 // 8: backend.operation.IsShow
+	(*CattleCategoryParent)(nil),   // 9: backend.operation.CattleCategoryParent
+	(*ForageCategoryParent)(nil),   // 10: backend.operation.ForageCategoryParent
+	(*ForageSource)(nil),           // 11: backend.operation.ForageSource
+	(*JumpDelaType)(nil),           // 12: backend.operation.JumpDelaType
+	(*ForagePlanType)(nil),         // 13: backend.operation.ForagePlanType
+	(*DataSource)(nil),             // 14: backend.operation.DataSource
+	(*FormulaType)(nil),            // 15: backend.operation.FormulaType
 }
 var file_backend_operation_enum_proto_depIdxs = []int32{
 	0, // [0:0] is the sub-list for method output_type
@@ -835,14 +933,26 @@ func file_backend_operation_enum_proto_init() {
 				return nil
 			}
 		}
+		file_backend_operation_enum_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FormulaType); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_backend_operation_enum_proto_rawDesc,
-			NumEnums:      7,
-			NumMessages:   7,
+			NumEnums:      8,
+			NumMessages:   8,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

文件差異過大導致無法顯示
+ 540 - 307
proto/go/backend/operation/pasture.pb.go


部分文件因文件數量過多而無法顯示