From 8b09fbc19a96b57bf1d0e4d7c79b51a76aeca554 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 28 三月 2025 19:57:56 +0800 Subject: [PATCH] 修改bug --- DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml | 278 ++++++++----------------------------------------------- 1 files changed, 40 insertions(+), 238 deletions(-) diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml index 3b8afeb..3b2574e 100644 --- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml +++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml @@ -98,48 +98,32 @@ select id as id, (1) as type, - ('专车订单') as `name`, + if(#{language} = 1, '打车', if(#{language} = 2 , 'Ride', 'Course')) as `name`, DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i:%s') as time, startAddress as startAddress, endAddress as endAddress, state as state, orderType as reservation, - driverId as driverId + driverId as driverId, + isFrozen from t_order_private_car where 1 = 1 <if test="null != driverId"> and driverId = #{driverId} </if> - and state = 2 and (UNIX_TIMESTAMP(travelTime) - UNIX_TIMESTAMP(now())) < 1800 - - UNION ALL - - select - id as id, - (1) as type, - ('专车订单') as `name`, - DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i:%s') as time, - startAddress as startAddress, - endAddress as endAddress, - state as state, - orderType as reservation, - driverId as driverId - from t_order_private_car where 1 = 1 - <if test="null != driverId"> - and driverId = #{driverId} - </if> - and state in (3, 4, 5, 6, 11) + and (state in (3, 4, 5, 6, 11) or (state = 2 and (UNIX_TIMESTAMP(travelTime) - UNIX_TIMESTAMP(now())) < 1800)) </if> <if test="state == 2"> select id as id, (1) as type, - ('专车订单') as `name`, + if(#{language} = 1, '打车', if(#{language} = 2 , 'Ride', 'Course')) as `name`, DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i:%s') as time, startAddress as startAddress, endAddress as endAddress, state as state, orderType as reservation, - driverId as driverId + driverId as driverId, + isFrozen from t_order_private_car where 1 = 1 <if test="null != driverId"> and driverId = #{driverId} @@ -155,7 +139,7 @@ select id as id, (1) as type, - ('专车订单') as `name`, + if(#{language} = 1, '打车', if(#{language} = 2 , 'Ride', 'Course')) as `name`, DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i:%s') as time, startAddress as startAddress, endAddress as endAddress, @@ -164,13 +148,17 @@ orderMoney as orderMoney, payManner as payManner, UNIX_TIMESTAMP(travelTime) as travelTime, - remark as remark - from t_order_private_car where driverId = #{driverId} + remark as remark, + driverPay, + cancelMidway, + isFrozen + from t_order_private_car + where driverId = #{driverId} <if test="state == 1"> and state != 1 </if> <if test="state == 2"> - and state = 7 + and (state in (7, 12) or driverPay = 1) </if> <if test="state == 3"> and state = 10 @@ -187,8 +175,8 @@ select id as orderId, state as orderState, - ('专车订单') as orderName, - DATE_FORMAT(travelTime, '%m月%d日 %H:%i') as travelTime, + if(#{language} = 1, '打车', if(#{language} = 2 , 'Ride', 'Course')) as orderName, + DATE_FORMAT(travelTime, '%m-%d %H:%i') as travelTime, startAddress as startAddress, endAddress as endAddress, startLon as startLon, @@ -200,7 +188,8 @@ orderSource as orderSource, orderType as orderType, isReassign as isReassign, - companyId as companyId + companyId as companyId, + tripId from t_order_private_car where id = #{orderId} </select> @@ -212,7 +201,7 @@ a.userId as userId, a.driverId as driverId, a.state as orderState, - DATE_FORMAT(a.travelTime, '%m月%d日 %H:%i') as travelTime_, + DATE_FORMAT(a.travelTime, '%m-%d %H:%i') as travelTime_, DATE_FORMAT(a.travelTime, '%Y-%m-%d %H:%i:%s') as travelTime, DATE_FORMAT(a.arriveTime, '%Y-%m-%d %H:%i:%s') as arriveTime, a.startAddress as startAddress, @@ -223,8 +212,10 @@ a.endLat as endLat, a.orderMoney as orderMoney, a.payManner as payManner, + a.payMoney as payMoney, a.trackId as trackId, b.nickName as nickName, + b.phone as userPhone, a.passengersPhone as phone, a.orderType as reservation, a.telX as telX, @@ -232,15 +223,23 @@ a.bindId as bindId, ( (select count(id) from t_order_private_car where userId = b.id and state in (8, 9)) + - (select count(id) from t_order_taxi where userId = b.id and state in (8, 9)) + - (select count(id) from t_order_cross_city where userId = b.id and state in (8, 9)) + (select count(id) from t_order_logistics where userId = b.id and state in (8, 9)) ) as historyNum, (select phone from t_phone where companyId = a.companyId and `type` = 1) as emergencyCall, c.reason as cancelReason, c.remark as cancelRemark, c.money as cancelPayMoney, - if(c.userType = 1, '用户取消', '平台取消') as cancelUser, - (select isSpecialCar from t_sys_reformist where companyId = a.companyId) as reassign + if(c.userType = 1, '用户', '平台') as cancelUser, + (select isSpecialCar from t_sys_reformist where companyId = a.companyId) as reassign, + a.driverPay, + a.isFrozen, + a.tripId, + a.companyId, + DATE_FORMAT(a.snatchOrderTime, '%Y-%m-%d %H:%i:%s') as snatchOrderTime, + a.cancelMidway, + DATE_FORMAT(a.estimateArriveTime, '%Y-%m-%d %H:%i:%s') as estimateArriveTime, + a.estimateArriveMileage, + a.orderType from t_order_private_car a left join t_user b on (a.userId = b.id) left join t_order_cancel c on (a.id = c.orderId and c.orderType = 1 and c.state = 2) @@ -248,155 +247,13 @@ </select> - <select id="taskMidAxbUnBindSend" resultType="OrderPrivateCar"> - select - id as id, - `type` as `type`, - userId as userId, - serverCarModelId as serverCarModelId, - driverId as driverId, - carId as carId, - orderNum as orderNum, - placementLon as placementLon, - placementLat as placementLat, - placementAddress as placementAddress, - startLon as startLon, - startLat as startLat, - startAddress as startAddress, - endLon as endLon, - endLat as endLat, - endAddress as endAddress, - boardingLon as boardingLon, - boardingLat as boardingLat, - boardingAddress as boardingAddress, - boardingTime as boardingTime, - getoffLon as getoffLon, - getoffLat as getoffLat, - getoffAddress as getoffAddress, - getoffTime as getoffTime, - mileage as mileage, - payManner as payManner, - payType as payType, - orderMoney as orderMoney, - startMileage as startMileage, - startMoney as startMoney, - mileageKilometers as mileageKilometers, - mileageMoney as mileageMoney, - duration as duration, - durationMoney as durationMoney, - wait as wait, - waitMoney as waitMoney, - longDistance as longDistance, - longDistanceMoney as longDistanceMoney, - parkMoney as parkMoney, - roadTollMoney as roadTollMoney, - redPacketMoney as redPacketMoney, - couponMoney as couponMoney, - redPacketId as redPacketId, - couponId as couponId, - discount as discount, - discountMoney as discountMoney, - activityId as activityId, - companyId as companyId, - payMoney as payMoney, - substitute as substitute, - passengers as passengers, - passengersPhone as passengersPhone, - state as state, - insertTime as insertTime, - travelTime as travelTime, - snatchOrderTime as snatchOrderTime, - setOutTime as setOutTime, - arriveTime as arriveTime, - startServiceTime as startServiceTime, - endServiceTime as endServiceTime, - orderType as orderType, - orderSource as orderSource, - invoiceId as invoiceId, - isReassign as isReassign, - reassignNotice as reassignNotice, - trackId as trackId, - isDelete as isDelete, - oldState as oldState, - telX as telX, - bindId as bindId - from t_order_private_car where (state in (8, 9) and telX != '' and telX is not null and (UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(endServiceTime)) > 1800) or (state = 10 and telX != '' and telX is not null) + <select id="taskMidAxbUnBindSend" resultType="com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar"> + select * from t_order_private_car where (state in (8, 9) and telX != '' and telX is not null and (UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(endServiceTime)) > 1800) or (state = 10 and telX != '' and telX is not null) </select> - <select id="queryByState" resultType="OrderPrivateCar"> - select - id as id, - `type` as `type`, - userId as userId, - serverCarModelId as serverCarModelId, - driverId as driverId, - carId as carId, - orderNum as orderNum, - placementLon as placementLon, - placementLat as placementLat, - placementAddress as placementAddress, - startLon as startLon, - startLat as startLat, - startAddress as startAddress, - endLon as endLon, - endLat as endLat, - endAddress as endAddress, - boardingLon as boardingLon, - boardingLat as boardingLat, - boardingAddress as boardingAddress, - boardingTime as boardingTime, - getoffLon as getoffLon, - getoffLat as getoffLat, - getoffAddress as getoffAddress, - getoffTime as getoffTime, - mileage as mileage, - payManner as payManner, - payType as payType, - orderMoney as orderMoney, - startMileage as startMileage, - startMoney as startMoney, - mileageKilometers as mileageKilometers, - mileageMoney as mileageMoney, - duration as duration, - durationMoney as durationMoney, - wait as wait, - waitMoney as waitMoney, - longDistance as longDistance, - longDistanceMoney as longDistanceMoney, - parkMoney as parkMoney, - roadTollMoney as roadTollMoney, - redPacketMoney as redPacketMoney, - couponMoney as couponMoney, - redPacketId as redPacketId, - couponId as couponId, - discount as discount, - discountMoney as discountMoney, - activityId as activityId, - companyId as companyId, - payMoney as payMoney, - substitute as substitute, - passengers as passengers, - passengersPhone as passengersPhone, - state as state, - insertTime as insertTime, - travelTime as travelTime, - snatchOrderTime as snatchOrderTime, - setOutTime as setOutTime, - arriveTime as arriveTime, - startServiceTime as startServiceTime, - endServiceTime as endServiceTime, - orderType as orderType, - orderSource as orderSource, - invoiceId as invoiceId, - isReassign as isReassign, - reassignNotice as reassignNotice, - trackId as trackId, - isDelete as isDelete, - oldState as oldState, - telX as telX, - bindId as bindId - from t_order_private_car where isDelete = 1 and userId = #{uid} + <select id="queryByState" resultType="com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar"> + select * from t_order_private_car where isDelete = 1 and userId = #{uid} <if test="null != orderType"> and orderType = #{orderType} </if> @@ -412,63 +269,8 @@ </select> - <select id="query" resultType="OrderPrivateCar"> - select - id as id, - userId as userId, - driverId as driverId, - carId as carId, - orderNum as orderNum, - placementLon as placementLon, - placementLat as placementLat, - placementAddress as placementAddress, - startLon as startLon, - startLat as startLat, - startAddress as startAddress, - endLon as endLon, - endLat as endLat, - endAddress as endAddress, - boardingLon as boardingLon, - boardingLat as boardingLat, - boardingAddress as boardingAddress, - boardingTime as boardingTime, - getoffLon as getoffLon, - getoffLat as getoffLat, - getoffAddress as getoffAddress, - getoffTime as getoffTime, - mileage as mileage, - payManner as payManner, - payType as payType, - orderMoney as orderMoney, - parkMoney as parkMoney, - roadTollMoney as roadTollMoney, - redPacketMoney as redPacketMoney, - couponMoney as couponMoney, - redPacketId as redPacketId, - couponId as couponId, - discount as discount, - discountMoney as discountMoney, - activityId as activityId, - companyId as companyId, - payMoney as payMoney, - substitute as substitute, - passengers as passengers, - passengersPhone as passengersPhone, - state as state, - insertTime as insertTime, - travelTime as travelTime, - snatchOrderTime as snatchOrderTime, - setOutTime as setOutTime, - arriveTime as arriveTime, - startServiceTime as startServiceTime, - endServiceTime as endServiceTime, - orderType as orderType, - orderSource as orderSource, - invoiceId as invoiceId, - isReassign as isReassign, - trackId as trackId, - orderType as reservation - from t_order_private_car where 1 = 1 + <select id="query" resultType="com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar"> + select * from t_order_private_car where 1 = 1 <if test="null != state"> and state in <foreach collection="state" item="item" index="index" open="(" separator="," close=")"> -- Gitblit v1.7.1