廖井涛
2024-03-06 ed436058f1ae782a0c18e28e134c6099f4e5e951
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
<?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.example.erp.mapper.sd.DeliveryDetailMapper">
 
    <resultMap id="selectDeliveryFinishedGoodsInventoryOrderDetail" type="com.example.erp.entity.sd.OrderDetail">
 
        <result column="order_id" property="orderId"/>
        <result column="order_number" property="orderNumber"/>
        <result column="o_quantity" property="quantity"/>
        <result column="building_number" property="buildingNumber"/>
        <result column="product_name" property="productName"/>
        <result column="product_id" property="productId"/>
        <result column="price" property="price"/>
        <result column="width" property="width"/>
        <result column="height" property="height"/>
        <result column="shape" property="shape"/>
        <result column="gross_area" property="grossArea"/>
        <result column="compute_area" property="computeArea"/>
        <result column="compute_gross_area" property="computeGrossArea"/>
        <result column="processing_note" property="processingNote"/>
        <result column="edging_type" property="edgingType"/>
        <result column="perimeter" property="perimeter"/>
 
        <result column="delivery_num" property="deliveryNum"/>
 
        <result column="delivery_id" property="deliveryDetail.deliveryid"/>
 
        <result column="d_quantity" property="deliveryDetail.quantity"/>
        <result column="money" property="deliveryDetail.money"/>
        <result column="delivery_number" property="deliveryDetail.deliveryNumber"/>
        <result column="delivery_detail_remakes" property="deliveryDetail.deliveryDetailRemakes"/>
 
        <result column="batch" property="order.batch"/>
        <result column="t_quantity" property="order.quantity"/>
 
 
        <result column="customer_id" property="delivery.customerId"/>
        <result column="customer_name" property="delivery.customerName"/>
        <result column="project" property="delivery.project"/>
        <result column="pay_method" property="delivery.payMethod"/>
        <result column="pay_date" property="delivery.payDate"/>
        <result column="contacts" property="delivery.contacts"/>
        <result column="contact_number" property="delivery.contactNumber"/>
        <result column="delivery_address" property="delivery.deliveryAddress"/>
        <result column="remarks" property="delivery.remarks"/>
        <result column="create_time" property="delivery.createTime"/>
        <result column="delivery_date" property="delivery.deliveryDate"/>
        <result column="creator" property="delivery.creator"/>
 
        <result column="quantity_available" property="finishedGoodsInventory.quantityAvailable"/>
        <result column="storage_region" property="finishedGoodsInventory.storageRegion"/>
        <result column="actual_signal_area" property="finishedGoodsInventory.actualSignalArea"/>
 
 
    </resultMap>
 
    <delete id="deleteDeliveryDetail">
        delete from sd.delivery_detail where delivery_id=#{deliveryId}
    </delete>
 
    <update id="updateOrderDetailDeliveryNum">
        update sd.order_detail set delivery_num=#{deliveryDetail.quantity} where order_id=#{orderId} and order_number=#{orderNumber}
    </update>
 
    <update id="updateIsNotOrderDetailDeliveryNum">
        update sd.order_detail set delivery_num=delivery_num-#{quantity} where order_id=#{orderId} and order_number=#{orderNumber}
    </update>
 
    <select id="getdeliveryDetailmaximum" >
        select count(*) from sd.delivery_detail where  delivery_id=#{deliveryId}
    </select>
 
    <select id="getIsNotDeliveryDetail" >
        select * from sd.delivery_detail where  delivery_id=#{deliveryId}
    </select>
 
 
    <insert id="insertDeliveryDetail"  useGeneratedKeys="true" >
        insert into sd.delivery_detail (delivery_id,delivery_number,order_number,
                                        area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,create_time)
        values (
                   #{number} ,#{deliveryNumber},#{orderDetail.order_number},#{orderDetail.computeGrossArea},
                #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity},
                #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,now()
               )
    </insert>
 
 
 
    <select id="getSelectShippingOrderDetail" resultMap="selectDeliveryFinishedGoodsInventoryOrderDetail">
        select od.order_id,
               o.batch,
               dd.delivery_number,
               fgi.quantity_available + dd.quantity as quantity_available,
               od.order_number,
               od.quantity-dd.quantity as t_quantity,
               od.quantity as o_quantity,
               dd.quantity as d_quantity,
               od.building_number,
               od.product_id,
               od.product_name,
               od.price,
               fgi.storage_region,
               dd.money,
               od.width,
               od.height,
               od.shape,
               fgi.actual_signal_area,
               od.gross_area,
               od.compute_area,
               od.compute_gross_area,
               od.processing_note,
               od.edging_type,
               od.perimeter,
               dd.delivery_detail_remakes
        from sd.delivery_detail dd
        left join sd.delivery d on dd.delivery_id=d.delivery_id
        left join sd.order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
        left join sd.`order` o on dd.order_id=o.order_id
        left join mm.finished_goods_inventory fgi on dd.order_id=fgi.order_id and dd.order_number=fgi.order_number
        <where>
            <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryDetail.quantity != null and orderDetail.deliveryDetail.quantity != ''">
                and dd.quantity regexp #{orderDetail.deliveryDetail.quantity}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp #{orderDetail.price}
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.deliveryDetail.money != null and orderDetail.deliveryDetail.money != ''">
                and dd.money regexp  REGEXP_REPLACE(#{orderDetail.deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
            <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes}
            </if>
 
        </where>
        limit #{offset},#{pageSize};
    </select>
 
    <select id="getSelectShippingOrderDetailPageTotal">
        select
            CEILING(count(dd.id)/#{pageSize})
        from sd.delivery_detail dd
                 left join sd.delivery d on dd.delivery_id=d.delivery_id
                 left join sd.order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
                 left join sd.`order` o on dd.order_id=o.order_id
                 left join mm.finished_goods_inventory fgi on dd.order_id=fgi.order_id and dd.order_number=fgi.order_number
        <where>
            <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''">
                and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryDetail.quantity != null and orderDetail.deliveryDetail.quantity != ''">
                and dd.quantity regexp #{orderDetail.deliveryDetail.quantity}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp #{orderDetail.price}
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.deliveryDetail.money != null and orderDetail.deliveryDetail.money != ''">
                and dd.money regexp  REGEXP_REPLACE(#{orderDetail.deliveryDetail.money},'\\.0+$','')
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
            <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''">
                and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
 
    <select id="getSelectShippingOrderDetails" resultMap="selectDeliveryFinishedGoodsInventoryOrderDetail">
        select od.order_id,
               od.order_number,
               o.batch,
               fgi.quantity_available,
               od.quantity- od.delivery_num as t_quantity,
               od.quantity as o_quantity,
               fgi.quantity_available as d_quantity,
               od.building_number,
               od.product_id,
               od.product_name,
               od.price,
               fgi.storage_region,
               od.width,
               od.height,
               od.shape,
               fgi.actual_signal_area,
               od.gross_area,
               od.compute_area,
               od.compute_gross_area,
               od.processing_note,
               od.edging_type,
               od.perimeter
        from sd.order_detail od
                 left join sd.`order` o on od.order_id = o.order_id
                 left join mm.finished_goods_inventory fgi
                 on od.order_id = fgi.order_id and od.order_number = fgi.order_number
        <where>
            fgi.quantity_available > 0 and od.quantity > od.delivery_num
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryNum != null and orderDetail.deliveryNum != ''">
                and od.delivery_num regexp #{orderDetail.deliveryNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp  REGEXP_REPLACE(#{orderDetail.price},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
 
    <select id="getSelectShippingOrderDetailsPageTotal">
        select
        CEILING(count(od.id)/#{pageSize})
        from sd.order_detail od
        left join sd.`order` o on od.order_id = o.order_id
        left join mm.finished_goods_inventory fgi
        on od.order_id = fgi.order_id and od.order_number = fgi.order_number
        <where>
            fgi.quantity_available > 0 and od.quantity > od.delivery_num
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''">
                and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable}
            </if>
            <if test="orderDetail.quantity != null and orderDetail.quantity != ''">
                and od.quantity regexp #{orderDetail.quantity}
            </if>
            <if test="orderDetail.deliveryNum != null and orderDetail.deliveryNum != ''">
                and od.delivery_num regexp #{orderDetail.deliveryNum}
            </if>
            <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''">
                and od.building_number regexp #{orderDetail.buildingNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.price != null and orderDetail.price != ''">
                and od.price regexp  REGEXP_REPLACE(#{orderDetail.price},'\\.0+$','')
            </if>
            <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''">
                and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''">
                and fgi.actual_signal_area regexp REGEXP_REPLACE(#{orderDetail.finishedGoodsInventory.actualSignalArea},'\\.0+$','')
            </if>
            <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''">
                and od.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeArea != null and orderDetail.computeArea != ''">
                and od.compute_area regexp REGEXP_REPLACE(#{orderDetail.computeArea},'\\.0+$','')
            </if>
            <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''">
                and od.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','')
            </if>
            <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''">
                and od.processing_note regexp #{orderDetail.processingNote}
            </if>
            <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''">
                and od.edging_type regexp #{orderDetail.edgingType}
            </if>
            <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''">
                and od.perimeter regexp #{orderDetail.perimeter}
            </if>
        </where>
        limit #{offset},#{pageSize};
    </select>
</mapper>