切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
7170e299b8ded59894566c225f1f2d23f26e6226
1 个父辈
a4d345ca
更新评估状态值
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
28 行增加
和
1 行删除
pkg/application/staff_assess/service/service.go
pkg/application/staff_assess/service/service_v2.go
sql/2023-04-04.sql
pkg/application/staff_assess/service/service.go
查看文件 @
7170e29
...
...
@@ -1102,13 +1102,19 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma
}
}
//保存信息
hasValue
:=
false
//评估是否有填写值
for
i
:=
range
assessContentList
{
_
,
err
=
assessContentRepo
.
Save
(
assessContentList
[
i
])
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"保存评估填写内容"
+
err
.
Error
())
}
if
len
(
assessContentList
[
i
]
.
Value
)
>
0
{
hasValue
=
true
}
}
if
hasValue
{
assessData
.
Status
=
domain
.
StaffAssessCompleted
}
assessData
.
Status
=
domain
.
StaffAssessCompleted
assessData
.
UpdatedAt
=
time
.
Now
()
_
,
err
=
assessReps
.
Save
(
assessData
)
if
err
!=
nil
{
...
...
pkg/application/staff_assess/service/service_v2.go
查看文件 @
7170e29
...
...
@@ -117,6 +117,7 @@ func (srv StaffAssessServeice) AssessTaskDescV2(param *query.AssessTaskDescV2Que
BeginDay
:
assessTaskDataAny
.
BeginDay
,
StepList
:
[]
adapter
.
AssessTaskStep
{},
}
hasAssessSelf
:=
false
for
_
,
v
:=
range
assessTaskDataAny
.
StepList
{
stepItem
:=
adapter
.
AssessTaskStep
{
...
...
@@ -142,6 +143,7 @@ func (srv StaffAssessServeice) AssessTaskDescV2(param *query.AssessTaskDescV2Que
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
"获取个人的评估环节"
+
err
.
Error
())
}
if
len
(
assessSelfData
)
>
0
{
hasAssessSelf
=
true
stepItem
.
Status
=
string
(
assessSelfData
[
0
]
.
Status
)
}
stepItem
.
Desc
=
fmt
.
Sprintf
(
"截止日期:%s"
,
stepItem
.
EndTime
)
...
...
@@ -229,6 +231,13 @@ func (srv StaffAssessServeice) AssessTaskDescV2(param *query.AssessTaskDescV2Que
sort
.
Slice
(
result
.
StepList
,
func
(
i
,
j
int
)
bool
{
return
result
.
StepList
[
i
]
.
SortBy
<
result
.
StepList
[
j
]
.
SortBy
})
for
i
:=
range
result
.
StepList
{
if
result
.
StepList
[
i
]
.
LinkNodeType
==
domain
.
LinkNodeAllInvite
{
if
!
hasAssessSelf
{
result
.
StepList
[
i
]
.
Status
=
""
}
}
}
if
err
:=
transactionContext
.
CommitTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
...
...
sql/2023-04-04.sql
0 → 100644
查看文件 @
7170e29
-- 数据修复 数据表summary_evaluation
-- 添加上级评估
INSERT
INTO
public
.
summary_evaluation
(
id
,
company_id
,
evaluation_project_id
,
evaluation_project_name
,
cycle_id
,
cycle_name
,
target_user
,
target_department
,
executor
,
"types"
,
status
,
check_result
,
begin_time
,
end_time
,
total_score
,
created_at
,
updated_at
,
deleted_at
,
node_id
,
total_rating
)
VALUES
(
DEFAULT
,
1
,
1632655294074982400
,
'鄢铃真0303'
,
1630442543739047936
,
'202303绩效考核'
,
'{"userId": "3245763368183552", "account": "18650060951", "userName": "鄢铃真", "companyName": ""}'
::
jsonb
,
'[{"departmentId": "181", "departmentName": "人力行政部"}, {"departmentId": "60", "departmentName": "人资部"}, {"departmentId": "62", "departmentName": "行政部"}]'
::
jsonb
,
'{"userId": "3242583253399296", "account": "13400519725", "userName": "洪启帆", "companyName": ""}'
::
jsonb
,
3
,
'uncompleted'
,
'uncompleted'
,
'2023-04-03 23:59:00.000'
,
'2023-04-07 23:59:59.000 +0800'
,
NULL
,
'2023-04-04 14:54:40.498'
,
'2023-04-04 14:54:40.498'
,
NULL
,
1632653755742687233
,
NULL
);
-- 添加评估考核结果
INSERT
INTO
public
.
summary_evaluation
(
id
,
company_id
,
evaluation_project_id
,
evaluation_project_name
,
cycle_id
,
cycle_name
,
target_user
,
target_department
,
executor
,
"types"
,
status
,
check_result
,
begin_time
,
end_time
,
total_score
,
created_at
,
updated_at
,
deleted_at
,
node_id
,
total_rating
)
VALUES
(
DEFAULT
,
1
,
1632655294074982400
,
'鄢铃真0303'
,
1630442543739047936
,
'202303绩效考核'
,
'{"userId": "3245763368183552", "account": "18650060951", "userName": "鄢铃真", "companyName": ""}'
::
jsonb
,
'[{"departmentId": "181", "departmentName": "人力行政部"}, {"departmentId": "60", "departmentName": "人资部"}, {"departmentId": "62", "departmentName": "行政部"}]'
::
jsonb
,
'{"userId": "", "account": "", "userName": "", "companyName": ""}'
::
jsonb
,
5
,
'uncompleted'
,
'uncompleted'
,
'2023-04-07 23:59:00.000'
,
'2023-04-09 23:59:00.000'
,
NULL
,
'2023-04-04 14:54:40.498'
,
'2023-04-04 14:54:40.498'
,
NULL
,
1632653755742687233
,
NULL
);
-- 去除人资评估
DELETE
FROM
public
.
summary_evaluation
WHERE
id
=
37
...
...
请
注册
或
登录
后发表评论