<?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.fas.business.dao.mapper.FireCarMapper">
	<!--统计-->
	<!-- <select id="countPageData" resultType="long">
		SELECT
		count(1) AS total_num
		FROM
		f_fire_car a
	<trim prefix="WHERE" prefixOverrides="AND ">
		<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%")</if>
	</trim> 
	</select>-->
	<!--分页查询 -->
	<!-- <select id="getFireCarPage" resultType="java.util.HashMap">
	
		SELECT
			a.id,
			a.dept_id,
			a.type,
			a.name,
			a.car_num as carNum,
			a.engine_num as engineNum,
			a.model,
			a.country,
			a.state,
			a.remark,
			a.create_by createBy,
			date_format(a.create_date , '%Y-%m-%d %H:%i:%s') as createDate,
            a.performance_index AS performanceIndex,
            a.floor3d,
            a.org_code AS orgCode,
            a.position3d,
            a.photo_path AS photoPath,
            rs.name riskSourceName
		FROM
		f_fire_car a
		LEFT JOIN f_risk_source rs on rs.id = a.risk_source_id
	<trim prefix="WHERE" prefixOverrides="AND ">
		<if test="name!=null"> and (a.name like concat(concat("%",#{name}),"%") or a.type like concat(concat("%",#{name}),"%"))</if>
	</trim>
		order by a.id desc
		<choose>
	     <when test="pageSize==-1"></when>
	     <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>  
	    </choose> 
	</select>-->
	<!-- 
	<select id="getFireCarDetailById" resultType="com.yeejoin.amos.fas.business.vo.FireCarDetailVo">
	   SELECT
		    a.id,
		    a.dept_id,
		    a.type,
		    a. NAME,
		    a.car_num AS carNum,
		    a.engine_num AS engineNum,
		    a.model,
		    a.country,
		    a.state,
		    a.remark,
		    a.create_by createBy,
		    date_format(
		        a.create_date,
		        '%Y-%m-%d %H:%i:%s'
		    ) AS createDate,
		    a.performance_index AS performanceIndex,
		    a.floor3d,
		    a.is_indoor as isIndoor,
		    a.org_code AS orgCode,
		    a.position3d,
		    a.ue4_rotation as ue4Rotation,
		    a.ue4_location as ue4Location,
            a.photo_path AS photoPath,
            a.risk_source_id as riskSourceId
		FROM
		    f_fire_car a
		WHERE 1=1
		<if test="truckId!=null"> AND a.id = #{truckId}</if>
	</select> -->
</mapper>