<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.slcf.dao.ReportQueryDao">
|
|
<!-- mapper不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 -->
|
<sql id="viewLocMapConditionSql">
|
<if test="row1!=null and row1!='' ">
|
and left(rowlev,2) like '%' + #{row1} + '%'
|
</if>
|
</sql>
|
|
<!-- 入库统计 -->
|
<!-- 分页查询所有信息 -->
|
<select id="queryViewLocMapList" parameterType="com.slcf.pojo.ViewLocMapBean" resultType="com.slcf.pojo.ViewLocMapBean">
|
select top (#{pageSize}) * from asr_loc_map_view
|
<where>
|
rowlev not in (select top ((#{pageNumber}-1)*#{pageSize}) rowlev from asr_loc_map_view
|
<where>
|
1=1
|
<include refid="viewLocMapConditionSql"></include>
|
</where>
|
order by rowlev asc)
|
<include refid="viewLocMapConditionSql"></include>
|
<![CDATA[
|
order by rowlev asc
|
]]>
|
</where>
|
</select>
|
|
<select id="getViewLocMapCount" parameterType="com.slcf.pojo.ViewLocMapBean" resultType="Integer">
|
select count(1) from asr_loc_map_view a
|
<where>
|
<![CDATA[
|
1=1
|
]]>
|
<include refid="viewLocMapConditionSql"></include>
|
</where>
|
</select>
|
|
</mapper>
|