<?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.BasAgvLocDetlMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasAgvLocDetl">
|
<result column="loc_no" property="locNo" />
|
<result column="zpallet" property="zpallet" />
|
<result column="anfme" property="anfme" />
|
<result column="matnr" property="matnr" />
|
<result column="maktx" property="maktx" />
|
<result column="batch" property="batch" />
|
<result column="order_no" property="orderNo" />
|
<result column="specs" property="specs" />
|
<result column="model" property="model" />
|
<result column="color" property="color" />
|
<result column="brand" property="brand" />
|
<result column="unit" property="unit" />
|
<result column="price" property="price" />
|
<result column="sku" property="sku" />
|
<result column="units" property="units" />
|
<result column="barcode" property="barcode" />
|
<result column="origin" property="origin" />
|
<result column="manu" property="manu" />
|
<result column="manu_date" property="manuDate" />
|
<result column="item_num" property="itemNum" />
|
<result column="safe_qty" property="safeQty" />
|
<result column="weight" property="weight" />
|
<result column="man_length" property="manLength" />
|
<result column="volume" property="volume" />
|
<result column="three_code" property="threeCode" />
|
<result column="supp" property="supp" />
|
<result column="supp_code" property="suppCode" />
|
<result column="be_batch" property="beBatch" />
|
<result column="dead_time" property="deadTime" />
|
<result column="dead_warn" property="deadWarn" />
|
<result column="source" property="source" />
|
<result column="inspect" property="inspect" />
|
<result column="danger" property="danger" />
|
<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="memo" property="memo" />
|
<result column="store_date" property="storeDate" />
|
<result column="owner" property="owner" />
|
<result column="frozen" property="frozen" />
|
<result column="standby1" property="standby1" />
|
<result column="standby2" property="standby2" />
|
<result column="standby3" property="standby3" />
|
<result column="box_type1" property="boxType1" />
|
<result column="box_type2" property="boxType2" />
|
<result column="box_type3" property="boxType3" />
|
|
</resultMap>
|
<sql id="batchSeq">
|
<choose>
|
<when test="batch != null and batch != ''">
|
and d.batch = #{batch}
|
</when>
|
<otherwise>
|
and (d.batch IS NULL OR d.batch = '')
|
</otherwise>
|
</choose>
|
<choose>
|
<when test="brand != null and brand != ''">
|
and d.brand = #{brand}
|
</when>
|
<otherwise>
|
and (d.brand IS NULL OR d.brand = '')
|
</otherwise>
|
</choose>
|
<choose>
|
<when test="standby1 != null and standby1 != ''">
|
and d.standby1 = #{standby1}
|
</when>
|
<otherwise>
|
and (d.standby1 IS NULL OR d.standby1 = '')
|
</otherwise>
|
</choose>
|
<choose>
|
<when test="standby2 != null and standby2 != ''">
|
and d.standby2 = #{standby2}
|
</when>
|
<otherwise>
|
and (d.standby2 IS NULL OR d.standby2 = '')
|
</otherwise>
|
</choose>
|
<choose>
|
<when test="standby3 != null and standby3 != ''">
|
and d.standby3 = #{standby3}
|
</when>
|
<otherwise>
|
and (d.standby3 IS NULL OR d.standby3 = '')
|
</otherwise>
|
</choose>
|
<choose>
|
<when test="boxType1 != null and boxType1 != ''">
|
and d.box_type1 = #{boxType1}
|
</when>
|
<otherwise>
|
and (d.box_type1 IS NULL OR d.box_type1 = '')
|
</otherwise>
|
</choose>
|
<choose>
|
<when test="boxType2 != null and boxType2 != ''">
|
and d.box_type2 = #{boxType2}
|
</when>
|
<otherwise>
|
and (d.box_type2 IS NULL OR d.box_type2 = '')
|
</otherwise>
|
</choose>
|
<choose>
|
<when test="boxType3 != null and boxType3 != ''">
|
and d.box_type3 = #{boxType3}
|
</when>
|
<otherwise>
|
and (d.box_type3 IS NULL OR d.box_type3 = '')
|
</otherwise>
|
</choose>
|
</sql>
|
<select id="selectItem" resultMap="BaseResultMap">
|
select top 1 *
|
from asr_loc_detl d
|
where 1=1
|
and loc_no = #{locNo}
|
and matnr = #{matnr}
|
<include refid="batchSeq"></include>
|
</select>
|
</mapper>
|