<?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.zy.ints.mapper.WaitMatoutMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.zy.ints.entity.WaitMatout">
|
<result column="bill_no" property="billNo" />
|
<result column="seq_no" property="seqNo" />
|
<result column="bill_type" property="billType" />
|
<result column="mat_no" property="matNo" />
|
<result column="mat_name" property="matName" />
|
<result column="qty" property="qty" />
|
<result column="specs" property="specs" />
|
<result column="unit" property="unit" />
|
<result column="size" property="size" />
|
<result column="color" property="color" />
|
<result column="weight" property="weight" />
|
<result column="memo" property="memo" />
|
<result column="out_qty" property="outQty" />
|
<result column="link_erp" property="linkErp" />
|
<result column="io_status" property="ioStatus" />
|
<result column="io_time" property="ioTime" />
|
<result column="modi_user" property="modiUser" />
|
<result column="modi_time" property="modiTime" />
|
<result column="appe_user" property="appeUser" />
|
<result column="appe_time" property="appeTime" />
|
|
</resultMap>
|
|
<sql id="condition">
|
<if test="bill_no!=null and bill_no!='' ">
|
and bill_no like '%' + #{bill_no} + '%'
|
</if>
|
<if test="bill_type!=null and bill_type!='' ">
|
and bill_type like '%' + #{bill_type} + '%'
|
</if>
|
<if test="mat_name!=null and mat_name!='' ">
|
and a.mat_name like '%' + #{mat_name} + '%'
|
</if>
|
<if test="qty!=null and qty!='' ">
|
and a.qty = #{qty}
|
</if>
|
<if test="altme!=null and altme!='' ">
|
and a.unit like '%' + #{unit} + '%'
|
</if>
|
<if test="startTime!=null and endTime!=null">
|
and appe_time between #{startTime} and #{endTime}
|
</if>
|
</sql>
|
|
|
<select id="getHeadPage" resultMap="BaseResultMap">
|
select * from
|
(
|
select *,
|
ROW_NUMBER() over (order by appe_time desc) as row
|
from (
|
select distinct bill_no, bill_type, appe_time
|
from ints_wait_matout
|
where 1=1
|
<include refid="condition"></include>
|
) r
|
) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
|
</select>
|
<select id="getHeadPageCount" parameterType="java.util.Map" resultType="integer">
|
select count(1) from
|
(
|
select *,
|
ROW_NUMBER() over (order by appe_time desc) as row
|
from (
|
select distinct bill_no, bill_type, appe_time
|
from ints_wait_matout
|
where 1=1
|
<include refid="condition"></include>
|
) r
|
) t
|
</select>
|
<select id="selectWaitMatOutBySts" resultMap="BaseResultMap">
|
select * from ints_wait_matout
|
where io_status=2
|
order by modi_time,mat_no asc
|
</select>
|
|
</mapper>
|