From 9ff903e0e9db52e161896c44cbe03dbbbc5fdd09 Mon Sep 17 00:00:00 2001
From: 15815213711 <a13118667520@163.com>
Date: 星期二, 29 七月 2025 14:16:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master

---
 service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml |   86 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml b/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
index c5218ba..de53e3d 100644
--- a/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
@@ -64,6 +64,28 @@
         <if test="status != null  and status != ''"> and thisTab.status = #{status}</if>
         <if test="isDeleted != null "> and thisTab.is_deleted = #{isDeleted}</if>
     </sql>
+    <sql id="whereCondition2">
+        <if test="dispatchNo != null  and dispatchNo != ''"> and ts.DISPATCH_NO = #{dispatchNo}</if>
+        <if test="transportMode != null  and transportMode != ''"> and ts.TRANSPORT_MODE = #{transportMode}</if>
+        <if test="productName != null  and productName != ''"> and  ts.PRODUCT_ID like concat('%', #{productName}, '%')</if>
+        <if test="carrierName != null  and carrierName != ''"> and  bp.NAME  like concat('%', #{carrierName}, '%')</if>
+        <if test="departureLocationName != null  and departureLocationName != ''"> and  location_d.NAME_TREE like concat('%', #{departureLocationName}, '%')</if>
+        <if test="arrivalLocationName != null  and arrivalLocationName != ''"> and location_a.NAME_TREE like concat('%', #{arrivalLocationName}, '%')</if>
+        <if test="licensePlateNumber != null  and licensePlateNumber != ''"> and vhc.LICENSE_PLATE_NUMBER = #{licensePlateNumber}</if>
+        <if test="vehiclePlateId != null  and vehiclePlateId != ''"> and ts.VEHICLE_PLATE_ID = #{vehiclePlateId}</if>
+        <if test="mainDriverName != null  and mainDriverName != ''"> and  driver_m.NAME  like concat('%', #{mainDriverName}, '%')</if>
+        <if test="assistantDriverName != null  and assistantDriverName != ''"> and  driver_a.NAME like concat('%', #{assistantDriverName}, '%')</if>
+        <if test="pointNum != null "> and ts.POINT_NUM = #{pointNum}</if>
+        <if test="quantity != null "> and ts.QUANTITY = #{quantity}</if>
+        <if test="actualDepartureTime != null "> and ts.ACTUAL_DEPARTURE_TIME = #{actualDepartureTime}</if>
+        <if test="requiredArrivalTime != null "> and ts.REQUIRED_ARRIVAL_TIME = #{requiredArrivalTime}</if>
+        <if test="actualArrivalTime != null "> and ts.ACTUAL_ARRIVAL_TIME = #{actualArrivalTime}</if>
+        <if test="beReturn != null  and beReturn != ''"> and ts.BE_RETURN = #{beReturn}</if>
+        <if test="dispatchQuantity != null "> and ts.DISPATCH_QUANTITY = #{dispatchQuantity}</if>
+        <if test="dispatchWeight != null "> and ts.DISPATCH_WEIGHT = #{dispatchWeight}</if>
+        <if test="dispatchVolume != null "> and ts.DISPATCH_VOLUME = #{dispatchVolume}</if>
+        <if test="status != null  and status != ''"> and ts.STATUS = #{status}</if>
+    </sql>
 
     <!--鏌ヨ-->
     <select id="selectDispatchOrderById" parameterType="Integer" resultMap="DispatchOrderResult">
@@ -86,6 +108,70 @@
         order by thisTab.id desc
     </select>
 
+    <select id="selectDispatchOrderList2" parameterType="com.ruoyi.cwgl.domain.DispatchOrder" resultMap="DispatchOrderResult">
+        SELECT
+        ts.DISPATCH_NO as 'dispatch_no',
+        ts.TRANSPORT_MODE as 'transport_mode',
+        ts.PRODUCT_ID as 'product_name',
+        bp.NAME as 'carrier_name',
+        location_d.NAME_TREE as 'departure_location_name',
+        -- ts.ARRIVAL_LOCATION_ID '鐩殑鍦癐D',
+        location_a.NAME_TREE  as 'arrival_location_name',
+        -- ts.VEHICLE_ID '杩愯緭宸ュ叿ID',
+        vhc.LICENSE_PLATE_NUMBER  as 'license_plate_number',
+        ts.VEHICLE_PLATE_ID as 'vehicle_plate_id',
+        driver_m.NAME as 'main_driver_name',
+        driver_a.NAME as 'assistant_driver_name',
+        ts.POINT_NUM as 'point_num',
+        -- ts.ELECTRONIC_LOCK '鐢靛瓙閿�',
+        -- ts.RE_WEIGHING_WEIGHT '澶嶇閲嶉噺',
+        ts.QUANTITY as 'quantity',
+        ts.ACTUAL_DEPARTURE_TIME as'actual_departure_time',
+        ts.REQUIRED_ARRIVAL_TIME as 'required_arrival_time',
+        ts.ACTUAL_ARRIVAL_TIME as 'actual_arrival_time',
+        ts.BE_RETURN as 'be_return',
+        ts.DISPATCH_QUANTITY as 'dispatch_quantity',
+        ts.DISPATCH_WEIGHT as 'dispatch_weight',
+        ts.DISPATCH_VOLUME as 'dispatch_volume',
+        -- ts.EMPTY_MILEAGE '绌鸿浇閲岀▼锛堝叕閲岋級',
+        -- ts.EMPTY_FUEL '绌鸿浇娌硅�楋紙鍗囷級',
+        -- ts.HEAVY_MILEAGE '閲嶈浇閲岀▼锛堝叕閲岋級',
+        -- ts.HEAVY_FUEL '閲嶈浇娌硅�楋紙鍗�)',
+        -- ts.BE_SCHEDULED '鏄惁鎸夌彮娆�',
+        -- ts.TRACKING_NO '蹇�掑崟鍙�',
+        -- ts.SEAL_NO '閾呭皝鍙�',
+        -- ts.SCHEDULE_NO '鐝鍙�',
+         ts.STATUS AS 'status',
+        -- ts.ESTIMATED_COST '棰勪及璐圭敤',
+        -- ts.ESTIMATED_CARRIER_NUM '棰勪及鎵胯繍鍟嗘暟',
+        -- ts.ESTIMATED_COST_SAVING '棰勪及鑺傜害璐圭敤',
+        -- ts.TRANSPORT_LINE '杩愯緭绾胯矾',
+        ts.REMARK 'remark'
+        -- ts.DISPATCH_PERMISSION_GROUP '璋冨害鏉冮檺鍒嗙粍',
+        -- ts.DISPATCH_GROUP '璋冨害鍒嗙粍',
+        -- ts.ROUTE_CODE '绾胯矾鍙�',
+
+        FROM
+        tms_shipment ts
+        -- 璁㈠崟琛�
+        -- 	LEFT JOIN oms_order ord ON ts.DISPATCH_NO = ord.DISPATCH_CODE
+        left join tms_vehicle  vhc on ts.VEHICLE_ID=vhc.id
+        left join base_provider bp on bp.ID=ts.CARRIER_ID
+        -- 鍙告満琛�
+        left join tms_driver driver_m on driver_m.ID=ts.MAIN_DRIVER_ID
+        -- 鍙告満琛�
+        left join tms_driver driver_a on driver_a.ID=ts.ASSISTANT_DRIVER_ID
+        -- 鍦板尯琛�
+        left join base_location location_a on location_a.ID =ts.ARRIVAL_LOCATION_ID
+        -- 鍦板尯琛�
+        left join base_location location_d on location_d.ID =ts.DEPARTURE_LOCATION_ID
+--         where ts.CREATED_TIME >'2025-07-01 00:00:01'
+             <where>
+            <include refid="whereCondition2"/>
+        </where>
+        order by ts.CREATED_TIME desc
+    </select>
+
     <!-- 鏂板 -->
     <insert id="insertDispatchOrder" parameterType="com.ruoyi.cwgl.domain.DispatchOrder"  useGeneratedKeys="true" keyProperty="id">
         insert into dispatch_order

--
Gitblit v1.8.0