From 5269c06d291f9f18d082983f63c4afb193a6bd80 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期二, 29 七月 2025 17:29:56 +0800
Subject: [PATCH] 新增时间查询状态

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

diff --git a/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml b/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
index 6884b7c..461e63f 100644
--- a/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
@@ -77,9 +77,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 #{requiredArrivalTimeEnd} and #{requiredArrivalTimeEnd}</if>
+        <if test="actualArrivalTimeBegin != null and actualArrivalTimeBegin!='' and actualArrivalTimeEnd != null and actualArrivalTimeEnd!='' "> and ts.ACTUAL_ARRIVAL_TIME between #{actualArrivalTimeEnd} 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>
@@ -256,6 +256,34 @@
 	bfd.ENTITY_ID = #{no}
 
     </select>
+    <select id="selectDispatchOrderAttachment" resultType="com.ruoyi.cwgl.domain.vo.DispatchOrderAttachmentVo">
+SELECT
+-- 	image.PATH,
+	CONCAT('https://tms.ygalogisticspark.com/ImageViewServlet?id=',image.id) as imageUrl,
+	-- tof.FEE_TYPE_ID '璐圭敤绫诲瀷ID',
+	bfi.FEE_TYPE as feeItem,
+	tof.account as account,
+	case tof.CURRENCY_ID
+		when 1 then '娓竵'
+		when 2 then '浜烘皯甯�'
+		else '鏈煡'
+	end as currency
+
+FROM
+-- 鍏朵粬璐圭敤琛�
+	Tms_Other_Fee tof
+-- 璋冨害鍗曡〃
+	LEFT JOIN tms_shipment ts ON tof.dispatch_Order_Id = ts.id
+-- 闄勪欢琛�
+	LEFT JOIN Thorn_Attachment image ON image.OBJ_ID = tof.id
+-- 璐圭敤绫诲瀷琛�
+	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'
+
+
+    </select>
 
     <!-- 鏂板 -->
     <insert id="insertDispatchOrder" parameterType="com.ruoyi.cwgl.domain.DispatchOrder"  useGeneratedKeys="true" keyProperty="id">

--
Gitblit v1.8.0