...
|
...
|
@@ -109,10 +109,13 @@ func (srv TaskService) CreateTask(transactionContext application.TransactionCont |
|
|
Status: domain.TaskRunning,
|
|
|
Level: 0,
|
|
|
LevelName: "",
|
|
|
RelatedUser: []int{int(leaderData.Id), int(leaderData.ParentId)},
|
|
|
RelatedUser: []int{int(leaderData.Id)},
|
|
|
RunAt: nowTime.Unix(),
|
|
|
StopAt: 0,
|
|
|
}
|
|
|
if int(leaderData.ParentId) != 0 {
|
|
|
newTask.RelatedUser = append(newTask.RelatedUser, int(leaderData.ParentId))
|
|
|
}
|
|
|
newTask.ApplyLevelName("战略任务")
|
|
|
err = taskRepo.Save(&newTask)
|
|
|
if err != nil {
|
...
|
...
|
@@ -226,7 +229,10 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
|
|
}
|
|
|
leaderData := leaderList[0]
|
|
|
//更新相关人员
|
|
|
taskData.RelatedUser = []int{int(leaderData.Id), int(leaderData.ParentId)}
|
|
|
taskData.RelatedUser = []int{int(leaderData.Id)}
|
|
|
if leaderData.ParentId != 0 {
|
|
|
taskData.RelatedUser = append(taskData.RelatedUser, int(leaderData.ParentId))
|
|
|
}
|
|
|
for _, val := range relatedUser {
|
|
|
if val.Id == leaderData.Id || val.Id == leaderData.ParentId {
|
|
|
continue
|
...
|
...
|
|