| 
					
				 | 
			
			
				@@ -9,21 +9,41 @@ import ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	"gitee.com/xuyiping_admin/pkg/logger/zaplog" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-func (s *StoreEntry) BarnTypeEnumList(excludeTypes []pasturePb.PenType_Kind) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	allBarnTypes := s.BarnTypeMap() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+func (s *StoreEntry) BarnTypeEnumList(userModel *model.UserModel, excludeTypes []pasturePb.PenType_Kind, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	dataList := make([]*model.ConfigPenType, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	pref := s.DB.Model(new(model.ConfigPenType)). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		Where("is_show =? ", pasturePb.IsShow_Ok). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		Where("pasture_id =? ", userModel.AppPasture.Id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pref = pref.Where("kind >= ?", pasturePb.PenType_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pref = pref.Where("kind > ?", pasturePb.PenType_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if err := pref.Order("kind ASC"). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		Find(&dataList).Error; err != nil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		zaplog.Error("BarnTypeEnumList", zap.Any("err", err)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	allBarnTypes := model.ConfigBarnTypeSlice(dataList).ToPB2(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	barnTypeList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	for v1 := range allBarnTypes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if len(excludeTypes) == 0 || excludeTypes == nil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return allBarnTypes 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	for _, v1 := range allBarnTypes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		var info bool 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		for _, v2 := range excludeTypes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			if v1 == v2 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			if v1.Value == int32(v2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				info = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				break 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if !info { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			barnTypeList = append(barnTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Value:    int32(v1), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Label:    allBarnTypes[v1], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				Value:    v1.Value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				Label:    v1.Label, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -32,54 +52,23 @@ func (s *StoreEntry) BarnTypeEnumList(excludeTypes []pasturePb.PenType_Kind) []* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) BreedStatusEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	dataList := make([]*model.ConfigSaleCowAnalysisMethod, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	pref := s.DB.Model(new(model.ConfigSaleCowAnalysisMethod)). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	dataList := make([]*model.ConfigBreedStatus, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	pref := s.DB.Model(new(model.ConfigBreedStatus)). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Where("is_show =? ", pasturePb.IsShow_Ok). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Where("pasture_id =? ", userModel.AppPasture.Id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		pref = pref.Where("kind >= ?", pasturePb.SaleCowAnalysisMethod_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pref = pref.Where("kind >= ?", pasturePb.BreedStatus_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		pref = pref.Where("kind > ?", pasturePb.SaleCowAnalysisMethod_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pref = pref.Where("kind > ?", pasturePb.BreedStatus_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	if err := pref.Order("kind ASC"). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Find(&dataList).Error; err != nil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		zaplog.Error("LactIntervalSymbolEnumList", zap.Any("err", err)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		zaplog.Error("ConfigBreedStatus", zap.Any("err", err)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigSaleCowAnalysisMethodSlice(dataList).ToPB(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*breedStatusList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	breedStatusList = append(breedStatusList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.BreedStatus_UnBreed), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "未配", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.BreedStatus_Breeding), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "已配未检", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.BreedStatus_Pregnant), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "怀孕", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.BreedStatus_Empty), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "空怀", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.BreedStatus_Calving), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "产犊", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.BreedStatus_Abort), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "流产", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.BreedStatus_No_Mating), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "禁配", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return breedStatusList*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigBreedStatusSlice(dataList).ToPB2(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) CowKindEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -99,35 +88,7 @@ func (s *StoreEntry) CowKindEnumList(userModel *model.UserModel, isAll string) [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigCowKindSlice(dataList).ToPB2(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*cowKindList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	cowKindList = append(cowKindList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowKind_XMTEN), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "西门塔尔牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowKind_AGSN), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "安格斯牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowKind_XNLN), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "夏洛莱牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowKind_LMZN), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "利木赞牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowKind_HFTN), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "海福特牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowKind_HN), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "和牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return cowKindList*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigCowKindSlice(dataList).ToPB2(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) CowSourceEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -147,76 +108,27 @@ func (s *StoreEntry) CowSourceEnumList(userModel *model.UserModel, isAll string) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigCowSourceSlice(dataList).ToPB2(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*cowSourceList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	cowSourceList = append(cowSourceList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowSource_Calving), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "产犊", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowSource_Transfer_In), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "调入", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowSource_Buy), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "购买", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return cowSourceList*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigCowSourceSlice(dataList).ToPB2(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-func (s *StoreEntry) CowTypeEnumList(optionName, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	cowTypeList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+func (s *StoreEntry) CowTypeEnumList(userModel *model.UserModel, optionName, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	dataList := make([]*model.ConfigCowType, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	pref := s.DB.Model(new(model.ConfigCowType)). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		Where("is_show =? ", pasturePb.IsShow_Ok). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		Where("pasture_id =? ", userModel.AppPasture.Id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.CowType_Invalid), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "全部", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pref = pref.Where("kind >= ?", pasturePb.CowType_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pref = pref.Where("kind > ?", pasturePb.CowType_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if optionName == "breed" { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.CowType_Reserve_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "后备牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.CowType_Breeding_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "成母牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		return cowTypeList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if err := pref.Order("kind ASC"). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		Find(&dataList).Error; err != nil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		zaplog.Error("CowKindEnumList", zap.Any("err", err)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Lactating_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "哺乳犊牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Weaned_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "育成牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Youth_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "青年牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Fattening_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "育肥牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Reserve_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "后备牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Breeding_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "成母牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Breeding_Bull), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "种公牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return cowTypeList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigCowTypeSlice(dataList).ToPB2(userModel, optionName) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) SameTimeCowTypeEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -236,25 +148,7 @@ func (s *StoreEntry) SameTimeCowTypeEnumList(userModel *model.UserModel, isAll s 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigSameTimeCowTypeSlice(dataList).ToPB(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*cowTypeList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.SameTimeCowType_Invalid), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "全部", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.SameTimeCowType_Empty), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "空怀牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.SameTimeCowType_Breeding_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "成母牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return cowTypeList*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigSameTimeCowTypeSlice(dataList).ToPB(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) SameTimeTypeEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -274,84 +168,11 @@ func (s *StoreEntry) SameTimeTypeEnumList(userModel *model.UserModel, isAll stri 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigSameTimeTypeSlice(dataList).ToPB(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*cowTypeList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.SameTimeType_Invalid), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "全部", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.SameTimeType_PGBJ), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "PG保健", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.SameTimeType_PGTQ), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "PG同期", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.SameTimeType_RnGH), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "RnGH", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.SameTimeType_TAI), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "TAI输精", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return cowTypeList*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigSameTimeTypeSlice(dataList).ToPB(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) ImmunizationCowTypeEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	dataList := make([]*model.ConfigImmunizationCowType, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	pref := s.DB.Model(new(model.ConfigImmunizationCowType)). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Where("is_show =? ", pasturePb.IsShow_Ok). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Where("pasture_id =? ", userModel.AppPasture.Id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		pref = pref.Where("kind >= ?", pasturePb.CowKind_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		pref = pref.Where("kind > ?", pasturePb.CowKind_Invalid) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if err := pref.Order("kind ASC"). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Find(&dataList).Error; err != nil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		zaplog.Error("SameTimeTypeEnumList", zap.Any("err", err)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigImmunizationCowTypeSlice(dataList).ToPB(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*cowTypeList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Lactating_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "犊牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Weaned_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "育成牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Youth_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "青年牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Fattening_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "育肥牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Reserve_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "后备牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Breeding_Calf), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "成母牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.CowType_Breeding_Bull), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "种公牛", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return cowTypeList*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return s.CowTypeEnumList(userModel, "", isAll) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) ImmunizationConditionsEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -371,37 +192,7 @@ func (s *StoreEntry) ImmunizationConditionsEnumList(userModel *model.UserModel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigImmunizationConditionsSlice(dataList).ToPB(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*cowTypeList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.ImmunizationConditions_Invalid), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "全部", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	cowTypeList = append(cowTypeList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.ImmunizationConditions_Days_Age), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "日龄", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.ImmunizationConditions_Days_After_Delivery), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "产后天数", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.ImmunizationConditions_Days_Of_Pregnancy), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "怀孕天数", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.ImmunizationConditions_Admission_Days), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "入场天数", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.ImmunizationConditions_Other_Vaccine_After), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "基于其他疫苗之后", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return cowTypeList*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigImmunizationConditionsSlice(dataList).ToPB(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) TransferPenEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -421,37 +212,7 @@ func (s *StoreEntry) TransferPenEnumList(userModel *model.UserModel, isAll strin 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigTransferPenReasonSlice(dataList).ToPB2(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*transferPenList := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		transferPenList = append(transferPenList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.TransferPenReason_Invalid), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "全部", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	transferPenList = append(transferPenList, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.TransferPenReason_Normal), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "正常转群", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.TransferPenReason_Feed), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "饲喂转群", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.TransferPenReason_Dry_Milk), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "干奶转群", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.TransferPenReason_Pregnant), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "怀孕转群", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.TransferPenReason_Overantibody), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "过抗转群", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return transferPenList*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigTransferPenReasonSlice(dataList).ToPB2(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) ChildNumberEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -471,36 +232,7 @@ func (s *StoreEntry) ChildNumberEnumList(userModel *model.UserModel, isAll strin 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigChildNumberSlice(dataList).ToPB(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*configOptions := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		configOptions = append(configOptions, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			&pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Value:    int32(pasturePb.ChildNumber_Invalid), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Label:    "全部", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	configOptions = append(configOptions, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		&pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.ChildNumber_One), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "单胎", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.ChildNumber_Two), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "双胎", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.ChildNumber_Three), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "三胎", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.ChildNumber_Four), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "四胎", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return configOptions*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigChildNumberSlice(dataList).ToPB(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) CalvingLevelEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -520,35 +252,7 @@ func (s *StoreEntry) CalvingLevelEnumList(userModel *model.UserModel, isAll stri 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigCalvingLevelSlice(dataList).ToPB(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*configOptions := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		configOptions = append(configOptions, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			&pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Value:    int32(pasturePb.CalvingLevel_Invalid), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Label:    "全部", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	configOptions = append(configOptions, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		&pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.CalvingLevel_Natural_Childbirth), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "自然分娩", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.CalvingLevel_Artificial_Midwifery1), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "人工助产(1-2人)", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.CalvingLevel_Artificial_Midwifery2), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "人工助产(3人以上)", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.CalvingLevel_Caesarean_Section), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "剖腹产", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return configOptions*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigCalvingLevelSlice(dataList).ToPB(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) DystociaReasonEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -568,39 +272,7 @@ func (s *StoreEntry) DystociaReasonEnumList(userModel *model.UserModel, isAll st 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigDystociaReasonSlice(dataList).ToPB(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*configOptions := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		configOptions = append(configOptions, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			&pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Value:    int32(pasturePb.DystociaReason_Invalid), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Label:    "全部", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	configOptions = append(configOptions, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		&pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.DystociaReason_Malposition), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "胎位不正", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.DystociaReason_Fetal_Overgrowth), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "胎儿过大", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.DystociaReason_Uterine_Atony), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "子宫收缩无力", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.DystociaReason_Pelvic_Stenosis), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "盆骨狭小", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Value:    int32(pasturePb.DystociaReason_Sub_Health), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Label:    "母牛亚健康状态", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return configOptions*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigDystociaReasonSlice(dataList).ToPB(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func (s *StoreEntry) PregnantCheckResultEnumList(userModel *model.UserModel, isAll string) []*pasturePb.ConfigOptionsList { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -620,24 +292,5 @@ func (s *StoreEntry) PregnantCheckResultEnumList(userModel *model.UserModel, isA 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return model.ConfigPregnantCheckResultSlice(dataList).ToPB(userModel.Language) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	/*configOptions := make([]*pasturePb.ConfigOptionsList, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if isAll == model.IsAllYes { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		configOptions = append(configOptions, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			&pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Value:    int32(pasturePb.PregnantCheckResult_Invalid), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Label:    "全部", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.PregnantCheckResult_Pregnant), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "有胎", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}, &pasturePb.ConfigOptionsList{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Value:    int32(pasturePb.PregnantCheckResult_UnPregnant), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Label:    "无胎", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	return configOptions*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	return model.ConfigPregnantCheckResultSlice(dataList).ToPB(userModel) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |