<!-- 筛选统计 -->
<select id="finduserandcount" >
SELECT userName,screenDate,
COUNT(CASE WHEN SFSH != -1 THEN SFSH END) as all,
COUNT(CASE WHEN SFSH = 0 THEN SFSH END) as pass,
COUNT(CASE WHEN SFSH = 1 THEN SFSH END) as tovoid
FROM djwf
<where>
userName != ''
<if test="userName != null and userName !='' ">
and userName = #{userName}
</if>
<if test="screenDate != null and screenDate !='' ">
and screenDate = #{screenDate}
</if>
</where>
GROUP BY userName
</select>