| | |
| | | user_name as userName, |
| | | (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) as num |
| | | FROM automessage_sys_user WHERE user_type=2 ORDER BY |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | |
| | | 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)) as num |
| | | FROM automessage_sys_user WHERE user_type=2 ORDER BY |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | |
| | | (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 ORDER BY |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | | |
| | | <!-- 按未办结 --> |
| | | <select id="tosettled" 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=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=2 |
| | | ) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | | <!-- 按未办结 --> |
| | | <select id="workunit" 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=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) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | |
| | | <!-- 导办人员统计数 --> |
| | | <select id="staffNum" resultType="int"> |
| | | SELECT count(id) |
| | | FROM automessage_sys_user WHERE user_type=2 |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 获取一级组织 --> |
| | |
| | | <!-- 办事指南 根据导办数量排序 --> |
| | | <select id="guidanceTransaction" resultType="com.dg.core.db.gen.entity.Guidance"> |
| | | SELECT matter_name as name ,transaction_num as num from |
| | | automessage_transaction_event ORDER BY |
| | | num DESC |
| | | automessage_transaction_event |
| | | <where> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | | <!-- 办事指南 根据导办数量排序 --> |
| | | <select id="guidanceBrowse" resultType="com.dg.core.db.gen.entity.Guidance"> |
| | | SELECT matter_name as name ,browse_num as num from |
| | | automessage_transaction_event ORDER BY |
| | | num DESC |
| | | automessage_transaction_event |
| | | <where> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | |
| | | <!-- 办事指南 统计数量 --> |
| | | <select id="countWork" resultType="int"> |
| | | SELECT count(id) from automessage_transaction_event |
| | | <where> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |