From baf6391dc02bd535e1a29ab9536cc477360be233 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期二, 21 十月 2025 17:37:01 +0800
Subject: [PATCH] 新增每日车辆数
---
service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml | 53 ++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml b/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
index 0569543..e07ec65 100644
--- a/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
@@ -7,6 +7,7 @@
<resultMap type="com.ruoyi.cwgl.domain.DispatchOrder" id="DispatchOrderResult">
<result property="id" column="id" />
<result property="dispatchNo" column="dispatch_no" />
+ <result property="customerName" column="customer_name" />
<result property="transportMode" column="transport_mode" />
<result property="productName" column="product_name" />
<result property="carrierName" column="carrier_name" />
@@ -65,7 +66,8 @@
<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="dispatchNo != null and dispatchNo != ''"> and ts.DISPATCH_NO like concat('%', #{dispatchNo}, '%')</if>
+ <if test="customerName != null and customerName != ''"> and customer.`NAME` like concat('%', #{customerName}, '%')</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>
@@ -77,9 +79,9 @@
<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="actualDepartureTimeBegin != null and actualDepartureTimeBegin!='' and actualDepartureTimeEnd != null and actualDepartureTimeEnd!='' "> and ts.ACTUAL_DEPARTURE_TIME between #{actualDepartureTimeBegin} and #{actualDepartureTimeEnd}</if>
+ <if test="requiredArrivalTimeBegin != null and requiredArrivalTimeBegin!='' and requiredArrivalTimeEnd != null and requiredArrivalTimeEnd!='' "> and ts.REQUIRED_ARRIVAL_TIME between #{requiredArrivalTimeBegin} and #{requiredArrivalTimeEnd}</if>
+ <if test="actualArrivalTimeBegin != null and actualArrivalTimeBegin!='' and actualArrivalTimeEnd != null and actualArrivalTimeEnd!='' "> and ts.ACTUAL_ARRIVAL_TIME between #{actualArrivalTimeBegin} and #{actualArrivalTimeEnd}</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>
@@ -111,6 +113,7 @@
<select id="selectDispatchOrderList2" parameterType="com.ruoyi.cwgl.domain.DispatchOrder" resultMap="DispatchOrderResult">
SELECT
ts.DISPATCH_NO as 'dispatch_no',
+ customer.`NAME` as 'customer_name',
ts.TRANSPORT_MODE as 'transport_mode',
ts.PRODUCT_ID as 'product_name',
bp.NAME as 'carrier_name',
@@ -132,6 +135,7 @@
ts.BE_RETURN as 'be_return',
ts.DISPATCH_QUANTITY as 'dispatch_quantity',
ts.DISPATCH_WEIGHT as 'dispatch_weight',
+ ts.CREATED_TIME as 'create_time',
ts.DISPATCH_VOLUME as 'dispatch_volume',
-- ts.EMPTY_MILEAGE '绌鸿浇閲岀▼锛堝叕閲岋級',
-- ts.EMPTY_FUEL '绌鸿浇娌硅�楋紙鍗囷級',
@@ -154,7 +158,8 @@
FROM
tms_shipment ts
-- 璁㈠崟琛�
- -- LEFT JOIN oms_order ord ON ts.DISPATCH_NO = ord.DISPATCH_CODE
+ LEFT JOIN oms_order ord ON ts.DISPATCH_NO = ord.DISPATCH_CODE
+ LEFT join base_customer customer on customer.ID=ord.CUSTOMER_ID
left join tms_vehicle vhc on ts.VEHICLE_ID=vhc.id
left join base_provider bp on bp.ID=ts.CARRIER_ID
-- 鍙告満琛�
@@ -171,6 +176,41 @@
</where>
order by ts.CREATED_TIME desc
</select>
+
+ <select id="selectDispatchOrderItemByNos" resultType="com.ruoyi.cwgl.domain.DispatchOrderItem">
+ SELECT
+ bfd.ENTITY_ID as 'dispatch_no',
+ bfd.CREATED_TIME AS feeDataCreatedTime,
+ bfd.CHECK_STATUS AS checkStatus,
+ bfd.CURRENCY_TYPE AS currencyType,
+ bfd.FEE_ITEM AS feeItem,
+ bfd.FEE_TIME AS feeTime,
+ bfd.REMARK AS remark,
+ bfd.SETTLE_FEE AS settleFee,
+ bfd.STATUS AS feeDataStatus,
+
+ bill.NAME AS billName,
+ bill.STATUS AS billStatus,
+
+ fb.TYPE AS billType,
+ bt.FIELDS AS settableFeeItems
+
+ FROM bms_fee_data bfd
+ LEFT JOIN bms_bill bill ON bill.ID = bfd.BILL_ID
+ LEFT JOIN bms_fee_book fb ON fb.ID = bill.FEE_BOOK_ID
+ LEFT JOIN bms_bill_template bt ON bt.ID = bill.BILL_TEMPLATE_ID
+ LEFT JOIN oms_order ord ON bfd.ENTITY_ID = ord.DISPATCH_CODE
+
+ WHERE bfd.ENTITY_ID in
+ <foreach collection="nos" item="no" open="(" separator="," close=")">
+ #{no}
+ </foreach>
+
+
+ </select>
+
+
+
<select id="selectDispatchOrderItemByNo" resultType="com.ruoyi.cwgl.domain.DispatchOrderItem">
SELECT
ts.CREATED_TIME as createdTime,
@@ -257,7 +297,6 @@
</select>
<select id="selectDispatchOrderAttachment" resultType="com.ruoyi.cwgl.domain.vo.DispatchOrderAttachmentVo">
- -- 鏌ヨ璋冨害鍗曞彿鎴栬�呰皟搴﹀崟ID鏌ラ檮浠�
SELECT
-- image.PATH,
CONCAT('https://tms.ygalogisticspark.com/ImageViewServlet?id=',image.id) as imageUrl,
@@ -281,7 +320,7 @@
left join base_fee_item bfi on bfi.id=tof.FEE_TYPE_ID
WHERE
ts.DISPATCH_NO = #{no}
- AND image.biz_Type = 'com.vtradex.tms.core.model.entity.fee.TmsOtherFee';
+ AND image.biz_Type = 'com.vtradex.tms.core.model.entity.fee.TmsOtherFee'
</select>
--
Gitblit v1.8.0