diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
index d848f1e545..9685df941a 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
@@ -64,4 +64,7 @@ public class EpidemicPreventionFormDTO extends PageFormDTO implements Serializab
* 核酸检测次数
*/
private Integer natCount;
+
+ private String startDate;
+ private String endDate;
}
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
index ca26c6bf4e..425a17d3c3 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
@@ -656,8 +656,28 @@
IFNULL( c.count, 0 ) AS natCount
FROM
ic_resi_user a
- LEFT JOIN ( SELECT ID_CARD, count( id ) AS count FROM ic_resi_vaccine WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} GROUP BY ID_CARD ) b ON a.ID_CARD = b.ID_CARD
- LEFT JOIN ( SELECT ID_CARD, count( id ) AS count FROM ic_nat WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} GROUP BY ID_CARD ) c ON a.ID_CARD = c.ID_CARD
+ LEFT JOIN (
+ SELECT ID_CARD, count( id ) AS count
+ FROM ic_resi_vaccine
+ WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId}
+
+ AND DATE_FORMAT(INOCULATE_TIME,"%Y-%m-%d") > #{startDate}
+
+
+ AND DATE_FORMAT(INOCULATE_TIME,"%Y-%m-%d") < #{endDate}
+
+ GROUP BY ID_CARD ) b ON a.ID_CARD = b.ID_CARD
+ LEFT JOIN (
+ SELECT ID_CARD, count( id ) AS count
+ FROM ic_nat
+ WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId}
+
+ AND DATE_FORMAT(NAT_TIME,"%Y-%m-%d") > #{startDate}
+
+
+ AND DATE_FORMAT(NAT_TIME,"%Y-%m-%d") < #{endDate}
+
+ GROUP BY ID_CARD ) c ON a.ID_CARD = c.ID_CARD
WHERE
a.DEL_FLAG = '0'