package backend import ( "kpt-pasture/model" pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow" ) func (s *StoreEntry) WorkOrderSubUnitEnumList(isAll string) []*pasturePb.ConfigOptionsList { configOptions := make([]*pasturePb.ConfigOptionsList, 0) configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WorkOrderSubscribeUnit_Person), Label: "个人", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WorkOrderSubscribeUnit_dept), Label: "部门", Disabled: true, }) return configOptions } func (s *StoreEntry) WorkOrderPriorityEnumList(isAll string) []*pasturePb.ConfigOptionsList { configOptions := make([]*pasturePb.ConfigOptionsList, 0) configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.Priority_Low), Label: "低", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.Priority_Middle), Label: "一般", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.Priority_High), Label: "紧急", Disabled: true, }) return configOptions } func (s *StoreEntry) WorkOrderCategoryEnumList(isAll string) []*pasturePb.ConfigOptionsList { configOptions := make([]*pasturePb.ConfigOptionsList, 0) configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WorkOrderCategory_Health), Label: "保健", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WorkOrderCategory_Breed), Label: "繁殖", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WorkOrderCategory_Nutrition), Label: "营养", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WorkOrderCategory_Ordinary), Label: "日常", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WorkOrderCategory_Other), Label: "其他", Disabled: true, }) return configOptions } func (s *StoreEntry) AdmissionStatusEnumList(isAll string) []*pasturePb.ConfigOptionsList { configOptions := make([]*pasturePb.ConfigOptionsList, 0) if isAll == model.IsAllYes { configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.AuditStatus_Invalid), Label: "全部", Disabled: true, }) } configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.AdmissionStatus_Admission), Label: "在群", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.AdmissionStatus_Die), Label: "死亡", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.AdmissionStatus_Out), Label: "淘汰", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.AdmissionStatus_Sale), Label: "售卖", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.AdmissionStatus_Transfer), Label: "转出", Disabled: true, }) return configOptions } func (s *StoreEntry) ForbiddenMatingReasonsEnumList(isAll string) []*pasturePb.ConfigOptionsList { configOptions := make([]*pasturePb.ConfigOptionsList, 0) if isAll == model.IsAllYes { configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.AuditStatus_Invalid), Label: "全部", Disabled: true, }) } configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.ForbiddenMatingReasons_Metritis), Label: "子宫炎", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.ForbiddenMatingReasons_Reproductive_Diseases), Label: "繁殖疾病", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.ForbiddenMatingReasons_Reproductive_Failure), Label: "繁殖障碍", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.ForbiddenMatingReasons_Breast_Abnormalities), Label: "乳腺异常", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.ForbiddenMatingReasons_Low_Yield), Label: "低产", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.ForbiddenMatingReasons_Hoof_Disease), Label: "蹄病", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.ForbiddenMatingReasons_Other), Label: "其他", Disabled: true, }) return configOptions } func (s *StoreEntry) WarningHealthLevel(isAll string) []*pasturePb.ConfigOptionsList { configOptions := make([]*pasturePb.ConfigOptionsList, 0) if isAll == model.IsAllYes { configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(0), Label: "全部", Disabled: true, }) } configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WarningHealthLevel_Preliminary), Label: "初级疑似", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WarningHealthLevel_Moderate), Label: "中级疑似", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.WarningHealthLevel_Height), Label: "高度疑似", Disabled: true, }) return configOptions } func (s *StoreEntry) Behavior(isAll string) []*pasturePb.ConfigOptionsList { configOptions := make([]*pasturePb.ConfigOptionsList, 0) if isAll == model.IsAllYes { configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(0), Label: "全部", Disabled: true, }) } configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.Behavior_Rumina), Label: "反刍", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.Behavior_Intake), Label: "采食", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.Behavior_Reset), Label: "休息", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.Behavior_Immobility), Label: "静止", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.Behavior_Chew), Label: "咀嚼", Disabled: true, }) return configOptions } func (s *StoreEntry) HealthStatusEnumList(isAll string) []*pasturePb.ConfigOptionsList { configOptions := make([]*pasturePb.ConfigOptionsList, 0) if isAll == model.IsAllYes { configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.HealthStatus_Invalid), Label: "全部", Disabled: true, }) } configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.HealthStatus_Health), Label: "健康", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.HealthStatus_Disease), Label: "发病", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.HealthStatus_Treatment), Label: "治疗中", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.HealthStatus_Curable), Label: "治愈", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.HealthStatus_Out), Label: "淘汰", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.HealthStatus_Dead), Label: "死亡", Disabled: true, }) return configOptions } func (s *StoreEntry) MatingWindowPeriodEnumList(isAll string) []*pasturePb.ConfigOptionsList { configOptions := make([]*pasturePb.ConfigOptionsList, 0) if isAll == model.IsAllYes { configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(0), Label: "全部", Disabled: true, }) } configOptions = append(configOptions, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.MatingWindowPeriod_Front), Label: "早期", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.MatingWindowPeriod_Middle), Label: "最优", Disabled: true, }, &pasturePb.ConfigOptionsList{ Value: int32(pasturePb.MatingWindowPeriod_Behind), Label: "晚期", Disabled: true, }) return configOptions }