自动化立体仓库 - WMS系统
zc
2024-09-03 b196900d48deefb0129e28df0a842fadc3d6bff1
src/main/resources/mapper/LocDetlMapper.xml
@@ -80,6 +80,14 @@
        <include refid="batchSeq"></include>
    </select>
    <select id="selectItem2" resultMap="BaseResultMap">
        select top 1 *
        from asr_loc_detl
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
    </select>
    <delete id="deleteItem">
        delete from asr_loc_detl
        where 1=1
@@ -107,6 +115,9 @@
        </if>
        <if test="maktx!=null and maktx!='' ">
            and a.maktx like '%' + #{maktx} + '%'
        </if>
        <if test="model!=null and model!='' ">
            and a.model like '%' + #{model} + '%'
        </if>
        <if test="anfme!=null and anfme!='' ">
            and a.anfme like '%' + #{anfme} + '%'
@@ -233,25 +244,41 @@
        where 1=1
        and b.loc_sts = 'F'
<!--        <choose>-->
<!--            <when test="batch != null and batch != ''">-->
<!--                and a.batch = #{batch}-->
<!--            </when>-->
<!--            <otherwise>-->
<!--                and (a.batch IS NULL OR a.batch = '')-->
<!--            </otherwise>-->
<!--        </choose>-->
        <!--        <choose>-->
        <!--            <when test="batch != null and batch != ''">-->
        <!--                and a.batch = #{batch}-->
        <!--            </when>-->
        <!--            <otherwise>-->
        <!--                and (a.batch IS NULL OR a.batch = '')-->
        <!--            </otherwise>-->
        <!--        </choose>-->
        <if test="sPgNO != null and sPgNO != ''">
            and a.pg_no = #{sPgNO}
        </if>
        <if test="batch != null and batch != ''">
            and a.batch = #{batch}
        </if>
        <if test="orderNo != null and orderNo != ''">
            and a.order_no = #{orderNo}
        <!--        <choose>-->
        <!--            <when test="batch != null and batch != ''">-->
        <!--                and batch = #{batch}-->
        <!--            </when>-->
        <!--            <otherwise>-->
        <!--                and (batch IS NULL OR batch = '')-->
        <!--            </otherwise>-->
        <!--        </choose>-->
        <!--        <if test="orderNo != null and orderNo != ''">-->
        <!--            and a.order_no = #{orderNo}-->
        <!--        </if>-->
        <if test="matnr != null and matnr != ''">
            and a.matnr = #{matnr}
            and (a.pg_no is null or LEN(LTRIM(RTRIM(pg_no))) = 0)
        </if>
        <if test="locNos != null and locNos.size > 0">
            and b.loc_no not in
            <foreach item="item" collection="locNos" index="index"  separator="," open="(" close=")">
            <foreach item="item" collection="locNos" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>
        </if>
@@ -457,6 +484,9 @@
        <if test="matnr != null and matnr != ''">
            AND matnr like '%' +  #{matnr}+ '%'
        </if>
        <if test="model != null and model != ''">
            AND model like '%' +  #{model}+ '%'
        </if>
        <if test="maktx != null and maktx != ''">
            AND maktx like '%' + #{maktx}+ '%'
        </if>
@@ -483,6 +513,9 @@
        <if test="matnr != null and matnr != ''">
            AND matnr like '%' +  #{matnr}+ '%'
        </if>
        <if test="model != null and model != ''">
            AND model like '%' +  #{model}+ '%'
        </if>
        <if test="maktx != null and maktx != ''">
            AND maktx like '%' + #{maktx}+ '%'
        </if>