<?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.shkj.wms.mapper.BasePointDeviceMapper">

    <select id="selectBasePointByGroupno" resultType="com.shkj.wms.bo.BasePointDeviceQueryBo" parameterType="com.shkj.wms.vo.BasePointDeviceVo">
        select point_no,point_name,tunnel,dev_code from base_point point
        inner join base_point_group pointGroup on point.point_group=pointGroup.id where is_active ='1' and ifnull(is_occupy,'0')='0'
        <if test="groupNo !=null and groupNo !=''  ">
        and pointGroup.group_no =#{groupNo}
        </if>

        <if test="tunnel !=null and tunnel !=''  ">
            and point.tunnel =#{tunnel}
        </if>
        limit 1
    </select>

</mapper>
