无关风月
2024-10-22 e6e316c9bfaeb7e872dc79c010b515707613dde2
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCompanyMapper.xml
@@ -157,7 +157,6 @@
    <select id="queryOperationalData" resultType="map">
        select
        *,
        ROUND(if(orderNum != 0, cancelNum / orderNum, 0) * 100, 2) as cancelProportion,
@@ -186,17 +185,17 @@
            </if>
            group by DATE_FORMAT(insertTime, '%Y-%m-%d')
            union all
            select DATE_FORMAT(a.date, '%Y-%m-%d') as time, 0, count(a.id) as `online`, 0 as orderNum, 0 as cancelNum, 0 as onlinePay, 0 as offlinePay, 0 as money, 0 as complaint
            from t_driver_online a
            select DATE_FORMAT(a.startTime, '%Y-%m-%d') as time, 0, count(a.driverId) as `online`, 0 as orderNum, 0 as cancelNum, 0 as onlinePay, 0 as offlinePay, 0 as money, 0 as complaint
            from (select driverId, DATE_FORMAT(startTime, '%Y-%m-%d') as startTime from t_driver_work group by driverId, DATE_FORMAT(startTime, '%Y-%m-%d')) a
            left join t_driver b on (a.driverId = b.id)
            where assessment = 0
            <if test="null != companyId">
                and if(b.franchiseeId is null or b.franchiseeId = 0, b.companyId = #{companyId}, b.franchiseeId = #{companyId})
            </if>
            <if test="null != start and '' != start and null != end and '' != end">
                and DATE_FORMAT(a.date, '%Y-%m-%d') between #{start} and #{end}
                and DATE_FORMAT(a.startTime, '%Y-%m-%d') between #{start} and #{end}
            </if>
            group by DATE_FORMAT(a.date, '%Y-%m-%d')
            group by DATE_FORMAT(a.startTime, '%Y-%m-%d')
            union all
            <if test="1 == type">
                select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, count(id), 0, 0, 0, 0, 0 from t_order_private_car where isDelete = 1