切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
f969f59230c811c0089e6e43b38428e7de85da4e
1 个父辈
3a490f56
日常保存
显示空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
19 行增加
和
2 行删除
pkg/application/staff_assess/service/create_staff_assess.go
pkg/application/task/command/mark_task_anomaly.go
pkg/application/task/service/check_task_record_test.go
pkg/application/task/service/check_task_recordv2.go
pkg/domain/task.go
pkg/domain/task_stage.go
pkg/application/staff_assess/service/create_staff_assess.go
查看文件 @
f969f59
...
...
@@ -452,6 +452,7 @@ func (srv StaffAssessServeice) buildTaskRecord(staffAssess *domain.StaffAssess)
"name"
:
val
.
Name
,
"leaderId"
:
projectData
.
PrincipalId
,
"status"
:
domain
.
TaskRunning
,
"createdBy"
:
0
,
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
ARG_ERROR
,
"获取评估项指标任务task信息"
+
err
.
Error
())
...
...
@@ -508,6 +509,7 @@ func (srv StaffAssessServeice) buildTaskRecord(staffAssess *domain.StaffAssess)
taskRecordList
=
append
(
taskRecordList
,
&
newTaskRecord
)
}
}
//TODO 设置手动创建的task
if
err
:=
transactionContext
.
CommitTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
...
...
pkg/application/task/command/mark_task_anomaly.go
查看文件 @
f969f59
...
...
@@ -3,5 +3,5 @@ package command
type
MarkTaskAnomalyCommand
struct
{
Id
int
`json:"id,string"`
CompanyId
int
`json:"-"`
MarkType
string
`json:"markType"`
MarkType
string
`json:"markType"`
//a:去更新,b:去反馈,c:去求助,d:去辅导
}
...
...
pkg/application/task/service/check_task_record_test.go
查看文件 @
f969f59
...
...
@@ -23,6 +23,7 @@ func TestCheckYesterdayTaskRecord(t *testing.T) {
t
.
Log
(
"检查每日任务反馈"
+
err
.
Error
())
}
}
}
func
TestCreatTaskAnamaly
(
t
*
testing
.
T
)
{
...
...
@@ -43,7 +44,7 @@ func TestCreatTaskAnamaly(t *testing.T) {
"transactionContext"
:
transactionContext
,
})
_
,
taskRacordList
,
err
:=
taskRecordRepo
.
Find
(
map
[
string
]
interface
{}{
"ids"
:
[]
int
{
1669
736612939960320
},
"ids"
:
[]
int
{
1669
011861988708352
},
})
if
err
!=
nil
{
t
.
Error
(
err
)
...
...
pkg/application/task/service/check_task_recordv2.go
查看文件 @
f969f59
...
...
@@ -246,6 +246,7 @@ func isAssistFlag(transactionContext application.TransactionContext, taskData *d
CreatedAt
:
time
.
Now
(),
UpdatedAt
:
time
.
Now
(),
CompanyId
:
taskData
.
CompanyId
,
TaskRecordId
:
taskRecord
.
Id
,
TaskId
:
taskData
.
Id
,
Category
:
domain
.
AnomalyCategoryType3
,
CurrentStage
:
taskData
.
CurrentStage
,
...
...
@@ -361,6 +362,7 @@ func isAssessFlag(transactionContext application.TransactionContext, taskData *d
UpdatedAt
:
time
.
Now
(),
CompanyId
:
taskData
.
CompanyId
,
TaskId
:
taskData
.
Id
,
TaskRecordId
:
taskRecord
.
Id
,
Category
:
domain
.
AnomalyCategoryType2
,
CurrentStage
:
taskData
.
CurrentStage
,
LastStage
:
taskData
.
LastStage
,
...
...
pkg/domain/task.go
查看文件 @
f969f59
...
...
@@ -169,6 +169,13 @@ func (t *Task) DescriptTaskStatus() string {
return
statusNamed
}
func
(
t
*
Task
)
Copy
()
Task
{
t2
:=
*
t
t2
.
RelatedUser
=
make
([]
int
,
len
(
t
.
RelatedUser
))
copy
(
t2
.
RelatedUser
,
t
.
RelatedUser
)
return
t2
}
type
TaskRepository
interface
{
Save
(
param
*
Task
)
error
Remove
(
id
int
)
error
...
...
pkg/domain/task_stage.go
查看文件 @
f969f59
...
...
@@ -78,3 +78,8 @@ func (t TaskStage) dayEndTime(now time.Time) time.Time {
endTime
:=
time
.
Date
(
yyyy
,
m
,
d
,
23
,
59
,
59
,
0
,
time
.
Local
)
return
endTime
}
func
(
t
*
TaskStage
)
Copy
()
TaskStage
{
t2
:=
*
t
return
t2
}
...
...
请
注册
或
登录
后发表评论