切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
f3a04975a65987449d32fb1822304baf46a57b1f
1 个父辈
28824018
更新
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
9 行增加
和
8 行删除
pkg/application/staff_assess/query/assess_self_list.go
pkg/application/summary_evaluation/service/service.go
pkg/infrastructure/dao/summary_evaluation_dao.go
pkg/port/beego/controllers/staff_assess_controller.go
pkg/application/staff_assess/query/assess_self_list.go
查看文件 @
f3a0497
...
...
@@ -2,7 +2,7 @@ package query
type
AssessSelfListQuery
struct
{
UserId
int
`json:"userId"`
//用户id
CompanyId
int
`json:"
companyId"`
//公司Id
CompanyId
int
`json:"
-"`
//公司Id
PageSize
int
`json:"pageSize"`
//每页的记录数
PageNumber
int
`json:"pageNumber"`
//页码
}
...
...
pkg/application/summary_evaluation/service/service.go
查看文件 @
f3a0497
...
...
@@ -46,12 +46,12 @@ func (srv *SummaryEvaluationService) GetExecutorCycleList(param *command.QueryCy
offset
=
(
param
.
PageNumber
-
1
)
*
param
.
PageSize
}
cycleData
,
err
:=
evaluationDao
.
GetExecutorCycleList
(
param
.
UserId
,
offset
,
limit
,
0
)
cycleData
,
err
:=
evaluationDao
.
GetExecutorCycleList
(
param
.
UserId
,
offset
,
limit
,
domain
.
EvaluationSelf
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"获取周期列表"
+
err
.
Error
())
}
cnt
,
err
:=
evaluationDao
.
CountExecutorCycleList
(
param
.
UserId
,
0
)
cnt
,
err
:=
evaluationDao
.
CountExecutorCycleList
(
param
.
UserId
,
domain
.
EvaluationSelf
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
...
...
@@ -1311,5 +1311,6 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command
// 获取周期综合评估下,周期评估列表
func
(
srv
*
SummaryEvaluationService
)
ListEvalationSuper
()
(
map
[
int
]
interface
{},
error
)
{
return
nil
,
nil
}
...
...
pkg/infrastructure/dao/summary_evaluation_dao.go
查看文件 @
f3a0497
...
...
@@ -3,6 +3,7 @@ package dao
import
(
"github.com/go-pg/pg/v10"
pgTransaction
"github.com/linmadan/egglib-go/transaction/pg"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
)
type
SummaryEvaluationDao
struct
{
...
...
@@ -27,7 +28,7 @@ type PersonalCycle struct {
// GetExecutorCycleList 获取执行人拥有的周期列表
// executorId 执行人id
// offset,limit 分页
func
(
d
*
SummaryEvaluationDao
)
GetExecutorCycleList
(
executorId
int
,
offset
int
,
limit
int
,
evaluationType
int
)
([]
PersonalCycle
,
error
)
{
func
(
d
*
SummaryEvaluationDao
)
GetExecutorCycleList
(
executorId
int
,
offset
int
,
limit
int
,
evaluationType
domain
.
EvaluationType
)
([]
PersonalCycle
,
error
)
{
sqlStr
:=
`select
distinct
summary_evaluation.cycle_id ,
...
...
@@ -43,7 +44,7 @@ func (d *SummaryEvaluationDao) GetExecutorCycleList(executorId int, offset int,
if
evaluationType
>
0
{
sqlStr
+=
` and summary_evaluation."types"=? `
condition
=
append
(
condition
,
evaluationType
)
condition
=
append
(
condition
,
int
(
evaluationType
)
)
}
condition
=
append
(
condition
,
offset
,
limit
)
...
...
@@ -54,7 +55,7 @@ func (d *SummaryEvaluationDao) GetExecutorCycleList(executorId int, offset int,
}
// CountExecutorCycleList 统计执行人拥有的周期列表
func
(
d
*
SummaryEvaluationDao
)
CountExecutorCycleList
(
executorId
int
,
evaluationType
int
)
(
int
,
error
)
{
func
(
d
*
SummaryEvaluationDao
)
CountExecutorCycleList
(
executorId
int
,
evaluationType
domain
.
EvaluationType
)
(
int
,
error
)
{
sqlStr
:=
`select count(
distinct summary_evaluation.cycle_id
) as cnt
...
...
@@ -67,7 +68,7 @@ func (d *SummaryEvaluationDao) CountExecutorCycleList(executorId int, evaluation
}
if
evaluationType
>
0
{
sqlStr
+=
` and summary_evaluation."types"=? `
condition
=
append
(
condition
,
evaluationType
)
condition
=
append
(
condition
,
int
(
evaluationType
)
)
}
var
cnt
int
...
...
pkg/port/beego/controllers/staff_assess_controller.go
查看文件 @
f3a0497
...
...
@@ -60,7 +60,6 @@ func (c *StaffAssessController) AssessSelfMeList() {
}
userReq
:=
middlewares
.
GetUser
(
c
.
Ctx
)
paramReq
.
CompanyId
=
int
(
userReq
.
CompanyId
)
paramReq
.
UserId
=
int
(
userReq
.
UserId
)
data
,
err
:=
srv
.
AssessSelfList
(
paramReq
)
c
.
Response
(
data
,
err
)
}
...
...
请
注册
或
登录
后发表评论