正在显示
1 个修改的文件
包含
6 行增加
和
6 行删除
@@ -365,24 +365,24 @@ func (d *StaffAssessDao) SearchUserAssessContentV2(param SearchConditin3) ([]Use | @@ -365,24 +365,24 @@ func (d *StaffAssessDao) SearchUserAssessContentV2(param SearchConditin3) ([]Use | ||
365 | sqlStr += ` order by convert_to(staff_assess.target_user ->>'userName','GBK') limit ? offset ? ` | 365 | sqlStr += ` order by convert_to(staff_assess.target_user ->>'userName','GBK') limit ? offset ? ` |
366 | 366 | ||
367 | withSql2 := withSql + `,t_staff_assess_1 as( ` + sqlStr + ` )` | 367 | withSql2 := withSql + `,t_staff_assess_1 as( ` + sqlStr + ` )` |
368 | - sqlStr2 := `select | 368 | + sqlStr2 := ` ,t_item_used as (select |
369 | t_staff_assess_1.target_user_id, | 369 | t_staff_assess_1.target_user_id, |
370 | t_staff_assess_1.target_user_name, | 370 | t_staff_assess_1.target_user_name, |
371 | t_staff_assess_1.begin_day, | 371 | t_staff_assess_1.begin_day, |
372 | t_staff_assess_1.assess_id, | 372 | t_staff_assess_1.assess_id, |
373 | t_staff_assess_1.cycle_id, | 373 | t_staff_assess_1.cycle_id, |
374 | - staff_assess_content.id as content_id, | ||
375 | - staff_assess_content.value , | ||
376 | evaluation_item_used.sort_by , | 374 | evaluation_item_used.sort_by , |
377 | evaluation_item_used.category , | 375 | evaluation_item_used.category , |
378 | evaluation_item_used."name" as content_name , | 376 | evaluation_item_used."name" as content_name , |
379 | evaluation_item_used.weight, | 377 | evaluation_item_used.weight, |
380 | - staff_assess_content.level_value, | ||
381 | evaluation_item_used."rule" | 378 | evaluation_item_used."rule" |
382 | from t_staff_assess_1 | 379 | from t_staff_assess_1 |
383 | join evaluation_item_used on t_staff_assess_1.evaluation_project_id =evaluation_item_used.evaluation_project_id | 380 | join evaluation_item_used on t_staff_assess_1.evaluation_project_id =evaluation_item_used.evaluation_project_id |
384 | - left join staff_assess_content on t_staff_assess_1.assess_id = staff_assess_content.staff_assess_id | ||
385 | - and evaluation_item_used.category =staff_assess_content.category and evaluation_item_used."name" = evaluation_item_used."name" | 381 | + ) |
382 | + select t_item_used.* ,staff_assess_content.value,staff_assess_content.level_value | ||
383 | + from t_item_used | ||
384 | + left join staff_assess_content on staff_assess_content.staff_assess_id=t_item_used.assess_id | ||
385 | + and t_item_used.category =staff_assess_content.category and t_item_used.content_name = staff_assess_content."name" | ||
386 | where 1=1` | 386 | where 1=1` |
387 | sqlStr2 = withSql2 + sqlStr2 | 387 | sqlStr2 = withSql2 + sqlStr2 |
388 | tx := d.transactionContext.PgTx | 388 | tx := d.transactionContext.PgTx |
-
请 注册 或 登录 后发表评论