From bbc242ae52b584e90e9108d3c4f124f9adc4c121 Mon Sep 17 00:00:00 2001 From: gaoqr <13665037151@163.com> Date: Thu, 18 Jun 2026 11:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86=E3=80=81?= =?UTF-8?q?=E8=A3=85=E9=85=8D=E8=AE=BE=E7=BD=AE=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E4=BD=9C=E7=94=A8=E5=88=B0=E5=AD=90=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/order/OrderMapper.xml | 157 ++++++++++++++---- 1 file changed, 122 insertions(+), 35 deletions(-) diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/order/OrderMapper.xml b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/order/OrderMapper.xml index 34762a761..5a22ab2dd 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/order/OrderMapper.xml +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/order/OrderMapper.xml @@ -34,23 +34,32 @@ t.root_id FROM orders t + where 1=1 - - JOIN order_component oc - ON oc.order_id = t.id - AND oc.deleted = 0 - AND oc.pid = 0 - - - WHERE 1 = 1 - - + AND EXISTS ( SELECT 1 FROM order_component oc WHERE oc.order_id = t.id AND oc.deleted = 0 AND oc.pid = 0 + + + + AND oc.extra_process_status = 0 + + + AND oc.process_status = 1 + AND (oc.extra_process_status IS NULL OR oc.extra_process_status != 0) + + + AND oc.process_status = 2 + + + AND oc.extra_process_status = 3 + + + ) @@ -134,31 +143,6 @@ AND t.create_time BETWEEN #{reqVO.createTime[0]} AND #{reqVO.createTime[1]} - - - - - - AND oc.extra_process_status = 0 - - - - AND oc.process_status = 1 - AND oc.extra_process_status IS NULL - - - - AND oc.process_status = 2 - - - - AND oc.extra_process_status = 3 - - - - - - AND t.deleted = #{reqVO.deleted} @@ -202,6 +186,109 @@ #{parentId} + + AND EXISTS ( + SELECT 1 + FROM order_component oc + WHERE oc.order_id = t.id + AND oc.deleted = 0 + AND oc.pid = 0 + + + + AND oc.extra_process_status = 0 + + + AND oc.process_status = 1 + AND (oc.extra_process_status IS NULL OR oc.extra_process_status != 0) + + + AND oc.process_status = 2 + + + AND oc.extra_process_status = 3 + + + + ) + + + + AND CAST(t.id AS CHAR) LIKE CONCAT('%', #{reqVO.id}, '%') + + + + AND t.api_order_id = #{reqVO.apiOrderId} + + + + AND t.order_date BETWEEN #{reqVO.orderDate[0]} AND #{reqVO.orderDate[1]} + + + + AND t.delivery_date BETWEEN #{reqVO.deliveryDate[0]} AND #{reqVO.deliveryDate[1]} + + + + AND t.order_type = #{reqVO.orderType} + + + + AND t.order_sort = #{reqVO.orderSort} + + + + AND t.data_type = #{reqVO.dataType} + + + + AND t.status = #{reqVO.status} + + + + AND t.custom_order_no LIKE CONCAT('%', #{reqVO.customOrderNo}, '%') + + + + AND t.customer = #{reqVO.customer} + + + + AND t.address LIKE CONCAT('%', #{reqVO.address}, '%') + + + + AND t.phone_number = #{reqVO.phoneNumber} + + + + AND t.dealer LIKE CONCAT('%', #{reqVO.dealer}, '%') + + + + AND t.dealer_phone_number = #{reqVO.dealerPhoneNumber} + + + + AND t.salesman = #{reqVO.salesman} + + + + AND t.splitter = #{reqVO.splitter} + + + + AND t.remark = #{reqVO.remark} + + + + AND t.organ_id = #{reqVO.organId} + + + + AND t.create_time BETWEEN #{reqVO.createTime[0]} AND #{reqVO.createTime[1]} + + AND t.deleted = #{reqVO.deleted} ORDER BY t.id DESC