自动化立体仓库 - WMS系统
zjj
2023-06-12 f42daa4afb23949f718bcbc3c78ae0ec4079adb0
src/main/resources/mapper/LocDetlMapper.xml
@@ -499,6 +499,61 @@
        end
        desc
    </select>
    <sql id="selectAllSql">
        <if test="locNo!=null and locNo!='' ">
            and t.loc_no like '%' + #{locNo} + '%'
        </if>
        <if test="matnr != null and matnr !='' ">
            and t.matnr like '%' + #{matnr} + '%'
        </if>
        <if test="owner != null and owner !='' ">
            and t.owner like '%' + #{owner} + '%'
        </if>
    </sql>
    <select id="selectAllOwner" resultType="com.zy.asrs.entity.result.LocDetlAll" parameterType="com.zy.asrs.entity.result.LocDetlDTO">
        SELECT * FROM (
            SELECT ROW_NUMBER() over(order by matnr) as row,* FROM (
                  SELECT * FROM asr_loc_detl_all
                 ) t
                WHERE 1=1
                <include refid="selectAllSql"></include>
             ) a
        WHERE a.row BETWEEN ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
    <select id="selectAllCount" resultType="java.lang.Integer" parameterType="com.zy.asrs.entity.result.LocDetlDTO">
        SELECT count(*) FROM (
            SELECT ROW_NUMBER() over(order by matnr) as row,* FROM (
                   SELECT * FROM asr_loc_detl_all
                    ) t
                    WHERE 1=1
                    <include refid="selectAllSql"></include>
                    ) a
    </select>
    <select id="selectAllPyment" resultType="com.zy.asrs.entity.result.LocDetlAll" parameterType="com.zy.asrs.entity.result.LocDetlDTO">
        SELECT * FROM (
        SELECT ROW_NUMBER() over(order by matnr) as row,* FROM (
        SELECT * FROM asr_loc_detl_all
        ) t
        WHERE 1=1 and t.payment = 0
        <include refid="selectAllSql"></include>
        ) a
        WHERE a.row BETWEEN ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
    <select id="selectAllPymentcount" resultType="java.lang.Integer" parameterType="com.zy.asrs.entity.result.LocDetlDTO">
        SELECT count(*) FROM (
        SELECT ROW_NUMBER() over(order by matnr) as row,* FROM (
        SELECT * FROM asr_loc_detl_all
        ) t
        WHERE 1=1 and t.payment = 0
        <include refid="selectAllSql"></include>
        ) a
    </select>
</mapper>