济菏高速数据中心代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

197 lines
14 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zc.business.mapper.DcMeteorologicalDetectorDataMapper">
<resultMap type="DcMeteorologicalDetectorData" id="DcMeteorologicalDetectorDataResult">
<result property="id" column="id" />
<result property="iotDeviceId" column="iot_device_id" />
<result property="rainfall" column="rainfall" />
<result property="visibilityType" column="visibility_type" />
<result property="visibility" column="visibility" />
<result property="roadSurfaceStatus" column="road_surface_status" />
<result property="atmosphericPressure" column="atmospheric_pressure" />
<result property="temperature" column="temperature" />
<result property="humidity" column="humidity" />
<result property="windDirection" column="wind_direction" />
<result property="windSpeed" column="wind_speed" />
<result property="freezingPointTemperature" column="freezing_point_temperature" />
<result property="salinityValue" column="salinity_value" />
<result property="roadSurfaceTemperature" column="road_surface_temperature" />
<result property="waterFilmThickness" column="water_film_thickness" />
<result property="precipitationType" column="precipitation_type" />
<result property="wetSlipperyCoefficient" column="wet_slippery_coefficient" />
<result property="sensorTemperature" column="sensor_temperature" />
<result property="remoteRoadSurfaceTemperature" column="remote_road_surface_temperature" />
<result property="remoteRoadSurfaceStatus" column="remote_road_surface_status" />
<result property="subSurfaceTemperature" column="sub_surface_temperature" />
<result property="waterFilmIceSnowValue" column="water_film_ice_snow_value" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectDcMeteorologicalDetectorDataVo">
select id, iot_device_id, rainfall, visibility_type, visibility, road_surface_status, atmospheric_pressure, temperature, humidity, wind_direction, wind_speed, freezing_point_temperature, salinity_value, road_surface_temperature, water_film_thickness, precipitation_type, wet_slippery_coefficient, sensor_temperature, remote_road_surface_temperature, remote_road_surface_status, sub_surface_temperature, water_film_ice_snow_value,create_time from dc_meteorological_detector_data
</sql>
<select id="selectDcMeteorologicalDetectorDataList" parameterType="DcMeteorologicalDetectorData" resultMap="DcMeteorologicalDetectorDataResult">
<include refid="selectDcMeteorologicalDetectorDataVo"/>
<where>
<if test="iotDeviceId != null and iotDeviceId != ''"> and iot_device_id = #{iotDeviceId}</if>
<if test="rainfall != null and rainfall != ''"> and rainfall = #{rainfall}</if>
<if test="visibilityType != null and visibilityType != ''"> and visibility_type = #{visibilityType}</if>
<if test="visibility != null and visibility != ''"> and visibility = #{visibility}</if>
<if test="roadSurfaceStatus != null and roadSurfaceStatus != ''"> and road_surface_status = #{roadSurfaceStatus}</if>
<if test="atmosphericPressure != null and atmosphericPressure != ''"> and atmospheric_pressure = #{atmosphericPressure}</if>
<if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if>
<if test="humidity != null and humidity != ''"> and humidity = #{humidity}</if>
<if test="windDirection != null and windDirection != ''"> and wind_direction = #{windDirection}</if>
<if test="windSpeed != null and windSpeed != ''"> and wind_speed = #{windSpeed}</if>
<if test="freezingPointTemperature != null and freezingPointTemperature != ''"> and freezing_point_temperature = #{freezingPointTemperature}</if>
<if test="salinityValue != null and salinityValue != ''"> and salinity_value = #{salinityValue}</if>
<if test="roadSurfaceTemperature != null and roadSurfaceTemperature != ''"> and road_surface_temperature = #{roadSurfaceTemperature}</if>
<if test="waterFilmThickness != null and waterFilmThickness != ''"> and water_film_thickness = #{waterFilmThickness}</if>
<if test="precipitationType != null and precipitationType != ''"> and precipitation_type = #{precipitationType}</if>
<if test="wetSlipperyCoefficient != null and wetSlipperyCoefficient != ''"> and wet_slippery_coefficient = #{wetSlipperyCoefficient}</if>
<if test="sensorTemperature != null and sensorTemperature != ''"> and sensor_temperature = #{sensorTemperature}</if>
<if test="remoteRoadSurfaceTemperature != null and remoteRoadSurfaceTemperature != ''"> and remote_road_surface_temperature = #{remoteRoadSurfaceTemperature}</if>
<if test="remoteRoadSurfaceStatus != null and remoteRoadSurfaceStatus != ''"> and remote_road_surface_status = #{remoteRoadSurfaceStatus}</if>
<if test="subSurfaceTemperature != null and subSurfaceTemperature != ''"> and sub_surface_temperature = #{subSurfaceTemperature}</if>
<if test="waterFilmIceSnowValue != null and waterFilmIceSnowValue != ''"> and water_film_ice_snow_value = #{waterFilmIceSnowValue}</if>
</where>
</select>
<select id="selectDcMeteorologicalDetectorDataById" parameterType="Long" resultMap="DcMeteorologicalDetectorDataResult">
<include refid="selectDcMeteorologicalDetectorDataVo"/>
where id = #{id}
</select>
<insert id="insertDcMeteorologicalDetectorData" parameterType="DcMeteorologicalDetectorData" useGeneratedKeys="true" keyProperty="id">
insert into dc_meteorological_detector_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="iotDeviceId != null">iot_device_id,</if>
<if test="rainfall != null">rainfall,</if>
<if test="visibilityType != null">visibility_type,</if>
<if test="visibility != null">visibility,</if>
<if test="roadSurfaceStatus != null">road_surface_status,</if>
<if test="atmosphericPressure != null">atmospheric_pressure,</if>
<if test="temperature != null">temperature,</if>
<if test="humidity != null">humidity,</if>
<if test="windDirection != null">wind_direction,</if>
<if test="windSpeed != null">wind_speed,</if>
<if test="freezingPointTemperature != null">freezing_point_temperature,</if>
<if test="salinityValue != null">salinity_value,</if>
<if test="roadSurfaceTemperature != null">road_surface_temperature,</if>
<if test="waterFilmThickness != null">water_film_thickness,</if>
<if test="precipitationType != null">precipitation_type,</if>
<if test="wetSlipperyCoefficient != null">wet_slippery_coefficient,</if>
<if test="sensorTemperature != null">sensor_temperature,</if>
<if test="remoteRoadSurfaceTemperature != null">remote_road_surface_temperature,</if>
<if test="remoteRoadSurfaceStatus != null">remote_road_surface_status,</if>
<if test="subSurfaceTemperature != null">sub_surface_temperature,</if>
<if test="waterFilmIceSnowValue != null">water_film_ice_snow_value,</if>
create_time
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="iotDeviceId != null">#{iotDeviceId},</if>
<if test="rainfall != null">#{rainfall},</if>
<if test="visibilityType != null">#{visibilityType},</if>
<if test="visibility != null">#{visibility},</if>
<if test="roadSurfaceStatus != null">#{roadSurfaceStatus},</if>
<if test="atmosphericPressure != null">#{atmosphericPressure},</if>
<if test="temperature != null">#{temperature},</if>
<if test="humidity != null">#{humidity},</if>
<if test="windDirection != null">#{windDirection},</if>
<if test="windSpeed != null">#{windSpeed},</if>
<if test="freezingPointTemperature != null">#{freezingPointTemperature},</if>
<if test="salinityValue != null">#{salinityValue},</if>
<if test="roadSurfaceTemperature != null">#{roadSurfaceTemperature},</if>
<if test="waterFilmThickness != null">#{waterFilmThickness},</if>
<if test="precipitationType != null">#{precipitationType},</if>
<if test="wetSlipperyCoefficient != null">#{wetSlipperyCoefficient},</if>
<if test="sensorTemperature != null">#{sensorTemperature},</if>
<if test="remoteRoadSurfaceTemperature != null">#{remoteRoadSurfaceTemperature},</if>
<if test="remoteRoadSurfaceStatus != null">#{remoteRoadSurfaceStatus},</if>
<if test="subSurfaceTemperature != null">#{subSurfaceTemperature},</if>
<if test="waterFilmIceSnowValue != null">#{waterFilmIceSnowValue},</if>
current_date
</trim>
</insert>
<update id="updateDcMeteorologicalDetectorData" parameterType="DcMeteorologicalDetectorData">
update dc_meteorological_detector_data
<trim prefix="SET" suffixOverrides=",">
<if test="iotDeviceId != null">iot_device_id = #{iotDeviceId},</if>
<if test="rainfall != null">rainfall = #{rainfall},</if>
<if test="visibilityType != null">visibility_type = #{visibilityType},</if>
<if test="visibility != null">visibility = #{visibility},</if>
<if test="roadSurfaceStatus != null">road_surface_status = #{roadSurfaceStatus},</if>
<if test="atmosphericPressure != null">atmospheric_pressure = #{atmosphericPressure},</if>
<if test="temperature != null">temperature = #{temperature},</if>
<if test="humidity != null">humidity = #{humidity},</if>
<if test="windDirection != null">wind_direction = #{windDirection},</if>
<if test="windSpeed != null">wind_speed = #{windSpeed},</if>
<if test="freezingPointTemperature != null">freezing_point_temperature = #{freezingPointTemperature},</if>
<if test="salinityValue != null">salinity_value = #{salinityValue},</if>
<if test="roadSurfaceTemperature != null">road_surface_temperature = #{roadSurfaceTemperature},</if>
<if test="waterFilmThickness != null">water_film_thickness = #{waterFilmThickness},</if>
<if test="precipitationType != null">precipitation_type = #{precipitationType},</if>
<if test="wetSlipperyCoefficient != null">wet_slippery_coefficient = #{wetSlipperyCoefficient},</if>
<if test="sensorTemperature != null">sensor_temperature = #{sensorTemperature},</if>
<if test="remoteRoadSurfaceTemperature != null">remote_road_surface_temperature = #{remoteRoadSurfaceTemperature},</if>
<if test="remoteRoadSurfaceStatus != null">remote_road_surface_status = #{remoteRoadSurfaceStatus},</if>
<if test="subSurfaceTemperature != null">sub_surface_temperature = #{subSurfaceTemperature},</if>
<if test="waterFilmIceSnowValue != null">water_film_ice_snow_value = #{waterFilmIceSnowValue},</if>
</trim>
where id = #{id}
</update>
<insert id="insertIntermediateWarehouseData" parameterType="DcMeteorologicalDetectorData" useGeneratedKeys="true" keyProperty="id">
insert into meteorological_detector_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="iotDeviceId != null">device_id,</if>
<if test="temperature != null">temperature,</if>
<if test="humidity != null">humidity,</if>
<if test="precipitationType != null">precipitation_type,</if>
<if test="rainfall != null">rainfall,</if>
<if test="roadSurfaceStatus != null">road_surface_status,</if>
<if test="waterFilmThickness != null">water_film_thickness,</if>
update_time
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="iotDeviceId != null">#{iotDeviceId},</if>
<if test="temperature != null">#{temperature},</if>
<if test="humidity != null">#{humidity},</if>
<if test="precipitationType != null">#{precipitationType},</if>
<if test="rainfall != null">#{rainfall},</if>
<if test="roadSurfaceStatus != null">#{roadSurfaceStatus},</if>
<if test="waterFilmThickness != null">#{waterFilmThickness},</if>
current_date
</trim>
</insert>
<update id="updateIntermediateWarehouseData" parameterType="DcMeteorologicalDetectorData">
update meteorological_detector_data
<trim prefix="SET" suffixOverrides=",">
<if test="temperature != null">temperature = #{temperature},</if>
<if test="humidity != null">humidity = #{humidity},</if>
<if test="precipitationType != null">precipitation_type = #{precipitationType},</if>
<if test="rainfall != null">rainfall = #{rainfall},</if>
<if test="roadSurfaceStatus != null">road_surface_status = #{roadSurfaceStatus},</if>
<if test="waterFilmThickness != null">water_film_thickness = #{waterFilmThickness},</if>
update_time = current_date
</trim>
where device_id = #{iotDeviceId}
</update>
<delete id="deleteDcMeteorologicalDetectorDataById" parameterType="Long">
delete from dc_meteorological_detector_data where id = #{id}
</delete>
<delete id="deleteDcMeteorologicalDetectorDataByIds" parameterType="String">
delete from dc_meteorological_detector_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>