| | |
| | | <resultMap id="gdClueEventCountVoResultMap" type="org.sxkj.gd.workorder.vo.GdClueEventCountVO"> |
| | | <result column="total_count" property="totalCount"/> |
| | | <result column="my_count" property="myCount"/> |
| | | <result column="returned_count" property="returnedCount"/> |
| | | <result column="disposing_count" property="disposingCount"/> |
| | | <result column="disposed_count" property="disposedCount"/> |
| | | <result column="completed_count" property="completedCount"/> |
| | | </resultMap> |
| | |
| | | <select id="selectGdClueEventCount" resultMap="gdClueEventCountVoResultMap"> |
| | | select count(1) as total_count, |
| | | COALESCE(sum(case when ce.dispose_user = #{userId} then 1 else 0 end), 0) as my_count, |
| | | COALESCE(sum(case when ce.event_status = 2 then 1 else 0 end), 0) as returned_count, |
| | | COALESCE(sum(case when ce.event_status = 1 then 1 else 0 end), 0) as disposing_count, |
| | | COALESCE(sum(case when ce.event_status = 3 then 1 else 0 end), 0) as disposed_count, |
| | | COALESCE(sum(case when ce.event_status = 4 then 1 else 0 end), 0) as completed_count |
| | | from ja_gd_clue_event ce |