|
@@ -1,6 +1,7 @@
|
|
|
package backend
|
|
|
|
|
|
import (
|
|
|
+ "fmt"
|
|
|
"kpt-pasture/model"
|
|
|
|
|
|
"gitee.com/xuyiping_admin/pkg/logger/zaplog"
|
|
@@ -627,3 +628,95 @@ func (s *StoreEntry) WeekEnumList() []*pasturePb.ConfigOptionsList {
|
|
|
})
|
|
|
return configOptions
|
|
|
}
|
|
|
+
|
|
|
+func (s *StoreEntry) monthEnumList() []*pasturePb.ConfigOptionsList {
|
|
|
+ configOptions := make([]*pasturePb.ConfigOptionsList, 0)
|
|
|
+ for v := 1; v <= 31; v++ {
|
|
|
+ configOptions = append(configOptions, &pasturePb.ConfigOptionsList{
|
|
|
+ Value: int32(v),
|
|
|
+ Label: fmt.Sprintf("%d号", v),
|
|
|
+ Disabled: true,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return configOptions
|
|
|
+}
|
|
|
+
|
|
|
+func (s *StoreEntry) WorkOrderFrequencyEnumList() []*pasturePb.ConfigOptionsList {
|
|
|
+ configOptions := make([]*pasturePb.ConfigOptionsList, 0)
|
|
|
+ configOptions = append(configOptions, &pasturePb.ConfigOptionsList{
|
|
|
+ Value: int32(pasturePb.WorkOrderFrequency_None),
|
|
|
+ Label: "一次性",
|
|
|
+ Disabled: true,
|
|
|
+ }, &pasturePb.ConfigOptionsList{
|
|
|
+ Value: int32(pasturePb.WorkOrderFrequency_Daily),
|
|
|
+ Label: "每天",
|
|
|
+ Disabled: true,
|
|
|
+ }, &pasturePb.ConfigOptionsList{
|
|
|
+ Value: int32(pasturePb.WorkOrderFrequency_Weekly),
|
|
|
+ Label: "每周",
|
|
|
+ Disabled: true,
|
|
|
+ }, &pasturePb.ConfigOptionsList{
|
|
|
+ Value: int32(pasturePb.WorkOrderFrequency_Monthly),
|
|
|
+ Label: "每月",
|
|
|
+ Disabled: true,
|
|
|
+ })
|
|
|
+ return configOptions
|
|
|
+}
|
|
|
+
|
|
|
+func (s *StoreEntry) WorkOrderSubUnitEnumList() []*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() []*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() []*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
|
|
|
+}
|