切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
65d1db38344142f50e3aa76cc88496ce72eaee3d
1 个父辈
ec3e6cf8
更新
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
20 行增加
和
1 行删除
pkg/application/summary_evaluation/adapter/evaluation_info.go
pkg/application/summary_evaluation/service/service.go
pkg/application/summary_evaluation/adapter/evaluation_info.go
查看文件 @
65d1db3
...
...
@@ -41,6 +41,7 @@ type EvaluationItemAdapter struct {
Remark
string
`json:"remark"`
//填写的内容反馈
EvaluatorId
int
`json:"evaluatorId"`
//评估人id
EvaluatorName
string
`json:"evaluatorName"`
//评估人名称
ForbidEdit
bool
`json:"forbidEdit"`
//页面操作控制是否禁用编辑
}
// 评级数量
...
...
pkg/application/summary_evaluation/service/service.go
查看文件 @
65d1db3
...
...
@@ -1115,6 +1115,12 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command
itemValueRepo
:=
factory
.
CreateSummaryEvaluationValueRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
permissionRepository
:=
factory
.
CreatePermissionRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
})
// 获取权限配置
_
,
permissionList
,
err
:=
permissionRepository
.
Find
(
map
[
string
]
interface
{}{
"companyId"
:
param
.
CompanyId
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
_
,
evaluationList
,
err
:=
evaluationRepo
.
Find
(
map
[
string
]
interface
{}{
"limit"
:
1
,
"cycleId"
:
param
.
CycleId
,
...
...
@@ -1177,7 +1183,7 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command
itemValuesAdapter
:=
srv
.
buildSummaryItemValue
(
itemList
,
itemValues
)
codeList
:=
[]
*
adapter
.
LevalCodeCount
{}
codeMap
:=
map
[
string
]
*
adapter
.
LevalCodeCount
{}
for
_
,
v
:=
range
itemValuesAdapter
{
for
i
,
v
:=
range
itemValuesAdapter
{
if
v
.
Weight
>
0
{
continue
}
...
...
@@ -1192,7 +1198,19 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command
}
codeMap
[
v
.
Value
]
.
ItemList
=
append
(
codeMap
[
v
.
Value
]
.
ItemList
,
v
.
Name
)
codeMap
[
v
.
Value
]
.
Number
+=
1
if
len
(
permissionList
)
>
0
{
if
permissionList
[
0
]
.
OptEvalScore
==
domain
.
PermissionOff
&&
v
.
EvaluatorId
>
0
{
itemValuesAdapter
[
i
]
.
ForbidEdit
=
true
}
if
permissionList
[
0
]
.
OptHrScore
==
domain
.
PermissionOff
&&
v
.
EvaluatorId
<
0
{
itemValuesAdapter
[
i
]
.
ForbidEdit
=
true
}
}
}
result
:=
adapter
.
EvaluationInfoSuperAdapter
{
EvaluationBaseAdapter
:
evaluationBase
,
LevelCount
:
codeList
,
...
...
请
注册
或
登录
后发表评论