自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-24 b421f805b88a71b29c44d803e7661c2b8d486a18
src/main/resources/mapper/LocDetlMapper.xml
@@ -21,10 +21,30 @@
        <result column="modi_time" property="modiTime" />
        <result column="appe_user" property="appeUser" />
        <result column="appe_time" property="appeTime" />
    </resultMap>
    <select id="getStockOutPage" parameterType="java.util.Map" resultMap="BaseResultMap">
    <sql id="stockOutCondition">
        <if test="loc_no!=null and loc_no!='' ">
            and a.loc_no like '%' + #{loc_no} + '%'
        </if>
        <if test="matnr!=null and matnr!='' ">
            and a.matnr like '%' + #{matnr} + '%'
        </if>
        <if test="maktx!=null and maktx!='' ">
            and a.maktx like '%' + #{maktx} + '%'
        </if>
        <if test="anfme!=null and anfme!='' ">
            and a.anfme like '%' + #{anfme} + '%'
        </if>
        <if test="altme!=null and altme!='' ">
            and a.altme like '%' + #{altme} + '%'
        </if>
        <if test="startTime!=null and endTime!=null">
            and a.modi_time between #{startTime} and #{endTime}
        </if>
    </sql>
    <select id="getStockOutPage" resultMap="BaseResultMap">
        select * from
        (
            select
@@ -34,9 +54,7 @@
            left join asr_loc_mast b on a.loc_no = b.loc_no
            where 1=1
            and b.loc_type = 'F'
            <if test="loc_no!=null and loc_no!='' ">
                and a.loc_no like '%' + #{loc_no} + '%'
            </if>
            <include refid="stockOutCondition"></include>
        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
@@ -47,5 +65,6 @@
        left join asr_loc_mast b on a.loc_no = b.loc_no
        where 1=1
        and b.loc_type = 'F'
        <include refid="stockOutCondition"></include>
    </select>
</mapper>