<?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.yeejoin.amos.boot.module.ccs.api.mapper.FireBuildingMapper">
 <select id="getFireBuildingByMridIntreeMrids" resultType="com.yeejoin.amos.boot.module.ccs.api.dto.FireBuildingDto">
 	SELECT
		*
	FROM
		`ast_fire_building`
	WHERE
		type = 'building'
	AND find_in_set(#{mrid}, tree_mrids)
 </select>



	<select id="queryFloorRoom" resultType="java.util.Map">
		SELECT
			afb.*
		FROM ast_fire_building afb
		WHERE afb.parent_mrid = #{parentMrid,jdbcType=VARCHAR}
	</select>


<!-- <select id="queryFloorRoom" resultType="java.util.Map">-->
<!--	 SELECT-->
<!--		 	afb.id,-->
<!--			afb.station_code as stationCode,-->
<!--		 	afb.station_name as stationName,-->
<!--         	afb.mrid as code,-->
<!--         	afb.name as `name`,-->
<!--         	afb.classify as buildType,-->
<!--         	afb.floor_number,-->
<!--         	afb.equipment_number as equipmentNumber,-->
<!--         	afb.parent_mrid as parentMrid,-->
<!--         	afb.tree_mrids as treeMrids,-->
<!--         	afb.type,-->
<!--		 	afb.position as address,-->
<!--			afb.photo_url as photoUrl,-->
<!--			afb.area as area,-->
<!--			afb.build_date as buildDate,-->
<!--			afb.structure_type as structureType,-->
<!--			afb.fire_risk as fireRisk,-->
<!--			afb.fire_resistance_level as fireResistanceLevel,-->
<!--			afb.height as height,-->
<!--			afb.floor_area as floorArea,-->
<!--			afb.duty_user as dutyUser,-->
<!--			afb.duty_user_phone as dutyUserPhone,-->
<!--		 	afb.fire_road_photo as fireRoadPhoto,-->
<!--			afb.build_3photo as build3photo,-->
<!--			afb.build_photo as buildPhoto-->
<!--	 FROM ast_fire_building afb-->
<!--	 WHERE afb.mrid = #{parentMrid,jdbcType=VARCHAR}-->
<!--	</select>-->
</mapper>
