自动化立体仓库 - WMS系统
野心家
2023-05-06 6c31225fe42d32b936c5f38507c960e47e2dd106
src/main/resources/mapper/ManLocDetlMapper.xml
@@ -313,4 +313,48 @@
        where node_id = #{nodeId} ;
    </update>
    <select id="selectInventory" resultMap="BaseResultMap">
        select top 1 * from man_loc_detl
        where loc_no=#{LocNo}
        and 1=1
        and matnr=#{Matnr}
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </select>
    <delete id="deleteDatailed">
        delete from man_loc_detl
        where loc_no = #{locNo}
        and matnr = #{matnr}
        <choose>
            <when test="batch != null and batch != ''">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </delete>
    <update id="increase">
        update man_loc_detl
        set  anfme= #{anfme}
        , modi_time = getdate()
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
        <choose>
            <when test="batch != null and batch!=''  ">
                and batch = #{batch}
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
    </update>
</mapper>