diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcMeteorologicalDetectorDataMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcMeteorologicalDetectorDataMapper.java
index 3a0868cb..b98086ce 100644
--- a/zc-business/src/main/java/com/zc/business/mapper/DcMeteorologicalDetectorDataMapper.java
+++ b/zc-business/src/main/java/com/zc/business/mapper/DcMeteorologicalDetectorDataMapper.java
@@ -43,6 +43,22 @@ public interface DcMeteorologicalDetectorDataMapper
*/
int updateDcMeteorologicalDetectorData(DcMeteorologicalDetectorData dcMeteorologicalDetectorData);
+ /**
+ * 中间库新增气象检测器数据
+ *
+ * @param dcMeteorologicalDetectorData 气象检测器数据
+ * @return 结果
+ */
+ Boolean insertIntermediateWarehouseData(DcMeteorologicalDetectorData dcMeteorologicalDetectorData);
+
+ /**
+ * 中间库修改气象检测器数据
+ *
+ * @param dcMeteorologicalDetectorData 气象检测器数据
+ * @return 结果
+ */
+ Boolean updateIntermediateWarehouseData(DcMeteorologicalDetectorData dcMeteorologicalDetectorData);
+
/**
* 删除气象检测器数据
*
diff --git a/zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReportListener.java b/zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReportListener.java
index d7370696..561c79e6 100644
--- a/zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReportListener.java
+++ b/zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReportListener.java
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.google.gson.JsonObject;
import com.zc.business.domain.DcDevice;
import com.zc.business.domain.DcMeteorologicalDetectorData;
+import com.zc.business.enums.IotProductEnum;
import com.zc.business.service.IDcMeteorologicalDetectorDataService;
import com.zc.common.core.redis.stream.RedisStream;
import org.slf4j.Logger;
@@ -46,11 +47,14 @@ public class DevicePropertyReportListener implements StreamListener
where id = #{id}
-
+
insert into dc_meteorological_detector_data
@@ -146,6 +146,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
+
+ insert into meteorological_detector_data
+
+ device_id,
+ temperature,
+ humidity,
+ precipitation_type,
+ rainfall,
+ road_surface_status,
+ water_film_thickness,
+ update_time
+
+
+ #{iotDeviceId},
+ #{temperature},
+ #{humidity},
+ #{precipitationType},
+ #{rainfall},
+ #{roadSurfaceStatus},
+ #{waterFilmThickness},
+ current_date
+
+
+
+
+ update meteorological_detector_data
+
+ temperature = #{temperature},
+ humidity = #{humidity},
+ precipitation_type = #{precipitationType},
+ rainfall = #{rainfall},
+ road_surface_status = #{roadSurfaceStatus},
+ water_film_thickness = #{waterFilmThickness},
+ update_time = current_date
+
+ where device_id = #{iotDeviceId}
+
+
delete from dc_meteorological_detector_data where id = #{id}