|
|
package dao
|
|
|
|
|
|
import (
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
|
|
"time"
|
|
|
|
|
|
"github.com/go-pg/pg/v10"
|
...
|
...
|
@@ -138,6 +139,28 @@ func (d *SummaryEvaluationDao) CountTargetUserCycleList(executorId int, evaluati |
|
|
return cnt, err
|
|
|
}
|
|
|
|
|
|
// TargetUnconfirmedCycleList 用户【未确认绩效成绩】的周期列表
|
|
|
func (d *SummaryEvaluationDao) TargetUnconfirmedCycleList(companyId int, executorId int) ([]TargetUserCycle, error) {
|
|
|
sqlStr := `select
|
|
|
summary_evaluation.cycle_id ,
|
|
|
summary_evaluation.begin_time ,
|
|
|
summary_evaluation.cycle_name
|
|
|
from summary_evaluation
|
|
|
where summary_evaluation.deleted_at isnull
|
|
|
and summary_evaluation.company_id='?'
|
|
|
and summary_evaluation.target_user ->>'userId'='?'
|
|
|
and summary_evaluation.types='?'
|
|
|
and summary_evaluation.status='?'
|
|
|
and summary_evaluation.check_result='?'
|
|
|
`
|
|
|
tx := d.transactionContext.PgTx
|
|
|
condition := []interface{}{companyId, executorId, domain.EvaluationFinish, domain.EvaluationCompleted, domain.EvaluationCheckUncompleted}
|
|
|
sqlStr += ` order by summary_evaluation.begin_time desc `
|
|
|
var result []TargetUserCycle
|
|
|
_, err := tx.Query(&result, sqlStr, condition...)
|
|
|
return result, err
|
|
|
}
|
|
|
|
|
|
func (d *SummaryEvaluationDao) UpdateBeginTime(ids []int, beginTime time.Time) error {
|
|
|
if len(ids) == 0 {
|
|
|
return nil
|
...
|
...
|
|