|
@@ -116,9 +116,9 @@
|
|
|
from pay_base_customerandmeterrela c
|
|
|
left join pay_base_account a on c.account_id=a.id
|
|
|
left join pay_base_waterproperty p on c.waterProperty_id=p.id
|
|
|
- inner join sc_device device on device.metercode = c.metercode
|
|
|
+ inner join sc_device device on device.metercode = c.metercode and device.customer_id =#{customerId}
|
|
|
<where>
|
|
|
- c.businessstate=1 and c.site_id=#{siteId} and c.customer_id=#{customerId}
|
|
|
+ c.businessstate=1 and c.site_id=#{siteId}
|
|
|
<if test="id != null and id != ''">
|
|
|
and c.id= #{id}
|
|
|
</if>
|