Your Name hace 3 años
padre
commit
ecb1e75b58

+ 10 - 1
java110-bean/src/main/java/com/java110/dto/accessControlWhite/AccessControlWhiteDto.java

@@ -38,6 +38,8 @@ public class AccessControlWhiteDto extends PageDto implements Serializable {
     private String statusCd = "0";
     private String personFace;
 
+    private String machineCount;
+
 
     public String getThirdId() {
         return thirdId;
@@ -136,7 +138,6 @@ public class AccessControlWhiteDto extends PageDto implements Serializable {
     }
 
 
-
     public String getStatusCd() {
         return statusCd;
     }
@@ -176,4 +177,12 @@ public class AccessControlWhiteDto extends PageDto implements Serializable {
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
+
+    public String getMachineCount() {
+        return machineCount;
+    }
+
+    public void setMachineCount(String machineCount) {
+        this.machineCount = machineCount;
+    }
 }

+ 4 - 3
java110-db/src/main/resources/mapper/common/AccessControlWhiteV1ServiceDaoImplMapper.xml

@@ -19,12 +19,12 @@
     <select id="getAccessControlWhiteInfo" parameterType="Map" resultType="Map">
         select t.third_id,t.third_id thirdId,t.id_card,t.id_card idCard,t.access_control_key,t.access_control_key
         accessControlKey,t.status_cd,t.status_cd statusCd,t.person_name,t.person_name
-        personName,t.machine_id,t.machine_id machineId,t.acw_id,t.acw_id acwId,t.person_id,t.person_id
+        personName,t.acw_id,t.acw_id acwId,t.person_id,t.person_id
         personId,t.tel,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id
-        communityId,t.person_type,t.person_type personType,td.`name` personTypeName
+        communityId,t.person_type,t.person_type personType,td.`name` personTypeName,count(acwa.acwa_id) machineCount
         from access_control_white t
-
         left join t_dict td on t.person_type = td.status_cd and td.table_name ='access_control_white' and td.table_columns = 'person_type'
+        left join access_control_white_auth acwa on t.acw_id = acwa.acw_id and acwa.community_id = t.community_id and acwa.status_cd = '0'
         where 1 =1
         <if test="thirdId !=null and thirdId != ''">
             and t.third_id= #{thirdId}
@@ -68,6 +68,7 @@
         <if test="personType !=null and personType != ''">
             and t.person_type= #{personType}
         </if>
+        group by t.third_id,t.id_card,t.access_control_key,t.status_cd,t.person_name,t.acw_id,t.person_id,t.tel,t.start_time,t.end_time,t.community_id,t.person_type,td.`name`
         order by t.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}