...
|
...
|
@@ -1375,3 +1375,38 @@ func (d *StaffAssessDao) SearchExecutorAssessAfterNow(executorId int, companyId |
|
|
_, err := tx.Query(&result, sqlStr, condition1...)
|
|
|
return result, err
|
|
|
}
|
|
|
|
|
|
type AssessSelfContentRemark struct {
|
|
|
Category string `pg:"category"` //评估的分类
|
|
|
Name string `pg:"name"` //名称
|
|
|
Remark []domain.AssessContemtRemark `pg:"remark"`
|
|
|
BeginDay string `pg:"begin_day"` //开始的天数
|
|
|
LevelValue string `pg:"level_value"`
|
|
|
}
|
|
|
|
|
|
func (d *StaffAssessDao) SearchAssessSelfContentRemark(projectId int, targetUserId int, category string, name string, levalvalue string) ([]AssessSelfContentRemark, error) {
|
|
|
sqlStr := ` select
|
|
|
staff_assess_content.level_value ,
|
|
|
staff_assess_content.category ,
|
|
|
staff_assess_content."name" ,
|
|
|
staff_assess_content.remark ,
|
|
|
to_char(staff_assess.begin_time at time zone 'PRC', 'YYYY-MM-DD') as begin_day
|
|
|
from staff_assess_content
|
|
|
join staff_assess on staff_assess_content.staff_assess_id = staff_assess.id
|
|
|
where 1=1
|
|
|
and staff_assess.deleted_at isnull
|
|
|
and staff_assess_content.category =?
|
|
|
and staff_assess_content."name" = ?
|
|
|
and staff_assess_content.level_value =?
|
|
|
and staff_assess.evaluation_project_id=?
|
|
|
and target_user ->>'userId'='?'
|
|
|
ORDER BY staff_assess.begin_time `
|
|
|
|
|
|
var result []AssessSelfContentRemark
|
|
|
condition := []interface{}{
|
|
|
category, name, levalvalue, projectId, targetUserId,
|
|
|
}
|
|
|
tx := d.transactionContext.PgTx
|
|
|
_, err := tx.Query(&result, sqlStr, condition...)
|
|
|
return result, err
|
|
|
} |
...
|
...
|
|