切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
4225a99ebe28a28c0b891971f88346a7b01f4257
1 个父辈
a17aa542
更新
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
64 行增加
和
41 行删除
pkg/application/summary_evaluation/service/scheduled_v2.go
pkg/domain/evaluation_cycle.go
pkg/domain/evaluation_project.go
pkg/infrastructure/pg/models/evaluation_cycle.go
pkg/infrastructure/repository/pg_evaluation_cycle_repository.go
pkg/port/beego/controllers/staff_assess_controller.go
pkg/port/beego/routers/staff_assess_router.go
pkg/application/summary_evaluation/service/scheduled_v2.go
查看文件 @
4225a99
...
...
@@ -36,6 +36,7 @@ func TaskSendSummaryEvaluationV2() error {
return
nil
}
func
getPrepareEvaluationCycle
()
{}
func
getPrepareSummaryEvaluation
()
([]
*
domain
.
EvaluationProject
,
error
)
{
transactionContext
,
err
:=
factory
.
CreateTransactionContext
(
nil
)
if
err
!=
nil
{
...
...
pkg/domain/evaluation_cycle.go
查看文件 @
4225a99
...
...
@@ -21,16 +21,17 @@ type TemplateSimple struct {
}
type
EvaluationCycle
struct
{
Id
int64
`json:"id,string" comment:"ID"`
Name
string
`json:"name" comment:"名称"`
TimeStart
*
time
.
Time
`json:"timeStart" comment:"起始时间"`
TimeEnd
*
time
.
Time
`json:"timeEnd" comment:"截至时间"`
CompanyId
int64
`json:"companyId,string" comment:"公司ID"`
CreatorId
int64
`json:"creatorId,string" comment:"创建人ID"`
KpiCycle
int
`json:"kpiCycle" comment:"考核周期(1日、2周、3月)"`
CreatedAt
time
.
Time
`json:"createdAt" comment:"创建时间"`
UpdatedAt
time
.
Time
`json:"updatedAt" comment:"更新时间"`
DeletedAt
*
time
.
Time
`json:"deletedAt" comment:"删除时间"`
Id
int64
`json:"id,string" comment:"ID"`
Name
string
`json:"name" comment:"名称"`
TimeStart
*
time
.
Time
`json:"timeStart" comment:"起始时间"`
TimeEnd
*
time
.
Time
`json:"timeEnd" comment:"截至时间"`
CompanyId
int64
`json:"companyId,string" comment:"公司ID"`
CreatorId
int64
`json:"creatorId,string" comment:"创建人ID"`
KpiCycle
int
`json:"kpiCycle" comment:"考核周期(1日、2周、3月)"`
SummaryState
ProjectSummaryState
`json:"summaryState" comment:"周期评估是否下发"`
CreatedAt
time
.
Time
`json:"createdAt" comment:"创建时间"`
UpdatedAt
time
.
Time
`json:"updatedAt" comment:"更新时间"`
DeletedAt
*
time
.
Time
`json:"deletedAt" comment:"删除时间"`
}
type
EvaluationCycleRepository
interface
{
...
...
pkg/domain/evaluation_project.go
查看文件 @
4225a99
...
...
@@ -33,6 +33,7 @@ type EvaluationProject struct {
DeletedAt
*
time
.
Time
`json:"deletedAt" comment:"删除时间"`
}
// 周期评估的下发状态
type
ProjectSummaryState
int
const
(
...
...
pkg/infrastructure/pg/models/evaluation_cycle.go
查看文件 @
4225a99
...
...
@@ -5,15 +5,16 @@ import (
)
type
EvaluationCycle
struct
{
tableName
struct
{}
`comment:"评估周期" pg:"evaluation_cycle"`
Id
int64
`comment:"周期ID" pg:"pk:id"`
Name
string
`comment:"名称"`
TimeStart
*
time
.
Time
`comment:"起始时间"`
TimeEnd
*
time
.
Time
`comment:"截至时间"`
CompanyId
int64
`comment:"公司ID"`
CreatorId
int64
`comment:"创建人ID"`
KpiCycle
int
`comment:"考核周期(1日、2周、3月)"`
CreatedAt
time
.
Time
`comment:"创建时间"`
UpdatedAt
time
.
Time
`comment:"更新时间"`
DeletedAt
*
time
.
Time
`comment:"删除时间"`
tableName
struct
{}
`comment:"评估周期" pg:"evaluation_cycle"`
Id
int64
`comment:"周期ID" pg:"pk:id"`
Name
string
`comment:"名称"`
TimeStart
*
time
.
Time
`comment:"起始时间"`
TimeEnd
*
time
.
Time
`comment:"截至时间"`
CompanyId
int64
`comment:"公司ID"`
CreatorId
int64
`comment:"创建人ID"`
KpiCycle
int
`comment:"考核周期(1日、2周、3月)"`
SummaryState
int
`comment:"周期评估是否下发" pg:",use_zero"`
CreatedAt
time
.
Time
`comment:"创建时间"`
UpdatedAt
time
.
Time
`comment:"更新时间"`
DeletedAt
*
time
.
Time
`comment:"删除时间"`
}
...
...
pkg/infrastructure/repository/pg_evaluation_cycle_repository.go
查看文件 @
4225a99
...
...
@@ -23,31 +23,33 @@ func NewEvaluationCycleRepository(transactionContext *pgTransaction.TransactionC
func
(
repo
*
EvaluationCycleRepository
)
TransformToDomain
(
m
*
models
.
EvaluationCycle
)
domain
.
EvaluationCycle
{
return
domain
.
EvaluationCycle
{
Id
:
m
.
Id
,
Name
:
m
.
Name
,
TimeStart
:
m
.
TimeStart
,
TimeEnd
:
m
.
TimeEnd
,
CompanyId
:
m
.
CompanyId
,
CreatorId
:
m
.
CreatorId
,
KpiCycle
:
m
.
KpiCycle
,
CreatedAt
:
m
.
CreatedAt
.
Local
(),
UpdatedAt
:
m
.
UpdatedAt
.
Local
(),
DeletedAt
:
m
.
DeletedAt
,
Id
:
m
.
Id
,
Name
:
m
.
Name
,
TimeStart
:
m
.
TimeStart
,
TimeEnd
:
m
.
TimeEnd
,
CompanyId
:
m
.
CompanyId
,
CreatorId
:
m
.
CreatorId
,
KpiCycle
:
m
.
KpiCycle
,
SummaryState
:
domain
.
ProjectSummaryState
(
m
.
SummaryState
),
CreatedAt
:
m
.
CreatedAt
.
Local
(),
UpdatedAt
:
m
.
UpdatedAt
.
Local
(),
DeletedAt
:
m
.
DeletedAt
,
}
}
func
(
repo
*
EvaluationCycleRepository
)
TransformToModel
(
d
*
domain
.
EvaluationCycle
)
models
.
EvaluationCycle
{
return
models
.
EvaluationCycle
{
Id
:
d
.
Id
,
Name
:
d
.
Name
,
TimeStart
:
d
.
TimeStart
,
TimeEnd
:
d
.
TimeEnd
,
CompanyId
:
d
.
CompanyId
,
CreatorId
:
d
.
CreatorId
,
KpiCycle
:
d
.
KpiCycle
,
CreatedAt
:
d
.
CreatedAt
,
UpdatedAt
:
d
.
UpdatedAt
,
DeletedAt
:
d
.
DeletedAt
,
Id
:
d
.
Id
,
Name
:
d
.
Name
,
TimeStart
:
d
.
TimeStart
,
TimeEnd
:
d
.
TimeEnd
,
CompanyId
:
d
.
CompanyId
,
CreatorId
:
d
.
CreatorId
,
KpiCycle
:
d
.
KpiCycle
,
SummaryState
:
int
(
d
.
SummaryState
),
CreatedAt
:
d
.
CreatedAt
,
UpdatedAt
:
d
.
UpdatedAt
,
DeletedAt
:
d
.
DeletedAt
,
}
}
...
...
pkg/port/beego/controllers/staff_assess_controller.go
查看文件 @
4225a99
...
...
@@ -341,3 +341,19 @@ func (c *StaffAssessController) ListTargetUserSelfCycle() {
data
,
err
:=
srv
.
ListTargetUserSelfCycle
(
paramReq
)
c
.
Response
(
data
,
err
)
}
// ListTargetUserSelfCycle 按照周期获取员工的每日自评小结
func
(
c
*
StaffAssessController
)
GetStaffAsessSelfCountLevel
()
{
srv
:=
service
.
NewStaffAssessServeice
()
paramReq
:=
&
query
.
StaffAsessSelfCountLevel
{}
err
:=
c
.
BindJSON
(
paramReq
)
if
err
!=
nil
{
e
:=
application
.
ThrowError
(
application
.
ARG_ERROR
,
"json 解析错误"
+
err
.
Error
())
c
.
Response
(
nil
,
e
)
return
}
userReq
:=
middlewares
.
GetUser
(
c
.
Ctx
)
paramReq
.
CompanyId
=
int
(
userReq
.
CompanyId
)
data
,
err
:=
srv
.
GetStaffAsessSelfCountLevel
(
paramReq
)
c
.
Response
(
data
,
err
)
}
...
...
pkg/port/beego/routers/staff_assess_router.go
查看文件 @
4225a99
...
...
@@ -36,6 +36,7 @@ func init() {
web
.
NSCtrlPost
(
"/summary/users-indicator"
,
(
*
controllers
.
StaffAssessController
)
.
QueryMemberPerformanceIndicator
),
//员工绩效-综合管理-绩效导出指标
web
.
NSCtrlPost
(
"/summary/export-indicator"
,
(
*
controllers
.
StaffAssessController
)
.
ExportPerformanceIndicator
),
//员工绩效-综合管理-绩效导出指标
web
.
NSCtrlPost
(
"/target_user/self/cycle"
,
(
*
controllers
.
StaffAssessController
)
.
ListTargetUserSelfCycle
),
//获取员工自评的周期下拉列表
web
.
NSCtrlPost
(
"/target_user/self/summary"
,
(
*
controllers
.
StaffAssessController
)
.
GetStaffAsessSelfCountLevel
),
//获取员工每日自评小结
)
//v2 改版
assessTaskV2NS
:=
web
.
NewNamespace
(
"/v2/staff-assess-task"
,
...
...
请
注册
或
登录
后发表评论