切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
郑周
2 years ago
提交
1e00d92ad1657a5447365280dabc012b3f3b6fb5
2 个父辈
ed535218
04315e53
Merge remote-tracking branch 'origin/test' into test
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
6 行增加
和
8 行删除
pkg/application/evaluation_project/project_service.go
pkg/domain/summary_evaluation_value.go
pkg/infrastructure/pg/models/evaluation_item_used.go
pkg/application/evaluation_project/project_service.go
查看文件 @
1e00d92
...
...
@@ -252,7 +252,6 @@ func (rs *EvaluationProjectService) UpdateTemplate(in *command.UpdateProjectTemp
node
.
TimeStart
=
&
start
node
.
TimeEnd
=
&
end
}
project
,
err
=
projectRepository
.
Insert
(
project
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
...
...
pkg/domain/summary_evaluation_value.go
查看文件 @
1e00d92
...
...
@@ -117,7 +117,7 @@ func (itemValue *SummaryEvaluationValue) valueTypeRating(item *EvaluationItemUse
}
}
if
(
ratingValue
==
nil
)
&&
len
(
value
)
>
0
{
return
fmt
.
Errorf
(
"条目%d:%s-%s
系
评级值异常"
,
item
.
Id
,
item
.
Category
,
item
.
Name
)
return
fmt
.
Errorf
(
"条目%d:%s-%s评级值异常"
,
item
.
Id
,
item
.
Category
,
item
.
Name
)
}
itemValue
.
Rating
=
*
ratingValue
return
nil
...
...
@@ -129,17 +129,16 @@ func (itemValue *SummaryEvaluationValue) valueTypeScore(item *EvaluationItemUsed
return
errors
.
New
(
"评分方式错误"
)
}
value
=
strings
.
TrimSpace
(
value
)
valueNumber
,
err
:=
strconv
.
ParseFloat
(
value
,
64
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"条目%d:%s-%s系评分值异常"
,
item
.
Id
,
item
.
Category
,
item
.
Name
)
}
itemValue
.
Value
=
value
//处理空值
if
len
(
value
)
==
0
{
itemValue
.
Score
=
"0"
return
nil
}
valueNumber
,
err
:=
strconv
.
ParseFloat
(
value
,
64
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"条目%d:%s-%s评分值异常"
,
item
.
Id
,
item
.
Category
,
item
.
Name
)
}
if
item
.
EvaluatorId
<
0
{
//hrbp 的评分方式
itemValue
.
Score
=
value
...
...
pkg/infrastructure/pg/models/evaluation_item_used.go
查看文件 @
1e00d92
...
...
@@ -23,7 +23,7 @@ type EvaluationItemUsed struct {
RuleType
int
`pg:",use_zero"`
//评估方式(0评级、1评分)
Rule
domain
.
EvaluationRule
//评估的选项规则
EvaluatorId
int
// 项目评估人ID ( 0=无评估人、-1=HRBP )
Weight
float64
//"权重"
Weight
float64
`pg:",use_zero"`
//"权重"
Required
int
// 必填项
CreatedAt
time
.
Time
//数据创建时间
UpdatedAt
time
.
Time
//数据更新时间
...
...
请
注册
或
登录
后发表评论