|
@ -10,46 +10,51 @@ |
|
|
<result property="eventTime" column="eventTime"/> |
|
|
<result property="eventTime" column="eventTime"/> |
|
|
<result property="isProject" column="isProject"/> |
|
|
<result property="isProject" column="isProject"/> |
|
|
<result property="redDot" column="redDot"/> |
|
|
<result property="redDot" column="redDot"/> |
|
|
<collection property="eventImgs" ofType="java.lang.String"> |
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.EventListResultDTO$Attachment"> |
|
|
<result column="img"/> |
|
|
<result column="resiEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 --> |
|
|
|
|
|
<result column="url" property="url"/> |
|
|
|
|
|
<result column="type" property="type"/> |
|
|
</collection> |
|
|
</collection> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
<select id="eventUnDisposedList" resultMap="eventUnDisposedListMap"> |
|
|
<select id="eventUnDisposedList" resultMap="eventUnDisposedListMap"> |
|
|
SELECT rea.ATTACHMENT_URL AS img,t.* FROM |
|
|
SELECT |
|
|
(SELECT |
|
|
rea.id AS resiEventAttachmentId, |
|
|
re.EVENT_CONTENT AS eventContent, |
|
|
rea.ATTACHMENT_URL AS url, |
|
|
<if test='eventType == "undisposed" '> |
|
|
rea.ATTACHMENT_TYPE AS type, |
|
|
IFNULL(DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime, |
|
|
t.* |
|
|
</if> |
|
|
FROM |
|
|
<if test='eventType == "processed" '> |
|
|
( |
|
|
IFNULL(DATE_FORMAT(re.LATEST_OPERATED_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime, |
|
|
SELECT |
|
|
</if> |
|
|
re.EVENT_CONTENT AS eventContent, |
|
|
<if test='eventType == "transferred" '> |
|
|
<if test='eventType == "undisposed" '> |
|
|
IFNULL(DATE_FORMAT(re.CLOSE_CASE_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime, |
|
|
IFNULL(DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime, |
|
|
</if> |
|
|
</if> |
|
|
re.ID AS eventId, |
|
|
<if test='eventType == "processed" '> |
|
|
(CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject, |
|
|
IFNULL(DATE_FORMAT(re.LATEST_OPERATED_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime, |
|
|
(CASE WHEN ro.RED_DOT = 1 THEN TRUE ELSE FALSE END) AS redDot |
|
|
</if> |
|
|
FROM resi_event_report_org ro |
|
|
<if test='eventType == "transferred" '> |
|
|
INNER JOIN resi_event re ON (ro.RESI_EVENT_ID = re.ID AND re.DEL_FLAG = '0' AND re.audit_status = 'auto_passed') |
|
|
IFNULL(DATE_FORMAT(re.CLOSE_CASE_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime, |
|
|
AND ro.DEL_FLAG = '0' |
|
|
</if> |
|
|
and ro.ORG_ID = #{orgId} |
|
|
re.ID AS eventId, |
|
|
<if test='eventType == "undisposed" '> |
|
|
(CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject, |
|
|
AND ro.ORG_READ = 'un_read' |
|
|
(CASE WHEN ro.RED_DOT = 1 THEN TRUE ELSE FALSE END) AS redDot |
|
|
</if> |
|
|
FROM resi_event_report_org ro |
|
|
<if test='eventType == "processed" '> |
|
|
INNER JOIN resi_event re ON (ro.RESI_EVENT_ID = re.ID AND re.DEL_FLAG = '0' AND re.audit_status = 'auto_passed') |
|
|
AND ro.ORG_READ = 'read' |
|
|
AND ro.DEL_FLAG = '0' |
|
|
AND re.`STATUS` = 'processing' |
|
|
AND ro.ORG_ID = #{orgId} |
|
|
</if> |
|
|
<if test='eventType == "undisposed" '> |
|
|
<if test='eventType == "transferred" '> |
|
|
AND ro.ORG_READ = 'un_read' |
|
|
AND ro.ORG_READ = 'read' |
|
|
</if> |
|
|
AND re.`STATUS` = 'closed_case' |
|
|
<if test='eventType == "processed" '> |
|
|
</if> |
|
|
AND ro.ORG_READ = 'read' |
|
|
|
|
|
AND re.`STATUS` = 'processing' |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test='eventType == "transferred" '> |
|
|
|
|
|
AND ro.ORG_READ = 'read' |
|
|
|
|
|
AND re.`STATUS` = 'closed_case' |
|
|
|
|
|
</if> |
|
|
)t |
|
|
)t |
|
|
LEFT JOIN resi_event_attachment rea |
|
|
LEFT JOIN resi_event_attachment rea ON (rea.resi_event_id = t.eventId AND rea.del_flag = '0' AND rea.attachment_type = 'image') |
|
|
ON (rea.RESI_EVENT_ID = t.eventId |
|
|
|
|
|
and rea.DEL_FLAG = '0' |
|
|
|
|
|
AND rea.ATTACHMENT_TYPE = 'image') |
|
|
|
|
|
<if test='eventType == "undisposed" '> |
|
|
<if test='eventType == "undisposed" '> |
|
|
ORDER BY t.eventTime,rea.sort asc |
|
|
ORDER BY t.eventTime,rea.sort asc |
|
|
</if> |
|
|
</if> |
|
@ -126,6 +131,7 @@ |
|
|
<result column="eventImg"/> |
|
|
<result column="eventImg"/> |
|
|
</collection>--> |
|
|
</collection>--> |
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.EventDetailResultDTO$Attachment"> |
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.EventDetailResultDTO$Attachment"> |
|
|
|
|
|
<result column="resiEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 --> |
|
|
<result column="url" property="url"/> |
|
|
<result column="url" property="url"/> |
|
|
<result column="type" property="type"/> |
|
|
<result column="type" property="type"/> |
|
|
</collection> |
|
|
</collection> |
|
@ -146,6 +152,7 @@ |
|
|
(CASE WHEN re.READ_FLAG = 1 THEN FALSE ELSE TRUE END) AS isRollback, |
|
|
(CASE WHEN re.READ_FLAG = 1 THEN FALSE ELSE TRUE END) AS isRollback, |
|
|
(CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject, |
|
|
(CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject, |
|
|
IFNULL(re.project_id,'') AS projectId, |
|
|
IFNULL(re.project_id,'') AS projectId, |
|
|
|
|
|
ea.id AS resiEventAttachmentId, |
|
|
ea.ATTACHMENT_URL AS url, |
|
|
ea.ATTACHMENT_URL AS url, |
|
|
ea.ATTACHMENT_TYPE AS type, |
|
|
ea.ATTACHMENT_TYPE AS type, |
|
|
IF(ISNULL(em.USER_SHOW_NAME),NULL,concat('人大代表-',em.USER_SHOW_NAME)) AS person, |
|
|
IF(ISNULL(em.USER_SHOW_NAME),NULL,concat('人大代表-',em.USER_SHOW_NAME)) AS person, |
|
@ -186,6 +193,7 @@ |
|
|
<result property="eventTime" column="eventTime"/> |
|
|
<result property="eventTime" column="eventTime"/> |
|
|
<result property="eventId" column="eventId"/> |
|
|
<result property="eventId" column="eventId"/> |
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.NewEventsResultDTO$Attachment"> |
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.NewEventsResultDTO$Attachment"> |
|
|
|
|
|
<result column="resiEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 --> |
|
|
<result column="url" property="url"/> |
|
|
<result column="url" property="url"/> |
|
|
<result column="type" property="type"/> |
|
|
<result column="type" property="type"/> |
|
|
</collection> |
|
|
</collection> |
|
@ -197,6 +205,7 @@ |
|
|
SELECT |
|
|
SELECT |
|
|
IFNULL(re.EVENT_CONTENT,'') AS eventContent, |
|
|
IFNULL(re.EVENT_CONTENT,'') AS eventContent, |
|
|
DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i') AS eventTime, |
|
|
DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i') AS eventTime, |
|
|
|
|
|
ea.id AS resiEventAttachmentId, |
|
|
ea.attachment_url AS url, |
|
|
ea.attachment_url AS url, |
|
|
ea.attachment_type AS type, |
|
|
ea.attachment_type AS type, |
|
|
re.id as eventId |
|
|
re.id as eventId |
|
@ -240,6 +249,7 @@ |
|
|
<result property="longitude" column="longitude" /> |
|
|
<result property="longitude" column="longitude" /> |
|
|
<result property="latitude" column="latitude" /> |
|
|
<result property="latitude" column="latitude" /> |
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.ResiEventListResultDTO$Attachment"> |
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.ResiEventListResultDTO$Attachment"> |
|
|
|
|
|
<result column="resiEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 --> |
|
|
<result column="url" property="url"/> |
|
|
<result column="url" property="url"/> |
|
|
<result column="type" property="type"/> |
|
|
<result column="type" property="type"/> |
|
|
</collection> |
|
|
</collection> |
|
@ -257,6 +267,7 @@ |
|
|
re.`status`, |
|
|
re.`status`, |
|
|
re.shift_project, |
|
|
re.shift_project, |
|
|
re.latest_operated_time, |
|
|
re.latest_operated_time, |
|
|
|
|
|
rea.id AS resiEventAttachmentId, |
|
|
rea.attachment_url AS url, |
|
|
rea.attachment_url AS url, |
|
|
rea.attachment_type AS type, |
|
|
rea.attachment_type AS type, |
|
|
re.read_flag, |
|
|
re.read_flag, |
|
|