| | |
| | | user_name, |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as departmentNmae, |
| | | ((select sum(IF(evaluate_state='1',10,IF(evaluate_state='2',5,0))) from automessage_guide_repair_order |
| | | WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id)/(select count(id) from automessage_guide_repair_order |
| | | WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id) |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if>) as num |
| | | WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | )/(select count(id) from automessage_guide_repair_order |
| | | WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if>) |
| | | ) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |