|
|
@ -571,31 +571,16 @@ |
|
|
|
|
|
|
|
<select id="getEventBySourceTypeCount" resultType="com.epmet.dto.result.EventAnalysisResultDTO"> |
|
|
|
SELECT |
|
|
|
ea.jisujiban as jiSuJiBan, |
|
|
|
eb.zhitonglianban as zhiTongLianBan, |
|
|
|
ec.wanggehua as wangGeHua |
|
|
|
from |
|
|
|
( |
|
|
|
SELECT count(e.id) as jisujiban from ic_event e |
|
|
|
WHERE e.DEL_FLAG = 0 and e.SOURCE_TYPE = 0 |
|
|
|
<if test="null != orgIdPath and orgIdPath != ''"> |
|
|
|
and e.GRID_PIDS like concat(#{orgIdPath},'%') |
|
|
|
</if> |
|
|
|
)ea, |
|
|
|
( |
|
|
|
SELECT count(e.id) as zhitonglianban from ic_event e |
|
|
|
WHERE e.DEL_FLAG = 0 and e.SOURCE_TYPE = 1 |
|
|
|
<if test="null != orgIdPath and orgIdPath != ''"> |
|
|
|
and e.GRID_PIDS like concat(#{orgIdPath},'%') |
|
|
|
</if> |
|
|
|
)eb, |
|
|
|
( |
|
|
|
SELECT count(e.id) as wanggehua from ic_event e |
|
|
|
WHERE e.DEL_FLAG = 0 and e.SOURCE_TYPE = 2 |
|
|
|
<if test="null != orgIdPath and orgIdPath != ''"> |
|
|
|
and e.GRID_PIDS like concat(#{orgIdPath},'%') |
|
|
|
</if> |
|
|
|
)ec |
|
|
|
SUM(CASE WHEN e.SOURCE_TYPE = 0 THEN 1 ELSE 0 END) as jiSuJiBan, |
|
|
|
SUM(CASE WHEN e.SOURCE_TYPE = 1 THEN 1 ELSE 0 END) as zhiTongLianBan, |
|
|
|
SUM(CASE WHEN e.SOURCE_TYPE = 2 THEN 1 ELSE 0 END) as wangGeHua |
|
|
|
FROM ic_event e |
|
|
|
<where> |
|
|
|
e.DEL_FLAG = 0 |
|
|
|
<if test="null != orgIdPath and orgIdPath != ''"> |
|
|
|
and e.GRID_PIDS like concat(#{orgIdPath},'%') |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getAnalysis" resultType="java.util.Map"> |
|
|
@ -626,8 +611,7 @@ |
|
|
|
e.LONGITUDE, |
|
|
|
e.EVENT_CONTENT AS eventContent, |
|
|
|
r.MANAGE_STATUS AS manageStatus, |
|
|
|
c.CATEGORY_CODE AS categoryCode, |
|
|
|
rea.ATTACHMENT_URL AS imgUrl |
|
|
|
c.CATEGORY_CODE AS categoryCode |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="getListByStatus" resultType="com.epmet.dto.result.IcEventResultDTO"> |
|
|
@ -636,7 +620,6 @@ |
|
|
|
FROM ic_event e |
|
|
|
LEFT JOIN ic_event_reply r ON r.IC_EVENT_ID = e.ID |
|
|
|
LEFT JOIN ic_event_category c ON c.IC_EVENT_ID = e.ID |
|
|
|
LEFT JOIN ic_event_attachment rea ON rea.ic_event_id = e.ID AND rea.del_flag = '0' |
|
|
|
<where> |
|
|
|
e.DEL_FLAG = 0 |
|
|
|
<if test="null != orgIdPath and orgIdPath != ''"> |
|
|
@ -665,7 +648,6 @@ |
|
|
|
FROM ic_event e |
|
|
|
LEFT JOIN ic_event_reply r ON r.IC_EVENT_ID = e.ID |
|
|
|
LEFT JOIN ic_event_category c ON c.IC_EVENT_ID = e.ID |
|
|
|
LEFT JOIN ic_event_attachment rea ON rea.ic_event_id = e.ID AND rea.del_flag = '0' |
|
|
|
<where> |
|
|
|
e.DEL_FLAG = 0 |
|
|
|
<if test="null != orgIdPath and orgIdPath != ''"> |
|
|
|