切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Your Name
2 years ago
提交
a0f067ec9fae0e76faf117f6211a8c45428cb05c
1 个父辈
981d0e8f
更新
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
65 行增加
和
6 行删除
pkg/application/staff_assess/adapter/assess_info.go
pkg/application/staff_assess/adapter/assess_task_desc.go
pkg/application/staff_assess/query/assess_self_info.go
pkg/application/staff_assess/service/service.go
pkg/application/staff_assess/adapter/assess_info.go
0 → 100644
查看文件 @
a0f067e
package
adapter
import
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
//评估内容详情
type
AssessInfoResp
struct
{
CycleId
int64
`json:"cycleId"`
//周期id
CycleName
string
`json:"cycleName"`
//周期名称
EvaluationProjectId
int
`json:"evaluationProjectId"`
//项目id
EvaluationProjectName
string
`json:"evaluationProjectName"`
//项目名称
BeginTime
string
`json:"beginTime"`
//开始时间 2006-01-02 15:04:05
EndTime
string
`json:"endTime"`
//结束时间 2006-01-02 15:04:05
Status
string
`json:"status"`
//完成状态
TargetUserId
int
`json:"targetUser"`
//
TargetUserName
string
`json:"targetUserName"`
//
AssessContent
[]
AssessContent
`json:"assessContent"`
//评估内容
}
type
AssessContent
struct
{
Category
string
`json:"category" comment:"类别"`
Name
string
`json:"name" comment:"名称"`
PromptTitle
string
`json:"promptTitle" comment:"提示项标题"`
PromptText
string
`json:"promptText" comment:"提示项正文"`
EntryItems
[]
domain
.
EntryItem
`json:"entryItems" comment:"填写项"`
RuleId
string
}
...
...
pkg/application/staff_assess/adapter/assess_task_desc.go
查看文件 @
a0f067e
...
...
@@ -5,7 +5,7 @@ type AssessTaskDescResp struct {
EvaluationProjectId
int
`json:"evaluationProjectId"`
//项目id
EvaluationProjectName
string
`json:"evaluationProjectName"`
//项目名称
CycleName
string
`json:"cycleName"`
//周期名称
BeginTime
string
`json:"beginTime"`
//开始时间 2006-01-02
BeginTime
string
`json:"beginTime"`
//开始时间 2006-01-02
15:04:05
EndTime
string
`json:"endTime"`
//结束时间 2006-01-02 15:04:05
StepList
[]
AssessTaskStep
`json:"stepList"`
// 考评流程
}
...
...
pkg/application/staff_assess/query/assess_self_info.go
0 → 100644
查看文件 @
a0f067e
package
query
type
AssessSelfInfo
struct
{
AssessId
int
`json:"assessId"`
//StaffAssess 的id
UserId
int
`json:"userId"`
CompanyId
int
`json:"companyId"`
}
...
...
pkg/application/staff_assess/service/service.go
查看文件 @
a0f067e
...
...
@@ -255,17 +255,40 @@ func (srv StaffAssessServeice) AssessSelfList(param query.AssessSelfListQuery) (
}
//获取用户数据
userRep
:=
factory
.
CreateUserRepository
(
map
[
string
]
interface
{}{
userRep
o
:=
factory
.
CreateUserRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
userData
,
err
:=
userRep
.
FindOne
(
map
[
string
]
interface
{}{
userData
,
err
:=
userRep
o
.
FindOne
(
map
[
string
]
interface
{}{
"id"
:
param
.
UserId
,
})
if
err
!=
nil
{
log
.
Logger
.
Error
(
"获取用户信息,"
+
err
.
Error
())
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
"获取用户信息,"
+
err
.
Error
())
}
departmentRepo
:=
factory
.
CreateDepartmentRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
var
supperUserList
[]
*
domain
.
User
if
len
(
userData
.
DepartmentId
)
>
0
{
_
,
departmentList
,
err
:=
departmentRepo
.
Find
(
map
[
string
]
interface
{}{
"ids"
:
userData
.
DepartmentId
,
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
"获取部门信息,"
+
err
.
Error
())
}
var
chargeUserIds
[]
int64
for
_
,
v
:=
range
departmentList
{
chargeUserIds
=
append
(
chargeUserIds
,
v
.
ChargeUserIds
...
)
}
if
len
(
chargeUserIds
)
>
0
{
_
,
supperUserList
,
err
=
userRepo
.
Find
(
map
[
string
]
interface
{}{
"ids"
:
chargeUserIds
,
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
"获取员工上级信息,"
+
err
.
Error
())
}
}
}
if
err
:=
transactionContext
.
CommitTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
...
...
@@ -289,6 +312,9 @@ func (srv StaffAssessServeice) AssessSelfList(param query.AssessSelfListQuery) (
SupperUserName
:
""
,
DutyTime
:
userData
.
CreateAt
.
Local
()
.
Format
(
"2006-01-02 15:04:05"
),
}
for
_
,
v
:=
range
supperUserList
{
userInfo
.
SupperUserName
=
userInfo
.
SupperUserName
+
v
.
Name
+
";"
}
result
:=
tool_funs
.
SimpleWrapGridMap
(
int64
(
cnt
),
listData
)
result
[
"userInfo"
]
=
userInfo
return
result
,
nil
...
...
@@ -313,7 +339,7 @@ func (srv StaffAssessServeice) CreateStaffAssessTask() error {
return
nil
}
func
(
srv
StaffAssessServeice
)
getStaffDesc
(
userId
int
)
*
domain
.
StaffDesc
{
// 获取员工自评详情
func
(
srv
StaffAssessServeice
)
StaffAssessSelfInfo
()
{
return
&
domain
.
StaffDesc
{}
}
...
...
请
注册
或
登录
后发表评论