INSERT INTO pay_base_customerandmeterrela
(
id,
account_id,
watermeter_id,
accountname,
accountnumber,
metercode,
businessstate,
office_id,
housetype,
calculateway,
customercategory,
customergroup,
fixedamount,
vatno,
bankaccount,
invoicetitle,
address,
opendate,
waterproperty_id,
watertype,
canceldate,
create_by,
create_date,
update_by,
update_date,
remarks,
del_flag,
site_id,
customer_id
)
values
(
#{customer.id,jdbcType=BIGINT},
#{customer.accountId,jdbcType=BIGINT},
#{customer.watermeterId,jdbcType=BIGINT},
#{customer.accountname,jdbcType=VARCHAR},
#{customer.accountnumber,jdbcType=VARCHAR},
#{customer.metercode,jdbcType=VARCHAR},
#{customer.businessstate,jdbcType=INTEGER},
#{customer.officeId,jdbcType=BIGINT},
#{customer.housetype,jdbcType=INTEGER},
#{customer.calculateway,jdbcType=INTEGER},
#{customer.customercategory,jdbcType=INTEGER},
#{customer.customergroup,jdbcType=INTEGER},
#{customer.fixedamount,jdbcType=VARCHAR},
#{customer.vatno,jdbcType=VARCHAR},
#{customer.bankaccount,jdbcType=VARCHAR},
#{customer.invoicetitle,jdbcType=VARCHAR},
#{customer.address,jdbcType=VARCHAR},
#{customer.opendate,jdbcType=TIMESTAMP},
#{customer.waterPropertyId,jdbcType=BIGINT},
#{customer.watertype,jdbcType=INTEGER},
#{customer.canceldate,jdbcType=TIMESTAMP},
#{customer.createBy,jdbcType=VARCHAR},
#{customer.createDate,jdbcType=TIMESTAMP},
#{customer.updateBy,jdbcType=VARCHAR},
#{customer.updateDate,jdbcType=TIMESTAMP},
#{customer.remarks,jdbcType=VARCHAR},
#{customer.delFlag,jdbcType=VARCHAR},
#{customer.siteId,jdbcType=BIGINT},
#{customer.customerId,jdbcType=BIGINT}
)
update pay_base_customerandmeterrela
account_id =#{accountId},
watermeter_id =#{watermeterId},
accountname =#{accountname},
accountnumber =#{accountnumber},
metercode =#{metercode},
businessstate =#{businessstate},
office_id =#{officeId},
housetype =#{housetype},
calculateway =#{calculateway},
customercategory =#{customercategory},
customergroup =#{customergroup},
fixedamount =#{fixedamount},
vatno =#{vatno},
bankaccount =#{bankaccount},
address =#{address},
opendate =#{opendate},
waterproperty_id =#{waterPropertyId},
watertype =#{watertype},
canceldate =#{canceldate},
update_by =#{updateBy},
update_date =#{updateDate},
id =#{id}
update pay_base_customerandmeterrela set businessstate =#{state},update_by=#{updateBy},update_date =#{date},canceldate =#{date}
where site_id =#{siteId} and customer_id =#{customerId} and id =#{id}
update sc_device set status =#{state},update_by=#{updateBy},date_update =#{date}
where site_id =#{siteId} and customer_id =#{customerId} and metercode =#{metercode}
update pay_base_account set name=#{accountname},idtype =#{idtype},idcardno=#{idcardno},telephone=#{telephone},update_by=#{updateBy},update_date =#{date}
where site_id =#{siteId} and customer_id =#{customerId} and accountnumber =#{accountnumber}
update pay_base_customerandmeterrela set accountname=#{accountname},housetype =#{housetype} ,office_id =#{officeId},customergroup =#{customergroup},update_by=#{updateBy},update_date =#{date}
where site_id =#{siteId} and customer_id =#{customerId} and accountnumber =#{accountnumber} and metercode =#{metercode}
update pay_base_account set address =#{address} ,telephone =#{telephone},idtype =#{idtype},idcardno=#{idcardno}
where site_id =#{siteId} and customer_id =#{customerId} and accountnumber =#{accountnumber};
update sc_install_list set is_accepted =#{isAccepted},date_update=#{date},update_by =#{updateBy} where device_id =#{id}
update pay_pay_rechargeaccount set businessstate ='2',update_by=#{updateBy},update_date =#{date}
where site_id =#{siteId} and customer_id =#{customerId} and account_id =#{id}
update pay_base_account set state =#{state},update_by=#{updateBy},update_date =#{date}
where site_id =#{siteId} and customer_id =#{customerId} and id =#{id}