|
|
@ -3,27 +3,6 @@ |
|
|
|
|
|
|
|
<mapper namespace="com.epmet.dao.IcEventDao"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="icEventMap" type="com.epmet.dto.result.IcEventListResultDTO"> |
|
|
|
<id property="eventId" column="id"/> |
|
|
|
<result property="gridId" column="grid_id"/> |
|
|
|
<result property="sourceType" column="source_type" /> |
|
|
|
<result property="address" column="address" /> |
|
|
|
<result property="name" column="name" /> |
|
|
|
<result property="mobile" column="mobile" /> |
|
|
|
<result property="satisfaction" column="satisfaction" /> |
|
|
|
<result property="satisfactionName" column="satisfaction" /> |
|
|
|
<result property="createdTime" column="created_time" /> |
|
|
|
<result property="status" column="status" /> |
|
|
|
<result property="createdUserId" column="created_by" /> |
|
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.IcEventListResultDTO$Attachment"> |
|
|
|
<result column="icEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 --> |
|
|
|
<result column="url" property="url"/> |
|
|
|
<result column="type" property="type"/> |
|
|
|
<result column="duration" property="duration"/> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
<select id="getProcessStatusRatio" resultType="java.util.Map"> |
|
|
|
select STATUS status, count(1) eventCount |
|
|
|
from ic_event e |
|
|
@ -90,9 +69,29 @@ |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<resultMap id="icEventMap" type="com.epmet.dto.result.IcEventListResultDTO"> |
|
|
|
<id property="icEventId" column="id"/> |
|
|
|
<result property="gridId" column="grid_id"/> |
|
|
|
<result property="sourceType" column="source_type" /> |
|
|
|
<result property="address" column="address" /> |
|
|
|
<result property="name" column="name" /> |
|
|
|
<result property="mobile" column="mobile" /> |
|
|
|
<result property="satisfaction" column="satisfaction" /> |
|
|
|
<result property="satisfactionName" column="satisfaction" /> |
|
|
|
<result property="createdTime" column="created_time" /> |
|
|
|
<result property="status" column="status" /> |
|
|
|
<result property="createdUserId" column="created_by" /> |
|
|
|
<result property="categoryId" column="CATEGORY_ID" /> |
|
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.IcEventListResultDTO$Attachment"> |
|
|
|
<result column="icEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 --> |
|
|
|
<result column="url" property="url"/> |
|
|
|
<result column="type" property="type"/> |
|
|
|
<result column="duration" property="duration"/> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
<select id="icEventList" parameterType="map" resultMap="icEventMap"> |
|
|
|
SELECT |
|
|
|
ie.id eventId, |
|
|
|
ie.id icEventId, |
|
|
|
ie.grid_id gridId, |
|
|
|
ie.event_content eventContent, |
|
|
|
ie.source_type sourceType, |
|
|
@ -108,12 +107,17 @@ |
|
|
|
rea.id AS iceventattachmentid, |
|
|
|
rea.attachment_url AS url, |
|
|
|
rea.attachment_type AS type, |
|
|
|
rea.duration AS duration |
|
|
|
rea.duration AS duration, |
|
|
|
iec.category_id AS categoryId |
|
|
|
FROM |
|
|
|
ic_event ie |
|
|
|
LEFT JOIN ic_event_attachment rea ON(ie.id = rea.ic_event_id AND rea.del_flag = '0') |
|
|
|
LEFT JOIN ic_event_category iec ON(ie.id = iec.ic_event_id AND iec.del_flag = '0') |
|
|
|
WHERE |
|
|
|
ie.del_flag = '0' |
|
|
|
<if test="icEventId != null and icEventId != '' "> |
|
|
|
AND ie.id = #{icEventId} |
|
|
|
</if> |
|
|
|
<if test="gridId != null and gridId != '' "> |
|
|
|
AND ie.grid_id = #{gridId} |
|
|
|
</if> |
|
|
|