作者 tangxvhui

修复任务列表查询错误

... ... @@ -976,6 +976,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map
resultList := []adapter.TaskRecordAdapter{}
for _, val := range taskRecordList {
item := adapter.TaskRecordAdapter{
Id: val.Id,
StaffAssessId: val.StaffAssessId,
... ... @@ -1012,7 +1013,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map
}
if len(contentList) > 0 {
for _, val2 := range contentList[0].Remark {
item.AssistContent = val2.RemarkText + "\n"
item.AssistContent += val2.RemarkText + "\n"
}
}
resultList = append(resultList, item)
... ... @@ -1147,13 +1148,13 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取用户的角色信息"+err.Error())
}
if len(param.SearchWord) > 0 {
param.SearchWord = "%" + param.SearchWord + "%"
}
if hrbpFlag == domain.RoleTypeSystem {
listData, err := srv.listTask3ForHrbp(param)
return listData, err
}
if len(param.SearchWord) > 0 {
param.SearchWord = "%" + param.SearchWord + "%"
}
var limit = 20
var offset = 0
if param.PageSize > 0 {
... ...
... ... @@ -728,7 +728,7 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error)
where 1=1 and task.company_id=?
%s
),
t_task_1 as (
tt_task_1 as (
select
(case
when t_task.c_plan_completed_at=0 then 1
... ... @@ -751,9 +751,9 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error)
from t_task
where 1=1
)select *
from t_task_1
order by t_task_1.sort_by_1,t_task_1.last_stage_diff,
t_task_1."level",t_task_1."created_at"
from tt_task_1
order by tt_task_1.sort_by_1,tt_task_1.last_stage_diff,
tt_task_1."level",tt_task_1."created_at"
limit ? offset ?
`
condition := []interface{}{param.CompanyId}
... ...