hym 3 سال پیش
والد
کامیت
9c0bbd174c

+ 1 - 1
zoniot-pay/zoniot-pay-core/src/main/java/com/zcxk/rmcp/pay/dao/pay/archives/PayBaseCustomerandmeterrelaMapper.java

@@ -62,7 +62,7 @@ public interface PayBaseCustomerandmeterrelaMapper {
 
     public List<MeterListInfo> selectAccountInfo(@Param("siteId") Integer siteId, @Param("customerId") Integer customerId, @Param("accountnumber") String accountnumber);
 
-    List<CustomerListInfo> selectAccountWater(@Param("siteId") Integer siteId, @Param("customerId") Integer customerId, @Param("accountnumber") String accountnumber);
+    List<CustomerListInfo> selectAccountWater(@Param("tenantId") String tenantId, @Param("accountnumber") String accountnumber);
 
     public List<MeterListInfo> queryMetercode(@Param("siteId") Integer siteId, @Param("customerId") Integer customerId);
     public List<PayAccountInfo> selectAccountMeterInfo(@Param("tenantId") String tenantId, @Param("metercode") String metercode);

+ 2 - 7
zoniot-pay/zoniot-pay-core/src/main/resources/mapper/PayBaseCustomerandmeterrelaMapper.xml

@@ -515,19 +515,14 @@
             account.address as installAddress,
             device.water_meter_no as "metereleno"
         from pay_base_account account
-        inner join sc_device device on account.id = device.account_id and device.customer_id =#{customerId}
+        inner join sc_device device on account.id = device.account_id and device.tenant_id=#{tenantId}
         <where>
             (account.accountnumber not in (select accountnumber from pay_base_customerandmeterrela where businessstate ='1' ))
             and device.water_meter_no is not null
             <if test="accountnumber != null">
                 and account.accountnumber like concat('%',#{accountnumber},'%')
             </if>
-            <if test="siteId != null">
-                and  account.site_id = #{siteId}
-            </if>
-            <if test="customerId != null">
-                and account.customer_id = #{customerId}
-            </if>
+
             order by account.create_date desc
         </where>
     </select>

+ 1 - 1
zoniot-pay/zoniot-pay-core/src/main/resources/mapper/pay/MeasurementRecordMapper.xml

@@ -82,7 +82,7 @@
             #{item.id}, #{item.meterNo}, #{item.fileMeterNo}, #{item.approvalStatus}, #{item.lastReading},
             #{item.currentReading}, #{item.location}, #{item.planId}, #{item.waterConsumption}, #{item.createDate},
             #{item.updateDate}, #{item.createBy}, #{item.updateBy}, #{item.status}, #{item.deviceId}
-            , #{item.lastPeriodDate}  , #{item.currentPeriodDate},#{realWaterConsumption}  )
+            , #{item.lastPeriodDate}  , #{item.currentPeriodDate},#{item.realWaterConsumption}  )
         </foreach>
     </insert>
 

+ 1 - 1
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/pay/archives/impl/PayBaseCustomerandmeterrelaServiceImpl.java

@@ -156,7 +156,7 @@ public class PayBaseCustomerandmeterrelaServiceImpl implements PayBaseCustomeran
         CustomerListInfo customer = new CustomerListInfo();//返回集合所需实体
         List<MeterListInfo> codeList = new ArrayList<MeterListInfo>();//返回水表档案信息集合
         //根据客户编码查找该客户下的用水性质跟结算方式
-        List<CustomerListInfo> accountList = payBaseCustomerandmeterrelaMapper.selectAccountWater(loginUser.getSiteId(),loginUser.getCustomerId(),accountnumber);
+        List<CustomerListInfo> accountList = payBaseCustomerandmeterrelaMapper.selectAccountWater(loginUser.getTenantId(),accountnumber);
         if(accountList != null && accountList.size() > 0){
             for(int i=0; i<accountList.size(); i++){
                 String numbers = accountList.get(i) != null && accountList.get(i).getAccountnumber() != null ? accountList.get(i).getAccountnumber() : "";