作者 tangxvhui

更新

@@ -26,7 +26,7 @@ type TaskStage struct { @@ -26,7 +26,7 @@ type TaskStage struct {
26 Name string `json:"name"` //里程碑名称 26 Name string `json:"name"` //里程碑名称
27 StatusDescription string `json:"statusDescription,omitempty"` //里程碑的完成情况 27 StatusDescription string `json:"statusDescription,omitempty"` //里程碑的完成情况
28 SortBy int `json:"sortBy"` // 28 SortBy int `json:"sortBy"` //
29 - PlanCompletedAt string `json:"planCompletedAt,omitempty"` //计划完成时间, 例:2006-01-02  
30 - RealCompletedAt string `json:"realCompletedAt,omitempty"` //实际完成时间, 例:2006-01-02 29 + PlanCompletedAt string `json:"planCompletedAt"` //计划完成时间, 例:2006-01-02
  30 + RealCompletedAt string `json:"realCompletedAt"` //实际完成时间, 例:2006-01-02
31 IsRef bool `json:"isRef"` //是否已经被下发 31 IsRef bool `json:"isRef"` //是否已经被下发
32 } 32 }
@@ -735,9 +735,14 @@ func (srv TaskService) ListTask2(param *command.SearchTaskCommand) (map[string]i @@ -735,9 +735,14 @@ func (srv TaskService) ListTask2(param *command.SearchTaskCommand) (map[string]i
735 continue 735 continue
736 } 736 }
737 stage := adapter.TaskStage{ 737 stage := adapter.TaskStage{
738 - Id: val.StageId,  
739 - Name: val.StageName,  
740 - SortBy: val.StageSortBy, 738 + Id: val.StageId,
  739 + Name: val.StageName,
  740 + SortBy: val.StageSortBy,
  741 + PlanCompletedAt: time.Unix(int64(val.PlanCompletedAt), 0).Local().Format("2006-01-02"),
  742 + RealCompletedAt: "",
  743 + }
  744 + if val.RealCompletedAt > 0 {
  745 + stage.RealCompletedAt = time.Unix(int64(val.RealCompletedAt), 0).Local().Format("2006-01-02")
741 } 746 }
742 switch val.StageSortBy { 747 switch val.StageSortBy {
743 case 1: 748 case 1:
@@ -839,9 +844,14 @@ func (srv TaskService) listTask2ForHrbp(param *command.SearchTaskCommand) (map[s @@ -839,9 +844,14 @@ func (srv TaskService) listTask2ForHrbp(param *command.SearchTaskCommand) (map[s
839 continue 844 continue
840 } 845 }
841 stage := adapter.TaskStage{ 846 stage := adapter.TaskStage{
842 - Id: val.StageId,  
843 - Name: val.StageName,  
844 - SortBy: val.StageSortBy, 847 + Id: val.StageId,
  848 + Name: val.StageName,
  849 + SortBy: val.StageSortBy,
  850 + PlanCompletedAt: time.Unix(int64(val.PlanCompletedAt), 0).Local().Format("2006-01-02"),
  851 + RealCompletedAt: "",
  852 + }
  853 + if val.RealCompletedAt > 0 {
  854 + stage.RealCompletedAt = time.Unix(int64(val.RealCompletedAt), 0).Local().Format("2006-01-02")
845 } 855 }
846 switch val.StageSortBy { 856 switch val.StageSortBy {
847 case 1: 857 case 1:
@@ -86,6 +86,7 @@ type ListTaskStage struct { @@ -86,6 +86,7 @@ type ListTaskStage struct {
86 StageName string `pg:"stage_name"` 86 StageName string `pg:"stage_name"`
87 StageSortBy int `pg:"stage_sort_by"` 87 StageSortBy int `pg:"stage_sort_by"`
88 PlanCompletedAt int `pg:"plan_completed_at"` 88 PlanCompletedAt int `pg:"plan_completed_at"`
  89 + RealCompletedAt int `pg:"real_completed_at"`
89 } 90 }
90 91
91 // 获取任务以及里程碑列表,用于页面展示; 有过滤查看权限 92 // 获取任务以及里程碑列表,用于页面展示; 有过滤查看权限
@@ -113,6 +114,7 @@ func (d *TaskDao) ListTaskStageNotHrbp(param ListTaskCondition) ([]ListTaskStage @@ -113,6 +114,7 @@ func (d *TaskDao) ListTaskStageNotHrbp(param ListTaskCondition) ([]ListTaskStage
113 task_stage."name" as stage_name, 114 task_stage."name" as stage_name,
114 task_stage.sort_by as stage_sort_by, 115 task_stage.sort_by as stage_sort_by,
115 task_stage.plan_completed_at, 116 task_stage.plan_completed_at,
  117 + task_stage.real_completed_at,
116 (case 118 (case
117 when task_stage.real_completed_at =0 119 when task_stage.real_completed_at =0
118 then task_stage.plan_completed_at - floor( extract(epoch from now())) 120 then task_stage.plan_completed_at - floor( extract(epoch from now()))
@@ -143,6 +145,7 @@ func (d *TaskDao) ListTaskStageNotHrbp(param ListTaskCondition) ([]ListTaskStage @@ -143,6 +145,7 @@ func (d *TaskDao) ListTaskStageNotHrbp(param ListTaskCondition) ([]ListTaskStage
143 t_task_tage_1.created_at , 145 t_task_tage_1.created_at ,
144 t_task_tage_1."level" , 146 t_task_tage_1."level" ,
145 t_task_tage_1.plan_completed_at, 147 t_task_tage_1.plan_completed_at,
  148 + t_task_tage_1.real_completed_at,
146 t_task_tage_1.stage_name, 149 t_task_tage_1.stage_name,
147 t_task_tage_1.stage_id, 150 t_task_tage_1.stage_id,
148 t_task_tage_1.stage_sort_by 151 t_task_tage_1.stage_sort_by
@@ -232,6 +235,7 @@ func (d *TaskDao) ListTaskStageByHrbp(param ListTaskCondition) ([]ListTaskStage, @@ -232,6 +235,7 @@ func (d *TaskDao) ListTaskStageByHrbp(param ListTaskCondition) ([]ListTaskStage,
232 task_stage."name" as stage_name, 235 task_stage."name" as stage_name,
233 task_stage.sort_by as stage_sort_by, 236 task_stage.sort_by as stage_sort_by,
234 task_stage.plan_completed_at, 237 task_stage.plan_completed_at,
  238 + task_stage.real_completed_at,
235 (case 239 (case
236 when task_stage.real_completed_at =0 240 when task_stage.real_completed_at =0
237 then task_stage.plan_completed_at - floor( extract(epoch from now())) 241 then task_stage.plan_completed_at - floor( extract(epoch from now()))
@@ -263,6 +267,7 @@ func (d *TaskDao) ListTaskStageByHrbp(param ListTaskCondition) ([]ListTaskStage, @@ -263,6 +267,7 @@ func (d *TaskDao) ListTaskStageByHrbp(param ListTaskCondition) ([]ListTaskStage,
263 t_task_tage_1.created_at , 267 t_task_tage_1.created_at ,
264 t_task_tage_1."level" , 268 t_task_tage_1."level" ,
265 t_task_tage_1.plan_completed_at, 269 t_task_tage_1.plan_completed_at,
  270 + t_task_tage_1.real_completed_at,
266 t_task_tage_1.stage_name, 271 t_task_tage_1.stage_name,
267 t_task_tage_1.stage_id, 272 t_task_tage_1.stage_id,
268 t_task_tage_1.stage_sort_by 273 t_task_tage_1.stage_sort_by