切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
ca1bbefe1cd85f649957c2e0f3507487e1625a9d
1 个父辈
86b37cec
上级评估编辑
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
106 行增加
和
2 行删除
pkg/application/summary_evaluation/adapter/evaluation_super_list.go
pkg/application/summary_evaluation/command/query_evaluation_list.go
pkg/application/summary_evaluation/service/service.go
pkg/port/beego/controllers/summary_evaluation_controller.go
pkg/port/beego/routers/summary_evaluation_router.go
pkg/application/summary_evaluation/adapter/evaluation_super_list.go
0 → 100644
查看文件 @
ca1bbef
package
adapter
type
EvaluationSuperListAdapter
struct
{
SummaryEvaluationId
int
`json:"summaryEvaluationId,string"`
//评估任务id
TargetUserName
string
`json:"targetUserName"`
//目标用户,被评估的员工
EvaluationStatus
string
`json:"evaluationStatus"`
//上级评估完成状态
EndTime
string
`json:"endTime"`
//截止时间
TotalScoreSelf
string
`json:"totalScoreSelf"`
//综合自评总分
Department
string
`json:"department"`
//部门
Position
string
`json:"position"`
//职位
EntryTime
string
`json:"entryTime"`
//入职时间
}
...
...
pkg/application/summary_evaluation/command/query_evaluation_list.go
0 → 100644
查看文件 @
ca1bbef
package
command
type
QueryEvaluationList
struct
{
PageNumber
int
`json:"pageNumber"`
PageSize
int
`json:"pageSize"`
CycleId
int
`json:"cycleId,string"`
CompanyId
int
`json:"companyId"`
ExecutorId
int
`json:"executorId"`
TargetUsrName
string
`json:"targetUsrName"`
}
...
...
pkg/application/summary_evaluation/service/service.go
查看文件 @
ca1bbef
...
...
@@ -975,3 +975,52 @@ func (srv *SummaryEvaluationService) getEvaluationSuperDefaultValue(transactionC
}
return
result
,
nil
}
// 获取上级评估的列表
func
(
srv
*
SummaryEvaluationService
)
ListEvaluationSuper
(
param
*
command
.
QueryEvaluationList
)
(
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
()
}()
evaluationRepo
:=
factory
.
CreateSummaryEvaluationRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
userRepo
:=
factory
.
CreateUserRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
cnt
,
evaluationList
,
err
:=
evaluationRepo
.
Find
(
map
[
string
]
interface
{}{
"cycleId"
:
param
.
CycleId
,
"executorId"
:
param
.
ExecutorId
,
"types"
:
int
(
domain
.
EvaluationSuper
),
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
targetUserIds
:=
[]
int
{}
for
_
,
v
:=
range
evaluationList
{
targetUserIds
=
append
(
targetUserIds
,
v
.
TargetUser
.
UserId
)
}
var
userList
[]
*
domain
.
User
if
len
(
targetUserIds
)
>
0
{
_
,
userList
,
err
=
userRepo
.
Find
(
map
[
string
]
interface
{}{
"ids"
:
targetUserIds
,
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
}
_
=
userList
_
=
evaluationList
_
=
cnt
if
err
:=
transactionContext
.
CommitTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
return
nil
,
nil
}
...
...
pkg/port/beego/controllers/summary_evaluation_controller.go
查看文件 @
ca1bbef
...
...
@@ -174,3 +174,34 @@ func (c *SummaryEvaluationController) EditEvaluationHRBP() {
data
,
err
:=
srv
.
EditEvaluationHRBP
(
in
)
c
.
Response
(
data
,
err
)
}
func
(
c
*
SummaryEvaluationController
)
GetEvaluationSuper
()
{
srv
:=
service
.
NewSummaryEvaluationService
()
param
:=
&
command
.
QueryEvaluationSuper
{}
err
:=
c
.
BindJSON
(
param
)
if
err
!=
nil
{
e
:=
application
.
ThrowError
(
application
.
ARG_ERROR
,
"json 解析错误"
+
err
.
Error
())
c
.
Response
(
nil
,
e
)
return
}
userReq
:=
middlewares
.
GetUser
(
c
.
Ctx
)
param
.
CompanyId
=
int
(
userReq
.
CompanyId
)
data
,
err
:=
srv
.
GetEvaluationSuper
(
param
)
c
.
Response
(
data
,
err
)
}
func
(
c
*
SummaryEvaluationController
)
EditEvaluationSuper
()
{
srv
:=
service
.
NewSummaryEvaluationService
()
param
:=
&
command
.
EditEvaluationValue
{}
err
:=
c
.
BindJSON
(
param
)
if
err
!=
nil
{
e
:=
application
.
ThrowError
(
application
.
ARG_ERROR
,
"json 解析错误"
+
err
.
Error
())
c
.
Response
(
nil
,
e
)
return
}
userReq
:=
middlewares
.
GetUser
(
c
.
Ctx
)
param
.
CompanyId
=
int
(
userReq
.
CompanyId
)
param
.
ExecutorId
=
int
(
userReq
.
UserId
)
data
,
err
:=
srv
.
EditEvaluationSuper
(
param
)
c
.
Response
(
data
,
err
)
}
...
...
pkg/port/beego/routers/summary_evaluation_router.go
查看文件 @
ca1bbef
...
...
@@ -13,13 +13,15 @@ func init() {
web
.
NSCtrlPost
(
"/executor/cycle/list"
,
(
*
controllers
.
SummaryEvaluationController
)
.
GetExecutorCycleList
),
web
.
NSCtrlPost
(
"/target_user/cycle/list"
,
(
*
controllers
.
SummaryEvaluationController
)
.
GetTargetUserCycleList
),
web
.
NSCtrlPost
(
"/cycle/menu"
,
(
*
controllers
.
SummaryEvaluationController
)
.
GetMenu
),
web
.
NSCtrlPost
(
"/self"
,
(
*
controllers
.
SummaryEvaluationController
)
.
GetEvaluationSelf
),
web
.
NSCtrlPost
(
"/self/edit"
,
(
*
controllers
.
SummaryEvaluationController
)
.
EditEvaluationSelf
),
web
.
NSCtrlPost
(
"/evaluation-self"
,
(
*
controllers
.
SummaryEvaluationController
)
.
GetEvaluationSelf
),
web
.
NSCtrlPost
(
"/evaluation-self/edit"
,
(
*
controllers
.
SummaryEvaluationController
)
.
EditEvaluationSelf
),
web
.
NSCtrlPost
(
"/evaluation-360"
,
(
*
controllers
.
SummaryEvaluationController
)
.
GetEvaluation360
),
web
.
NSCtrlPost
(
"/evaluation-360/edit"
,
(
*
controllers
.
SummaryEvaluationController
)
.
EditEvaluation360
),
web
.
NSCtrlPost
(
"/evaluation-hr"
,
(
*
controllers
.
SummaryEvaluationController
)
.
GetEvaluationHRBP
),
web
.
NSCtrlPost
(
"/evaluation-hr/edit"
,
(
*
controllers
.
SummaryEvaluationController
)
.
EditEvaluationHRBP
),
web
.
NSCtrlPost
(
"/self/summary"
,
(
*
controllers
.
SummaryEvaluationController
)
.
CountEvaluationSelfLevel
),
web
.
NSCtrlPost
(
"/evaluation-super"
,
(
*
controllers
.
SummaryEvaluationController
)
.
GetEvaluationSuper
),
web
.
NSCtrlPost
(
"/evaluation-super/edit"
,
(
*
controllers
.
SummaryEvaluationController
)
.
EditEvaluationSuper
),
)
web
.
AddNamespace
(
summaryNS
)
}
...
...
请
注册
或
登录
后发表评论