切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
fbc30d54008ad43ea0e2faa83d4cc9105eb055bf
1 个父辈
ad06cbcb
补充接口
显示空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
62 行增加
和
1 行删除
pkg/application/staff_assess/service/service_v2.go
pkg/port/beego/controllers/staff_assess_controller_v2.go
pkg/port/beego/routers/staff_assess_router.go
pkg/application/staff_assess/service/service_v2.go
查看文件 @
fbc30d5
...
...
@@ -743,3 +743,45 @@ func (srv StaffAssessServeice) ListTargetUserInviteAssess(param *query.ListTarge
}
return
tool_funs
.
SimpleWrapGridMap
(
int64
(
cnt
),
resultList
),
nil
}
//根据周期和日期。获取上级评估的列表,员工的被其他人评估
func
(
srv
StaffAssessServeice
)
ListTargetUserSuperAssess
(
param
*
query
.
ListTargetAssessQuery
)
(
map
[
string
]
interface
{},
error
)
{
transactionContext
,
err
:=
factory
.
CreateTransactionContext
(
nil
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
err
.
Error
())
}
if
err
:=
transactionContext
.
StartTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
err
.
Error
())
}
defer
func
()
{
_
=
transactionContext
.
RollbackTransaction
()
}()
assessReps
:=
factory
.
CreateStaffAssessRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
//获取员工的评估
cnt
,
assessList
,
err
:=
assessReps
.
Find
(
map
[
string
]
interface
{}{
"cycleId"
:
param
.
CycleId
,
"beginDay"
:
param
.
BeginDay
,
"companyId"
:
param
.
CompanyId
,
"targetUserId"
:
param
.
TargetUserId
,
"typesList"
:
[]
string
{
string
(
domain
.
AssessSuper
)},
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"获取员工的评估"
+
err
.
Error
())
}
if
err
:=
transactionContext
.
CommitTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
var
resultList
[]
map
[
string
]
interface
{}
for
_
,
v
:=
range
assessList
{
item
:=
map
[
string
]
interface
{}{
"id"
:
v
.
Id
,
"targetUser"
:
v
.
TargetUser
,
"executor"
:
v
.
Executor
,
}
resultList
=
append
(
resultList
,
item
)
}
return
tool_funs
.
SimpleWrapGridMap
(
int64
(
cnt
),
resultList
),
nil
}
...
...
pkg/port/beego/controllers/staff_assess_controller_v2.go
查看文件 @
fbc30d5
...
...
@@ -149,3 +149,21 @@ func (c *StaffAssessControllerV2) ListTargetUserInviteAssess() {
data
,
err
:=
srv
.
ListTargetUserInviteAssess
(
paramReq
)
c
.
Response
(
data
,
err
)
}
// 被评估的员工的评估列表-上级评估
func
(
c
*
StaffAssessControllerV2
)
ListTargetUserMeSupperAssess
()
{
srv
:=
service
.
NewStaffAssessServeice
()
paramReq
:=
&
query
.
ListTargetAssessQuery
{}
err
:=
c
.
BindJSON
(
paramReq
)
if
err
!=
nil
{
e
:=
application
.
ThrowError
(
application
.
ARG_ERROR
,
"json 解析错误"
+
err
.
Error
())
c
.
Response
(
nil
,
e
)
return
}
paramReq
.
CompanyId
=
1
userReq
:=
middlewares
.
GetUser
(
c
.
Ctx
)
paramReq
.
CompanyId
=
int
(
userReq
.
CompanyId
)
paramReq
.
TargetUserId
=
int
(
userReq
.
UserId
)
data
,
err
:=
srv
.
ListTargetUserSuperAssess
(
paramReq
)
c
.
Response
(
data
,
err
)
}
...
...
pkg/port/beego/routers/staff_assess_router.go
查看文件 @
fbc30d5
...
...
@@ -32,7 +32,7 @@ func init() {
web
.
NSCtrlPut
(
"/info"
,
(
*
controllers
.
StaffAssessController
)
.
SaveAssessInfo
),
//通用保存员工评估的详情
web
.
NSCtrlPut
(
"/info-cache"
,
(
*
controllers
.
StaffAssessController
)
.
SaveAssessCache
),
//通用保存员工评估的详情(缓存)
web
.
NSCtrlPost
(
"/target-user/invite/list"
,
(
*
controllers
.
StaffAssessController
)
.
ListTargetUserInviteAssess
),
//获取被评估员工360评估的列表
web
.
NSCtrlPost
(
"/me/target-user/supper/list"
,
(
*
controllers
.
StaffAssessController
)
.
ListTargetUserMeSupperAssess
),
//获取我
的
上级评估的列表
web
.
NSCtrlPost
(
"/me/target-user/supper/list"
,
(
*
controllers
.
StaffAssessController
)
.
ListTargetUserMeSupperAssess
),
//获取我
被
上级评估的列表
web
.
NSCtrlPost
(
"/target-user/self/info"
,
(
*
controllers
.
StaffAssessController
)
.
GetAssessTargetUserSelfInfo
),
//获取被评估员工的自评反馈详情
)
//v2 改版
...
...
@@ -50,6 +50,7 @@ func init() {
web
.
NSCtrlPost
(
"/target-user/self/info"
,
(
*
controllers
.
StaffAssessControllerV2
)
.
GetAssessTargetUserSelfInfo
),
//获取被评估员工的自评反馈详情
web
.
NSCtrlPost
(
"/self/me/info"
,
(
*
controllers
.
StaffAssessControllerV2
)
.
GetAssessSelfMeInfo
),
//获取当前周期里我的自评反馈详情
web
.
NSCtrlPost
(
"/target-user/invite/list"
,
(
*
controllers
.
StaffAssessControllerV2
)
.
ListTargetUserInviteAssess
),
//获取被评估员工360评估的列表
web
.
NSCtrlPost
(
"/me/target-user/supper/list"
,
(
*
controllers
.
StaffAssessController
)
.
ListTargetUserMeSupperAssess
),
//获取我被上级评估的列表
)
web
.
AddNamespace
(
assessTaskNS
)
...
...
请
注册
或
登录
后发表评论