<?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.LoadStatusMapper">
	<select id="findOtherLoadStatus" parameterType="java.lang.String" resultType="com.huatek.busi.entity.LoadStatus">
	SELECT
		t.transformer_id as transformerId,
		t.equipment_id as equipmentId,
		tt.stype as stype,
		tt.record_date as recordDate,
		tt.start_time as startTime,
		tt.stop_time as stopTime
	FROM `busi_equipment_relationship` t
	LEFT JOIN iec_bydwork_param tt on t.transformer_id = tt.eqm_code
	WHERE
	equipment_id = #{equipmentId}
	order by tt.record_date desc limit 1
	</select>
	<select id="findTransformerLoadStatus" parameterType="java.lang.String" resultType="com.huatek.busi.entity.LoadStatus">
	SELECT
		eqm_code as eqmCode,
		stype as stype,
		record_date as recordDate,
		start_time as startTime,
		stop_time as stopTime
	FROM  iec_bydwork_param
	WHERE
	eqm_code = #{eqmCode}
	order by record_date desc limit 1
	</select>

</mapper>