diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml index 2b063d7094..4df3c80001 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml @@ -33,7 +33,7 @@ IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime, IFNULL(v.vaccinationCount,0) AS vaccinationCount FROM ic_epidemic_special_attention a - LEFT JOIN ic_resi_user b ON a.id_card = b.id_card + LEFT JOIN ic_resi_user b ON a.id_card = b.id_card AND b.del_flag = '0' LEFT JOIN (SELECT id_card ,count(1) AS vaccinationCount FROM ic_vaccine WHERE DEL_FLAG = 0 GROUP BY ID_CARD) v ON (v.ID_CARD = a.ID_CARD) WHERE a.DEL_FLAG = 0 AND a.ORG_ID = #{orgId} @@ -79,7 +79,7 @@ b.HOME_ID, IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime FROM ic_epidemic_special_attention a - LEFT JOIN ic_resi_user b ON a.id_card = b.id_card + LEFT JOIN ic_resi_user b ON a.id_card = b.id_card AND b.del_flag = '0' WHERE a.DEL_FLAG = 0 AND a.ORG_ID = #{orgId} AND a.ATTENTION_TYPE = #{attentionType}