作者 tangxvhui

周期列表输出字段

... ... @@ -4,4 +4,6 @@ type AssessCycleDayResp struct {
CycleId string `json:"cycleId"`
CycleName string `json:"cycleName"`
BeginDay string `json:"beginDay"`
EndTime string `json:"endTime"`
BeginTime string `json:"beginTime"`
}
... ...
... ... @@ -55,6 +55,8 @@ func (srv StaffAssessServeice) SearchAssessTaskMeV2(param *query.SearchAssessMeQ
CycleId: v.CycleId,
CycleName: v.CycleName,
BeginDay: v.BeginDay,
BeginTime: v.BeginTime,
EndTime: v.EndTime,
}
listData = append(listData, temp)
}
... ...
... ... @@ -416,9 +416,11 @@ func (d *StaffAssessDao) ExportDataUserAssess(param SearchConditin1) ([]ExportDa
}
type AssessCycleDayMe struct {
BeginDay string `json:"beginDay"`
CycleId string `json:"cycleId"`
CycleName string `json:"cycleName"`
BeginDay string
CycleId string
CycleName string
EndTime string
BeginTime string
}
// 根据评估的人执行人id,搜索 executorId参与的评估周期
... ... @@ -431,13 +433,16 @@ func (d *StaffAssessDao) SearchAssessCycleMe(executorId int, companyId int, limi
}
sqlStr := `
SELECT
staff_assess_task.cycle_id ,staff_assess_task.cycle_name ,staff_assess_task.begin_day
distinct on(staff_assess_task.cycle_id,staff_assess_task.begin_day)
staff_assess_task.cycle_id,staff_assess_task.cycle_name ,
staff_assess_task.begin_day,
to_char(staff_assess_task.end_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as end_time,
to_char(staff_assess_task.begin_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as begin_time
FROM staff_assess_task
JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id"
WHERE staff_assess.company_id=?
and staff_assess_task.deleted_at isnull
and staff_assess.executor->>'userId'='?'
group by staff_assess_task.cycle_id ,staff_assess_task.cycle_name ,staff_assess_task.begin_day
order by staff_assess_task.begin_day desc
limit ? offset ?
`
... ...