切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
4f7797721ef8235df04d32961b4435663fe1af39
1 个父辈
287c2a36
调整 人资稽查的详情获取
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
30 行增加
和
27 行删除
pkg/application/summary_evaluation/service/get_evaluation.go
pkg/application/summary_evaluation/service/get_evaluation.go
查看文件 @
4f77977
...
...
@@ -38,6 +38,9 @@ func (srv *SummaryEvaluationService) GetEvaluationShow1(param command.QueryEvalu
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
if
len
(
evaluationList
)
==
0
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"该人员缺少考评评估结果"
)
}
if
len
(
evaluationList
)
>
0
{
_
,
evaluationValueList
,
err
=
evaluationValueRepo
.
Find
(
map
[
string
]
interface
{}{
"summaryEvaluationId"
:
evaluationList
[
0
]
.
Id
})
if
err
!=
nil
{
...
...
@@ -46,7 +49,7 @@ func (srv *SummaryEvaluationService) GetEvaluationShow1(param command.QueryEvalu
}
//如果没有评估考核结果,就获取上级评估的内容
if
len
(
evaluationValueList
)
==
0
{
_
,
evaluationList
,
err
=
evaluationRepo
.
Find
(
map
[
string
]
interface
{}{
_
,
evaluationList
2
,
err
:
=
evaluationRepo
.
Find
(
map
[
string
]
interface
{}{
"limit"
:
1
,
"companyId"
:
param
.
CompanyId
,
"cycleId"
:
param
.
CycleId
,
...
...
@@ -56,38 +59,38 @@ func (srv *SummaryEvaluationService) GetEvaluationShow1(param command.QueryEvalu
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
if
len
(
evaluationList
)
>
0
{
_
,
evaluationValueList
,
err
=
evaluationValueRepo
.
Find
(
map
[
string
]
interface
{}{
"summaryEvaluationId"
:
evaluationList
[
0
]
.
Id
})
if
len
(
evaluationList2
)
>
0
{
_
,
evaluationValueList
,
err
=
evaluationValueRepo
.
Find
(
map
[
string
]
interface
{}{
"summaryEvaluationId"
:
evaluationList2
[
0
]
.
Id
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
}
}
// 如果没有评估考核结果也没有上级评估的内容
// 就查找 360 或人资评估数据
if
len
(
evaluationList
)
==
0
{
_
,
evaluationList
,
err
=
evaluationRepo
.
Find
(
map
[
string
]
interface
{}{
"limit"
:
500
,
"companyId"
:
param
.
CompanyId
,
"cycleId"
:
param
.
CycleId
,
"targetUserId"
:
param
.
TargetUserId
,
"typesList"
:
[]
int
{
int
(
domain
.
EvaluationHrbp
),
int
(
domain
.
Evaluation360
)},
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
evaluationIds
:=
[]
int
{}
for
_
,
val
:=
range
evaluationList
{
evaluationIds
=
append
(
evaluationIds
,
val
.
Id
)
}
_
,
evaluationValueList
,
err
=
evaluationValueRepo
.
Find
(
map
[
string
]
interface
{}{
"summaryEvaluationIdList"
:
evaluationIds
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
// 如果没有评估考核结果的填写内容
// 也没有上级评估
// 就查找 360 或人资评估数据
if
len
(
evaluationList2
)
==
0
{
_
,
evaluationList3
,
err
:=
evaluationRepo
.
Find
(
map
[
string
]
interface
{}{
"limit"
:
500
,
"companyId"
:
param
.
CompanyId
,
"cycleId"
:
param
.
CycleId
,
"targetUserId"
:
param
.
TargetUserId
,
"typesList"
:
[]
int
{
int
(
domain
.
EvaluationHrbp
),
int
(
domain
.
Evaluation360
)},
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
evaluationIds
:=
[]
int
{}
for
_
,
val
:=
range
evaluationList3
{
evaluationIds
=
append
(
evaluationIds
,
val
.
Id
)
}
if
len
(
evaluationIds
)
>
0
{
_
,
evaluationValueList
,
err
=
evaluationValueRepo
.
Find
(
map
[
string
]
interface
{}{
"summaryEvaluationIdList"
:
evaluationIds
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
}
}
}
if
len
(
evaluationList
)
==
0
{
return
nil
,
application
.
ThrowError
(
application
.
BUSINESS_ERROR
,
"该人员没有上级评估、人资评估、360评估。"
)
}
evaluationProjectId
:=
evaluationList
[
0
]
.
EvaluationProjectId
//获取所有题目
_
,
itemUsedList
,
err
:=
itemUsedRepo
.
Find
(
map
[
string
]
interface
{}{
...
...
请
注册
或
登录
后发表评论