| | |
| | | |
| | | <select id="getSfStatisticsCategory" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult2"> |
| | | SELECT a.sub_id as subTaskId, |
| | | SELECT |
| | | <if test="configValue != null and configValue != ''"> |
| | | SUM(CASE WHEN a.categoryid IN(${configValue}) |
| | | AND IFNULL(a.matchedtext,a.asrtext) IS NOT NULL |
| | | AND IFNULL(a.matchedtext,a.asrtext) != '' |
| | | THEN 1 ELSE 0 END) AS joyCount, |
| | | </if> |
| | | <if test="configValue != null and configValue != ''"> |
| | | SUM(CASE WHEN a.categoryid IN(${configValue}) |
| | | THEN 1 ELSE 0 END) AS joyAllCount, |
| | | </if> |
| | | COUNT(sub_id) joyCount |
| | | a.sub_id as subTaskId |
| | | FROM service_subtask_detail a |
| | | INNER JOIN service_subtask t ON a.sub_id = t.id |
| | | where 1=1 |