作者 tangxvhui

周期列表输出字段

@@ -4,4 +4,6 @@ type AssessCycleDayResp struct { @@ -4,4 +4,6 @@ type AssessCycleDayResp struct {
4 CycleId string `json:"cycleId"` 4 CycleId string `json:"cycleId"`
5 CycleName string `json:"cycleName"` 5 CycleName string `json:"cycleName"`
6 BeginDay string `json:"beginDay"` 6 BeginDay string `json:"beginDay"`
  7 + EndTime string `json:"endTime"`
  8 + BeginTime string `json:"beginTime"`
7 } 9 }
@@ -55,6 +55,8 @@ func (srv StaffAssessServeice) SearchAssessTaskMeV2(param *query.SearchAssessMeQ @@ -55,6 +55,8 @@ func (srv StaffAssessServeice) SearchAssessTaskMeV2(param *query.SearchAssessMeQ
55 CycleId: v.CycleId, 55 CycleId: v.CycleId,
56 CycleName: v.CycleName, 56 CycleName: v.CycleName,
57 BeginDay: v.BeginDay, 57 BeginDay: v.BeginDay,
  58 + BeginTime: v.BeginTime,
  59 + EndTime: v.EndTime,
58 } 60 }
59 listData = append(listData, temp) 61 listData = append(listData, temp)
60 } 62 }
@@ -416,9 +416,11 @@ func (d *StaffAssessDao) ExportDataUserAssess(param SearchConditin1) ([]ExportDa @@ -416,9 +416,11 @@ func (d *StaffAssessDao) ExportDataUserAssess(param SearchConditin1) ([]ExportDa
416 } 416 }
417 417
418 type AssessCycleDayMe struct { 418 type AssessCycleDayMe struct {
419 - BeginDay string `json:"beginDay"`  
420 - CycleId string `json:"cycleId"`  
421 - CycleName string `json:"cycleName"` 419 + BeginDay string
  420 + CycleId string
  421 + CycleName string
  422 + EndTime string
  423 + BeginTime string
422 } 424 }
423 425
424 // 根据评估的人执行人id,搜索 executorId参与的评估周期 426 // 根据评估的人执行人id,搜索 executorId参与的评估周期
@@ -431,13 +433,16 @@ func (d *StaffAssessDao) SearchAssessCycleMe(executorId int, companyId int, limi @@ -431,13 +433,16 @@ func (d *StaffAssessDao) SearchAssessCycleMe(executorId int, companyId int, limi
431 } 433 }
432 sqlStr := ` 434 sqlStr := `
433 SELECT 435 SELECT
434 - staff_assess_task.cycle_id ,staff_assess_task.cycle_name ,staff_assess_task.begin_day 436 + distinct on(staff_assess_task.cycle_id,staff_assess_task.begin_day)
  437 + staff_assess_task.cycle_id,staff_assess_task.cycle_name ,
  438 + staff_assess_task.begin_day,
  439 + to_char(staff_assess_task.end_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as end_time,
  440 + to_char(staff_assess_task.begin_time at time zone 'PRC','YYYY-MM-DD HH24:MI:SS') as begin_time
435 FROM staff_assess_task 441 FROM staff_assess_task
436 JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id" 442 JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id"
437 WHERE staff_assess.company_id=? 443 WHERE staff_assess.company_id=?
438 and staff_assess_task.deleted_at isnull 444 and staff_assess_task.deleted_at isnull
439 and staff_assess.executor->>'userId'='?' 445 and staff_assess.executor->>'userId'='?'
440 - group by staff_assess_task.cycle_id ,staff_assess_task.cycle_name ,staff_assess_task.begin_day  
441 order by staff_assess_task.begin_day desc 446 order by staff_assess_task.begin_day desc
442 limit ? offset ? 447 limit ? offset ?
443 ` 448 `