| <?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.zy.asrs.mapper.BasDevpMapper"> | 
|   | 
|     <!-- 通用查询映射结果 --> | 
|     <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasDevp"> | 
|         <id column="dev_no" property="devNo" /> | 
|         <result column="dec_desc" property="decDesc" /> | 
|         <result column="dev_mk" property="devMk" /> | 
|         <result column="in_enable" property="inEnable" /> | 
|         <result column="out_enable" property="outEnable" /> | 
|         <result column="autoing" property="autoing" /> | 
|         <result column="loading" property="loading" /> | 
|         <result column="canining" property="canining" /> | 
|         <result column="canouting" property="canouting" /> | 
|         <result column="fronting" property="fronting" /> | 
|         <result column="rearing" property="rearing" /> | 
|         <result column="uping" property="uping" /> | 
|         <result column="downing" property="downing" /> | 
|         <result column="inreq1" property="inreq1" /> | 
|         <result column="inreq2" property="inreq2" /> | 
|         <result column="wrk_no" property="wrkNo" /> | 
|         <result column="wrk_no1" property="wrkNo1" /> | 
|         <result column="ctn_type" property="ctnType" /> | 
|         <result column="barcode" property="barcode" /> | 
|         <result column="in_qty" property="inQty" /> | 
|         <result column="row1" property="row1" /> | 
|         <result column="io_time" property="ioTime" /> | 
|         <result column="area" property="area" /> | 
|         <result column="in_ok" property="inOk" /> | 
|         <result column="out_ok" property="outOk" /> | 
|         <result column="loc_type1" property="locType1" /> | 
|         <result column="loc_type2" property="locType2" /> | 
|         <result column="loc_type3" property="locType3" /> | 
|         <result column="modi_user" property="modiUser" /> | 
|         <result column="modi_time" property="modiTime" /> | 
|         <result column="appe_user" property="appeUser" /> | 
|         <result column="appe_time" property="appeTime" /> | 
|         <result column="std_qty" property="stdQty" /> | 
|         <result column="min_wt" property="minWt" /> | 
|         <result column="max_wt" property="maxWt" /> | 
|         <result column="gross_wt" property="grossWt" /> | 
|         <result column="cart_pos" property="cartPos" /> | 
|         <result column="qr_code_value" property="qrCodeValue" /> | 
|         <result column="loc_no" property="locNo" /> | 
|         <result column="lev" property="lev" /> | 
|         <result column="lift_no" property="liftNo" /> | 
|   | 
|     </resultMap> | 
|   | 
|     <select id="getAvailableInSite" resultType="java.lang.Integer"> | 
|         select | 
|         abd.dev_no | 
|         from asr_bas_devp abd | 
|         left join asr_sta_desc asd on abd.dev_no = asd.stn_no | 
|         where 1=1 | 
|         and asd.type_no = #{typeNo} | 
|         and abd.in_enable = 'Y' | 
|         group by abd.dev_no | 
|     </select> | 
|   | 
|     <select id="getAvailableOutSite" resultType="java.lang.Integer"> | 
|         select | 
|         abd.dev_no | 
|         from asr_bas_devp abd | 
|         left join asr_sta_desc asd on abd.dev_no = asd.stn_no | 
|         where 1=1 | 
|         and asd.type_no = #{typeNo} | 
|         and abd.out_enable = 'Y' | 
|         group by abd.dev_no | 
|     </select> | 
|   | 
|     <select id="selectByWrkNo" resultMap="BaseResultMap"> | 
|         select top 1 * | 
|         from asr_bas_devp | 
|         where 1=1 | 
|         and wrk_no = #{wrkNo} | 
|     </select> | 
|   | 
|     <select id="queryByLocNo" resultMap="BaseResultMap"> | 
|         select top 1 * | 
|         from asr_bas_devp | 
|         where 1=1 | 
|         and loc_no = #{locNo} | 
|     </select> | 
|   | 
|     <select id="queryByQrCode" resultMap="BaseResultMap"> | 
|         select top 1 * | 
|         from asr_bas_devp | 
|         where 1=1 | 
|         and qr_code_value = #{qrCodeValue} | 
|     </select> | 
|   | 
|     <select id="selectLevSite" resultMap="BaseResultMap"> | 
|         select * | 
|         from asr_bas_devp | 
|         where 1=1 | 
|         and dev_no in ('105','106','107','108') | 
|     </select> | 
|   | 
|     <select id="selectHasLiftNoByLev" resultMap="BaseResultMap"> | 
|         select * | 
|         from asr_bas_devp | 
|         where 1=1 | 
|         and lev = #{lev} | 
|         and lift_no is not null | 
|     </select> | 
|   | 
|     <select id="selectByLevAndLiftNo" resultMap="BaseResultMap"> | 
|         select * | 
|         from asr_bas_devp | 
|         where 1=1 | 
|         and lev = #{lev} | 
|         and lift_no = #{liftNo} | 
|     </select> | 
| </mapper> |