|
|
@ -53,7 +53,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 查询难点赌点-耗时最长|涉及部门最多|处理次数【new】 --> |
|
|
|
<select id="selectDifficultyNew" resultType="com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO"> |
|
|
|
<select id="selectDifficultyByAreaCode" resultType="com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO"> |
|
|
|
SELECT |
|
|
|
diff.EVENT_ID AS projectId, |
|
|
|
diff.EVENT_CONTENT AS title, |
|
|
@ -65,15 +65,17 @@ |
|
|
|
diff.EVENT_RE_ORG AS handleDepts, |
|
|
|
diff.EVENT_RE_ORG AS handleCount |
|
|
|
FROM |
|
|
|
screen_difficulty_data diff |
|
|
|
screen_difficulty_data diff |
|
|
|
left join screen_customer_grid scg |
|
|
|
on(diff.ORG_ID=scg.GRID_ID and scg.DEL_FLAG='0') |
|
|
|
WHERE |
|
|
|
diff.DEL_FLAG = '0' |
|
|
|
AND ( |
|
|
|
<foreach collection="orgIds" item="id" separator=" OR "> |
|
|
|
diff.ALL_PARENT_IDS LIKE CONCAT('%',#{id},'%') |
|
|
|
</foreach> |
|
|
|
) |
|
|
|
ORDER BY (CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT ELSE diff.EVENT_RE_ORG END) DESC |
|
|
|
diff.DEL_FLAG = '0' |
|
|
|
AND scg.AREA_CODE like concat(#{areaCode},'%') |
|
|
|
ORDER BY |
|
|
|
(CASE #{type} |
|
|
|
WHEN 'timelongest' THEN diff.EVENT_COST_TIME |
|
|
|
WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT |
|
|
|
ELSE diff.EVENT_RE_ORG END) DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |