切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
3c547b8269be328d4625668712914dacc7a2f4bf
1 个父辈
027afcbf
更新查看权限
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
3 行增加
和
12 行删除
pkg/infrastructure/dao/staff_assess_dao.go
pkg/infrastructure/dao/staff_assess_dao.go
查看文件 @
3c547b8
...
...
@@ -333,18 +333,9 @@ func (d *StaffAssessDao) CountUserAssess(param SearchConditin1) (int, error) {
func
(
d
*
StaffAssessDao
)
useTStaffAssess
(
companyId
int
,
cycleId
int
,
userId
int
,
beginDay
string
,
hrbp
int
,
limit
int
,
offset
int
,
assessType
string
)
string
{
sqlstr
:=
`
set time zone 'PRC';
with t_user_department as (
select "user".id as user_id ,jsonb_array_elements_text ("user".department_id) as depart_id from "user"
where "user".company_id= %d and "user".deleted_at isnull
),
t_department as (
select department.id::text as depart_id from department where charge_user_ids @>'[%d]'
and "department".deleted_at isnull
),
-- 部门主管
t_user_1 as (
select t_user_department.user_id::text from t_user_department
join t_department on t_user_department.depart_id = t_department.depart_id
with t_user_1 as (
select "user".id::text as user_id from "user" where "user".parent_id =%d
),
-- 如果是hrbp
t_project_1 as(
...
...
@@ -413,7 +404,7 @@ func (d *StaffAssessDao) useTStaffAssess(companyId int, cycleId int, userId int,
"assessType"
:
` and staff_assess."types" ='%s' `
,
}
params
:=
[]
interface
{}{
companyId
,
userId
,
cycleId
,
hrbp
,
cycleId
,
userId
,
cycleId
,
userId
,
cycleId
,
hrbp
,
cycleId
,
userId
,
cycleId
,
}
extWhere
:=
""
if
len
(
beginDay
)
>
0
{
...
...
请
注册
或
登录
后发表评论