...
|
...
|
@@ -85,27 +85,33 @@ func (d *SummaryEvaluationDao) CountExecutorCycleList(companyId int, executorId |
|
|
}
|
|
|
|
|
|
type TargetUserCycle struct {
|
|
|
CycleId string `pg:"cycle_id" ` //周期id
|
|
|
CycleName string `pg:"cycle_name"` //周期名称
|
|
|
BeginTime time.Time `pg:"begin_time"`
|
|
|
EndTime time.Time `pg:"end_time"`
|
|
|
CycleId string `pg:"cycle_id" ` //周期id
|
|
|
CycleName string `pg:"cycle_name"` //周期名称
|
|
|
BeginTime time.Time `pg:"begin_time"`
|
|
|
EndTime time.Time `pg:"end_time"`
|
|
|
EvaluationProjectId string `pg:"evaluation_project_id"`
|
|
|
EvaluationProjectName string `pg:"evaluation_project_name"`
|
|
|
TargetUserId string `pg:"target_user_id"`
|
|
|
}
|
|
|
|
|
|
// GetExecutorCycleList 获取被评估目标人拥有的周期列表
|
|
|
// executorId 执行人id
|
|
|
// offset,limit 分页
|
|
|
func (d *SummaryEvaluationDao) GetTargetUserCycleList(executorId int, offset int, limit int, evaluationType int) ([]TargetUserCycle, error) {
|
|
|
func (d *SummaryEvaluationDao) GetTargetUserCycleList(targetUserId int, offset int, limit int, evaluationType int) ([]TargetUserCycle, error) {
|
|
|
sqlStr := `select
|
|
|
distinct
|
|
|
summary_evaluation.cycle_id ,
|
|
|
summary_evaluation.begin_time ,
|
|
|
summary_evaluation.cycle_name
|
|
|
summary_evaluation.cycle_name ,
|
|
|
summary_evaluation.evaluation_project_id ,
|
|
|
summary_evaluation.evaluation_project_name ,
|
|
|
summary_evaluation.target_user ->>'userId' as target_user_id
|
|
|
from summary_evaluation
|
|
|
where summary_evaluation.deleted_at isnull and summary_evaluation.target_user ->>'userId'='?'
|
|
|
`
|
|
|
tx := d.transactionContext.PgTx
|
|
|
condition := []interface{}{
|
|
|
executorId,
|
|
|
targetUserId,
|
|
|
}
|
|
|
|
|
|
if evaluationType > 0 {
|
...
|
...
|
@@ -147,7 +153,10 @@ func (d *SummaryEvaluationDao) TargetUnconfirmedCycleList(companyId int, executo |
|
|
summary_evaluation.cycle_id,
|
|
|
summary_evaluation.begin_time,
|
|
|
summary_evaluation.end_time,
|
|
|
summary_evaluation.cycle_name
|
|
|
summary_evaluation.cycle_name ,
|
|
|
summary_evaluation.evaluation_project_id ,
|
|
|
summary_evaluation.evaluation_project_name ,
|
|
|
summary_evaluation.target_user ->>'userId' as target_user_id
|
|
|
from summary_evaluation
|
|
|
where summary_evaluation.deleted_at isnull
|
|
|
and summary_evaluation.company_id='?'
|
...
|
...
|
|