自动化立体仓库 - WMS系统
Junjie
2023-05-12 fd1bfa1163d438ec6cabfdd6e01e632d31189c80
src/main/resources/mapper/LocMastMapper.xml
@@ -156,4 +156,45 @@
    <select id="selectLocByLev" resultMap="BaseResultMap">
        SELECT * FROM asr_loc_mast WHERE lev1 = #{lev}
    </select>
    <select id="queryFreeLocMast2" resultMap="BaseResultMap">
        select *
        from asr_loc_mast
        where 1=1
        and loc_sts='O'
        <if test="locType1 != null">
            and loc_type1 = #{locType1}
        </if>
        <if test="rowBeg != null">
            and row1 >= #{rowBeg}
        </if>
        <if test="rowEnd != null">
            and row1 &lt;= #{rowEnd}
        </if>
        <if test="bayBeg != null">
            and bay1 >= #{bayBeg}
        </if>
        <if test="bayEnd != null">
            and bay1 &lt;= #{bayEnd}
        </if>
        <if test="levBeg != null">
            and lev1 >= #{levBeg}
        </if>
        <if test="levEnd != null">
            and lev1 &lt;= #{levEnd}
        </if>
        and loc_no not in ('0100101')
        order by loc_sts desc ,lev1 asc,bay1 asc
    </select>
    <select id="selectEmptyByLocNos" resultMap="BaseResultMap">
        SELECT * FROM asr_loc_mast
        WHERE loc_sts IN ('O')
        AND loc_no IN
        <foreach collection="locNos" item="loc" index="index" open="(" close=")" separator=",">
            #{loc}
        </foreach>
        ORDER BY
        row1 ASC
    </select>
</mapper>