ReceiptContainerHeaderMapper.xml
1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?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.huaheng.pc.receipt.receiptContainerHeader.mapper.ReceiptContainerHeaderMapper">
<select id="selectUnCompletedReceiptContainer" resultType="com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader">
SELECT id, receiptContainerCode, warehouseId, warehouseCode, taskType, status, created, createdBy
FROM receipt_container_header
WHERE status < 40
<if test="id != null ">
AND id = #{id}
</if>
<if test="receiptContainerCode != null and receiptContainerCode != ''">
<bind name="receiptContainerCodePattern" value="'%' + receiptContainerCode + '%'" />
AND receiptContainerCode like #{receiptContainerCodePattern}
</if>
<if test="warehouseId != null ">
AND warehouseId = #{warehouseId}
</if>
<if test="warehouseCode != null and warehouseCode != ''">
<bind name="warehouseCodePattern" value="'%' + warehouseCode + '%'" />
AND warehouseCode like #{warehouseCodePattern}
</if>
<if test="taskType != null ">
AND taskType = #{taskType}
</if>
<if test="params != null and params.createdBegin != null and params.createdBegin != ''">
AND created >= #{params.createdBegin}
</if>
<if test="params != null and params.createdEnd != null and params.createdEnd != ''">
AND created <= #{params.createdEnd}
</if>
<if test="createdBy != null and createdBy != ''">
<bind name="createdByPattern" value="'%' + createdBy + '%'" />
AND createdBy like #{createdByPattern}
</if>
</select>
</mapper>