切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
郑周
2 years ago
提交
4c4d192c30778722c30396ed13b52685a4a6580d
1 个父辈
2121e387
1. 员工考核结果确认后,就不能在进行编辑
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
28 行增加
和
0 行删除
pkg/application/summary_evaluation/service/service.go
pkg/application/summary_evaluation/service/service.go
查看文件 @
4c4d192
...
...
@@ -1212,6 +1212,20 @@ func (srv *SummaryEvaluationService) EditEvaluationSuper(param *command.EditEval
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"没有操作权限"
)
}
_
,
evaluationList
,
err
:=
evaluationRepo
.
Find
(
map
[
string
]
interface
{}{
"targetUserId"
:
evaluationData
.
TargetUser
.
UserId
,
"typesList"
:
[]
int
{
int
(
domain
.
EvaluationFinish
)},
"cycleId"
:
evaluationData
.
CycleId
,
"limit"
:
1
,
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
// 如果目标员工已经确认考核结果,就不能在进行评估编辑
if
len
(
evaluationList
)
>
0
&&
evaluationList
[
0
]
.
Status
==
domain
.
EvaluationCompleted
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"用户已经确认该周期的考核结果,不能在编辑!"
)
}
_
,
itemList
,
err
:=
itemUsedRepo
.
Find
(
map
[
string
]
interface
{}{
"evaluationProjectId"
:
evaluationData
.
EvaluationProjectId
,
"nodeType"
:
domain
.
LinkNodeSelfAssessment
,
...
...
@@ -1307,6 +1321,20 @@ func (srv *SummaryEvaluationService) EditEvaluationSuperForAdmin(param *command.
if
evaluationData
.
CompanyId
!=
param
.
CompanyId
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"没有操作权限"
)
}
_
,
evaluationList
,
err
:=
evaluationRepo
.
Find
(
map
[
string
]
interface
{}{
"targetUserId"
:
evaluationData
.
TargetUser
.
UserId
,
"typesList"
:
[]
int
{
int
(
domain
.
EvaluationFinish
)},
"cycleId"
:
evaluationData
.
CycleId
,
"limit"
:
1
,
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
// 如果目标员工已经确认考核结果,就不能在进行评估编辑
if
len
(
evaluationList
)
>
0
&&
evaluationList
[
0
]
.
Status
==
domain
.
EvaluationCompleted
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"用户已经确认该周期的考核结果,不能在编辑!"
)
}
_
,
itemList
,
err
:=
itemUsedRepo
.
Find
(
map
[
string
]
interface
{}{
"evaluationProjectId"
:
evaluationData
.
EvaluationProjectId
,
"nodeType"
:
domain
.
LinkNodeSelfAssessment
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
...
...
请
注册
或
登录
后发表评论