...
|
...
|
@@ -365,25 +365,25 @@ func (d *StaffAssessDao) SearchUserAssessContentV2(param SearchConditin3) ([]Use |
|
|
sqlStr += ` order by convert_to(staff_assess.target_user ->>'userName','GBK') limit ? offset ? `
|
|
|
|
|
|
withSql2 := withSql + `,t_staff_assess_1 as( ` + sqlStr + ` )`
|
|
|
sqlStr2 := `select
|
|
|
t_staff_assess_1.target_user_id,
|
|
|
t_staff_assess_1.target_user_name,
|
|
|
t_staff_assess_1.begin_day,
|
|
|
t_staff_assess_1.assess_id,
|
|
|
t_staff_assess_1.cycle_id,
|
|
|
staff_assess_content.id as content_id,
|
|
|
staff_assess_content.value ,
|
|
|
evaluation_item_used.sort_by ,
|
|
|
evaluation_item_used.category ,
|
|
|
evaluation_item_used."name" as content_name ,
|
|
|
evaluation_item_used.weight,
|
|
|
staff_assess_content.level_value,
|
|
|
evaluation_item_used."rule"
|
|
|
from t_staff_assess_1
|
|
|
join evaluation_item_used on t_staff_assess_1.evaluation_project_id =evaluation_item_used.evaluation_project_id
|
|
|
left join staff_assess_content on t_staff_assess_1.assess_id = staff_assess_content.staff_assess_id
|
|
|
and evaluation_item_used.category =staff_assess_content.category and evaluation_item_used."name" = evaluation_item_used."name"
|
|
|
where 1=1`
|
|
|
sqlStr2 := ` ,t_item_used as (select
|
|
|
t_staff_assess_1.target_user_id,
|
|
|
t_staff_assess_1.target_user_name,
|
|
|
t_staff_assess_1.begin_day,
|
|
|
t_staff_assess_1.assess_id,
|
|
|
t_staff_assess_1.cycle_id,
|
|
|
evaluation_item_used.sort_by ,
|
|
|
evaluation_item_used.category ,
|
|
|
evaluation_item_used."name" as content_name ,
|
|
|
evaluation_item_used.weight,
|
|
|
evaluation_item_used."rule"
|
|
|
from t_staff_assess_1
|
|
|
join evaluation_item_used on t_staff_assess_1.evaluation_project_id =evaluation_item_used.evaluation_project_id
|
|
|
)
|
|
|
select t_item_used.* ,staff_assess_content.value,staff_assess_content.level_value
|
|
|
from t_item_used
|
|
|
left join staff_assess_content on staff_assess_content.staff_assess_id=t_item_used.assess_id
|
|
|
and t_item_used.category =staff_assess_content.category and t_item_used.content_name = staff_assess_content."name"
|
|
|
where 1=1`
|
|
|
sqlStr2 = withSql2 + sqlStr2
|
|
|
tx := d.transactionContext.PgTx
|
|
|
var result []UserAssessContent
|
...
|
...
|
|