<?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.huatek.busi.mapper.TransformerMeteorologicalStatisticsMapper">

	<sql id="Base_Column_List">
		id as id,
		cac_monitor_type_code as cacMonitorTypeCode,
		site_id as siteId,
		sensor_id as sensorId,
		main_tree_id as mainTreeId,
		sub_tree_id as subTreeId,
		d_time as dTime,
		avg_air_temperature as
		avgAirTemperature,
		avg_air_pressure as avgAirPressure,
		avg_humidity as
		avgHumidity,
		avg_precipitation as avgPrecipitation,
		avg_precipitation_intensity as avgPrecipitationIntensity,
		avg_radiation_intensity as avgRadiationIntensity,
		create_time as
		createTime,
		load_rate as loadRate
	</sql>

	<delete id="deleteItem">
		delete from transformer_meteorological_statistics 
		where sensor_id = #{sensorCode} and d_time = #{day} and cac_monitor_type_code = #{cacMonitorTypeCode}
	</delete>

	<select id="selectStatistics" resultType="com.huatek.busi.vo.epa.TemperatureEvaluateDataVo">
		SELECT
		   avg_air_temperature  AS temperature,
		   d_time as dTime
		FROM
			transformer_meteorological_statistics t
		WHERE
			t.main_tree_id = #{mainTreeId}
		AND
			t.d_time &gt; #{startDate}
		AND
			t.d_time &lt; #{endDate}
	</select>


</mapper>