|
@@ -406,15 +406,17 @@
|
|
|
account.accountnumber as "accountnumber",
|
|
|
account.calculateway as "calculateway",
|
|
|
account.waterproperty_id as "waterPropertyId",
|
|
|
+ account.address as installAddress,
|
|
|
device.metercode as "metercode",
|
|
|
account.name as accountname,
|
|
|
account.telephone as telephone,
|
|
|
account.idcardno as idcardno,
|
|
|
device.water_meter_no as "metereleno"
|
|
|
from pay_base_account account
|
|
|
- inner join sc_device device on account.id = device.account_id
|
|
|
+ inner join sc_device device on account.id = device.account_id and device.customer_id =#{customerId}
|
|
|
<where>
|
|
|
device.metercode not in(select metercode from pay_base_customerandmeterrela where businessstate = '1')
|
|
|
+ and device.water_meter_no is not null
|
|
|
<if test="metercode != null">
|
|
|
and device.metercode like concat('%',#{metercode},'%')
|
|
|
</if>
|
|
@@ -433,15 +435,17 @@
|
|
|
account.accountnumber as "accountnumber",
|
|
|
account.calculateway as "calculateway",
|
|
|
account.waterproperty_id as "waterPropertyId",
|
|
|
+ account.address as installAddress,
|
|
|
device.metercode as "metercode",
|
|
|
account.name as accountname,
|
|
|
account.telephone as telephone,
|
|
|
account.idcardno as idcardno,
|
|
|
device.water_meter_no as "metereleno"
|
|
|
from pay_base_account account
|
|
|
- inner join sc_device device on account.id = device.account_id
|
|
|
+ inner join sc_device device on account.id = device.account_id and device.customer_id =#{customerId}
|
|
|
<where>
|
|
|
device.id not in(select watermeter_id from pay_base_customerandmeterrela where businessstate = '1')
|
|
|
+ and device.water_meter_no is not null
|
|
|
<if test="metereleno != null">
|
|
|
and device.water_meter_no like concat('%',#{metereleno},'%')
|
|
|
</if>
|
|
@@ -463,9 +467,10 @@
|
|
|
account.address as installAddress,
|
|
|
device.water_meter_no as "metereleno"
|
|
|
from pay_base_account account
|
|
|
- inner join sc_device device on account.id = device.account_id
|
|
|
+ inner join sc_device device on account.id = device.account_id and device.customer_id =#{customerId}
|
|
|
<where>
|
|
|
- and (account.accountnumber not in (select accountnumber from pay_base_customerandmeterrela where businessstate ='1' ))
|
|
|
+ (account.accountnumber not in (select accountnumber from pay_base_customerandmeterrela where businessstate ='1' ))
|
|
|
+ and device.water_meter_no is not null
|
|
|
<if test="accountnumber != null">
|
|
|
and account.accountnumber like concat('%',#{accountnumber},'%')
|
|
|
</if>
|