自动化立体仓库 - 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
@@ -236,14 +244,15 @@
        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}
@@ -251,17 +260,25 @@
        <if test="batch != null and batch != ''">
            and a.batch = #{batch}
        </if>
<!--        <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 LENGTH(TRIM(pg_no)) = 0)
        <!--        <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>