|
@@ -28,8 +28,8 @@
|
|
|
left join sc_device sc on pcr.meter_id = sc.id
|
|
|
<where>
|
|
|
pcr.del_flag = 0
|
|
|
- <if test="payControlRecordDto.siteId != null"> and pcr.site_id = #{siteId}</if>
|
|
|
- <if test="payControlRecordDto.customerId != null"> and pcr.customer_id = {customerId}</if>
|
|
|
+ <if test="siteId != null"> and pcr.site_id = #{siteId}</if>
|
|
|
+ <if test="customerId != null"> and pcr.customer_id = #{customerId}</if>
|
|
|
<if test="payControlRecordDto.id != null"> and pcr.id = #{payControlRecordDto.id}</if>
|
|
|
<if test="payControlRecordDto.accountId != null"> and pcr.account_id = #{payControlRecordDto.accountId}</if>
|
|
|
<if test="payControlRecordDto.meterId != null"> and pcr.meter_id = #{payControlRecordDto.meterId}</if>
|
|
@@ -92,8 +92,8 @@
|
|
|
left join pay_control_rule pcrule on pcr.control_rule_id = pcrule.id
|
|
|
where
|
|
|
pba.accountnumber = #{accountNumber}
|
|
|
- <if test="payControlRecordDto.siteId != null"> and pcr.site_id = #{siteId}</if>
|
|
|
- <if test="payControlRecordDto.customerId != null"> and pcr.customer_id = #{customerId}</if>
|
|
|
+ <if test="siteId != null"> and pcr.site_id = #{siteId}</if>
|
|
|
+ <if test="customerId != null"> and pcr.customer_id = #{customerId}</if>
|
|
|
and DATE_FORMAT(pcr.create_date,'%Y')=#{year}
|
|
|
order by pcr.update_date desc
|
|
|
</select>
|