|
@@ -11,6 +11,7 @@ type PerformanceApplicationForm struct { |
|
@@ -11,6 +11,7 @@ type PerformanceApplicationForm struct { |
|
11
|
Weight string //权重
|
11
|
Weight string //权重
|
|
12
|
Standard string //标准
|
12
|
Standard string //标准
|
|
13
|
Task string //任务、指标
|
13
|
Task string //任务、指标
|
|
|
|
14
|
+ Definition string //定义
|
|
14
|
}
|
15
|
}
|
|
15
|
|
16
|
|
|
16
|
type PerformanceDimension struct {
|
17
|
type PerformanceDimension struct {
|
|
@@ -27,6 +28,7 @@ type PerformanceModule struct { |
|
@@ -27,6 +28,7 @@ type PerformanceModule struct { |
|
27
|
|
28
|
|
|
28
|
type PerformanceTarget struct {
|
29
|
type PerformanceTarget struct {
|
|
29
|
Task string `json:"task"`
|
30
|
Task string `json:"task"`
|
|
|
|
31
|
+ Definition string `json:"definition"`
|
|
30
|
}
|
32
|
}
|
|
31
|
|
33
|
|
|
32
|
func LoadPerformanceDimensions(rows [][]string) ([]*PerformanceDimension, error) {
|
34
|
func LoadPerformanceDimensions(rows [][]string) ([]*PerformanceDimension, error) {
|
|
@@ -55,8 +57,14 @@ func LoadPerformanceDimensions(rows [][]string) ([]*PerformanceDimension, error) |
|
@@ -55,8 +57,14 @@ func LoadPerformanceDimensions(rows [][]string) ([]*PerformanceDimension, error) |
|
55
|
//指标任务
|
57
|
//指标任务
|
|
56
|
if len(item) > 4 && item[4] != "" {
|
58
|
if len(item) > 4 && item[4] != "" {
|
|
57
|
taskName = item[4]
|
59
|
taskName = item[4]
|
|
|
|
60
|
+ } else {
|
|
|
|
61
|
+ taskName = "填写自评反馈"
|
|
58
|
}
|
62
|
}
|
|
59
|
form.Task = taskName
|
63
|
form.Task = taskName
|
|
|
|
64
|
+ //定义
|
|
|
|
65
|
+ if len(item) > 5 {
|
|
|
|
66
|
+ form.Definition = strings.TrimSpace(item[5])
|
|
|
|
67
|
+ }
|
|
60
|
//权重
|
68
|
//权重
|
|
61
|
if len(item) > 6 && item[6] != "" {
|
69
|
if len(item) > 6 && item[6] != "" {
|
|
62
|
weightName = item[6]
|
70
|
weightName = item[6]
|
|
@@ -66,6 +74,11 @@ func LoadPerformanceDimensions(rows [][]string) ([]*PerformanceDimension, error) |
|
@@ -66,6 +74,11 @@ func LoadPerformanceDimensions(rows [][]string) ([]*PerformanceDimension, error) |
|
66
|
if len(item) > 7 && item[7] != "" {
|
74
|
if len(item) > 7 && item[7] != "" {
|
|
67
|
standardName = item[7]
|
75
|
standardName = item[7]
|
|
68
|
}
|
76
|
}
|
|
|
|
77
|
+ if key < len(rows)-1 {
|
|
|
|
78
|
+ if len(rows[key+1]) > 1 && rows[key+1][1] != "" {
|
|
|
|
79
|
+ standardName = ""
|
|
|
|
80
|
+ }
|
|
|
|
81
|
+ }
|
|
69
|
form.Standard = standardName
|
82
|
form.Standard = standardName
|
|
70
|
formRows = append(formRows, form)
|
83
|
formRows = append(formRows, form)
|
|
71
|
}
|
84
|
}
|
|
@@ -192,7 +205,7 @@ func getStandard(items []*PerformanceApplicationForm) (string, error) { |
|
@@ -192,7 +205,7 @@ func getStandard(items []*PerformanceApplicationForm) (string, error) { |
|
192
|
func getTasks(items []*PerformanceApplicationForm) ([]*PerformanceTarget, error) {
|
205
|
func getTasks(items []*PerformanceApplicationForm) ([]*PerformanceTarget, error) {
|
|
193
|
tasks := make([]*PerformanceTarget, 0)
|
206
|
tasks := make([]*PerformanceTarget, 0)
|
|
194
|
for _, item := range items {
|
207
|
for _, item := range items {
|
|
195
|
- target := &PerformanceTarget{Task: item.Task}
|
208
|
+ target := &PerformanceTarget{Task: item.Task, Definition: item.Definition}
|
|
196
|
tasks = append(tasks, target)
|
209
|
tasks = append(tasks, target)
|
|
197
|
}
|
210
|
}
|
|
198
|
return tasks, nil
|
211
|
return tasks, nil
|