|
|
@ -31,7 +31,7 @@ |
|
|
|
(CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject, |
|
|
|
(CASE WHEN ro.RED_DOT = 1 THEN TRUE ELSE FALSE END) AS redDot |
|
|
|
FROM resi_event_report_org ro |
|
|
|
INNER JOIN resi_event re ON (ro.RESI_EVENT_ID = re.ID AND re.DEL_FLAG = '0') |
|
|
|
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.DEL_FLAG = '0' |
|
|
|
and ro.ORG_ID = #{orgId} |
|
|
|
<if test='eventType == "undisposed" '> |
|
|
@ -185,18 +185,23 @@ |
|
|
|
<result property="eventContent" column="eventContent"/> |
|
|
|
<result property="eventTime" column="eventTime"/> |
|
|
|
<result property="eventId" column="eventId"/> |
|
|
|
<collection property="eventImgs" ofType="java.lang.String"> |
|
|
|
<result column="img"/> |
|
|
|
<collection property="attachmentList" ofType="com.epmet.dto.result.NewEventsResultDTO$Attachment"> |
|
|
|
<result column="url" property="url"/> |
|
|
|
<result column="type" property="type"/> |
|
|
|
</collection> |
|
|
|
<!--<collection property="eventImgs" ofType="java.lang.String"> |
|
|
|
<result column="img"/> |
|
|
|
</collection>--> |
|
|
|
</resultMap> |
|
|
|
<select id="newEvents" resultMap="newEventsMap"> |
|
|
|
SELECT |
|
|
|
IFNULL(re.EVENT_CONTENT,'') AS eventContent, |
|
|
|
DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i') AS eventTime, |
|
|
|
ea.ATTACHMENT_URL AS img, |
|
|
|
ea.attachment_url AS url, |
|
|
|
ea.attachment_type AS type, |
|
|
|
re.id as eventId |
|
|
|
FROM resi_event_report_org ro |
|
|
|
LEFT JOIN resi_event re ON (re.ID = ro.RESI_EVENT_ID AND re.DEL_FLAG = '0') |
|
|
|
LEFT JOIN resi_event re ON (re.ID = ro.RESI_EVENT_ID AND re.DEL_FLAG = '0' AND re.audit_status = 'auto_passed') |
|
|
|
LEFT JOIN resi_event_attachment ea ON (ea.RESI_EVENT_ID = ro.RESI_EVENT_ID AND ea.DEL_FLAG = '0' AND |
|
|
|
ea.ATTACHMENT_TYPE = 'image' AND ea.SORT IN (3,1,2)) |
|
|
|
WHERE ro.DEL_FLAG = '0' |
|
|
|