<?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.RptTemperChartsMapper">

	<sql id="Base_Column_List">
		id as id,
		site_id as siteId,
		main_tree_id as mainTreeId,
		main_equipment_id as mainEquipmentId,
		box_temper as boxTemper,
		box_sensor_id as boxSensorId,
		box_outside_temper as boxOutsideTemper,
		box_outside_sensor_id as boxOutsideSensorId,
		ai_temper as aiTemper,
		ai_sensor_id as aiSensorId,
		ao_temper as aoTemper,
		ao_sensor_id as aoSensorId,
		bi_temper as biTemper,
		bi_sensor_id as biSensorId,
		bo_temper as boTemper,
		bo_sensor_id as boSensorId,
		ci_temper as ciTemper,
		ci_sensor_id as ciSensorId,
		co_temper as coTemper,
		co_sensor_id as coSensorId,
		hz_time as hzTime,
		create_time as createTime
	</sql>

	<select id="getRptTemperCharts" resultType="com.huatek.busi.entity.RptTemperCharts">
		select
			<include refid="Base_Column_List"/>
		from
			rpt_temper_charts t
		where
			t.main_tree_id = #{mainTreeId} and t.hz_time = #{day}
		limit 1
	</select>
</mapper>