|
@@ -63,64 +63,63 @@ |
|
@@ -63,64 +63,63 @@ |
|
63
|
</resultMap>
|
63
|
</resultMap>
|
|
64
|
|
64
|
|
|
65
|
<sql id="ContractDistributorStandard_sql">
|
65
|
<sql id="ContractDistributorStandard_sql">
|
|
66
|
- SELECT
|
|
|
|
67
|
- tb.id,
|
|
|
|
68
|
- tb.code,
|
|
|
|
69
|
- tb.supplier,
|
|
|
|
70
|
- tb.buyer,
|
|
|
|
71
|
- tb.dept_id,
|
|
|
|
72
|
- tb.order_date,
|
|
|
|
73
|
- tb.unit,
|
|
|
|
74
|
- tb.workshop_id,
|
|
|
|
75
|
- tb.total_amount_capital,
|
|
|
|
76
|
- tb.deposit_info,
|
|
|
|
77
|
- tb.packaging_requirements,
|
|
|
|
78
|
- tb.payment_terms,
|
|
|
|
79
|
- tb.execution_standard,
|
|
|
|
80
|
- tb.execution_standard_remarks,
|
|
|
|
81
|
- tb.transport_mode,
|
|
|
|
82
|
- tb.destination,
|
|
|
|
83
|
- tb.includes_packaging_fee,
|
|
|
|
84
|
- tb.includes_transport_fee,
|
|
|
|
85
|
- tb.piece_weight_head,
|
|
|
|
86
|
- tb.surface,
|
|
|
|
87
|
- tb.tolerance,
|
|
|
|
88
|
- tb.performance,
|
|
|
|
89
|
- tb.component,
|
|
|
|
90
|
- tb.packaging,
|
|
|
|
91
|
- tb.special_terms,
|
|
|
|
92
|
- tb.designated_consignee,
|
|
|
|
93
|
- tb.special_instructions,
|
|
|
|
94
|
- tb.remarks,
|
|
|
|
95
|
- tb.status,
|
|
|
|
96
|
- tb.create_by_id,
|
|
|
|
97
|
- tb.create_by,
|
|
|
|
98
|
- tb.update_by_id,
|
|
|
|
99
|
- tb.update_by,
|
|
|
|
100
|
- tb.create_time,
|
|
|
|
101
|
- tb.update_time,
|
|
|
|
102
|
- tb.total_quantity,
|
|
|
|
103
|
- tb.total_amount_excluding_tax,
|
|
|
|
104
|
- tb.total_amount_including_tax,
|
|
|
|
105
|
- tb.type,
|
|
|
|
106
|
- tb.parent_id,
|
|
|
|
107
|
- tb.formal_file_id,
|
|
|
|
108
|
- tb.formal_file_name,
|
|
|
|
109
|
- tb.formal_standardized,
|
|
|
|
110
|
- tb.formal_approved,
|
|
|
|
111
|
- tb.formal_approver_id,
|
|
|
|
112
|
- tb.formal_time,
|
|
|
|
113
|
- tb.standard_file_id,
|
|
|
|
114
|
- tb.standard_file_name,
|
|
|
|
115
|
- tb.standard_standardized,
|
|
|
|
116
|
- tb.standard_approved,
|
|
|
|
117
|
- tb.standard_approver_id,
|
|
|
|
118
|
- tb.standard_time,
|
|
|
|
119
|
- tb.price_spec_locked,
|
|
|
|
120
|
- tb.signed_contract_file_id,
|
|
|
|
121
|
- tb.signed_contract_file_name,
|
|
|
|
122
|
- tb.formalized_at,
|
|
|
|
123
|
- tb.standardized_at
|
66
|
+ SELECT tb.id,
|
|
|
|
67
|
+ tb.code,
|
|
|
|
68
|
+ tb.supplier,
|
|
|
|
69
|
+ tb.buyer,
|
|
|
|
70
|
+ tb.dept_id,
|
|
|
|
71
|
+ tb.order_date,
|
|
|
|
72
|
+ tb.unit,
|
|
|
|
73
|
+ tb.workshop_id,
|
|
|
|
74
|
+ tb.total_amount_capital,
|
|
|
|
75
|
+ tb.deposit_info,
|
|
|
|
76
|
+ tb.packaging_requirements,
|
|
|
|
77
|
+ tb.payment_terms,
|
|
|
|
78
|
+ tb.execution_standard,
|
|
|
|
79
|
+ tb.execution_standard_remarks,
|
|
|
|
80
|
+ tb.transport_mode,
|
|
|
|
81
|
+ tb.destination,
|
|
|
|
82
|
+ tb.includes_packaging_fee,
|
|
|
|
83
|
+ tb.includes_transport_fee,
|
|
|
|
84
|
+ tb.piece_weight_head,
|
|
|
|
85
|
+ tb.surface,
|
|
|
|
86
|
+ tb.tolerance,
|
|
|
|
87
|
+ tb.performance,
|
|
|
|
88
|
+ tb.component,
|
|
|
|
89
|
+ tb.packaging,
|
|
|
|
90
|
+ tb.special_terms,
|
|
|
|
91
|
+ tb.designated_consignee,
|
|
|
|
92
|
+ tb.special_instructions,
|
|
|
|
93
|
+ tb.remarks,
|
|
|
|
94
|
+ tb.status,
|
|
|
|
95
|
+ tb.create_by_id,
|
|
|
|
96
|
+ tb.create_by,
|
|
|
|
97
|
+ tb.update_by_id,
|
|
|
|
98
|
+ tb.update_by,
|
|
|
|
99
|
+ tb.create_time,
|
|
|
|
100
|
+ tb.update_time,
|
|
|
|
101
|
+ tb.total_quantity,
|
|
|
|
102
|
+ tb.total_amount_excluding_tax,
|
|
|
|
103
|
+ tb.total_amount_including_tax,
|
|
|
|
104
|
+ tb.type,
|
|
|
|
105
|
+ tb.parent_id,
|
|
|
|
106
|
+ tb.formal_file_id,
|
|
|
|
107
|
+ tb.formal_file_name,
|
|
|
|
108
|
+ tb.formal_standardized,
|
|
|
|
109
|
+ tb.formal_approved,
|
|
|
|
110
|
+ tb.formal_approver_id,
|
|
|
|
111
|
+ tb.formal_time,
|
|
|
|
112
|
+ tb.standard_file_id,
|
|
|
|
113
|
+ tb.standard_file_name,
|
|
|
|
114
|
+ tb.standard_standardized,
|
|
|
|
115
|
+ tb.standard_approved,
|
|
|
|
116
|
+ tb.standard_approver_id,
|
|
|
|
117
|
+ tb.standard_time,
|
|
|
|
118
|
+ tb.price_spec_locked,
|
|
|
|
119
|
+ tb.signed_contract_file_id,
|
|
|
|
120
|
+ tb.signed_contract_file_name,
|
|
|
|
121
|
+ tb.formalized_at,
|
|
|
|
122
|
+ tb.standardized_at
|
|
124
|
FROM tbl_contract_distributor_standard AS tb
|
123
|
FROM tbl_contract_distributor_standard AS tb
|
|
125
|
</sql>
|
124
|
</sql>
|
|
126
|
|
125
|
|
|
@@ -130,18 +129,38 @@ |
|
@@ -130,18 +129,38 @@ |
|
130
|
<if test="vo.code != null and vo.code != ''">
|
129
|
<if test="vo.code != null and vo.code != ''">
|
|
131
|
AND code like CONCAT('%', #{vo.code}, '%')
|
130
|
AND code like CONCAT('%', #{vo.code}, '%')
|
|
132
|
</if>
|
131
|
</if>
|
|
133
|
- <if test="vo.buyerList != null and vo.buyerList.size() > 0">
|
|
|
|
134
|
- AND tb.buyer IN
|
|
|
|
135
|
- <foreach collection="vo.buyerList" open="(" separator="," close=")" item="item">
|
|
|
|
136
|
- #{item}
|
|
|
|
137
|
- </foreach>
|
|
|
|
138
|
- </if>
|
|
|
|
139
|
- <if test="vo.deptIdList != null and vo.deptIdList.size() > 0">
|
|
|
|
140
|
- AND tb.dept_id IN
|
|
|
|
141
|
- <foreach collection="vo.deptIdList" open="(" separator="," close=")" item="item">
|
|
|
|
142
|
- #{item}
|
|
|
|
143
|
- </foreach>
|
|
|
|
144
|
- </if>
|
132
|
+ <choose>
|
|
|
|
133
|
+ <when test="vo.keyword != null and vo.keyword != ''">
|
|
|
|
134
|
+ AND (code like CONCAT('%', #{vo.keyword}, '%')
|
|
|
|
135
|
+ <if test="vo.buyerList != null and vo.buyerList.size() > 0">
|
|
|
|
136
|
+ OR tb.buyer IN
|
|
|
|
137
|
+ <foreach collection="vo.buyerList" open="(" separator="," close=")" item="item">
|
|
|
|
138
|
+ #{item}
|
|
|
|
139
|
+ </foreach>
|
|
|
|
140
|
+ </if>
|
|
|
|
141
|
+ <if test="vo.deptIdList != null and vo.deptIdList.size() > 0">
|
|
|
|
142
|
+ OR tb.dept_id IN
|
|
|
|
143
|
+ <foreach collection="vo.deptIdList" open="(" separator="," close=")" item="item">
|
|
|
|
144
|
+ #{item}
|
|
|
|
145
|
+ </foreach>
|
|
|
|
146
|
+ </if>
|
|
|
|
147
|
+ )
|
|
|
|
148
|
+ </when>
|
|
|
|
149
|
+ <otherwise>
|
|
|
|
150
|
+ <if test="vo.buyerList != null and vo.buyerList.size() > 0">
|
|
|
|
151
|
+ AND tb.buyer IN
|
|
|
|
152
|
+ <foreach collection="vo.buyerList" open="(" separator="," close=")" item="item">
|
|
|
|
153
|
+ #{item}
|
|
|
|
154
|
+ </foreach>
|
|
|
|
155
|
+ </if>
|
|
|
|
156
|
+ <if test="vo.deptIdList != null and vo.deptIdList.size() > 0">
|
|
|
|
157
|
+ AND tb.dept_id IN
|
|
|
|
158
|
+ <foreach collection="vo.deptIdList" open="(" separator="," close=")" item="item">
|
|
|
|
159
|
+ #{item}
|
|
|
|
160
|
+ </foreach>
|
|
|
|
161
|
+ </if>
|
|
|
|
162
|
+ </otherwise>
|
|
|
|
163
|
+ </choose>
|
|
145
|
<if test="vo.orderDate != null">
|
164
|
<if test="vo.orderDate != null">
|
|
146
|
AND tb.order_date IN (#{vo.orderDate})
|
165
|
AND tb.order_date IN (#{vo.orderDate})
|
|
147
|
</if>
|
166
|
</if>
|