Pu Zhibing
2024-11-01 a85ab71180fdcb02b3cae304ebc96bb2ca12423c
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
@@ -93,7 +93,7 @@
            and t1.status = #{req.status}
        </if>
        <if test="req.orderSource != null and req.orderSource != 1 ">
            and t1.orderSource = #{req.orderSource}
            and t1.order_source = #{req.orderSource}
        </if>
        <if test="req.siteId != null ">
            and t1.site_id = #{req.siteId}
@@ -120,8 +120,8 @@
        1 as type,
        title,
        `status`,
        order_amount,
        payment_amount as payment_amount ,
        recharge_amount as order_amount,
        recharge_amount as payment_amount ,
        create_time,
        end_time,
        pay_time,
@@ -601,10 +601,10 @@
        </if>
        <if test="statisticsQueryDto.dayType ==5">
            AND create_time >= #{statisticsQueryDto.startTime}
            AND DATE(create_time) >= #{statisticsQueryDto.startTime}
            AND create_time &lt;= #{statisticsQueryDto.endTime}
            AND DATE(create_time) &lt;= #{statisticsQueryDto.endTime}
        </if>
@@ -702,10 +702,10 @@
        </if>
        <if test="statisticsQueryDto.dayType ==5">
            <if test="statisticsQueryDto.startTime != null">
                AND create_time >= #{statisticsQueryDto.startTime}
                AND DATE(create_time) >= #{statisticsQueryDto.startTime}
            </if>
            <if test="statisticsQueryDto.endTime != null">
                AND create_time &lt;= #{statisticsQueryDto.endTime}
                AND DATE(create_time) &lt;= #{statisticsQueryDto.endTime}
            </if>
        </if>
        GROUP BY
@@ -850,7 +850,7 @@
    </select>
    <select id="chargingList" resultType="com.ruoyi.order.api.vo.ChargingOrderListVO">
        select t1.* ,t1.current as chargingCapacity,t1.recharge_amount as paymentAmount,t1.electricity as chargingCapacity from t_charging_order t1
        select t1.* ,t1.current as chargingCapacity,t1.payment_amount as paymentAmount,t1.electricity as chargingCapacity from t_charging_order t1
        where 1=1
        <if test="null != req.code and req.code!=''">
            and t1.code  LIKE CONCAT('%',#{req.code},'%')
@@ -940,6 +940,13 @@
                    #{siteId}
                </foreach>
            </if>
            <if test="statisticsQueryDto.dayType == 1">
                AND DATE(create_time ) = CURDATE()
            </if>
            <if test="statisticsQueryDto.dayType != 1">
                and DATE(create_time) >= #{statisticsQueryDto.startTime}
                and DATE(create_time)  &lt;= #{statisticsQueryDto.endTime}
            </if>
            group by source_name