自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-03-29 f94e75b6390118e170ce573dc1fc9780d0176a52
src/main/resources/mapper/LocDetlMapper.xml
@@ -26,13 +26,7 @@
        <result column="appe_time" property="appeTime" />
    </resultMap>
    <select id="selectItem" resultMap="BaseResultMap">
        select top 1 *
        from asr_loc_detl
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
    <sql id="batchSeq">
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
@@ -41,8 +35,35 @@
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </sql>
    <select id="selectItem" resultMap="BaseResultMap">
        select top 1 *
        from asr_loc_detl
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
        <include refid="batchSeq"></include>
    </select>
    <delete id="deleteItem">
        delete from asr_loc_detl
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
        <include refid="batchSeq"></include>
    </delete>
    <update id="updateAnfme">
        update asr_loc_detl
        set anfme = #{anfme}
        , modi_time = getdate()
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
        <include refid="batchSeq"></include>
    </update>
    <sql id="stockOutCondition">
        <if test="loc_no!=null and loc_no!='' ">
            and a.loc_no like '%' + #{loc_no} + '%'