切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
11f9fef8dcc57fd60c3bfc0e19b3659d58ffbad2
2 个父辈
021921f9
6135ba2d
master
...
dev-pushdata
dev-tangxvhui
dev-zhengzhou
test
v1.4.0
v2.2.0-fix
v2.2.0
v2.0.0
Merge branch '1.3.2-bug' into test
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
13 行增加
和
5 行删除
pkg/application/summary_evaluation/command/query_cycle_list.go
pkg/application/summary_evaluation/service/service3.go
pkg/infrastructure/dao/staff_assess_dao_2.go
pkg/application/summary_evaluation/command/query_cycle_list.go
查看文件 @
11f9fef
...
...
@@ -5,6 +5,7 @@ type QueryCycleList struct {
UserId
int
`json:"userId,string"`
CompanyId
int
`json:"-"`
Types
int
`json:"types"`
CycleId
int
`json:"cycleId,string"`
PageSize
int
`json:"pageSize"`
PageNumber
int
`json:"pageNumber"`
}
...
...
pkg/application/summary_evaluation/service/service3.go
查看文件 @
11f9fef
...
...
@@ -49,7 +49,7 @@ func (srv *SummaryEvaluationService) ListCycleAndProject(param *command.QueryCyc
assessDao
:=
dao
.
NewStaffAssessDao
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
projectList
,
err
:=
assessDao
.
ListCycleAndProject
(
param
.
UserId
,
param
.
CompanyId
,
offset
,
limit
)
projectList
,
err
:=
assessDao
.
ListCycleAndProject
(
param
.
UserId
,
param
.
CompanyId
,
param
.
CycleId
,
offset
,
limit
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
...
...
pkg/infrastructure/dao/staff_assess_dao_2.go
查看文件 @
11f9fef
...
...
@@ -440,7 +440,7 @@ type CycleAndProjectItem struct {
}
// 获取某个人的自评的周期和项目
func
(
d
*
StaffAssessDao
)
ListCycleAndProject
(
userId
int
,
companyId
int
,
offset
int
,
limit
int
)
(
result
[]
CycleAndProjectItem
,
err
error
)
{
func
(
d
*
StaffAssessDao
)
ListCycleAndProject
(
userId
int
,
companyId
int
,
cycleId
int
,
offset
int
,
limit
int
)
(
result
[]
CycleAndProjectItem
,
err
error
)
{
sqlStr
:=
`select
distinct
staff_assess.cycle_id ,
...
...
@@ -453,10 +453,17 @@ func (d *StaffAssessDao) ListCycleAndProject(userId int, companyId int, offset i
and company_id=?
and target_user->>'userId'=?
and "types"='self'
order by cycle_id desc
limit ? offset ? `
`
condition
:=
[]
interface
{}{
companyId
,
strconv
.
Itoa
(
userId
)}
if
cycleId
>
0
{
condition
=
append
(
condition
,
cycleId
)
sqlStr
+=
` and cycle_id=? `
}
condition
=
append
(
condition
,
limit
,
offset
)
sqlStr
+=
` order by cycle_id desc limit ? offset ? `
tx
:=
d
.
transactionContext
.
PgTx
condition
:=
[]
interface
{}{
companyId
,
strconv
.
Itoa
(
userId
),
limit
,
offset
}
_
,
err
=
tx
.
Query
(
&
result
,
sqlStr
,
condition
...
)
return
result
,
err
}
...
...
请
注册
或
登录
后发表评论