<?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.WorkFileLogDao">
|
|
<!-- mapper不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 -->
|
<sql id="workDetailLogConditionSql">
|
<if test="wrk_no!=null and wrk_no!='' ">
|
and wrk_no = #{wrk_no}
|
</if>
|
<if test="io_time!=null and io_time!='' ">
|
and io_time = #{io_time}
|
</if>
|
<if test="matnr!=null and matnr!='' ">
|
and (a.matnr like '%' + #{matnr} + '%'
|
or maktx like '%' + #{matnr} + '%'
|
or lgnum like '%' + #{matnr} + '%'
|
or tbnum like '%' + #{matnr} + '%'
|
or tbpos like '%' + #{matnr} + '%'
|
or zmatid like '%' + #{matnr} + '%'
|
or werks like '%' + #{matnr} + '%'
|
or anfme like '%' + #{matnr} + '%'
|
or altme like '%' + #{matnr} + '%'
|
or zpallet like '%' + #{matnr} + '%'
|
or bname like '%' + #{matnr} + '%'
|
)
|
</if>
|
</sql>
|
|
<select id="queryWorkDetailLogList" parameterType="com.slcf.bean.WorkDetailLogCondition" resultType="com.slcf.pojo.WorkDetailLogBean">
|
select * from (
|
select a.*,ROW_NUMBER() OVER(Order by wrk_no,a.matnr) as rowid
|
from asr_wrk_detl_log a
|
<where>
|
1=1
|
<include refid="workDetailLogConditionSql"></include>
|
</where>
|
) as a
|
<where>
|
rowid between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
|
<![CDATA[
|
order by a.wrk_no,a.matnr asc
|
]]>
|
</where>
|
</select>
|
|
<select id="getWorkDetailLogCount" parameterType="com.slcf.bean.WorkDetailLogCondition" resultType="Integer">
|
select count(1) from asr_wrk_detl_log a
|
<where>
|
<![CDATA[
|
1=1
|
]]>
|
<include refid="workDetailLogConditionSql"></include>
|
</where>
|
</select>
|
</mapper>
|