正在显示
3 个修改的文件
包含
17 行增加
和
1 行删除
@@ -1196,6 +1196,11 @@ func (srv StaffAssessServeice) StaffAssess360BeforeEdit(param *query.AssessInfoQ | @@ -1196,6 +1196,11 @@ func (srv StaffAssessServeice) StaffAssess360BeforeEdit(param *query.AssessInfoQ | ||
1196 | } | 1196 | } |
1197 | //360评估全部是选填项 | 1197 | //360评估全部是选填项 |
1198 | for i := range result.AssessContent { | 1198 | for i := range result.AssessContent { |
1199 | + if len(result.AssessContent[i].Value) == 0 { | ||
1200 | + result.AssessContent[i].LevelValue = "" | ||
1201 | + result.AssessContent[i].ScoreValue = 0 | ||
1202 | + result.AssessContent[i].ReteResult = "" | ||
1203 | + } | ||
1199 | result.AssessContent[i].Required = domain.NodeRequiredNo | 1204 | result.AssessContent[i].Required = domain.NodeRequiredNo |
1200 | } | 1205 | } |
1201 | return result, nil | 1206 | return result, nil |
@@ -1209,6 +1214,11 @@ func (srv StaffAssessServeice) StaffAssessSuperBeforeEdit(param *query.AssessInf | @@ -1209,6 +1214,11 @@ func (srv StaffAssessServeice) StaffAssessSuperBeforeEdit(param *query.AssessInf | ||
1209 | } | 1214 | } |
1210 | //上级评估全部是选填项 | 1215 | //上级评估全部是选填项 |
1211 | for i := range result.AssessContent { | 1216 | for i := range result.AssessContent { |
1217 | + if len(result.AssessContent[i].Value) == 0 { | ||
1218 | + result.AssessContent[i].LevelValue = "" | ||
1219 | + result.AssessContent[i].ScoreValue = 0 | ||
1220 | + result.AssessContent[i].ReteResult = "" | ||
1221 | + } | ||
1212 | result.AssessContent[i].Required = domain.NodeRequiredNo | 1222 | result.AssessContent[i].Required = domain.NodeRequiredNo |
1213 | } | 1223 | } |
1214 | return result, nil | 1224 | return result, nil |
@@ -50,6 +50,9 @@ func (content *StaffAssessContent) TransformValue() error { | @@ -50,6 +50,9 @@ func (content *StaffAssessContent) TransformValue() error { | ||
50 | 50 | ||
51 | // 规则是评级方式 | 51 | // 规则是评级方式 |
52 | func (content *StaffAssessContent) ratingValue() error { | 52 | func (content *StaffAssessContent) ratingValue() error { |
53 | + content.LevelValue = "" | ||
54 | + content.ScoreValue = 0 | ||
55 | + content.ReteResult = "" | ||
53 | levels := content.Rule.Rating.Levels | 56 | levels := content.Rule.Rating.Levels |
54 | for _, v := range levels { | 57 | for _, v := range levels { |
55 | if v.Code != content.Value { | 58 | if v.Code != content.Value { |
@@ -81,6 +84,9 @@ func (content *StaffAssessContent) scoreValue() error { | @@ -81,6 +84,9 @@ func (content *StaffAssessContent) scoreValue() error { | ||
81 | // 未开启按分数子区间匹配等级 | 84 | // 未开启按分数子区间匹配等级 |
82 | // return nil | 85 | // return nil |
83 | //} | 86 | //} |
87 | + content.LevelValue = "" | ||
88 | + content.ScoreValue = 0 | ||
89 | + content.ReteResult = "" | ||
84 | for _, v := range rule.Score.Levels { | 90 | for _, v := range rule.Score.Levels { |
85 | if valueFloat < v.Start || valueFloat > v.End { | 91 | if valueFloat < v.Start || valueFloat > v.End { |
86 | continue | 92 | continue |
@@ -16,7 +16,7 @@ type SummaryEvaluationValue struct { | @@ -16,7 +16,7 @@ type SummaryEvaluationValue struct { | ||
16 | Score string //评定得分 | 16 | Score string //评定得分 |
17 | Types int //评估类型 | 17 | Types int //评估类型 |
18 | Executor domain.StaffDesc //填写评估的用户,执行人 | 18 | Executor domain.StaffDesc //填写评估的用户,执行人 |
19 | - Weight float64 //权重 | 19 | + Weight float64 `pg:",use_zero"` //权重 |
20 | Rating domain.RatingLevel //评级填写值 | 20 | Rating domain.RatingLevel //评级填写值 |
21 | Remark string //填写的内容反馈 | 21 | Remark string //填写的内容反馈 |
22 | CreatedAt time.Time //数据创建时间 | 22 | CreatedAt time.Time //数据创建时间 |
-
请 注册 或 登录 后发表评论