| | |
| | | <!-- 明细视图B的通用查询映射结果 --> |
| | | <resultMap id="PakoutDetailResultMap" type="com.zy.asrs.entity.result.OrderPakoutDetailVo"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="row" property="row" jdbcType="BIGINT"/> |
| | | <result column="item_name" property="itemName" jdbcType="VARCHAR"/> |
| | | <result column="matnr" property="matnr" jdbcType="VARCHAR"/> |
| | | <result column="batch" property="batch" jdbcType="VARCHAR"/> |
| | |
| | | </update> |
| | | |
| | | <select id="selectOrderPakoutDetailVoList" resultMap="PakoutDetailResultMap"> |
| | | SELECT * FROM v_pakout_detail |
| | | WHERE 1 = 1 |
| | | <if test="itemName != null and itemName != ''"> |
| | | AND item_name LIKE CONCAT('%', #{itemName}, '%') |
| | | </if> |
| | | ORDER BY create_time DESC |
| | | select d.* from ( |
| | | select |
| | | ROW_NUMBER() over (order by c.update_time desc) as row1, |
| | | c.* from ( |
| | | select a.* from v_pakout_detail as a |
| | | where 1=1 |
| | | <if test="itemName != null and itemName != ''"> |
| | | AND item_name LIKE CONCAT('%', #{itemName}, '%') |
| | | </if> |
| | | ) as c |
| | | ) as d |
| | | where d.row1 between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) order by d.update_time desc |
| | | </select> |
| | | |
| | | <select id="selectOrderPakoutDetailVoListV1" resultMap="PakoutDetailResultMap"> |
| | | select a.* from v_pakout_detail as a |
| | | where 1=1 |
| | | AND item_name = #{itemName} |
| | | </select> |
| | | |
| | | <select id="selectOrderPakoutDetailVoListTotal" resultType="Long"> |