From 3135ac10ab738063bb5df39b3c5cc0f143d11061 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期三, 07 一月 2026 16:11:15 +0800
Subject: [PATCH] 新增开票接口

---
 service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml b/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
index b4ae8d7..6ab25c3 100644
--- a/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
@@ -45,9 +45,10 @@
         <if test="driverName != null  and driverName != ''"> and  thisTab.driver_name like concat('%', #{driverName}, '%')</if>
         <if test="driverMobile != null  and driverMobile != ''"> and thisTab.driver_mobile = #{driverMobile}</if>
         <if test="licensePlateNumber != null  and licensePlateNumber != ''"> and thisTab.license_plate_number = #{licensePlateNumber}</if>
-        <if test="orderTime != null "> and thisTab.order_time = #{orderTime}</if>
-        <if test="orderCreatedTime != null "> and thisTab.order_created_time = #{orderCreatedTime}</if>
-        <if test="dispatchCreatedTime != null "> and thisTab.dispatch_created_time = #{dispatchCreatedTime}</if>
+        <if test="orderTimeBegin != null and orderTimeBegin!='' and orderTimeEnd != null and orderTimeEnd!='' "> and thisTab.order_time between #{orderTimeBegin} and #{orderTimeEnd}</if>
+        <if test="orderCreatedTimeBegin != null and orderCreatedTimeBegin!='' and orderCreatedTimeEnd != null and orderCreatedTimeEnd!='' "> and thisTab.order_created_time between #{orderCreatedTimeBegin} and #{orderCreatedTimeEnd}</if>
+        <if test="dispatchCreatedTimeBegin != null and dispatchCreatedTimeBegin!='' and dispatchCreatedTimeEnd != null and dispatchCreatedTimeEnd!='' "> and thisTab.dispatch_created_time between #{dispatchCreatedTimeBegin} and #{dispatchCreatedTimeEnd}</if>
+
         <if test="keyCollectionTime != null "> and thisTab.key_collection_time = #{keyCollectionTime}</if>
         <if test="estimatedDepartureTime != null "> and thisTab.estimated_departure_time = #{estimatedDepartureTime}</if>
         <if test="requiredArrivalTime != null "> and thisTab.required_arrival_time = #{requiredArrivalTime}</if>
@@ -108,7 +109,7 @@
         ts.REMARK as remark,
         ts.REQUIRED_DEPARTURE_TIME as requiredDepartureTime ,
         TIMESTAMPDIFF(HOUR, ord.ORDER_TIME, ord.CREATED_TIME) as schedulingTimeout,
-        TIMESTAMPDIFF(HOUR, ord.REQUIRED_DEPARTURE_TIME, NOW()) as keyTimeout
+        TIMESTAMPDIFF(HOUR, ts.REQUIRED_DEPARTURE_TIME, NOW()) as keyTimeout
 
         FROM
         tms_shipment ts
@@ -131,6 +132,15 @@
         ORDER BY ord.ESTIMATED_DEPARTURE_TIME ASC
         LIMIT 1
     </select>
+    <select id="selectCwBoxNum" resultType="java.lang.String">
+    SELECT `NAME` from tms_vehicle where LICENSE_PLATE_NUMBER = #{licensePlateNumber} and `NAME` is not null LIMIT 1
+
+    </select>
+    <select id="selectNameByMobile" resultType="java.lang.String">
+        SELECT NAME from tms_driver where MOBILE =  #{driverCode}
+        limit 1
+
+    </select>
 
     <!-- 鏂板 -->
     <insert id="insertKeyCollectionInfo" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo"  useGeneratedKeys="true" keyProperty="id">

--
Gitblit v1.8.0