<?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.GisHomePageMapper">
	
	<select id="findHeaderInfoById" resultType="com.huatek.busi.vo.HeaderInfoVo" parameterType="string">
		SELECT
		a.abort_current AS current,
		a.abort_voltage AS voltage,
		CAST((a.abort_current/(b.electric_current*10)) AS decimal(20, 4))AS loadRate
		FROM
		iec_breaker_param a
		LEFT JOIN busi_offline_gis_brand b ON b.main_equipment_id = a.eqm_code
		WHERE
		a.eqm_code = #{mainTreeId}
		ORDER BY
		d_time DESC
		LIMIT 1
	</select>
	
</mapper>