自动化立体仓库 - WMS系统
123
zhangchao
2024-09-03 55470b5fa4880dd7ac7838792cdf4ad4aaa7b0c3
src/main/resources/mapper/LocDetlMapper.xml
@@ -236,32 +236,45 @@
        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}-->
<!--        </if>-->
        <choose>
            <when test="sPgNO != null and sPgNO != ''">
                and a.pg_no = #{sPgNO}
            </when>
            <otherwise>
                and (pg_no IS NULL OR pg_no = '')
            </otherwise>
        </choose>
                <if test="batch != null and batch != ''">
                    and a.batch = #{batch}
                </if>
<!--        <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="model != null and model != ''">
            and a.model = #{model}
          and (a.pg_no is null or LEN(LTRIM(RTRIM(pg_no))) = 0)
            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>