|
@ -249,10 +249,17 @@ |
|
|
screen_difficulty_data diff |
|
|
screen_difficulty_data diff |
|
|
WHERE |
|
|
WHERE |
|
|
diff.DEL_FLAG = '0' |
|
|
diff.DEL_FLAG = '0' |
|
|
AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') |
|
|
<choose> |
|
|
<if test="status!= null and status != ''"> |
|
|
<when test="orgType != null and orgType == 'grid'"> |
|
|
AND diff.EVENT_STATUS_CODE = #{status} |
|
|
AND diff.ORG_ID = #{agencyId,jdbcType=VARCHAR} |
|
|
</if> |
|
|
</when> |
|
|
|
|
|
<otherwise> |
|
|
|
|
|
AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') |
|
|
|
|
|
</otherwise> |
|
|
|
|
|
</choose> |
|
|
|
|
|
<if test="status!= null and status != ''"> |
|
|
|
|
|
AND diff.EVENT_STATUS_CODE = #{status} |
|
|
|
|
|
</if> |
|
|
ORDER BY |
|
|
ORDER BY |
|
|
CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME |
|
|
CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME |
|
|
WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT |
|
|
WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT |
|
|