|
@@ -89,23 +89,29 @@ type TargetUserCycle struct { |
|
@@ -89,23 +89,29 @@ type TargetUserCycle struct { |
89
|
CycleName string `pg:"cycle_name"` //周期名称
|
89
|
CycleName string `pg:"cycle_name"` //周期名称
|
90
|
BeginTime time.Time `pg:"begin_time"`
|
90
|
BeginTime time.Time `pg:"begin_time"`
|
91
|
EndTime time.Time `pg:"end_time"`
|
91
|
EndTime time.Time `pg:"end_time"`
|
|
|
92
|
+ EvaluationProjectId string `pg:"evaluation_project_id"`
|
|
|
93
|
+ EvaluationProjectName string `pg:"evaluation_project_name"`
|
|
|
94
|
+ TargetUserId string `pg:"target_user_id"`
|
92
|
}
|
95
|
}
|
93
|
|
96
|
|
94
|
// GetExecutorCycleList 获取被评估目标人拥有的周期列表
|
97
|
// GetExecutorCycleList 获取被评估目标人拥有的周期列表
|
95
|
// executorId 执行人id
|
98
|
// executorId 执行人id
|
96
|
// offset,limit 分页
|
99
|
// offset,limit 分页
|
97
|
-func (d *SummaryEvaluationDao) GetTargetUserCycleList(executorId int, offset int, limit int, evaluationType int) ([]TargetUserCycle, error) {
|
100
|
+func (d *SummaryEvaluationDao) GetTargetUserCycleList(targetUserId int, offset int, limit int, evaluationType int) ([]TargetUserCycle, error) {
|
98
|
sqlStr := `select
|
101
|
sqlStr := `select
|
99
|
distinct
|
102
|
distinct
|
100
|
summary_evaluation.cycle_id ,
|
103
|
summary_evaluation.cycle_id ,
|
101
|
summary_evaluation.begin_time ,
|
104
|
summary_evaluation.begin_time ,
|
102
|
- summary_evaluation.cycle_name
|
105
|
+ summary_evaluation.cycle_name ,
|
|
|
106
|
+ summary_evaluation.evaluation_project_id ,
|
|
|
107
|
+ summary_evaluation.evaluation_project_name ,
|
|
|
108
|
+ summary_evaluation.target_user ->>'userId' as target_user_id
|
103
|
from summary_evaluation
|
109
|
from summary_evaluation
|
104
|
where summary_evaluation.deleted_at isnull and summary_evaluation.target_user ->>'userId'='?'
|
110
|
where summary_evaluation.deleted_at isnull and summary_evaluation.target_user ->>'userId'='?'
|
105
|
`
|
111
|
`
|
106
|
tx := d.transactionContext.PgTx
|
112
|
tx := d.transactionContext.PgTx
|
107
|
condition := []interface{}{
|
113
|
condition := []interface{}{
|
108
|
- executorId,
|
114
|
+ targetUserId,
|
109
|
}
|
115
|
}
|
110
|
|
116
|
|
111
|
if evaluationType > 0 {
|
117
|
if evaluationType > 0 {
|
|
@@ -147,7 +153,10 @@ func (d *SummaryEvaluationDao) TargetUnconfirmedCycleList(companyId int, executo |
|
@@ -147,7 +153,10 @@ func (d *SummaryEvaluationDao) TargetUnconfirmedCycleList(companyId int, executo |
147
|
summary_evaluation.cycle_id,
|
153
|
summary_evaluation.cycle_id,
|
148
|
summary_evaluation.begin_time,
|
154
|
summary_evaluation.begin_time,
|
149
|
summary_evaluation.end_time,
|
155
|
summary_evaluation.end_time,
|
150
|
- summary_evaluation.cycle_name
|
156
|
+ summary_evaluation.cycle_name ,
|
|
|
157
|
+ summary_evaluation.evaluation_project_id ,
|
|
|
158
|
+ summary_evaluation.evaluation_project_name ,
|
|
|
159
|
+ summary_evaluation.target_user ->>'userId' as target_user_id
|
151
|
from summary_evaluation
|
160
|
from summary_evaluation
|
152
|
where summary_evaluation.deleted_at isnull
|
161
|
where summary_evaluation.deleted_at isnull
|
153
|
and summary_evaluation.company_id='?'
|
162
|
and summary_evaluation.company_id='?'
|