Преглед на файлове

1修改根据客户编码点击事件

Xiaojh преди 4 години
родител
ревизия
a7946938ef
променени са 1 файла, в които са добавени 86 реда и са изтрити 81 реда
  1. 86 81
      smart-city-platform/src/main/resources/mapper/PayBaseCustomerandmeterrelaMapper.xml

+ 86 - 81
smart-city-platform/src/main/resources/mapper/PayBaseCustomerandmeterrelaMapper.xml

@@ -115,68 +115,72 @@
     <insert id="insertList">
         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
+            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,
+            valve_rule_id,
+            valve_rule_name
         )
         values
         <foreach collection="customers" item="customer" index="index" separator=",">
             (
-            #{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}
+                #{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},
+                #{customer.valveRuleId,jdbcType=VARCHAR},
+                #{customer.valveRuleName,jdbcType=VARCHAR}
             )
         </foreach>
     </insert>
@@ -205,6 +209,8 @@
             <if test="canceldate != null">canceldate =#{canceldate},</if>
             <if test="updateBy != null">update_by =#{updateBy},</if>
             <if test="updateDate != null">update_date =#{updateDate},</if>
+            <if test="valveRuleId != null">valve_rule_id =#{valveRuleId},</if>
+            <if test="valveRuleName != null">valve_rule_name =#{valveRuleName},</if>
         </set>
         <where>
             <if test="id != null">id =#{id}</if>
@@ -254,6 +260,8 @@
         customer.office_id as "officeId",
         account.email,
         customer.vatno,
+        customer.valve_rule_id as "valveRuleId",
+        customer.valve_rule_name as "valveRuleName",
         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",
         customer.calculateway as "calculateway",
@@ -372,10 +380,10 @@
 
     <select id="selectAccountInfo" resultType="com.bz.smart_city.entity.pay.archives.MeterListInfo">
         select
-            device.metercode as "metercode",
-            sil.user_name as accountname,
-            sil.user_phone as telephone,
-            sil.id_card as idcardno
+        device.metercode as "metercode",
+        account.name as accountname,
+        account.telephone as telephone,
+        account.idcardno as idcardno
         from pay_base_account account
         inner join sc_device device on account.id = device.account_id
         <where>
@@ -395,15 +403,14 @@
 
     <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",
-            sil.user_name as accountname,
-            sil.user_phone as telephone,
-            sil.id_card as idcardno,
-            device.water_meter_no as "metereleno"
+        account.accountnumber as "accountnumber",
+        account.calculateway as "calculateway",
+        account.waterproperty_id as "waterPropertyId",
+        device.metercode as "metercode",
+        account.name as accountname,
+        account.telephone as telephone,
+        account.idcardno as idcardno,
+        device.water_meter_no as "metereleno"
         from pay_base_account account
         inner join sc_device device on account.id = device.account_id
         <where>
@@ -423,18 +430,16 @@
 
     <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",
-            sil.user_name as accountname,
-            sil.user_phone as telephone,
-            sil.id_card as idcardno,
-            device.water_meter_no as "metereleno"
+        account.accountnumber as "accountnumber",
+        account.calculateway as "calculateway",
+        account.waterproperty_id as "waterPropertyId",
+        device.metercode as "metercode",
+        account.name as accountname,
+        account.telephone as telephone,
+        account.idcardno as idcardno,
+        device.water_meter_no as "metereleno"
         from pay_base_account account
         inner join sc_device device on account.id = device.account_id
-        inner join sc_install_list sil on sil.device_id = device.id
         <where>
             device.id not in(select watermeter_id from pay_base_customerandmeterrela where businessstate = '1')
             <if test="metereleno != null">