|
@@ -324,12 +324,14 @@
|
|
|
|
|
|
<select id="findAccountnumberList" resultType="com.zcxk.rmcp.pay.dto.pay.PayBaseAccountSelectAccountnumberDto">
|
|
|
select
|
|
|
- (select IFNULL(sum(payamount),0) from pay_amount_waterusedamount paw where
|
|
|
- paw.tenant_id=#{tenantId}
|
|
|
- and paw.state = 2 and paw.accountnumber = pba.accountnumber) sumPayamount,
|
|
|
+ (select IFNULL(sum(water_consumption),0) from rmcp_measurement_record paw
|
|
|
+ join pay_base_customerandmeterrela pb on paw.device_id=pb.watermeter_id
|
|
|
+ where
|
|
|
+ pb.tenant_id=#{tenantId}
|
|
|
+ and paw.approval_status = 1 and pb.accountnumber = pba.accountnumber) sumPayamount,
|
|
|
#{payment} as sumPayment,
|
|
|
psd2.label as stateName,
|
|
|
- ppr.balance as remaining,
|
|
|
+ ppr.remaining as remaining,
|
|
|
<!--(SELECT remaining from pay_pay_rechargeaccount
|
|
|
where account_id=pba.id and site_id=#{siteId} and customer_id=#{customerId})
|
|
|
-
|