From 47f5004419c3c703919b5351034fc9cfa0ac39f8 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期四, 08 一月 2026 14:52:30 +0800
Subject: [PATCH] 新增大屏接口

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

diff --git a/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml b/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml
index 25bc5bd..71073cb 100644
--- a/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml
+++ b/tms/src/main/resources/mapper/tms/TmsDispatchOrderMapper.xml
@@ -98,11 +98,23 @@
         <result property="closeBy"    column="close_by"    />
         <result property="closeRemark"    column="close_remark"    />
         <result property="isfk"    column="isfk"    />
-
+        <result property="isPrint"    column="is_print"    />
+        <result property="printCount"    column="print_count"    />
+        <result property="printTime"    column="print_time"    />
+        <result property="printBy"    column="print_by"    />
+        <result property="sixLinkNo"    column="six_link_no"    />
+        <result property="portName"    column="port_name"    />
+        <result property="billNo"    column="bill_no"    />
+        <result property="terminalName"    column="terminal_name"    />
+        <result property="cargoName"    column="cargo_name"    />
+        <result property="pieceCount"    column="piece_count"    />
+        <result property="weight"    column="weight"    />
+        <result property="contactName"    column="contact_name"    />
+        <result property="contactPhone"    column="contact_phone"    />
     </resultMap>
 
     <sql id="selectTmsDispatchOrderVo">
-        select thisTab.id, thisTab.dispatch_no, thisTab.customer_id, thisTab.customer_name, thisTab.customer_code, thisTab.project_id, thisTab.project_name, thisTab.contract_id, thisTab.contract_name, thisTab.order_type, thisTab.transport_line, thisTab.sign_type, thisTab.vehicle_provider_id, thisTab.vehicle_provider_name, thisTab.loading_service_provider_id, thisTab.loading_service_provider_name, thisTab.customs_service_provider_id, thisTab.customs_service_provider_name, thisTab.is_urgent, thisTab.transport_type, thisTab.load_method, thisTab.main_driver_id, thisTab.main_driver_name, thisTab.assistant_driver_id, thisTab.required_vehicle_types, thisTab.assistant_driver_name, thisTab.vehicle_id, thisTab.container_no, thisTab.license_plate, thisTab.shipper_id, thisTab.earliest_departure, thisTab.shipper_name, thisTab.latest_departure, thisTab.shipper_mobile, thisTab.earliest_arrival, thisTab.shipper_address, thisTab.latest_arrival, thisTab.departure_address, thisTab.shipper_region_code, thisTab.receiver_id, thisTab.destination_address, thisTab.receiver_name, thisTab.actual_vehicle_type, thisTab.receiver_mobile, thisTab.actual_load_start, thisTab.shipper_region_label, thisTab.receiver_address, thisTab.actual_unload_end, thisTab.receiver_region_code, thisTab.actual_departure, thisTab.actual_arrival, thisTab.actual_quantity, thisTab.actual_weight, thisTab.receiver_region_label, thisTab.actual_volume, thisTab.reweigh_weight, thisTab.container_id, thisTab.electronic_lock, thisTab.empty_mileage, thisTab.shelf_id, thisTab.empty_fuel, thisTab.shelf_code, thisTab.loaded_mileage, thisTab.loaded_fuel, thisTab.shift_no, thisTab.line_no, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark, thisTab.accounts_receivable_status, thisTab.accounts_payable_status, thisTab.collection_plan_id, thisTab.payment_plan_id , thisTab.is_customs, thisTab.start_region_code, thisTab.end_region_code, thisTab.quote_detail_id, thisTab.operation_mode, thisTab.quote_plan_id, thisTab.ok_time, thisTab.confirm_time, thisTab.is_load ,thisTab.commission_model ,thisTab.order_time, thisTab.iscc, thisTab.close_why, thisTab.close_time, thisTab.close_by, thisTab.close_remark, thisTab.isfk from tms_dispatch_order AS thisTab
+        select thisTab.id, thisTab.dispatch_no, thisTab.customer_id, thisTab.customer_name, thisTab.customer_code, thisTab.project_id, thisTab.project_name, thisTab.contract_id, thisTab.contract_name, thisTab.order_type, thisTab.transport_line, thisTab.sign_type, thisTab.vehicle_provider_id, thisTab.vehicle_provider_name, thisTab.loading_service_provider_id, thisTab.loading_service_provider_name, thisTab.customs_service_provider_id, thisTab.customs_service_provider_name, thisTab.is_urgent, thisTab.transport_type, thisTab.load_method, thisTab.main_driver_id, thisTab.main_driver_name, thisTab.assistant_driver_id, thisTab.required_vehicle_types, thisTab.assistant_driver_name, thisTab.vehicle_id, thisTab.container_no, thisTab.license_plate, thisTab.shipper_id, thisTab.earliest_departure, thisTab.shipper_name, thisTab.latest_departure, thisTab.shipper_mobile, thisTab.earliest_arrival, thisTab.shipper_address, thisTab.latest_arrival, thisTab.departure_address, thisTab.shipper_region_code, thisTab.receiver_id, thisTab.destination_address, thisTab.receiver_name, thisTab.actual_vehicle_type, thisTab.receiver_mobile, thisTab.actual_load_start, thisTab.shipper_region_label, thisTab.receiver_address, thisTab.actual_unload_end, thisTab.receiver_region_code, thisTab.actual_departure, thisTab.actual_arrival, thisTab.actual_quantity, thisTab.actual_weight, thisTab.receiver_region_label, thisTab.actual_volume, thisTab.reweigh_weight, thisTab.container_id, thisTab.electronic_lock, thisTab.empty_mileage, thisTab.shelf_id, thisTab.empty_fuel, thisTab.shelf_code, thisTab.loaded_mileage, thisTab.loaded_fuel, thisTab.shift_no, thisTab.line_no, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark, thisTab.accounts_receivable_status, thisTab.accounts_payable_status, thisTab.collection_plan_id, thisTab.payment_plan_id , thisTab.is_customs, thisTab.start_region_code, thisTab.end_region_code, thisTab.quote_detail_id, thisTab.operation_mode, thisTab.quote_plan_id, thisTab.ok_time, thisTab.confirm_time, thisTab.is_load ,thisTab.commission_model ,thisTab.order_time, thisTab.iscc, thisTab.close_why, thisTab.close_time, thisTab.close_by, thisTab.close_remark, thisTab.isfk, thisTab.is_print, thisTab.print_count, thisTab.print_time, thisTab.print_by, thisTab.six_link_no, thisTab.port_name, thisTab.bill_no, thisTab.terminal_name, thisTab.cargo_name, thisTab.piece_count, thisTab.weight, thisTab.contact_name, thisTab.contact_phone from tms_dispatch_order AS thisTab
     </sql>
     <sql id="selectTmsDispatchOrderVoCount">
         select count(0) from tms_dispatch_order as thisTab
