|
@@ -110,10 +110,10 @@
|
|
|
c.opendate,
|
|
|
c.metercode,
|
|
|
c.watermeter_id as "watermeterId",
|
|
|
- (select label from pay_sys_dict where type='住房类型' and `value`=c.housetype and site_id=#{siteId}
|
|
|
+ (select label from pay_sys_dict where type='住房类型' and `value`=c.housetype and customer_id=#{customerId} and site_id=#{siteId}
|
|
|
and customer_id=#{customerId}) as "housetype",
|
|
|
- (select label from pay_sys_dict where type='结算方式' and `value`=c.calculateway and site_id=#{siteId}
|
|
|
- and customer_id=#{customerId}) as "calculateway",
|
|
|
+ (select label from pay_sys_dict where type='结算方式' and `value`=c.calculateway and customer_id=#{customerId} and site_id=#{siteId}
|
|
|
+ ) as "calculateway",
|
|
|
|
|
|
p.id as "waterPropertyId",
|
|
|
p.name as "waterPropertyName",
|
|
@@ -124,7 +124,7 @@
|
|
|
left join pay_base_waterproperty p on c.waterProperty_id=p.id
|
|
|
inner join sc_device device on c.watermeter_id=device.id and device.customer_id =#{customerId}
|
|
|
<where>
|
|
|
- c.businessstate=1 and c.site_id=#{siteId}
|
|
|
+ c.businessstate=1 and c.customer_id=#{customerId} and c.site_id=#{siteId}
|
|
|
<if test="id != null and id != ''">
|
|
|
and c.id= #{id}
|
|
|
</if>
|