OrderDetailReportMapper.xml
5.83 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?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.OrderDetailReportMapper">
<resultMap id="OrderDetailReport" type="com.lframework.xingyun.sc.entity.OrderDetailReport">
<id column="id" property="id"/>
<result column="purchase_order_line_id" property="purchaseOrderLineId"/>
<result column="order_no" property="orderNo"/>
<result column="order_date" property="orderDate"/>
<result column="workshop_id" property="workshopId"/>
<result column="workshop_name" property="workshopName"/>
<result column="dept_name" property="deptName"/>
<result column="region_name" property="regionName"/>
<result column="ordering_unit_name" property="orderingUnitName"/>
<result column="industry" property="industry"/>
<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="suggested_price" property="suggestedPrice"/>
<result column="delivery_date" property="deliveryDate"/>
<result column="assessment_exceeds_agreement" property="assessmentExceedsAgreement"/>
<result column="sales_price" property="salesPrice"/>
<result column="price_list_no" property="priceListNo"/>
<result column="packaging_fee" property="packagingFee"/>
<result column="invoicing_status" property="invoicingStatus"/>
<result column="piece_weight_header" property="pieceWeightHeader"/>
<result column="surface" property="surface"/>
<result column="tolerance" property="tolerance"/>
<result column="performance" property="performance"/>
<result column="packaging" property="packaging"/>
<result column="remarks" property="remarks"/>
<result column="shipping_fee" property="shippingFee"/>
<result column="return_shipping_cost" property="returnShippingCost"/>
<result column="customer_type" property="customerType"/>
<result column="quality" property="quality"/>
<result column="contract_type" property="contractType"/>
<result column="stock_up_company_name" property="stockUpCompanyName"/>
<result column="order_type" property="orderType"/>
<result column="show_order" property="showOrder"/>
<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="OrderDetailReport_sql">
SELECT
tb.id,
tb.purchase_order_line_id,
tb.order_no,
tb.order_date,
tb.workshop_id,
ws.name AS workshop_name,
tb.dept_name,
tb.region_name,
tb.ordering_unit_name,
tb.industry,
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.suggested_price,
tb.delivery_date,
tb.assessment_exceeds_agreement,
tb.sales_price,
tb.price_list_no,
tb.packaging_fee,
tb.invoicing_status,
tb.piece_weight_header,
tb.surface,
tb.tolerance,
tb.performance,
tb.packaging,
tb.remarks,
tb.shipping_fee,
tb.return_shipping_cost,
tb.customer_type,
tb.quality,
tb.contract_type,
tb.stock_up_company_name,
tb.order_type,
tb.show_order,
tb.create_by_id,
tb.create_by,
tb.update_by_id,
tb.update_by,
tb.create_time,
tb.update_time
FROM order_detail_report AS tb
left join base_data_workshop as ws on ws.id = tb.workshop_id
</sql>
<select id="query" resultMap="OrderDetailReport">
<include refid="OrderDetailReport_sql"/>
<where>
<if test="vo.purchaseOrderLineId != null and vo.purchaseOrderLineId != ''">
AND tb.purchase_order_line_id = #{vo.purchaseOrderLineId}
</if>
<if test="vo.orderNo != null and vo.orderNo != ''">
AND tb.order_no LIKE CONCAT('%', #{vo.orderNo}, '%')
</if>
<if test="vo.workshopId != null and vo.workshopId != ''">
AND tb.workshop_id = #{vo.workshopId}
</if>
<if test="vo.deptName != null and vo.deptName != ''">
AND tb.dept_name LIKE CONCAT('%', #{vo.deptName}, '%')
</if>
<if test="vo.orderingUnitName != null and vo.orderingUnitName != ''">
AND tb.ordering_unit_name LIKE CONCAT('%', #{vo.orderingUnitName}, '%')
</if>
</where>
</select>
</mapper>