|
@@ -515,19 +515,14 @@
|
|
|
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 and device.customer_id =#{customerId}
|
|
|
+ inner join sc_device device on account.id = device.account_id and device.tenant_id=#{tenantId}
|
|
|
<where>
|
|
|
(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>
|
|
|
- <if test="siteId != null">
|
|
|
- and account.site_id = #{siteId}
|
|
|
- </if>
|
|
|
- <if test="customerId != null">
|
|
|
- and account.customer_id = #{customerId}
|
|
|
- </if>
|
|
|
+
|
|
|
order by account.create_date desc
|
|
|
</where>
|
|
|
</select>
|