切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
8dbcf5e9211ab9c1946355a9e0de87bd9bd7c54a
1 个父辈
7718e541
更新
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
33 行增加
和
29 行删除
pkg/application/summary_evaluation/service/service.go
pkg/infrastructure/dao/staff_assess_dao.go
pkg/application/summary_evaluation/service/service.go
查看文件 @
8dbcf5e
...
...
@@ -1220,9 +1220,9 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"没有找到符合条件的数据"
)
}
evaluationData
:=
evaluationList
[
0
]
if
evaluationData
.
Types
==
domain
.
EvaluationSuper
{
return
nil
,
application
.
ThrowError
(
application
.
BUSINESS_ERROR
,
"没有操作权限"
)
}
// if evaluationData.Types == domain.EvaluationSuper {
// return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
// }
if
evaluationData
.
CompanyId
==
param
.
CompanyId
{
return
nil
,
application
.
ThrowError
(
application
.
BUSINESS_ERROR
,
"没有操作权限"
)
}
...
...
pkg/infrastructure/dao/staff_assess_dao.go
查看文件 @
8dbcf5e
...
...
@@ -87,32 +87,32 @@ func (d *StaffAssessDao) CountTargetUserInviteAssess1(userIds []int, cycleId int
}
// 根据评估的人执行人id,搜索 executorId参与的评估任务
func
(
d
*
StaffAssessDao
)
SearchAssessTaskMe
(
executorId
int
,
companyId
int
,
limit
int
,
offset
int
)
([]
*
domain
.
StaffAssessTask
,
error
)
{
if
limit
<
0
{
limit
=
20
}
if
offset
<
0
{
offset
=
0
}
sqlStr
:=
`SELECT DISTINCT staff_assess_task.* FROM staff_assess_task
JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id"
WHERE staff_assess.company_id=?
and staff_assess_task.deleted_at isnull
and staff_assess.executor->>'userId'='?'
order by staff_assess_task.id desc
limit ? offset ?
`
tx
:=
d
.
transactionContext
.
PgTx
condition
:=
[]
interface
{}{
companyId
,
executorId
,
limit
,
offset
,
}
result
:=
[]
*
domain
.
StaffAssessTask
{}
_
,
err
:=
tx
.
Query
(
&
result
,
sqlStr
,
condition
...
)
return
result
,
err
}
// func (d *StaffAssessDao) SearchAssessTaskMe(executorId int, companyId int, limit int, offset int) ([]*domain.StaffAssessTask, error) {
// if limit < 0 {
// limit = 20
// }
// if offset < 0 {
// offset = 0
// }
// sqlStr := `SELECT DISTINCT staff_assess_task.* FROM staff_assess_task
// JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id"
// WHERE staff_assess.company_id=?
// and staff_assess_task.deleted_at isnull
// and staff_assess.executor->>'userId'='?'
// order by staff_assess_task.id desc
// limit ? offset ?
// `
// tx := d.transactionContext.PgTx
// condition := []interface{}{
// companyId, executorId, limit, offset,
// }
// result := []*domain.StaffAssessTask{}
// _, err := tx.Query(&result, sqlStr, condition...)
// return result, err
// }
// 搜索 executorId 参与的评估任务
func
(
d
*
StaffAssessDao
)
CountAssessTaskMe
(
executorId
int
,
companyId
int
)
(
int
,
error
)
{
...
...
@@ -1253,3 +1253,7 @@ func (d *StaffAssessDao) CountUncompletedSelfAssess(companyId int, projectIds []
_
,
err
:=
tx
.
Query
(
&
result
,
sqlStr
,
condition
...
)
return
result
,
err
}
func
(
d
*
StaffAssessDao
)
SearchAssesBeforeNow
()
{}
func
(
d
*
StaffAssessDao
)
SearchAssessAfterNow
()
{}
...
...
请
注册
或
登录
后发表评论