PurchaseOrderLineMapper.xml
3.41 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?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.lframework.xingyun.sc.mappers.PurchaseOrderLineMapper">
<resultMap id="PurchaseOrderLine" type="com.lframework.xingyun.sc.entity.PurchaseOrderLine">
<id column="id" property="id"/>
<result column="purchase_order_id" property="purchaseOrderId"/>
<result column="industry" property="industry"/>
<result column="quality" property="quality"/>
<result column="brand" property="brand"/>
<result column="thickness" property="thickness"/>
<result column="thickness_tol_pos" property="thicknessTolPos"/>
<result column="thickness_tol_neg" property="thicknessTolNeg"/>
<result column="width" property="width"/>
<result column="width_tol_pos" property="widthTolPos"/>
<result column="width_tol_neg" property="widthTolNeg"/>
<result column="length" property="length"/>
<result column="length_tol_pos" property="lengthTolPos"/>
<result column="length_tol_neg" property="lengthTolNeg"/>
<result column="status" property="status"/>
<result column="quantity" property="quantity"/>
<result column="sales_price" property="salesPrice"/>
<result column="delivery_date" property="deliveryDate"/>
<result column="show_order" property="showOrder"/>
<result column="assessment_exceeds_agreement" property="assessmentExceedsAgreement"/>
<result column="create_by_id" property="createById"/>
<result column="create_by" property="createBy"/>
<result column="update_by_id" property="updateById"/>
<result column="update_by" property="updateBy"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="PurchaseOrderLine_sql">
SELECT
tb.id,
tb.purchase_order_id,
tb.industry,
tb.quality,
tb.brand,
tb.thickness,
tb.thickness_tol_pos,
tb.thickness_tol_neg,
tb.width,
tb.width_tol_pos,
tb.width_tol_neg,
tb.length,
tb.length_tol_pos,
tb.length_tol_neg,
tb.status,
tb.quantity,
tb.sales_price,
tb.delivery_date,
tb.show_order,
tb.assessment_exceeds_agreement,
tb.create_by_id,
tb.create_by,
tb.update_by_id,
tb.update_by,
tb.create_time,
tb.update_time
FROM tbl_purchase_order_line AS tb
</sql>
<select id="query" resultMap="PurchaseOrderLine">
<include refid="PurchaseOrderLine_sql"/>
<where>
<if test="vo.purchaseOrderId != null and vo.purchaseOrderId != ''">
AND tb.purchase_order_id = #{vo.purchaseOrderId}
</if>
<if test="vo.brand != null and vo.brand != ''">
AND tb.brand = #{vo.brand}
</if>
<if test="vo.status != null and vo.status != ''">
AND tb.status = #{vo.status}
</if>
<if test="vo.deliveryDate != null">
AND tb.delivery_date = #{vo.deliveryDate}
</if>
</where>
ORDER BY tb.show_order ASC
</select>
</mapper>