Bläddra i källkod

批量安装BUG

lin 5 år sedan
förälder
incheckning
af9a997647

+ 2 - 0
smart-city-platform/src/main/java/com/bz/smart_city/dto/DeviceDto.java

@@ -112,5 +112,7 @@ public class DeviceDto extends Device {
 
     @ApiModelProperty(value="是否有无阀门 0:无 1:有",position = 125)
     private Integer isValve;
+    @ApiModelProperty(value="是否需要注册 0:否:是",position = 125)
+    private Integer isRegister;
 
 }

+ 8 - 0
smart-city-platform/src/main/java/com/bz/smart_city/entity/pay/archives/MeterListInfo.java

@@ -1,6 +1,7 @@
 package com.bz.smart_city.entity.pay.archives;
 
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 import java.math.BigInteger;
 
@@ -8,7 +9,14 @@ import java.math.BigInteger;
  * @Author: xjh
  * @Date: 2020/4/25 0025
  */
+@Data
 public class MeterListInfo {
     @ApiModelProperty(value = "水表编码", position =1 )
     public String metercode;
+    @ApiModelProperty(value = "用户姓名")
+    private String userName;
+    @ApiModelProperty(value = "用户手机号",position = 11)
+    private String userPhone;
+    @ApiModelProperty(value = "身份证号")
+    private String idCard;
 }

+ 3 - 1
smart-city-platform/src/main/resources/mapper/BuildingMapper.xml

@@ -1137,6 +1137,7 @@
         <if test="province != null or city != null or region != null or community != null">left join sc_building sb on (sb.id = sd.building_id and sb.status = 1)</if>
         <if test="errorType != null and errorType != ''">left join sc_water_meter_error_days swmed on ( swmed.device_id = sd.id)</if>
         <if test="programItems != null and programItems.size() != 0">left join sc_device_dimension sdd on (sdd.device_id = sd.id and sdd.status = 1)</if>
+        <if test="registerStatus != null"> left join sc_device_type sdt on (sdt.id = sd.device_type)</if>
         left join sc_install_list sil on (sil.device_id = sd.id)
         where sd.status = 1 and sys_id = -99 and sil.status = 1
         <if test="buildingId != null"> AND sd.building_id = #{buildingId}</if>
@@ -1150,7 +1151,8 @@
         <if test="errorType != null and errorType != ''"> AND swmed.last_error_type LIKE concat('%',#{errorType},'%')</if>
         <if test="locDesc != null and locDesc != ''"> AND sd.loc_desc LIKE concat('%',#{locDesc},'%')</if>
         <if test="deviceTypeId != null"> and sd.device_type = #{deviceTypeId}</if>
-        <if test="registerStatus != null"> and sd.register_status = #{registerStatus}</if>
+        <if test="registerStatus != null and registerStatus == 1"> and sd.register_status = #{registerStatus} and sdt.is_register = 1</if>
+        <if test="registerStatus != null and registerStatus == 0"> and sd.register_status = #{registerStatus} and sdt.is_register = 1</if>
         <if test="customerId != null"> and sd.customer_id = #{customerId}</if>
         <if test="startDate != null"> and sil.install_time <![CDATA[ >= ]]> #{startDate}</if>
         <if test="endDate != null"> and sil.install_time <![CDATA[ <= ]]> #{endDate}</if>

+ 3 - 2
smart-city-platform/src/main/resources/mapper/DeviceMapper.xml

@@ -730,7 +730,7 @@
         sb.longitude,sb.latitude,
         sb.province,sb.city,sb.region,sb.community,scom.name as community_name,
         scon.serial_number as concentrator_name,scol.collector_no as collector_name,swmed.days,swmed.last_error_type,swmed.meter_reading,scus.customer_name,
-        sil.plan_time,sil.install_time,sil.accept_time,sil.new_meter_start,sil.id as install_id,sil.old_meter_end,sd.register_status,sdt.is_valve
+        sil.plan_time,sil.install_time,sil.accept_time,sil.new_meter_start,sil.id as install_id,sil.old_meter_end,sd.register_status,sdt.is_valve,sdt.is_register
         from sc_device sd
         left join sc_device_type sdt on (sdt.id = sd.device_type and sdt.status = 1)
         left join sc_device_manufacturer sdm on (sdm.id = sd.manufacturer_id and sdm.status = 1)
@@ -758,7 +758,8 @@
         <if test="buildingId != null"> and sd.building_id = #{buildingId}</if>
         <if test="locDesc != null and locDesc != ''"> AND sd.loc_desc LIKE concat('%',#{locDesc},'%')</if>
         <if test="deviceTypeId != null"> and sd.device_type = #{deviceTypeId}</if>
-        <if test="registerStatus != null"> and sd.register_status = #{registerStatus}</if>
+        <if test="registerStatus != null and registerStatus == 1"> and sd.register_status = #{registerStatus} and sdt.is_register = 1</if>
+        <if test="registerStatus != null and registerStatus == 0"> and sd.register_status = #{registerStatus} and sdt.is_register = 1</if>
         <if test="startDate != null"> and sil.install_time <![CDATA[ >= ]]> #{startDate}</if>
         <if test="endDate != null"> and sil.install_time <![CDATA[ <= ]]> #{endDate}</if>
         <if test="programItems != null and programItems.size() != 0"> and

+ 5 - 1
smart-city-platform/src/main/resources/mapper/PayBaseCustomerandmeterrelaMapper.xml

@@ -362,9 +362,13 @@
 
     <select id="selectAccountInfo" resultType="com.bz.smart_city.entity.pay.archives.MeterListInfo">
         select
-        device.metercode as "metercode"
+        device.metercode as "metercode",
+        sil.user_name,
+        sil.user_phone,
+        sil.id_card
         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.metercode not in(select metercode from pay_base_customerandmeterrela where businessstate = '1')
             <if test="accountnumber != null">