| | |
| | | SUM(IFNULL(electricity_share_amount, 0)) AS electricity_share_amount, |
| | | SUM(IFNULL(service_share_amount, 0)) AS service_share_amount |
| | | FROM t_charging_order_share_record |
| | | WHERE del_flag = 0 AND charging_order_id IS NOT NULL |
| | | WHERE del_flag = 0 AND charging_order_id IS NOT NULL AND online_share_status = 'SUCCESS' |
| | | GROUP BY charging_order_id |
| | | ) s ON a.id = s.charging_order_id |
| | | <where> |
| | | a.del_flag = 0 and a.recharge_payment_status = 2 and a.status = 5 |
| | | a.del_flag = 0 and a.recharge_payment_status = 2 |
| | | <if test="sixBefore != null"> |
| | | AND a.create_time >= #{sixBefore} |
| | | </if> |
| | |
| | | LEFT JOIN ( |
| | | SELECT charging_order_id, SUM(IFNULL(share_amount, 0)) AS share_amount |
| | | FROM t_charging_order_share_record |
| | | WHERE del_flag = 0 AND charging_order_id IS NOT NULL |
| | | WHERE del_flag = 0 AND charging_order_id IS NOT NULL AND online_share_status = 'SUCCESS' |
| | | GROUP BY charging_order_id |
| | | ) s ON a.id = s.charging_order_id |
| | | <where> |
| | | a.del_flag = 0 and a.recharge_payment_status = 2 and a.status = 5 |
| | | a.del_flag = 0 and a.recharge_payment_status = 2 |
| | | <if test="siteIds != null and siteIds.size() > 0"> |
| | | AND a.site_id IN |
| | | <foreach collection="siteIds" item="siteId" open="(" separator="," close=")"> |
| | |
| | | SUM(IFNULL(service_share_amount, 0)) AS service_share_amount, |
| | | SUM(IFNULL(share_amount, 0)) AS share_amount |
| | | FROM t_charging_order_share_record |
| | | WHERE del_flag = 0 AND charging_order_id IS NOT NULL |
| | | WHERE del_flag = 0 AND charging_order_id IS NOT NULL AND online_share_status = 'SUCCESS' |
| | | GROUP BY charging_order_id |
| | | ) s ON a.id = s.charging_order_id |
| | | WHERE a.del_flag = 0 AND a.recharge_payment_status = 2 AND a.status = 5 |
| | | WHERE a.del_flag = 0 AND a.recharge_payment_status = 2 |
| | | <if test="partnerView == null or !partnerView"> |
| | | AND a.status = 5 |
| | | </if> |
| | | <if test="siteIds != null and siteIds.size() > 0"> |
| | | AND a.site_id IN |
| | | <foreach collection="siteIds" item="siteId" open="(" separator="," close=")"> |