|
@@ -253,27 +253,27 @@
|
|
|
account.email,
|
|
|
customer.vatno,
|
|
|
customer.businessstate as "businessstate",
|
|
|
- (select label from pay_sys_dict where type = '开户状态' and value = customer.businessstate and site_id = #{siteId} and customer_id =#{customerId}) as "businessName",
|
|
|
+ (select label from pay_sys_dict where type = '开户状态' and value = customer.businessstate and customer_id =#{customerId} and site_id = #{siteId}) as "businessName",
|
|
|
customer.calculateway as "calculateway",
|
|
|
- (select label from pay_sys_dict where type = '结算方式' and value = customer.calculateway and site_id = #{siteId} and customer_id =#{customerId}) as "calculatewayName",
|
|
|
+ (select label from pay_sys_dict where type = '结算方式' and value = customer.calculateway and customer_id =#{customerId} and site_id = #{siteId}) as "calculatewayName",
|
|
|
account.idtype as "idtype",
|
|
|
- (select label from pay_sys_dict where type = '证件类型' and value = account.idtype and site_id = #{siteId} and customer_id =#{customerId}) as "idtypeName",
|
|
|
+ (select label from pay_sys_dict where type = '证件类型' and value = account.idtype and customer_id =#{customerId} and site_id = #{siteId}) as "idtypeName",
|
|
|
account.idcardno as "idcardno",
|
|
|
customer.housetype as "housetype",
|
|
|
- (select label from pay_sys_dict where type = '住房类型' and value = customer.housetype and site_id = #{siteId} and customer_id =#{customerId}) as "housetypeName",
|
|
|
+ (select label from pay_sys_dict where type = '住房类型' and value = customer.housetype and customer_id =#{customerId} and site_id = #{siteId}) as "housetypeName",
|
|
|
customer.customergroup as "customergroup",
|
|
|
- (select label from pay_sys_dict where type = '开户分组' and value = customer.customergroup and site_id = #{siteId} and customer_id =#{customerId}) as "customergroupName"
|
|
|
+ (select label from pay_sys_dict where type = '开户分组' and value = customer.customergroup and customer_id =#{customerId} and site_id = #{siteId}) as "customergroupName"
|
|
|
from pay_base_customerandmeterrela customer
|
|
|
left join sc_device device on customer.watermeter_id = device.id
|
|
|
left join pay_base_account account on account.id = customer.account_id
|
|
|
left join pay_base_waterproperty property on property.id = customer.waterproperty_id
|
|
|
<where>
|
|
|
- <if test="siteId != null">
|
|
|
- and customer.site_id = #{siteId}
|
|
|
- </if>
|
|
|
<if test="customerId != null">
|
|
|
and customer.customer_id = #{customerId}
|
|
|
</if>
|
|
|
+ <if test="siteId != null">
|
|
|
+ and customer.site_id = #{siteId}
|
|
|
+ </if>
|
|
|
<if test="condition != null">
|
|
|
and
|
|
|
(
|
|
@@ -312,7 +312,7 @@
|
|
|
account.telephone as "telephone",
|
|
|
customer.metercode as "metercode",
|
|
|
property.name as "propertyName",
|
|
|
- device.loc_desc as "address",
|
|
|
+ account.address as "address",
|
|
|
customer.opendate as "opendate",
|
|
|
customer.businessstate as "businessstate",
|
|
|
customer.calculateway as "calculateway",
|