切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
8297747c0bac1e22e747c579458457aadedb1ae0
1 个父辈
db6b9be4
调整任务列表标记
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
25 行增加
和
9 行删除
pkg/application/task/service/service.go
pkg/application/task/service/service2.go
pkg/infrastructure/dao/task_anomaly.go
pkg/application/task/service/service.go
查看文件 @
8297747
...
...
@@ -1243,6 +1243,9 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
if
val
.
WarnFlag
>
0
{
val
.
WarnFlag
=
1
}
if
val
.
CurrentStage
.
Id
==
0
{
tk
.
WarnFlag
=
0
}
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
// tk.WarnFlag = int(domain.TaskWarn)
// }
...
...
@@ -1528,6 +1531,12 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s
if
val
.
CurrentStage
.
RealCompletedAt
>
0
{
tk
.
CurrentStage
.
RealCompletedAt
=
time
.
Unix
(
int64
(
val
.
CurrentStage
.
RealCompletedAt
),
0
)
.
Local
()
.
Format
(
"2006-01-02"
)
}
if
tk
.
WarnFlag
>
0
{
tk
.
WarnFlag
=
1
}
if
val
.
CurrentStage
.
Id
==
0
{
tk
.
WarnFlag
=
0
}
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
// tk.WarnFlag = int(domain.TaskWarn)
// }
...
...
@@ -1779,7 +1788,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result
taskStageRepo
:=
factory
.
CreateTaskStageRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
nowTime
:=
time
.
Now
()
.
Unix
()
for
_
,
val
:=
range
taskListData
{
tk
:=
adapter
.
TaskItem
{
Id
:
val
.
TaskId
,
...
...
@@ -1791,7 +1800,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result
LevelName
:
val
.
LevelName
,
UpdatedAt
:
val
.
UpdatedAt
.
Local
()
.
Format
(
"2006-01-02 15:04:05"
),
Anomaly
:
val
.
Anomaly
,
WarnFlag
:
0
,
WarnFlag
:
val
.
WarnFlag
,
LastStage
:
adapter
.
TaskStage
{
Id
:
val
.
LastStage
.
Id
,
Name
:
val
.
LastStage
.
Name
,
...
...
@@ -1815,13 +1824,19 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result
if
val
.
CurrentStage
.
RealCompletedAt
>
0
{
tk
.
CurrentStage
.
RealCompletedAt
=
time
.
Unix
(
int64
(
val
.
CurrentStage
.
RealCompletedAt
),
0
)
.
Local
()
.
Format
(
"2006-01-02"
)
}
if
val
.
LastStage
.
Id
>
0
&&
val
.
LastStage
.
PlanCompletedAt
<
val
.
LastStage
.
RealCompletedAt
{
// tk.WarnFlag = int(domain.TaskWarn)
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
// // tk.WarnFlag = int(domain.TaskWarn)
// tk.WarnFlag = 1
// }
// if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
// // tk.WarnFlag = int(domain.TaskWarn)
// tk.WarnFlag = 1
// }
if
tk
.
WarnFlag
>
0
{
tk
.
WarnFlag
=
1
}
if
val
.
CurrentStage
.
Id
>
0
&&
val
.
CurrentStage
.
PlanCompletedAt
<
nowTime
{
// tk.WarnFlag = int(domain.TaskWarn)
tk
.
WarnFlag
=
1
if
val
.
CurrentStage
.
Id
==
0
{
tk
.
WarnFlag
=
0
}
_
,
stageList
,
err
:=
taskStageRepo
.
Find
(
map
[
string
]
interface
{}{
"taskId"
:
val
.
TaskId
,
...
...
pkg/application/task/service/service2.go
查看文件 @
8297747
...
...
@@ -422,6 +422,7 @@ func (srv TaskService) ListTaskAnomaly1(param *command.ListTaskAnomalyCommand) (
taskAnomalyDao
:=
dao
.
NewTaskAnomalyDao
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
limit
:=
1000
offset
:=
0
cnt
,
anomalyList
,
err
:=
taskAnomalyDao
.
List1
(
param
.
UserId
,
param
.
CompanyId
,
param
.
TaskName
,
param
.
Category
,
param
.
DayTime
,
limit
,
offset
)
...
...
pkg/infrastructure/dao/task_anomaly.go
查看文件 @
8297747
...
...
@@ -364,7 +364,7 @@ func (d *TaskAnomalyDao) List3(userId int, companyId int, taskName string, categ
where t_task_ignore.id isnull and task.deleted_at isnull
and task_anomaly.company_id = ?
and task.related_user@> ?
and
task.leader->>'id' not in (select id::text from t_user where t_user."level" <3
)
and
not exists (select t_user.id::text from t_user where t_user."level" <3 and task.leader->>'id'=t_user.id::text
)
and task_anomaly.is_last=1
`
...
...
@@ -395,7 +395,7 @@ func (d *TaskAnomalyDao) List3(userId int, companyId int, taskName string, categ
where t_task_ignore.id isnull and task.deleted_at isnull
and task_anomaly.company_id = ?
and task.related_user@> ?
and
task.leader->>'id' not in (select id::text from t_user where t_user."level" <3
)
and
not exists (select t_user.id::text from t_user where t_user."level" <3 and task.leader->>'id'=t_user.id::text
)
and task_anomaly.is_last=1
`
...
...
请
注册
或
登录
后发表评论