1
|
package service
|
1
|
package service
|
2
|
|
2
|
|
3
|
import (
|
3
|
import (
|
4
|
- "encoding/json"
|
|
|
5
|
"fmt"
|
4
|
"fmt"
|
6
|
"strconv"
|
5
|
"strconv"
|
7
|
"strings"
|
6
|
"strings"
|
|
@@ -36,28 +35,29 @@ func dayEndTime(t time.Time) time.Time { |
|
@@ -36,28 +35,29 @@ func dayEndTime(t time.Time) time.Time { |
36
|
// return t2
|
35
|
// return t2
|
37
|
// }
|
36
|
// }
|
38
|
|
37
|
|
39
|
-func (srv TaskService) CreateTaskTest(param *command.CreateTaskCommand) error {
|
|
|
40
|
- transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
41
|
- if err != nil {
|
|
|
42
|
- return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
43
|
- }
|
|
|
44
|
- if err := transactionContext.StartTransaction(); err != nil {
|
|
|
45
|
- return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
46
|
- }
|
|
|
47
|
- defer func() {
|
|
|
48
|
- _ = transactionContext.RollbackTransaction()
|
|
|
49
|
- }()
|
|
|
50
|
- err = srv.CreateTask(transactionContext, param)
|
|
|
51
|
- if err != nil {
|
|
|
52
|
- return application.ThrowError(application.INTERNAL_SERVER_ERROR, "创建任务失败:"+err.Error())
|
|
|
53
|
- }
|
|
|
54
|
- if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
55
|
- return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
56
|
- }
|
|
|
57
|
- return nil
|
|
|
58
|
-}
|
38
|
+// func (srv TaskService) CreateTaskTest(param *command.CreateTaskCommand) error {
|
|
|
39
|
+// transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
40
|
+// if err != nil {
|
|
|
41
|
+// return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
42
|
+// }
|
|
|
43
|
+// if err := transactionContext.StartTransaction(); err != nil {
|
|
|
44
|
+// return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
45
|
+// }
|
|
|
46
|
+// defer func() {
|
|
|
47
|
+// _ = transactionContext.RollbackTransaction()
|
|
|
48
|
+// }()
|
|
|
49
|
+// err = srv.CreateTask(transactionContext, param)
|
|
|
50
|
+// if err != nil {
|
|
|
51
|
+// return application.ThrowError(application.INTERNAL_SERVER_ERROR, "创建任务失败:"+err.Error())
|
|
|
52
|
+// }
|
|
|
53
|
+// if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
54
|
+// return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
55
|
+// }
|
|
|
56
|
+// return nil
|
|
|
57
|
+// }
|
59
|
|
58
|
|
60
|
-func (srv TaskService) CreateTask(transactionContext application.TransactionContext, param *command.CreateTaskCommand) error {
|
59
|
+// CreateTask 重评估模板中创建
|
|
|
60
|
+func (srv TaskService) CreateTaskByProject(transactionContext application.TransactionContext, param *command.CreateTaskByProjectCommand) error {
|
61
|
taskRepo := factory.CreateTaskRepository(map[string]interface{}{
|
61
|
taskRepo := factory.CreateTaskRepository(map[string]interface{}{
|
62
|
"transactionContext": transactionContext,
|
62
|
"transactionContext": transactionContext,
|
63
|
})
|
63
|
})
|
|
@@ -67,6 +67,7 @@ func (srv TaskService) CreateTask(transactionContext application.TransactionCont |
|
@@ -67,6 +67,7 @@ func (srv TaskService) CreateTask(transactionContext application.TransactionCont |
67
|
cnt, _, err := taskRepo.Find(map[string]interface{}{
|
67
|
cnt, _, err := taskRepo.Find(map[string]interface{}{
|
68
|
"name": param.Name,
|
68
|
"name": param.Name,
|
69
|
"leaderId": strconv.Itoa(param.LeaderId),
|
69
|
"leaderId": strconv.Itoa(param.LeaderId),
|
|
|
70
|
+ "createdBy": 0,
|
70
|
"limit": 1,
|
71
|
"limit": 1,
|
71
|
})
|
72
|
})
|
72
|
if err != nil {
|
73
|
if err != nil {
|
|
@@ -112,6 +113,7 @@ func (srv TaskService) CreateTask(transactionContext application.TransactionCont |
|
@@ -112,6 +113,7 @@ func (srv TaskService) CreateTask(transactionContext application.TransactionCont |
112
|
RunAt: nowTime.Unix(),
|
113
|
RunAt: nowTime.Unix(),
|
113
|
StopAt: 0,
|
114
|
StopAt: 0,
|
114
|
SortBy: domain.TaskSortNull,
|
115
|
SortBy: domain.TaskSortNull,
|
|
|
116
|
+ CreatedBy: 0,
|
115
|
}
|
117
|
}
|
116
|
if int(leaderData.ParentId) != 0 {
|
118
|
if int(leaderData.ParentId) != 0 {
|
117
|
newTask.RelatedUser = append(newTask.RelatedUser, int(leaderData.ParentId))
|
119
|
newTask.RelatedUser = append(newTask.RelatedUser, int(leaderData.ParentId))
|
|
@@ -160,6 +162,113 @@ func (srv TaskService) CreateTask(transactionContext application.TransactionCont |
|
@@ -160,6 +162,113 @@ func (srv TaskService) CreateTask(transactionContext application.TransactionCont |
160
|
return nil
|
162
|
return nil
|
161
|
}
|
163
|
}
|
162
|
|
164
|
|
|
|
165
|
+// 创建任务
|
|
|
166
|
+func (srv TaskService) CreateTask(param *command.CreateTaskCommand) (map[string]interface{}, error) {
|
|
|
167
|
+ sortNamed := domain.TaskSortBy(param.SortBy)
|
|
|
168
|
+ if sortNamed.Named() == "" {
|
|
|
169
|
+ return nil, application.ThrowError(application.TRANSACTION_ERROR, "优先级设置错误")
|
|
|
170
|
+ }
|
|
|
171
|
+ transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
172
|
+ if err != nil {
|
|
|
173
|
+ return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
174
|
+ }
|
|
|
175
|
+ if err := transactionContext.StartTransaction(); err != nil {
|
|
|
176
|
+ return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
177
|
+ }
|
|
|
178
|
+ defer func() {
|
|
|
179
|
+ _ = transactionContext.RollbackTransaction()
|
|
|
180
|
+ }()
|
|
|
181
|
+ taskRepo := factory.CreateTaskRepository(map[string]interface{}{
|
|
|
182
|
+ "transactionContext": transactionContext,
|
|
|
183
|
+ })
|
|
|
184
|
+ cnt, _, err := taskRepo.Find(map[string]interface{}{
|
|
|
185
|
+ "name": param.Alias,
|
|
|
186
|
+ "leaderId": strconv.Itoa(param.LeaderId),
|
|
|
187
|
+ "createdBy": 1,
|
|
|
188
|
+ "limit": 1,
|
|
|
189
|
+ })
|
|
|
190
|
+ if err != nil {
|
|
|
191
|
+ return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, "创建任务失败:"+err.Error())
|
|
|
192
|
+ }
|
|
|
193
|
+ if cnt > 0 {
|
|
|
194
|
+ return map[string]interface{}{}, application.ThrowError(application.BUSINESS_ERROR, "已经存在相同的任务")
|
|
|
195
|
+ }
|
|
|
196
|
+ userRepo := factory.CreateUserRepository(map[string]interface{}{
|
|
|
197
|
+ "transactionContext": transactionContext,
|
|
|
198
|
+ })
|
|
|
199
|
+
|
|
|
200
|
+ _, leaderList, err := userRepo.Find(map[string]interface{}{
|
|
|
201
|
+ "id": param.LeaderId,
|
|
|
202
|
+ "companyId": param.CompanyId,
|
|
|
203
|
+ })
|
|
|
204
|
+ if err != nil {
|
|
|
205
|
+ return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, "查询人员失败:"+err.Error())
|
|
|
206
|
+ }
|
|
|
207
|
+ if len(leaderList) == 0 {
|
|
|
208
|
+ return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有查询到人员")
|
|
|
209
|
+ }
|
|
|
210
|
+ relatedUserIds := []int{}
|
|
|
211
|
+ for _, val := range param.RelatedUserId {
|
|
|
212
|
+ id, _ := strconv.Atoi(val)
|
|
|
213
|
+ relatedUserIds = append(relatedUserIds, id)
|
|
|
214
|
+ }
|
|
|
215
|
+ var relatedUser []*domain.User
|
|
|
216
|
+ if len(relatedUserIds) > 0 {
|
|
|
217
|
+ _, relatedUser, err = userRepo.Find(map[string]interface{}{
|
|
|
218
|
+ "ids": relatedUserIds,
|
|
|
219
|
+ "companyId": param.CompanyId,
|
|
|
220
|
+ })
|
|
|
221
|
+ if err != nil {
|
|
|
222
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取任务的相关人员"+err.Error())
|
|
|
223
|
+ }
|
|
|
224
|
+ }
|
|
|
225
|
+ leaderData := leaderList[0]
|
|
|
226
|
+ nowTime := time.Now()
|
|
|
227
|
+ newTask := domain.Task{
|
|
|
228
|
+ Id: 0,
|
|
|
229
|
+ CreatedAt: time.Time{},
|
|
|
230
|
+ UpdatedAt: time.Time{},
|
|
|
231
|
+ DeletedAt: nil,
|
|
|
232
|
+ CompanyId: int(leaderData.CompanyId),
|
|
|
233
|
+ Name: param.Alias,
|
|
|
234
|
+ Alias: param.Alias,
|
|
|
235
|
+ Leader: domain.TaskLeader{
|
|
|
236
|
+ Id: leaderData.Id,
|
|
|
237
|
+ Account: leaderData.Account,
|
|
|
238
|
+ Name: leaderData.Name,
|
|
|
239
|
+ },
|
|
|
240
|
+ Status: domain.TaskRunning,
|
|
|
241
|
+ Level: 0,
|
|
|
242
|
+ LevelName: "",
|
|
|
243
|
+ RelatedUser: []int{int(leaderData.Id)},
|
|
|
244
|
+ RunAt: nowTime.Unix(),
|
|
|
245
|
+ StopAt: 0,
|
|
|
246
|
+ SortBy: domain.TaskSortBy(param.SortBy),
|
|
|
247
|
+ CreatedBy: 1,
|
|
|
248
|
+ AssistFlagMax: 0,
|
|
|
249
|
+ }
|
|
|
250
|
+ //处理endTime
|
|
|
251
|
+ if param.EndTime == 0 {
|
|
|
252
|
+ newTask.EndTime = 0
|
|
|
253
|
+ } else {
|
|
|
254
|
+ newTask.EndTime = dayEndTime(time.Unix(param.EndTime, 10)).Unix()
|
|
|
255
|
+ }
|
|
|
256
|
+ newTask.ApplyLevelName(param.LevelName)
|
|
|
257
|
+ newTask.RelatedUser = []int{}
|
|
|
258
|
+ for _, val := range relatedUser {
|
|
|
259
|
+ newTask.RelatedUser = append(newTask.RelatedUser, int(val.Id))
|
|
|
260
|
+ }
|
|
|
261
|
+
|
|
|
262
|
+ err = taskRepo.Save(&newTask)
|
|
|
263
|
+ if err != nil {
|
|
|
264
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
265
|
+ }
|
|
|
266
|
+ if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
267
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
268
|
+ }
|
|
|
269
|
+ return map[string]interface{}{"id": newTask.Id}, nil
|
|
|
270
|
+}
|
|
|
271
|
+
|
163
|
// 更新任务
|
272
|
// 更新任务
|
164
|
func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string]interface{}, error) {
|
273
|
func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string]interface{}, error) {
|
165
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
274
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
@@ -198,7 +307,7 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
|
@@ -198,7 +307,7 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
198
|
if err != nil {
|
307
|
if err != nil {
|
199
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
308
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
200
|
}
|
309
|
}
|
201
|
- //任务的相关人员
|
310
|
+ //更新任务的相关人员
|
202
|
relatedUserIds := []int{}
|
311
|
relatedUserIds := []int{}
|
203
|
for _, val := range param.RelatedUserId {
|
312
|
for _, val := range param.RelatedUserId {
|
204
|
id, _ := strconv.Atoi(val)
|
313
|
id, _ := strconv.Atoi(val)
|
|
@@ -218,10 +327,12 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
|
@@ -218,10 +327,12 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
218
|
for _, val := range relatedUser {
|
327
|
for _, val := range relatedUser {
|
219
|
taskData.RelatedUser = append(taskData.RelatedUser, int(val.Id))
|
328
|
taskData.RelatedUser = append(taskData.RelatedUser, int(val.Id))
|
220
|
}
|
329
|
}
|
221
|
- //更新任务名称
|
330
|
+ //更新任务名称,任务分类
|
222
|
taskData.Alias = param.Alias
|
331
|
taskData.Alias = param.Alias
|
223
|
taskData.ApplyLevelName(param.LevelName)
|
332
|
taskData.ApplyLevelName(param.LevelName)
|
|
|
333
|
+
|
224
|
nowTime := time.Now()
|
334
|
nowTime := time.Now()
|
|
|
335
|
+ //更新里程碑数据
|
225
|
stageMap := map[int]*domain.TaskStage{}
|
336
|
stageMap := map[int]*domain.TaskStage{}
|
226
|
for _, val := range stageList {
|
337
|
for _, val := range stageList {
|
227
|
val.DeletedAt = &nowTime
|
338
|
val.DeletedAt = &nowTime
|
|
@@ -229,8 +340,8 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
|
@@ -229,8 +340,8 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
229
|
}
|
340
|
}
|
230
|
lastPlanCompletedAt := time.Time{}
|
341
|
lastPlanCompletedAt := time.Time{}
|
231
|
newStageList := []*domain.TaskStage{}
|
342
|
newStageList := []*domain.TaskStage{}
|
232
|
- //标记完成时间变更的里程碑
|
|
|
233
|
- markStage := []domain.TaskStage{}
|
343
|
+ //标记 变更完成时间的 里程碑
|
|
|
344
|
+ //markStage := []domain.TaskStage{}
|
234
|
for i, val2 := range param.StageList {
|
345
|
for i, val2 := range param.StageList {
|
235
|
t, err := time.ParseInLocation("2006-01-02", val2.PlanCompletedAt, time.Local)
|
346
|
t, err := time.ParseInLocation("2006-01-02", val2.PlanCompletedAt, time.Local)
|
236
|
if err != nil {
|
347
|
if err != nil {
|
|
@@ -262,9 +373,10 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
|
@@ -262,9 +373,10 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
262
|
oldStage.DeletedAt = nil
|
373
|
oldStage.DeletedAt = nil
|
263
|
oldStage.SortBy = i + 1
|
374
|
oldStage.SortBy = i + 1
|
264
|
oldStage.Name = val2.Name
|
375
|
oldStage.Name = val2.Name
|
265
|
- if ok := oldStage.SetPlanCompleted(t); ok {
|
|
|
266
|
- markStage = append(markStage, *oldStage)
|
|
|
267
|
- }
|
376
|
+ oldStage.SetPlanCompleted(t)
|
|
|
377
|
+ //if ok := oldStage.SetPlanCompleted(t); ok {
|
|
|
378
|
+ //markStage = append(markStage, *oldStage)
|
|
|
379
|
+ // }
|
268
|
}
|
380
|
}
|
269
|
|
381
|
|
270
|
stageList = append(stageList, newStageList...)
|
382
|
stageList = append(stageList, newStageList...)
|
|
@@ -303,39 +415,40 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
|
@@ -303,39 +415,40 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string] |
303
|
}
|
415
|
}
|
304
|
|
416
|
|
305
|
taskData.UseEndTime = param.UseEndtime
|
417
|
taskData.UseEndTime = param.UseEndtime
|
|
|
418
|
+ taskData.AssistFlagMax = param.AssistFlagMax
|
306
|
err = taskRepo.Save(taskData)
|
419
|
err = taskRepo.Save(taskData)
|
307
|
if err != nil {
|
420
|
if err != nil {
|
308
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
421
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
309
|
}
|
422
|
}
|
310
|
- messageRepo := factory.CreateMessagePersonalRepository(map[string]interface{}{
|
|
|
311
|
- "transactionContext": transactionContext,
|
|
|
312
|
- })
|
423
|
+ // messageRepo := factory.CreateMessagePersonalRepository(map[string]interface{}{
|
|
|
424
|
+ // "transactionContext": transactionContext,
|
|
|
425
|
+ // })
|
313
|
//根据markStage 记录的里程碑数据生成通知
|
426
|
//根据markStage 记录的里程碑数据生成通知
|
314
|
- for _, val := range markStage {
|
|
|
315
|
- for _, val2 := range taskData.RelatedUser {
|
|
|
316
|
- t1 := time.Unix(val.PlanCompletedAt, 0).Format("2006-01-02")
|
|
|
317
|
- s := fmt.Sprintf(`%s 负责的任务 %s 的里程碑 %s 计划完成时间变更为 %s,请知晓!`, taskData.Leader.Name, taskData.Alias, val.Name, t1)
|
|
|
318
|
- payload := map[string]string{
|
|
|
319
|
- "id": strconv.Itoa(val.Id),
|
|
|
320
|
- "taskName": taskData.Name,
|
|
|
321
|
- "taskStageName": val.Name,
|
|
|
322
|
- }
|
|
|
323
|
- payloadStr, _ := json.Marshal(payload)
|
|
|
324
|
- newMessage := domain.MessagePersonal{
|
|
|
325
|
- Id: 0,
|
|
|
326
|
- Types: domain.MessageTypesTaskModify,
|
|
|
327
|
- TargetUserId: val2,
|
|
|
328
|
- ReadFlag: domain.MessageUnread,
|
|
|
329
|
- Title: s,
|
|
|
330
|
- Content: s,
|
|
|
331
|
- Payload: string(payloadStr),
|
|
|
332
|
- }
|
|
|
333
|
- err = messageRepo.Save(&newMessage)
|
|
|
334
|
- if err != nil {
|
|
|
335
|
- return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
336
|
- }
|
|
|
337
|
- }
|
|
|
338
|
- }
|
427
|
+ // for _, val := range markStage {
|
|
|
428
|
+ // for _, val2 := range taskData.RelatedUser {
|
|
|
429
|
+ // t1 := time.Unix(val.PlanCompletedAt, 0).Format("2006-01-02")
|
|
|
430
|
+ // s := fmt.Sprintf(`%s 负责的任务 %s 的里程碑 %s 计划完成时间变更为 %s,请知晓!`, taskData.Leader.Name, taskData.Alias, val.Name, t1)
|
|
|
431
|
+ // payload := map[string]string{
|
|
|
432
|
+ // "id": strconv.Itoa(val.Id),
|
|
|
433
|
+ // "taskName": taskData.Name,
|
|
|
434
|
+ // "taskStageName": val.Name,
|
|
|
435
|
+ // }
|
|
|
436
|
+ // payloadStr, _ := json.Marshal(payload)
|
|
|
437
|
+ // newMessage := domain.MessagePersonal{
|
|
|
438
|
+ // Id: 0,
|
|
|
439
|
+ // Types: domain.MessageTypesTaskModify,
|
|
|
440
|
+ // TargetUserId: val2,
|
|
|
441
|
+ // ReadFlag: domain.MessageUnread,
|
|
|
442
|
+ // Title: s,
|
|
|
443
|
+ // Content: s,
|
|
|
444
|
+ // Payload: string(payloadStr),
|
|
|
445
|
+ // }
|
|
|
446
|
+ // err = messageRepo.Save(&newMessage)
|
|
|
447
|
+ // if err != nil {
|
|
|
448
|
+ // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
449
|
+ // }
|
|
|
450
|
+ // }
|
|
|
451
|
+ // }
|
339
|
if err := transactionContext.CommitTransaction(); err != nil {
|
452
|
if err := transactionContext.CommitTransaction(); err != nil {
|
340
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
453
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
341
|
}
|
454
|
}
|
|
@@ -449,13 +562,6 @@ func (srv TaskService) GetTaskInfo(param *command.GetTaskCommand) (*adapter.Task |
|
@@ -449,13 +562,6 @@ func (srv TaskService) GetTaskInfo(param *command.GetTaskCommand) (*adapter.Task |
449
|
taskRecordRepo := factory.CreateTaskRecordRepository(map[string]interface{}{
|
562
|
taskRecordRepo := factory.CreateTaskRecordRepository(map[string]interface{}{
|
450
|
"transactionContext": transactionContext,
|
563
|
"transactionContext": transactionContext,
|
451
|
})
|
564
|
})
|
452
|
- // cnt, _, err := taskRecordRepo.Find(map[string]interface{}{
|
|
|
453
|
- // "taskId": param.TaskId,
|
|
|
454
|
- // "limit": 1,
|
|
|
455
|
- // })
|
|
|
456
|
- // if err != nil {
|
|
|
457
|
- // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "相关联的任务反馈信息"+err.Error())
|
|
|
458
|
- // }
|
|
|
459
|
result := adapter.TaskInfoAdapter{
|
565
|
result := adapter.TaskInfoAdapter{
|
460
|
Id: taskData.Id,
|
566
|
Id: taskData.Id,
|
461
|
Name: taskData.Name,
|
567
|
Name: taskData.Name,
|
|
@@ -477,6 +583,7 @@ func (srv TaskService) GetTaskInfo(param *command.GetTaskCommand) (*adapter.Task |
|
@@ -477,6 +583,7 @@ func (srv TaskService) GetTaskInfo(param *command.GetTaskCommand) (*adapter.Task |
477
|
RelatedUserId: []string{},
|
583
|
RelatedUserId: []string{},
|
478
|
RelatedUser: []adapter.UserData{},
|
584
|
RelatedUser: []adapter.UserData{},
|
479
|
StageList: []adapter.TaskStage{},
|
585
|
StageList: []adapter.TaskStage{},
|
|
|
586
|
+ AssistFlagMax: taskData.AssistFlagMax,
|
480
|
}
|
587
|
}
|
481
|
for _, val := range relatedUserList {
|
588
|
for _, val := range relatedUserList {
|
482
|
idStr := strconv.Itoa(int(val.Id))
|
589
|
idStr := strconv.Itoa(int(val.Id))
|
|
@@ -487,6 +594,7 @@ func (srv TaskService) GetTaskInfo(param *command.GetTaskCommand) (*adapter.Task |
|
@@ -487,6 +594,7 @@ func (srv TaskService) GetTaskInfo(param *command.GetTaskCommand) (*adapter.Task |
487
|
Name: val.Name,
|
594
|
Name: val.Name,
|
488
|
ParentId: val.ParentId,
|
595
|
ParentId: val.ParentId,
|
489
|
})
|
596
|
})
|
|
|
597
|
+
|
490
|
}
|
598
|
}
|
491
|
|
599
|
|
492
|
for _, val := range stageList {
|
600
|
for _, val := range stageList {
|