ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/query/SiteQuery.java
@@ -29,4 +29,7 @@ @ApiModelProperty(value = "城市code") private String cityCode; @ApiModelProperty(value = "经营类型 1=直营 2=非直营") private Integer businessCategory; } ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/SiteMapper.xml
@@ -184,7 +184,7 @@ t_accounting_strategy_detail a left join t_accounting_strategy b on (a.accounting_strategy_id = b.id) where a.del_flag = 0 and b.del_flag = 0 and b.audit_status = 3 where a.del_flag = 0 and b.del_flag = 0 AND DATE_FORMAT(NOW(), '%H:%i:%s') between a.start_time and CASE WHEN a.end_time = '00:00' THEN '23:59:59' ELSE a.end_time END) tasd on (ts.accounting_strategy_id = tasd.accounting_strategy_id) <where> @@ -193,6 +193,9 @@ </if> <if test="null != query.cityCode and '' != query.cityCode"> and ts.city_code = #{query.cityCode} </if> <if test="null != query.businessCategory"> and ts.business_category = #{query.businessCategory} </if> AND ts.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} AND ts.status = ${@com.ruoyi.common.core.enums.status.SiteStatusEnum@NORMAL_USE.getCode()} @@ -325,7 +328,7 @@ t_accounting_strategy_detail a left join t_accounting_strategy b on (a.accounting_strategy_id = b.id) where a.del_flag = 0 and b.del_flag = 0 and b.audit_status = 3 where a.del_flag = 0 and b.del_flag = 0 AND DATE_FORMAT(NOW(), '%H:%i:%s') between a.start_time AND CASE WHEN a.end_time = '00:00' THEN '23:59:59' ELSE a.end_time END) tasd on (ts.accounting_strategy_id = tasd.accounting_strategy_id) <where> @@ -335,6 +338,9 @@ <if test="null != query.cityCode and '' != query.cityCode"> and ts.city_code = #{query.cityCode} </if> <if test="null != query.businessCategory"> and ts.business_category = #{query.businessCategory} </if> AND ts.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} AND ts.status = ${@com.ruoyi.common.core.enums.status.SiteStatusEnum@NORMAL_USE.getCode()} AND (tp.partner_type IS NULL OR tp.partner_type != 3) ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
@@ -1891,7 +1891,7 @@ <select id="getChargingOrderCount" resultType="java.util.Map"> select count(a.id) as num, count(distinct a.id) as num, sum(b.charging_capacity) as charging_capacity, sum(CASE WHEN a.order_source = 0 THEN b.period_service_price WHEN a.order_source = 1 THEN b.period_service_price @@ -1900,14 +1900,12 @@ sum(b.period_electric_price) as electrovalence, sum(b.charging_capacity) as electricity from t_charging_order a left join ( select charging_order_id, sum(period_service_price) as period_service_price, sum(period_electric_price) as period_electric_price, sum(charging_capacity) as charging_capacity from t_charging_order_accounting_strategy group by charging_order_id ) as b on (a.id = b.charging_order_id) where a.del_flag = 0 and a.status = 5 and a.recharge_payment_status = 2 and DATE_FORMAT(a.create_time, '%Y-%m-%d') = #{time} left join t_charging_order_accounting_strategy b on a.id = b.charging_order_id where a.del_flag = 0 and a.status = 5 and a.recharge_payment_status = 2 and a.create_time >= CONCAT(#{time}, ' 00:00:00') and a.create_time < DATE_ADD(#{time}, INTERVAL 1 DAY) <if test="siteIds != null and siteIds.size() > 0"> and a.site_id IN <foreach collection="siteIds" item="siteId" open="(" separator="," close=")">