@@ -190,6 +202,19 @@
             </foreach>
 
         </if>
+        <if test="isPrint != null "> and thisTab.is_print = #{isPrint}</if>
+        <if test="printCount != null "> and thisTab.print_count = #{printCount}</if>
+        <if test="printTime != null "> and thisTab.print_time = #{printTime}</if>
+        <if test="printBy != null  and printBy != ''"> and thisTab.print_by = #{printBy}</if>
+        <if test="sixLinkNo != null  and sixLinkNo != ''"> and thisTab.six_link_no = #{sixLinkNo}</if>
+        <if test="portName != null  and portName != ''"> and  thisTab.port_name like concat('%', #{portName}, '%')</if>
+        <if test="billNo != null  and billNo != ''"> and thisTab.bill_no = #{billNo}</if>
+        <if test="terminalName != null  and terminalName != ''"> and  thisTab.terminal_name like concat('%', #{terminalName}, '%')</if>
+        <if test="cargoName != null  and cargoName != ''"> and  thisTab.cargo_name like concat('%', #{cargoName}, '%')</if>
+        <if test="pieceCount != null "> and thisTab.piece_count = #{pieceCount}</if>
+        <if test="weight != null "> and thisTab.weight = #{weight}</if>
+        <if test="contactName != null  and contactName != ''"> and  thisTab.contact_name like concat('%', #{contactName}, '%')</if>
+        <if test="contactPhone != null  and contactPhone != ''"> and thisTab.contact_phone = #{contactPhone}</if>
     </sql>
 
     <!--鏌ヨ-->
@@ -305,6 +330,19 @@
             <if test="closeBy != null">close_by,</if>
             <if test="closeRemark != null">close_remark,</if>
             <if test="isfk != null">isfk,</if>
+            <if test="isPrint != null">is_print,</if>
+            <if test="printCount != null">print_count,</if>
+            <if test="printTime != null">print_time,</if>
+            <if test="printBy != null">print_by,</if>
+            <if test="sixLinkNo != null and sixLinkNo != ''">six_link_no,</if>
+            <if test="portName != null and portName != ''">port_name,</if>
+            <if test="billNo != null and billNo != ''">bill_no,</if>
+            <if test="terminalName != null">terminal_name,</if>
+            <if test="cargoName != null">cargo_name,</if>
+            <if test="pieceCount != null">piece_count,</if>
+            <if test="weight != null">weight,</if>
+            <if test="contactName != null">contact_name,</if>
+            <if test="contactPhone != null">contact_phone,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="dispatchNo != null and dispatchNo != ''">#{dispatchNo},</if>
@@ -397,6 +435,19 @@
             <if test="closeBy != null">#{closeBy},</if>
             <if test="closeRemark != null">#{closeRemark},</if>
             <if test="isfk != null">#{isfk},</if>
+            <if test="isPrint != null">#{isPrint},</if>
+            <if test="printCount != null">#{printCount},</if>
+            <if test="printTime != null">#{printTime},</if>
+            <if test="printBy != null">#{printBy},</if>
+            <if test="sixLinkNo != null and sixLinkNo != ''">#{sixLinkNo},</if>
+            <if test="portName != null and portName != ''">#{portName},</if>
+            <if test="billNo != null and billNo != ''">#{billNo},</if>
+            <if test="terminalName != null">#{terminalName},</if>
+            <if test="cargoName != null">#{cargoName},</if>
+            <if test="pieceCount != null">#{pieceCount},</if>
+            <if test="weight != null">#{weight},</if>
+            <if test="contactName != null">#{contactName},</if>
+            <if test="contactPhone != null">#{contactPhone},</if>
         </trim>
     </insert>
 
@@ -508,7 +559,19 @@
             <if test="closeBy != null">close_by = #{closeBy},</if>
             <if test="closeRemark != null">close_remark = #{closeRemark},</if>
             <if test="isfk != null">isfk = #{isfk},</if>
-
+            <if test="isPrint != null">is_print = #{isPrint},</if>
+            <if test="printCount != null">print_count = #{printCount},</if>
+            <if test="printTime != null">print_time = #{printTime},</if>
+            <if test="printBy != null">print_by = #{printBy},</if>
+            <if test="sixLinkNo != null and sixLinkNo != ''">six_link_no = #{sixLinkNo},</if>
+            <if test="portName != null and portName != ''">port_name = #{portName},</if>
+            <if test="billNo != null and billNo != ''">bill_no = #{billNo},</if>
+            <if test="terminalName != null">terminal_name = #{terminalName},</if>
+            <if test="cargoName != null">cargo_name = #{cargoName},</if>
+            <if test="pieceCount != null">piece_count = #{pieceCount},</if>
+            <if test="weight != null">weight = #{weight},</if>
+            <if test="contactName != null">contact_name = #{contactName},</if>
+            <if test="contactPhone != null">contact_phone = #{contactPhone},</if>
         </trim>
         where id = #{id}
     </update>
@@ -607,6 +670,19 @@
                 <if test="item.closeBy != null">close_by = #{item.closeBy},</if>
                 <if test="item.closeRemark != null">close_remark = #{item.closeRemark},</if>
                 <if test="item.isfk != null">isfk = #{item.isfk},</if>
+                <if test="item.isPrint != null">is_print = #{item.isPrint},</if>
+                <if test="item.printCount != null">print_count = #{item.printCount},</if>
+                <if test="item.printTime != null">print_time = #{item.printTime},</if>
+                <if test="item.printBy != null">print_by = #{item.printBy},</if>
+                <if test="item.sixLinkNo != null and item.sixLinkNo != ''">six_link_no = #{item.sixLinkNo},</if>
+                <if test="item.portName != null and item.portName != ''">port_name = #{item.portName},</if>
+                <if test="item.billNo != null and item.billNo != ''">bill_no = #{item.billNo},</if>
+                <if test="item.terminalName != null">terminal_name = #{item.terminalName},</if>
+                <if test="item.cargoName != null">cargo_name = #{item.cargoName},</if>
+                <if test="item.pieceCount != null">piece_count = #{item.pieceCount},</if>
+                <if test="item.weight != null">weight = #{item.weight},</if>
+                <if test="item.contactName != null">contact_name = #{item.contactName},</if>
+                <if test="item.contactPhone != null">contact_phone = #{item.contactPhone},</if>
             </trim>
             where id = #{item.id}
         </foreach>
@@ -705,5 +781,35 @@
 WHERE tdo.dispatch_no = #{no}
 GROUP BY tdo.id
     </select>
+    <select id="selectItineraryLog" resultType="com.ruoyi.tms.domain.vo.DpItineraryLogVo">
+
+        SELECT
+	tr.vehicle_number as vehicleNumber,
+	tr.trip_time as tripTime ,
+	tdo.dispatch_no as dispatchNo ,
+CASE
+		trip_type
+		WHEN 0 THEN
+		'寮�濮嬬敵鎶�'
+		WHEN 3 THEN
+		'瀹℃牳閫氳繃'
+		WHEN 4 THEN
+		'娴峰叧楠屾斁'
+		WHEN 5 THEN
+		'鏀捐绂诲満'
+		end  as remark
+	FROM
+		tms_trip tr
+		LEFT JOIN tms_dispatch_order tdo ON tr.dispatch_order_id = tdo.id
+	WHERE
+		tdo.`status` = 3
+		AND tr.trip_type IN (
+			0,
+			3,
+		4,
+	5)
+	order by tr.trip_time desc
+
+    </select>
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0