From 08b030a4cb662725c4f73e3b8a531de2c593369b Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期一, 22 十二月 2025 16:01:13 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cwxt_master' into cwxt_master
---
service/src/main/resources/mapper/cwgl/PendingSettlementBusinessMapper.xml | 31 ++++++++++++++++++++++---------
1 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/service/src/main/resources/mapper/cwgl/PendingSettlementBusinessMapper.xml b/service/src/main/resources/mapper/cwgl/PendingSettlementBusinessMapper.xml
index ac244be..63b954d 100644
--- a/service/src/main/resources/mapper/cwgl/PendingSettlementBusinessMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/PendingSettlementBusinessMapper.xml
@@ -76,7 +76,6 @@
<if test="carrierId != null and carrierId != ''"> and thisTab.carrier_id = #{carrierId}</if>
<if test="projectName != null and projectName != ''"> and thisTab.project_name like concat('%', #{projectName}, '%')</if>
<if test="dispatchNo != null and dispatchNo != ''"> and thisTab.dispatch_no = #{dispatchNo}</if>
- <if test="createdTime != null "> and thisTab.created_time = #{createdTime}</if>
<if test="transportMode != null and transportMode != ''"> and thisTab.transport_mode = #{transportMode}</if>
<if test="productId != null and productId != ''"> and thisTab.product_id = #{productId}</if>
<if test="customerName != null and customerName != ''"> and thisTab.customer_name like concat('%', #{customerName}, '%')</if>
@@ -100,6 +99,7 @@
<if test="actualDepartureTimeBegin != null and actualDepartureTimeBegin != '' and actualDepartureTimeEnd != null and actualDepartureTimeEnd != ''"> and thisTab.actual_departure_time between #{actualDepartureTimeBegin} and #{actualDepartureTimeEnd}</if>
<if test="requiredArrivalTimeBegin != null and requiredArrivalTimeBegin != '' and requiredArrivalTimeEnd != null and requiredArrivalTimeEnd != ''"> and thisTab.required_arrival_time between #{requiredArrivalTimeBegin} and #{requiredArrivalTimeEnd}</if>
<if test="actualArrivalTimeBegin != null and actualArrivalTimeBegin != '' and actualArrivalTimeEnd != null and actualArrivalTimeEnd != ''"> and thisTab.actual_arrival_time between #{actualArrivalTimeBegin} and #{actualArrivalTimeEnd}</if>
+ <if test="createdTimeBegin != null and createdTimeBegin != '' and createdTimeEnd != null and createdTimeEnd != ''"> and thisTab.created_time between #{createdTimeBegin} and #{createdTimeEnd}</if>
<if test="beReturn != null and beReturn != ''"> and thisTab.be_return = #{beReturn}</if>
<if test="dispatchQuantity != null "> and thisTab.dispatch_quantity = #{dispatchQuantity}</if>
<if test="dispatchWeight != null "> and thisTab.dispatch_weight = #{dispatchWeight}</if>
@@ -532,7 +532,7 @@
</foreach>
</update>
<update id="updeteCwData">
- update pending_settlement_business set IS_SYNC = 1
+ update tms_shipment set IS_SYNC = 1
where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
@@ -540,18 +540,24 @@
</update>
<update id="updatePendingSettlementBusinessIsCreate">
-
UPDATE pending_settlement_business
- SET is_create = 1 ,bill_id = #{id},bill_name = #{billName},related_bill_status = 1
+ SET
+ is_create = 1,
+ bill_id = #{id},
+ bill_name = #{billName},
+ related_bill_status = 1
WHERE dispatch_no IN
<foreach item="item" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<update id="updatePendingSettlementBusinessByBillId">
- UPDATE pending_settlement_business set bill_name = #{billName}
- where bill_id = #{id}
-
+ UPDATE pending_settlement_business p
+ JOIN estimated_receivable e ON p.dispatch_no = e.dispatch_no
+ SET
+ p.bill_name = #{billName},
+ e.related_bill_name = #{billName}
+ WHERE p.bill_id = #{id}
</update>
<update id="updateEstimatedReceivableBillStatus">
UPDATE pending_settlement_business
@@ -573,8 +579,15 @@
</foreach>
</delete>
<delete id="cancelRelevancy">
- UPDATE pending_settlement_business set bill_id = null ,bill_name = null,is_create = 0,related_bill_status = 0
- where id = #{id}
+ UPDATE pending_settlement_business p
+LEFT JOIN estimated_receivable e ON p.dispatch_no = e.dispatch_no
+SET
+ p.bill_id = NULL,
+ p.bill_name = NULL,
+ p.is_create = 0,
+ p.related_bill_status = 0,
+ e.related_bill_name = NULL
+ WHERE p.id = #{id}
</delete>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0