<?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.foreverwin.pms.mapper.EquipMapper">

    <select id="selectBySiteType" resultType="com.foreverwin.mesnac.equip.model.Equip">
        SELECT R.*
        FROM RESRCE R
        INNER JOIN Z_PMS_EQUIP_TYPE_EQUIP  ETE
        ON R.HANDLE = ETE.EQUIP_BO
        INNER JOIN Z_PMS_EQUIP_TYPE ET
        ON ET.HANDLE = ETE.EQUIP_TYPE_BO
        WHERE R.SITE = #{site} AND ET.SITE = #{site} AND ET.EQUIP_TYPE = #{type}
    </select>
</mapper>