From 849648e82e5dec96f9f30fcc9c9bd799268b1f4c Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期四, 09 四月 2026 10:40:44 +0800
Subject: [PATCH] 新增资金流水导入
---
service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml | 31 +++++++++++++++++++++++++------
1 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml b/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
index 4215519..6ab25c3 100644
--- a/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
@@ -27,10 +27,12 @@
<result property="quantity" column="quantity" />
<result property="dispatchQuantity" column="dispatch_quantity" />
<result property="remark" column="remark" />
+ <result property="boxNum" column="box_num" />
+ <result property="requiredDepartureTime" column="required_departure_time" />
</resultMap>
<sql id="selectKeyCollectionInfoVo">
- select thisTab.id, thisTab.customer_name, thisTab.carrier, thisTab.dispatch_no, thisTab.driver_name, thisTab.driver_mobile, thisTab.license_plate_number, thisTab.order_time, thisTab.order_created_time, thisTab.dispatch_created_time, thisTab.key_collection_time, thisTab.estimated_departure_time, thisTab.required_arrival_time, thisTab.consignor_address, thisTab.consignee_address, thisTab.main_driver, thisTab.point_num, thisTab.transport_mode, thisTab.assistant_driver, thisTab.quantity, thisTab.dispatch_quantity, thisTab.remark from key_collection_info AS thisTab
+ select thisTab.id, thisTab.customer_name, thisTab.carrier, thisTab.dispatch_no, thisTab.driver_name, thisTab.driver_mobile, thisTab.license_plate_number, thisTab.order_time, thisTab.order_created_time, thisTab.dispatch_created_time, thisTab.key_collection_time, thisTab.estimated_departure_time, thisTab.required_arrival_time, thisTab.consignor_address, thisTab.consignee_address, thisTab.main_driver, thisTab.point_num, thisTab.transport_mode, thisTab.assistant_driver, thisTab.quantity, thisTab.dispatch_quantity, thisTab.remark, thisTab.box_num , thisTab.required_departure_time from key_collection_info AS thisTab
</sql>
<sql id="selectKeyCollectionInfoVoCount">
select count(0) from key_collection_info as thisTab
@@ -43,9 +45,10 @@
<if test="driverName != null and driverName != ''"> and thisTab.driver_name like concat('%', #{driverName}, '%')</if>
<if test="driverMobile != null and driverMobile != ''"> and thisTab.driver_mobile = #{driverMobile}</if>
<if test="licensePlateNumber != null and licensePlateNumber != ''"> and thisTab.license_plate_number = #{licensePlateNumber}</if>
- <if test="orderTime != null "> and thisTab.order_time = #{orderTime}</if>
- <if test="orderCreatedTime != null "> and thisTab.order_created_time = #{orderCreatedTime}</if>
- <if test="dispatchCreatedTime != null "> and thisTab.dispatch_created_time = #{dispatchCreatedTime}</if>
+ <if test="orderTimeBegin != null and orderTimeBegin!='' and orderTimeEnd != null and orderTimeEnd!='' "> and thisTab.order_time between #{orderTimeBegin} and #{orderTimeEnd}</if>
+ <if test="orderCreatedTimeBegin != null and orderCreatedTimeBegin!='' and orderCreatedTimeEnd != null and orderCreatedTimeEnd!='' "> and thisTab.order_created_time between #{orderCreatedTimeBegin} and #{orderCreatedTimeEnd}</if>
+ <if test="dispatchCreatedTimeBegin != null and dispatchCreatedTimeBegin!='' and dispatchCreatedTimeEnd != null and dispatchCreatedTimeEnd!='' "> and thisTab.dispatch_created_time between #{dispatchCreatedTimeBegin} and #{dispatchCreatedTimeEnd}</if>
+
<if test="keyCollectionTime != null "> and thisTab.key_collection_time = #{keyCollectionTime}</if>
<if test="estimatedDepartureTime != null "> and thisTab.estimated_departure_time = #{estimatedDepartureTime}</if>
<if test="requiredArrivalTime != null "> and thisTab.required_arrival_time = #{requiredArrivalTime}</if>
@@ -56,6 +59,7 @@
<if test="transportMode != null and transportMode != ''"> and thisTab.transport_mode = #{transportMode}</if>
<if test="assistantDriver != null and assistantDriver != ''"> and thisTab.assistant_driver = #{assistantDriver}</if>
<if test="quantity != null "> and thisTab.quantity = #{quantity}</if>
+ <if test="boxNum != null "> and thisTab.box_num = #{boxNum}</if>
<if test="dispatchQuantity != null "> and thisTab.dispatch_quantity = #{dispatchQuantity}</if>
</sql>
@@ -87,11 +91,12 @@
driver_m.`NAME` as driverName,
driver_m.MOBILE as driverMobile,
vhc.LICENSE_PLATE_NUMBER as licensePlateNumber,
+ vhc.NAME as boxNum,
ord.ORDER_TIME as orderTime,
ord.CREATED_TIME as orderCreatedTime,
ts.CREATED_TIME as dispatchCreatedTime,
now() as keyCollectionTime, -- 鏀捐姹傛煡璇㈠埌鐨勬椂闂�
- ord.ESTIMATED_DEPARTURE_TIME as estimatedDepartureTime,
+ ord.REQUIRED_DEPARTURE_TIME as estimatedDepartureTime,
ord.CONSIGNOR_ADDRESS_ADDR_INFO as consignorAddress,
ord.CONSIGNEE_ADDRESS_ADDR_INFO as consigneeAddress,
driver_m.`NAME` as mainDriver,
@@ -102,8 +107,9 @@
ts.REQUIRED_ARRIVAL_TIME as requiredArrivalTime, -- 娣诲姞鍒悕
ts.DISPATCH_QUANTITY as dispatchQuantity,
ts.REMARK as remark,
+ ts.REQUIRED_DEPARTURE_TIME as requiredDepartureTime ,
TIMESTAMPDIFF(HOUR, ord.ORDER_TIME, ord.CREATED_TIME) as schedulingTimeout,
- TIMESTAMPDIFF(HOUR, ord.ESTIMATED_DEPARTURE_TIME, NOW()) as keyTimeout
+ TIMESTAMPDIFF(HOUR, ts.REQUIRED_DEPARTURE_TIME, NOW()) as keyTimeout
FROM
tms_shipment ts
@@ -125,6 +131,15 @@
ORDER BY ord.ESTIMATED_DEPARTURE_TIME ASC
LIMIT 1
+ </select>
+ <select id="selectCwBoxNum" resultType="java.lang.String">
+ SELECT `NAME` from tms_vehicle where LICENSE_PLATE_NUMBER = #{licensePlateNumber} and `NAME` is not null LIMIT 1
+
+ </select>
+ <select id="selectNameByMobile" resultType="java.lang.String">
+ SELECT NAME from tms_driver where MOBILE = #{driverCode}
+ limit 1
+
</select>
<!-- 鏂板 -->
@@ -152,6 +167,8 @@
<if test="quantity != null">quantity,</if>
<if test="dispatchQuantity != null">dispatch_quantity,</if>
<if test="remark != null">remark,</if>
+ <if test="boxNum != null">box_num,</if>
+ <if test="requiredDepartureTime != null">required_departure_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customerName != null">#{customerName},</if>
@@ -175,6 +192,8 @@
<if test="quantity != null">#{quantity},</if>
<if test="dispatchQuantity != null">#{dispatchQuantity},</if>
<if test="remark != null">#{remark},</if>
+ <if test="boxNum != null">#{boxNum},</if>
+ <if test="requiredDepartureTime != null">#{requiredDepartureTime},</if>
</trim>
</insert>
--
Gitblit v1.8.0