正在显示
3 个修改的文件
包含
12 行增加
和
9 行删除
@@ -596,6 +596,11 @@ func (srv TaskService) ListTask(param *command.ListTaskCommand) (map[string]inte | @@ -596,6 +596,11 @@ func (srv TaskService) ListTask(param *command.ListTaskCommand) (map[string]inte | ||
596 | Name: val.Name, | 596 | Name: val.Name, |
597 | StatusDescription: val.StatusDescription(), | 597 | StatusDescription: val.StatusDescription(), |
598 | SortBy: val.SortBy, | 598 | SortBy: val.SortBy, |
599 | + PlanCompletedAt: time.Unix(int64(val.PlanCompletedAt), 0).Local().Format("2006-01-02"), | ||
600 | + RealCompletedAt: "", | ||
601 | + } | ||
602 | + if val.RealCompletedAt > 0 { | ||
603 | + stage.RealCompletedAt = time.Unix(int64(val.RealCompletedAt), 0).Local().Format("2006-01-02") | ||
599 | } | 604 | } |
600 | switch val.SortBy { | 605 | switch val.SortBy { |
601 | case 1: | 606 | case 1: |
@@ -887,10 +892,9 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction | @@ -887,10 +892,9 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction | ||
887 | if err != nil { | 892 | if err != nil { |
888 | return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务数据"+err.Error()) | 893 | return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务数据"+err.Error()) |
889 | } | 894 | } |
890 | - | ||
891 | - if !(len(val.AssistContent) == 0 || val.AssistContent == "无") { | ||
892 | - taskData.Anomaly = 0 | ||
893 | - } | 895 | + // if !(len(val.AssistContent) == 0 || val.AssistContent == "无") { |
896 | + // taskData.Anomaly = 0 | ||
897 | + // } | ||
894 | taskList = append(taskList, taskData) | 898 | taskList = append(taskList, taskData) |
895 | _, stageList, err := taskStageRepo.Find(map[string]interface{}{"ids": []int{val.TaskStageCheck.Id}}) | 899 | _, stageList, err := taskStageRepo.Find(map[string]interface{}{"ids": []int{val.TaskStageCheck.Id}}) |
896 | if err != nil { | 900 | if err != nil { |
@@ -8,9 +8,9 @@ import ( | @@ -8,9 +8,9 @@ import ( | ||
8 | 8 | ||
9 | func TestGenerateToken(t *testing.T) { | 9 | func TestGenerateToken(t *testing.T) { |
10 | ut := UserAuth{ | 10 | ut := UserAuth{ |
11 | - CompanyId: 233, | ||
12 | - UserId: 3240357405361920, | ||
13 | - Phone: "13459147023", | 11 | + CompanyId: 8, |
12 | + UserId: 3438641393081088, | ||
13 | + Phone: "17711111111", | ||
14 | PlatformId: 28, | 14 | PlatformId: 28, |
15 | AdminType: 1, | 15 | AdminType: 1, |
16 | } | 16 | } |
@@ -102,8 +102,7 @@ func (repo *TaskStageRepository) Find(queryOptions map[string]interface{}) (int, | @@ -102,8 +102,7 @@ func (repo *TaskStageRepository) Find(queryOptions map[string]interface{}) (int, | ||
102 | tx := repo.transactionContext.PgTx | 102 | tx := repo.transactionContext.PgTx |
103 | var m []*models.TaskStage | 103 | var m []*models.TaskStage |
104 | query := tx.Model(&m). | 104 | query := tx.Model(&m). |
105 | - Where("deleted_at isnull"). | ||
106 | - Limit(20) | 105 | + Where("deleted_at isnull") |
107 | 106 | ||
108 | if val, ok := queryOptions["taskId"]; ok { | 107 | if val, ok := queryOptions["taskId"]; ok { |
109 | query.Where("task_stage.task_id = ?", val) | 108 | query.Where("task_stage.task_id = ?", val) |
-
请 注册 或 登录 后发表评论