config_data_extend.go 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. package backend
  2. import (
  3. "kpt-pasture/model"
  4. pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow"
  5. )
  6. func (s *StoreEntry) AdmissionStatusEnumList(isAll string) []*pasturePb.ConfigOptionsList {
  7. configOptions := make([]*pasturePb.ConfigOptionsList, 0)
  8. if isAll == model.IsAllYes {
  9. configOptions = append(configOptions,
  10. &pasturePb.ConfigOptionsList{
  11. Value: int32(pasturePb.AuditStatus_Invalid),
  12. Label: "全部",
  13. Disabled: true,
  14. })
  15. }
  16. configOptions = append(configOptions, &pasturePb.ConfigOptionsList{
  17. Value: int32(pasturePb.AdmissionStatus_Admission),
  18. Label: "在群",
  19. Disabled: true,
  20. }, &pasturePb.ConfigOptionsList{
  21. Value: int32(pasturePb.AdmissionStatus_Die),
  22. Label: "死亡",
  23. Disabled: true,
  24. }, &pasturePb.ConfigOptionsList{
  25. Value: int32(pasturePb.AdmissionStatus_Out),
  26. Label: "淘汰",
  27. Disabled: true,
  28. }, &pasturePb.ConfigOptionsList{
  29. Value: int32(pasturePb.AdmissionStatus_Sale),
  30. Label: "售卖",
  31. Disabled: true,
  32. }, &pasturePb.ConfigOptionsList{
  33. Value: int32(pasturePb.AdmissionStatus_Transfer),
  34. Label: "转出",
  35. Disabled: true,
  36. })
  37. return configOptions
  38. }
  39. func (s *StoreEntry) ForbiddenMatingReasonsEnumList(isAll string) []*pasturePb.ConfigOptionsList {
  40. configOptions := make([]*pasturePb.ConfigOptionsList, 0)
  41. if isAll == model.IsAllYes {
  42. configOptions = append(configOptions,
  43. &pasturePb.ConfigOptionsList{
  44. Value: int32(pasturePb.AuditStatus_Invalid),
  45. Label: "全部",
  46. Disabled: true,
  47. })
  48. }
  49. configOptions = append(configOptions, &pasturePb.ConfigOptionsList{
  50. Value: int32(pasturePb.ForbiddenMatingReasons_Metritis),
  51. Label: "子宫炎",
  52. Disabled: true,
  53. }, &pasturePb.ConfigOptionsList{
  54. Value: int32(pasturePb.ForbiddenMatingReasons_Reproductive_Diseases),
  55. Label: "繁殖疾病",
  56. Disabled: true,
  57. }, &pasturePb.ConfigOptionsList{
  58. Value: int32(pasturePb.ForbiddenMatingReasons_Reproductive_Failure),
  59. Label: "繁殖障碍",
  60. Disabled: true,
  61. }, &pasturePb.ConfigOptionsList{
  62. Value: int32(pasturePb.ForbiddenMatingReasons_Breast_Abnormalities),
  63. Label: "乳腺异常",
  64. Disabled: true,
  65. }, &pasturePb.ConfigOptionsList{
  66. Value: int32(pasturePb.ForbiddenMatingReasons_Low_Yield),
  67. Label: "低产",
  68. Disabled: true,
  69. }, &pasturePb.ConfigOptionsList{
  70. Value: int32(pasturePb.ForbiddenMatingReasons_Hoof_Disease),
  71. Label: "蹄病",
  72. Disabled: true,
  73. }, &pasturePb.ConfigOptionsList{
  74. Value: int32(pasturePb.ForbiddenMatingReasons_Other),
  75. Label: "其他",
  76. Disabled: true,
  77. })
  78. return configOptions
  79. }