切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
8b2e9a4b52bd678adbc19c6d03cbb2dcec03f7eb
1 个父辈
9f1a97f9
修复bug
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
11 行增加
和
10 行删除
pkg/application/notify/service/message_personal.go
pkg/application/task/service/service.go
pkg/infrastructure/dao/task_dao.go
pkg/application/notify/service/message_personal.go
查看文件 @
8b2e9a4
...
...
@@ -268,7 +268,7 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G
}
//我作为任务相关人
for
_
,
val
:=
range
taskStageList0
{
s
:=
fmt
.
Sprintf
(
"【您
下级%s关注的项目【%s】里程碑未按时完成,请前往辅导。】"
,
val
.
LeaderName
,
val
.
TaskName
)
s
:=
fmt
.
Sprintf
(
"【您
关注的【%s】里程碑未按时完成,请知晓。】"
,
val
.
TaskAlias
)
msgList
=
append
(
msgList
,
adapter
.
MessageListAdapter
{
Content
:
s
,
})
...
...
pkg/application/task/service/service.go
查看文件 @
8b2e9a4
...
...
@@ -718,7 +718,7 @@ func (srv TaskService) ListTask2(param *command.SearchTaskCommand) (map[string]i
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"获取任务列表"
+
err
.
Error
())
}
//查到的任务数据总数
taskCount
,
err
:=
taskDao
.
CountTask
Stage
NotHrbp
(
condition
)
taskCount
,
err
:=
taskDao
.
CountTaskNotHrbp
(
condition
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"统计任务总数"
+
err
.
Error
())
}
...
...
@@ -827,7 +827,7 @@ func (srv TaskService) listTask2ForHrbp(param *command.SearchTaskCommand) (map[s
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"获取任务列表"
+
err
.
Error
())
}
taskCount
,
err
:=
taskDao
.
CountTask
Stage
ByHrbp
(
condition
)
taskCount
,
err
:=
taskDao
.
CountTaskByHrbp
(
condition
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"统计任务总数"
+
err
.
Error
())
}
...
...
@@ -1203,7 +1203,7 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"获取任务列表"
+
err
.
Error
())
}
//查到的任务数据总数
taskCount
,
err
:=
taskDao
.
CountTask
Stage
NotHrbp
(
condition
)
taskCount
,
err
:=
taskDao
.
CountTaskNotHrbp
(
condition
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"统计任务总数"
+
err
.
Error
())
}
...
...
@@ -1344,7 +1344,7 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"获取任务列表"
+
err
.
Error
())
}
//查到的任务数据总数
taskCount
,
err
:=
taskDao
.
CountTask
StageNot
Hrbp
(
condition
)
taskCount
,
err
:=
taskDao
.
CountTask
By
Hrbp
(
condition
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
"统计任务总数"
+
err
.
Error
())
}
...
...
pkg/infrastructure/dao/task_dao.go
查看文件 @
8b2e9a4
...
...
@@ -43,9 +43,10 @@ func (d *TaskDao) catchTaskIdByPermission(userId int) string {
t_task_0 as (
(select task.id from task
join t_user on task.leader ->>'id'=t_user.id::text
where task.deleted_at isnull
)
union
(select task.id from task where task.related_user@>'[%d]')
(select task.id from task where task.related_user@>'[%d]'
and task.deleted_at isnull
)
),
t_task_ignore as (
select * from task_ignore where task_ignore.user_id =%d
...
...
@@ -175,11 +176,11 @@ func (d *TaskDao) ListTaskStageNotHrbp(param ListTaskCondition) ([]ListTaskStage
}
// 获取任务总数,用于页面展示; 有过滤查看权限
func
(
d
*
TaskDao
)
CountTask
Stage
NotHrbp
(
param
ListTaskCondition
)
(
int
,
error
)
{
func
(
d
*
TaskDao
)
CountTaskNotHrbp
(
param
ListTaskCondition
)
(
int
,
error
)
{
task1
:=
d
.
catchTaskIdByPermission
(
param
.
UserId
)
withSql
:=
task1
+
`select count(*) from task
join t_task_1 on task.id =t_task_1.id
where 1=1 and task.company_id=?`
where 1=1 and task.
deleted_at isnull and task.
company_id=?`
condition
:=
[]
interface
{}{
param
.
CompanyId
}
whereSql
:=
``
if
param
.
OnlyMy
{
...
...
@@ -286,14 +287,14 @@ func (d *TaskDao) ListTaskStageByHrbp(param ListTaskCondition) ([]ListTaskStage,
}
// 获取任务总数,用于页面展示; 无过滤查看权限
func
(
d
*
TaskDao
)
CountTask
Stage
ByHrbp
(
param
ListTaskCondition
)
(
int
,
error
)
{
func
(
d
*
TaskDao
)
CountTaskByHrbp
(
param
ListTaskCondition
)
(
int
,
error
)
{
withSql
:=
`with
t_task_ignore as (
select task_ignore.task_id,task_ignore.id from task_ignore where task_ignore.user_id =?
)select count(*) from task
left join t_task_ignore on t_task_ignore.task_id=task.id
where 1=1 and t_task_ignore.id isnull and task.company_id=?`
where 1=1 and t
ask.deleted_at isnull and t
_task_ignore.id isnull and task.company_id=?`
condition
:=
[]
interface
{}{
param
.
UserId
,
param
.
CompanyId
}
whereSql
:=
``
if
param
.
OnlyMy
{
...
...
请
注册
或
登录
后发表评论