作者 tangxvhui

调整周期评估查询输出

@@ -3,6 +3,7 @@ package adapter @@ -3,6 +3,7 @@ package adapter
3 //综合评估的周期列表 3 //综合评估的周期列表
4 4
5 type CycleListAdapter struct { 5 type CycleListAdapter struct {
6 - CycleId string `json:"cycleId"` //周期id  
7 - CycleName string `json:"cycleName"` // 6 + CycleId string `json:"cycleId"` //周期id
  7 + CycleName string `json:"cycleName"` //
  8 + SummaryEvaluationId string `json:"summaryEvaluationId"`
8 } 9 }
@@ -14,7 +14,7 @@ type EvaluationInfoAdapter struct { @@ -14,7 +14,7 @@ type EvaluationInfoAdapter struct {
14 EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05 14 EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05
15 TargetUserId int `json:"targetUserId"` //被评估的目标用户,被执行的 15 TargetUserId int `json:"targetUserId"` //被评估的目标用户,被执行的
16 TargetUserName string `json:"targetUserName"` // 16 TargetUserName string `json:"targetUserName"` //
17 - CompanyLogo string `json:"companyLogo,string,"` //公司logo 17 + CompanyLogo string `json:"companyLogo"` //公司logo
18 CompanyName string `json:"companyName"` //公司名称 18 CompanyName string `json:"companyName"` //公司名称
19 SupperUser string `json:"superUser"` //目标用户的上级 19 SupperUser string `json:"superUser"` //目标用户的上级
20 DutyTime string `json:"dutyTime"` //入职时间 20 DutyTime string `json:"dutyTime"` //入职时间
@@ -530,9 +530,11 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query @@ -530,9 +530,11 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query
530 cycleList := []adapter.CycleListAdapter{} 530 cycleList := []adapter.CycleListAdapter{}
531 for _, v := range cycleData { 531 for _, v := range cycleData {
532 m := adapter.CycleListAdapter{ 532 m := adapter.CycleListAdapter{
533 - CycleId: v.CycleId,  
534 - CycleName: v.CycleName, 533 + SummaryEvaluationId: v.SummaryEvaluationId,
  534 + CycleId: v.CycleId,
  535 + CycleName: v.CycleName,
535 } 536 }
  537 +
536 cycleList = append(cycleList, m) 538 cycleList = append(cycleList, m)
537 } 539 }
538 return tool_funs.SimpleWrapGridMap(int64(cnt), cycleList), nil 540 return tool_funs.SimpleWrapGridMap(int64(cnt), cycleList), nil
@@ -21,8 +21,9 @@ func NewSummaryEvaluationDao(options map[string]interface{}) *SummaryEvaluationD @@ -21,8 +21,9 @@ func NewSummaryEvaluationDao(options map[string]interface{}) *SummaryEvaluationD
21 } 21 }
22 22
23 type PersonalCycle struct { 23 type PersonalCycle struct {
24 - CycleId string `pg:"cycle_id" ` //  
25 - CycleName string `pg:"cycle_name"` // 24 + CycleId string `pg:"cycle_id" ` //周期id
  25 + CycleName string `pg:"cycle_name"` //周期名称
  26 + SummaryEvaluationId string `pg:"summary_evaluation_id"` //评估任务id
26 } 27 }
27 28
28 // GetExecutorCycleList 获取执行人拥有的周期列表 29 // GetExecutorCycleList 获取执行人拥有的周期列表
@@ -81,6 +82,7 @@ func (d *SummaryEvaluationDao) CountExecutorCycleList(executorId int, evaluation @@ -81,6 +82,7 @@ func (d *SummaryEvaluationDao) CountExecutorCycleList(executorId int, evaluation
81 func (d *SummaryEvaluationDao) GetTargetUserCycleList(executorId int, offset int, limit int, evaluationType int) ([]PersonalCycle, error) { 82 func (d *SummaryEvaluationDao) GetTargetUserCycleList(executorId int, offset int, limit int, evaluationType int) ([]PersonalCycle, error) {
82 sqlStr := `select 83 sqlStr := `select
83 distinct 84 distinct
  85 + summary_evaluation.id as summary_evaluation_id,
84 summary_evaluation.cycle_id , 86 summary_evaluation.cycle_id ,
85 summary_evaluation.cycle_name 87 summary_evaluation.cycle_name
86 from summary_evaluation 88 from summary_evaluation