作者 tangxvhui

修复任务列表查询错误

@@ -976,6 +976,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map @@ -976,6 +976,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map
976 976
977 resultList := []adapter.TaskRecordAdapter{} 977 resultList := []adapter.TaskRecordAdapter{}
978 for _, val := range taskRecordList { 978 for _, val := range taskRecordList {
  979 +
979 item := adapter.TaskRecordAdapter{ 980 item := adapter.TaskRecordAdapter{
980 Id: val.Id, 981 Id: val.Id,
981 StaffAssessId: val.StaffAssessId, 982 StaffAssessId: val.StaffAssessId,
@@ -1012,7 +1013,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map @@ -1012,7 +1013,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map
1012 } 1013 }
1013 if len(contentList) > 0 { 1014 if len(contentList) > 0 {
1014 for _, val2 := range contentList[0].Remark { 1015 for _, val2 := range contentList[0].Remark {
1015 - item.AssistContent = val2.RemarkText + "\n" 1016 + item.AssistContent += val2.RemarkText + "\n"
1016 } 1017 }
1017 } 1018 }
1018 resultList = append(resultList, item) 1019 resultList = append(resultList, item)
@@ -1147,13 +1148,13 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i @@ -1147,13 +1148,13 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
1147 if err != nil { 1148 if err != nil {
1148 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取用户的角色信息"+err.Error()) 1149 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取用户的角色信息"+err.Error())
1149 } 1150 }
1150 - if len(param.SearchWord) > 0 {  
1151 - param.SearchWord = "%" + param.SearchWord + "%"  
1152 - }  
1153 if hrbpFlag == domain.RoleTypeSystem { 1151 if hrbpFlag == domain.RoleTypeSystem {
1154 listData, err := srv.listTask3ForHrbp(param) 1152 listData, err := srv.listTask3ForHrbp(param)
1155 return listData, err 1153 return listData, err
1156 } 1154 }
  1155 + if len(param.SearchWord) > 0 {
  1156 + param.SearchWord = "%" + param.SearchWord + "%"
  1157 + }
1157 var limit = 20 1158 var limit = 20
1158 var offset = 0 1159 var offset = 0
1159 if param.PageSize > 0 { 1160 if param.PageSize > 0 {
@@ -728,7 +728,7 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error) @@ -728,7 +728,7 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error)
728 where 1=1 and task.company_id=? 728 where 1=1 and task.company_id=?
729 %s 729 %s
730 ), 730 ),
731 - t_task_1 as ( 731 + tt_task_1 as (
732 select 732 select
733 (case 733 (case
734 when t_task.c_plan_completed_at=0 then 1 734 when t_task.c_plan_completed_at=0 then 1
@@ -751,9 +751,9 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error) @@ -751,9 +751,9 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error)
751 from t_task 751 from t_task
752 where 1=1 752 where 1=1
753 )select * 753 )select *
754 - from t_task_1  
755 - order by t_task_1.sort_by_1,t_task_1.last_stage_diff,  
756 - t_task_1."level",t_task_1."created_at" 754 + from tt_task_1
  755 + order by tt_task_1.sort_by_1,tt_task_1.last_stage_diff,
  756 + tt_task_1."level",tt_task_1."created_at"
757 limit ? offset ? 757 limit ? offset ?
758 ` 758 `
759 condition := []interface{}{param.CompanyId} 759 condition := []interface{}{param.CompanyId}