|
@@ -424,16 +424,18 @@
|
|
|
|
|
|
<select id="selectAccountMeterInfo" resultType="com.bz.smart_city.entity.pay.archives.PayAccountInfo">
|
|
|
select
|
|
|
- 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"
|
|
|
+ account.accountnumber AS "accountnumber",
|
|
|
+ ifnull(account.calculateway,c.calculateway) AS "calculateway",
|
|
|
+ ifnull(account.waterproperty_id,c.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",
|
|
|
+ c.valve_rule_id as "valveRuleId"
|
|
|
from pay_base_account account
|
|
|
+ left join pay_base_customerandmeterrela c on account.id = c.account_id and c.customer_id =#{customerId}
|
|
|
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')
|
|
@@ -453,16 +455,18 @@
|
|
|
|
|
|
<select id="selectMeterElenoMeterInfo" resultType="com.bz.smart_city.entity.pay.archives.PayAccountInfo">
|
|
|
select
|
|
|
- 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"
|
|
|
+ account.accountnumber as "accountnumber",
|
|
|
+ ifnull(account.calculateway,c.calculateway) AS "calculateway",
|
|
|
+ ifnull(account.waterproperty_id,c.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",
|
|
|
+ c.valve_rule_id as "valveRuleId"
|
|
|
from pay_base_account account
|
|
|
+ left join pay_base_customerandmeterrela c on account.id = c.account_id and c.customer_id =#{customerId}
|
|
|
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')
|