puzhibing
2023-08-31 ef04ce57881e6a338b10d596c5eb76b2220598bf
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml
@@ -20,6 +20,12 @@
        <result column="endLng" property="endLng" />
        <result column="boardingTime" property="boardingTime" />
        <result column="getoffTime" property="getoffTime" />
        <result column="boardingAddress" property="boardingAddress"/>
        <result column="boardingLng" property="boardingLng"/>
        <result column="boardingLat" property="boardingLat"/>
        <result column="debusAddress" property="debusAddress"/>
        <result column="debusLng" property="debusLng"/>
        <result column="debusLat" property="debusLat"/>
        <result column="estimatedPrice" property="estimatedPrice" />
        <result column="orderMoney" property="orderMoney" />
        <result column="payMoney" property="payMoney" />
@@ -60,8 +66,8 @@
        o.id, o.code, o.userId, o.driverId, o.`source`, o.agentId, o.branchOfficeId, o.startTime, o.startAddress, o.startLat, o.startLng, o.endAddress, o.endLat, o.endLng,
        o.boardingTime, o.getoffTime, o.estimatedPrice, o.orderMoney, o.payMoney, o.discountedPrice, o.couponId, o.payType, o.payTime, o.`state`, o.status, o.createTime,
        o.startDistance,o.startPrice,o.overDriveDistance,o.overDrivePrice,o.longDistance,o.longDistancePrice,o.overLongDistance,o.overLongDistancePrice,
        o.waitTime,o.waitTimePrice,o.outWaitTime,o.outWaitTimePrice,o.badWeatherDistance,o.badWeatherPrice,o.overBadWeatherDistance,o.overBadWeatherPrice,a.nickname AS userName,
        a.phone AS userPhone,a.cancelCount,a.status AS userStatus,d.name AS driverName,d.phone AS driverPhone
        o.waitTime,o.waitTimePrice,o.outWaitTime,o.outWaitTimePrice,o.badWeatherDistance,o.badWeatherPrice,o.overBadWeatherDistance,o.overBadWeatherPrice,
        o.userPhone,o.userName,a.cancelCount,a.status AS userStatus,d.name AS driverName,d.phone AS driverPhone
    </sql>
    <sql id="Base_Column_Server_Order">
@@ -69,7 +75,7 @@
        o.boardingTime, o.getoffTime, o.estimatedPrice, o.orderMoney, o.payMoney, o.discountedPrice, o.couponId, o.payType, o.payTime, o.`state`, o.status, o.createTime,
        o.startDistance,o.startPrice,o.overDriveDistance,o.overDrivePrice,o.longDistance,o.longDistancePrice,o.overLongDistance,o.overLongDistancePrice,
        o.waitTime,o.waitTimePrice,o.outWaitTime,o.outWaitTimePrice,o.badWeatherDistance,o.badWeatherPrice,o.overBadWeatherDistance,o.overBadWeatherPrice,
        d.name AS driverName,d.phone AS driverPhone
        o.userPhone,o.userName,d.name AS driverName,d.phone AS driverPhone
    </sql>
    <select id="getOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp">
@@ -122,7 +128,7 @@
        GROUP BY `month`
    </select>
    <select id="getDataStatisticsOrderCount" resultType="com.stylefeng.guns.modular.system.controller.resp.PerformanceTableResp">
        SELECT date_format(o.createTime, '%Y-%m') AS monthTime,COUNT(o.id) AS amount,d.userName
        SELECT date_format(o.payTime, '%Y-%m') AS monthTime,COUNT(o.id) AS amount,d.userName
        FROM t_order o
        LEFT JOIN (SELECT id,name AS userName from t_driver) d ON o.driverId = d.id
        <where>
@@ -130,7 +136,7 @@
                AND o.agentId = #{agentId}
            </if>
            <if test="monthDate != null and monthDate != ''">
                AND date_format(o.createTime, '%Y-%m') LIKE concat('',#{monthDate},'%')
                AND date_format(o.payTime, '%Y-%m') LIKE concat('',#{monthDate},'%')
            </if>
            AND (o.`state` = 107 OR o.`state` = 108 OR o.`state` = 109)
            AND d.userName is not null