diff --git a/zc-business/src/main/java/com/zc/business/domain/DcWarning.java b/zc-business/src/main/java/com/zc/business/domain/DcWarning.java
index 10627b66..9118285b 100644
--- a/zc-business/src/main/java/com/zc/business/domain/DcWarning.java
+++ b/zc-business/src/main/java/com/zc/business/domain/DcWarning.java
@@ -127,6 +127,16 @@ public class DcWarning extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date currently;
+ private Long facilityId;
+
+ public Long getFacilityId() {
+ return facilityId;
+ }
+
+ public void setFacilityId(Long facilityId) {
+ this.facilityId = facilityId;
+ }
+
public Date getCurrently() {
return currently;
}
diff --git a/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
index 0738d82f..b76ec34d 100644
--- a/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
@@ -477,19 +477,21 @@
SELECT 20 UNION ALL SELECT 21 UNION ALL SELECT 22 UNION ALL SELECT 23
) t1
left join
- (select HOUR(warning_time) hours,count(*) num from dc_warning
- where date_format(warning_time,'%Y-%m-%d') = date_format(#{warningTime},'%Y-%m-%d')
- and warning_source=6
+ (select HOUR(warning_time) hours,count(*) num,dc_warning.stake_mark,facility_name from dc_warning
+ left join dc_facility on dc_warning.stake_mark=dc_facility.stake_mark and dc_facility.facility_type=1
+ where date_format(warning_time,'%Y-%m-%d') = date_format('2024-06-25','%Y-%m-%d') and warning_source=6
+ and dc_facility.id=#{facilityId}
GROUP BY hours) t2
on t1.n = t2.hours