1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- package backend
- import (
- "kpt-pasture/model"
- pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow"
- )
- 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
- }
|