| | |
| | | <select id="guidePlatePeople" resultType="com.dg.core.db.gen.entity.GuidePlate"> |
| | | SELECT |
| | | user_name as userName, |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=guide_department_id) as departmentNmae, |
| | | (select count(id) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id and state=3 ) as num |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as departmentNmae, |
| | | (select count(id) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id and automessage_guide_repair_order.state=3 ) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | |
| | | <select id="score" resultType="com.dg.core.db.gen.entity.GuidePlate"> |
| | | SELECT |
| | | user_name, |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=guide_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)) as num |
| | | (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)) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | |
| | | <select id="timeout" resultType="com.dg.core.db.gen.entity.GuidePlate"> |
| | | SELECT |
| | | user_name as userName, |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=guide_department_id) as departmentNmae, |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as departmentNmae, |
| | | (select count(id) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id and automessage_guide_repair_order.is_timeout=2 |
| | | ) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |