From 210e36fca8c7d1e4e2d73e1679da5a45cf4188d2 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期一, 29 十二月 2025 16:16:24 +0800
Subject: [PATCH] 新增api大屏查询

---
 tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml b/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml
index 57aacc9..1f218c2 100644
--- a/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml
+++ b/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml
@@ -157,6 +157,10 @@
         <if test="operationMode != null "> and thisTab.operation_mode = #{operationMode}</if>
         <if test="quotePlanId != null "> and thisTab.quote_plan_id = #{quotePlanId}</if>
 
+        <if test="createBy != null  and createBy != ''"> and  thisTab.create_by like concat('%', #{createBy}, '%')</if>
+        <if test="updateBy != null  and updateBy != ''"> and  thisTab.update_by like concat('%', #{updateBy}, '%')</if>
+
+
         <if test="createTimeBegin != null and createTimeBegin != '' and createTimeEnd != null and createTimeEnd != ''"> and  thisTab.create_time between #{createTimeBegin} and #{createTimeEnd}</if>
         <if test="updateTimeBegin != null and updateTimeBegin != '' and updateTimeEnd != null and updateTimeEnd != ''"> and  thisTab.update_time between #{updateTimeBegin} and #{updateTimeEnd}</if>
         <if test="confirmTimeBegin != null and confirmTimeBegin != '' and confirmTimeEnd != null and confirmTimeEnd != ''"> and  thisTab.confirm_time between #{confirmTimeBegin} and #{confirmTimeEnd}</if>
@@ -617,5 +621,25 @@
         where     tdo.id = #{dispatchId} and  tdd.driver_id = #{driverId};
 
     </select>
+    <select id="selectselectDpData" resultType="com.ruoyi.tms.domain.vo.DpDriverDispatchVo">
+        SELECT
+    tdo.main_driver_name as driverName,
+    tdo.license_plate as licensePlate,
+		tdo.status,
+    src.region_name AS startRegionName,
+
+    erc.region_name AS endRegionName
+FROM (
+    SELECT id
+    FROM tms_dispatch_order
+    WHERE `status` IN (2, 3)
+    ORDER BY confirm_time DESC
+    LIMIT 50
+) tmp
+JOIN tms_dispatch_order tdo ON tmp.id = tdo.id
+LEFT JOIN tms_region src ON SUBSTRING_INDEX(tdo.start_region_code, ',', -1) = src.region_code
+LEFT JOIN tms_region erc ON SUBSTRING_INDEX(tdo.end_region_code, ',', -1) = erc.region_code
+ORDER BY tdo.confirm_time DESC
+    </select>
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0