puzhibing
2024-02-07 387f61d55a8e20bc772b026cba4f8c34dfce5665
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml
@@ -75,8 +75,8 @@
        select
        a.id as id,
        a.state as orderState,
        if(a.type = 4, '同城小件物流订单', '跨城小件物流订单') as orderName,
        DATE_FORMAT(a.travelTime, '%m月%d日 %H:%i') as travelTime,
        if(#{language} = 1, '包裹', if(#{language} = 2, 'Delivery', 'Livraison')) as orderName,
        DATE_FORMAT(a.travelTime, '%m-%d %H:%i') as travelTime,
        a.startAddress as startAddress,
        a.endAddress as endAddress,
        a.startLon as startLon,
@@ -105,7 +105,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,
@@ -116,6 +116,7 @@
        a.endLat as endLat,
        a.orderMoney as orderMoney,
        a.payManner as payManner,
        a.payMoney as payMoney,
        a.trackId as trackId,
      b.nickName as userName,
        a.recipient as nickName,
@@ -130,7 +131,8 @@
        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
        (select isSpecialCar from t_sys_reformist where companyId = a.companyId) as reassign,
        a.driverPay
        from t_order_logistics 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 = a.type and c.state = 2)
@@ -142,19 +144,19 @@
        select
        id as id,
        type as type,
        if(type = 4, '同城小件物流订单', '跨城小件物流订单') as `name`,
        if(#{language} = 1, '包裹', if(#{language} = 2, 'Delivery', 'Livraison')) as `name`,
        DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i:%s') as `time`,
        startAddress as startAddress,
        endAddress as endAddress,
        state as state,
        CONCAT(recipient, '-', recipientPhone) as `user`,
        CONCAT(if(cargoType = 1, '普通货物 x ', '贵重货物 x '), cargoNumber) as cargoNumber,
        CONCAT(if(#{language} = 1, if(cargoType = 1, '普通货物 x ', '贵重货物 x '), if(#{language} = 2, if(cargoType = 1, 'General cargo x ', 'Valuable cargo x '), if(cargoType = 1, 'Pour marchandises générales x ', 'Marchandises de valeur x '))), cargoNumber) as cargoNumber,
        driverId as driverId
        from t_order_logistics where 1 = 1
        <if test="null != driverId">
            and driverId = #{driverId}
        </if>
        and state in (2, 3, 4, 5, 8, 11)
        and state in (2, 3, 4, 5, 8, 11,12)
    </select>
@@ -163,17 +165,18 @@
        select
        id as id,
        type as type,
        if(type = 4, '同城小件物流订单', '跨城小件物流订单') as `name`,
        if(#{language} = 1, '包裹', if(#{language} = 2, 'Delivery', 'Livraison')) as `name`,
        DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i:%s') as time,
        startAddress as startAddress,
        endAddress as endAddress,
        state as state,
        CONCAT(recipient, '-', recipientPhone) as `user`,
        CONCAT(if(cargoType = 1, '普通货物 x ', '贵重货物 x '), cargoNumber) as cargoNumber,
        CONCAT(if(#{language} = 1, if(cargoType = 1, '普通货物 x ', '贵重货物 x '), if(#{language} = 2, if(cargoType = 1, 'General cargo x ', 'Valuable cargo x '), if(cargoType = 1, 'Pour marchandises générales x ', 'Marchandises de valeur x '))), cargoNumber) as cargoNumber,
        orderMoney as orderMoney,
        payManner as payManner,
        UNIX_TIMESTAMP(travelTime) as travelTime,
        remark as remark
        remark as remark,
        driverPay
        from t_order_logistics where driverId = #{uid}
        <if test="state == 1">
            and state not in (1, 7)