| | |
| | | |
| | | <!-- 组织排行榜 按评价 --> |
| | | <select id="organizationScore" resultType="int"> |
| | | |
| | | format( |
| | | SELECT sum(IF(evaluate_state='1',10,IF(evaluate_state='2',5,0))) |
| | | FROM automessage_guide_repair_order |
| | | WHERE department_id in |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach>,1) |
| | | </foreach> |
| | | </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 |
| | | SELECT matter_name as name ,(select count(id) from automessage_guide_repair_order |
| | | where automessage_guide_repair_order.matter_id=automessage_transaction_event.id) as num |
| | | from automessage_transaction_event |
| | | <where> |
| | | <if test="ids != null"> |
| | | and department_id IN |