dingxin 6 jaren geleden
bovenliggende
commit
b972264acb
32 gewijzigde bestanden met toevoegingen van 923 en 256 verwijderingen
  1. 7
    10
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/FaceController.java
  2. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaFaceMapper.java
  3. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaFace.java
  4. 7
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/FaceServiceI.java
  5. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java
  6. 111
    121
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java
  7. 20
    8
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  8. 14
    11
      CODE/smart-community/app-api/src/main/resources/mapper/TaFaceMapper.xml
  9. 15
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java
  10. 58
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/TaUserController.java
  11. 8
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  12. 31
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/TaUser.java
  13. 20
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/ITaUserService.java
  14. 38
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  15. 58
    4
      CODE/smart-community/operate-api/src/main/resources/mapper/TaUserMapper.xml
  16. 7
    7
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java
  17. 2
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java
  18. 6
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java
  19. 58
    33
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java
  20. 44
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml
  21. 25
    0
      VUECODE/smart-operate-manage/src/api/user.js
  22. 12
    0
      VUECODE/smart-operate-manage/src/router/index.js
  23. 19
    1
      VUECODE/smart-operate-manage/src/store/modules/user.js
  24. 1
    1
      VUECODE/smart-operate-manage/src/views/account/role/edi/index.vue
  25. 2
    2
      VUECODE/smart-operate-manage/src/views/account/role/index.vue
  26. 2
    2
      VUECODE/smart-operate-manage/src/views/account/role/info/index.vue
  27. 190
    0
      VUECODE/smart-operate-manage/src/views/community/user/index.vue
  28. 100
    0
      VUECODE/smart-operate-manage/src/views/community/user/log/index.vue
  29. 7
    5
      VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js
  30. 1
    2
      VUECODE/smart-property-manage/src/store/modules/buildingOwnerInfo.js
  31. 49
    32
      VUECODE/smart-property-manage/src/views/building/index.vue
  32. 5
    5
      文档/MYSQL/smartCommunity.pdm

+ 7
- 10
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/FaceController.java Bestand weergeven

@@ -19,7 +19,7 @@ import javax.servlet.http.HttpSession;
19 19
 @RefreshScope
20 20
 @RequestMapping("/")
21 21
 @Api(value = "人脸相关API", description = "人脸相关API")
22
-public class FaceController {
22
+public class FaceController extends BaseController {
23 23
     @Autowired
24 24
     private FaceServiceI faceServicel;
25 25
 
@@ -34,9 +34,8 @@ public class FaceController {
34 34
                             @ApiParam(value = "file" ,required = true) MultipartFile uploadFile,
35 35
                             @RequestParam(required = false) Integer otherUserId){
36 36
         ResponseBean responseBean = new ResponseBean();
37
-        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
38
-        Integer userId = userElement.getId();
39
-        responseBean = faceServicel.addFace(userId ,uploadFile,otherUserId);
37
+        UserElement userElement = getUserElement(session);
38
+        responseBean = faceServicel.addFace(userElement ,uploadFile,otherUserId);
40 39
         return responseBean;
41 40
     }
42 41
 
@@ -51,9 +50,8 @@ public class FaceController {
51 50
                                @RequestParam(required = false) Integer otherUserId
52 51
                                ){
53 52
         ResponseBean responseBean = new ResponseBean();
54
-        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
55
-        Integer userId = userElement.getId();
56
-         responseBean = faceServicel.upDateFace(userId,uploadFile,otherUserId);
53
+        UserElement userElement = getUserElement(session);
54
+         responseBean = faceServicel.upDateFace(userElement,uploadFile,otherUserId);
57 55
         return responseBean;
58 56
     }
59 57
 
@@ -64,9 +62,8 @@ public class FaceController {
64 62
     })
65 63
     @RequestMapping(value = "/getUserIdFace",method = RequestMethod.GET)
66 64
     public Object getTaFaceByUserId(HttpSession session, @RequestParam(required = false) Integer otherUserId){
67
-        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
68
-        Integer userId = userElement.getId();
69
-        ResponseBean responseBean = faceServicel.getTaFaceByUserId(userId,otherUserId);
65
+        UserElement userElement = getUserElement(session);
66
+        ResponseBean responseBean = faceServicel.getTaFaceByUserId(userElement,otherUserId);
70 67
         return responseBean;
71 68
     }
72 69
 

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaFaceMapper.java Bestand weergeven

@@ -19,10 +19,10 @@ public interface TaFaceMapper{
19 19
 
20 20
     /**
21 21
      * 查看当前用户信息
22
-     * @param userid
22
+     * @param userVerifyId
23 23
      * @return
24 24
      */
25
-    TaFace getByUserId(@Param("userid") Integer userid);
25
+    TaFace getByUserVerifyId(@Param("userVerifyId") Integer userVerifyId);
26 26
 
27 27
     /**
28 28
      * 查看当前信息

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaFace.java Bestand weergeven

@@ -19,9 +19,9 @@ public class TaFace {
19 19
     private Integer communityId;
20 20
 
21 21
     /**
22
-     * 用户ID
22
+     * 用户审核 ID
23 23
      */
24
-    private Integer taUserId;
24
+    private Integer taUserVerifyId;
25 25
 
26 26
     /**
27 27
      *图片

+ 7
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/FaceServiceI.java Bestand weergeven

@@ -9,28 +9,29 @@ import org.springframework.web.multipart.MultipartFile;
9 9
 public interface FaceServiceI {
10 10
     /**
11 11
      * 添加人脸
12
-     * @param userId 登入人ID
12
+     * @param userElement 登入人ID
13 13
      *  @param  uploadFile
14 14
      *  @param otherUserId 关联家属或者租客ID
15 15
      * @return
16 16
      */
17
-    ResponseBean addFace(Integer userId ,MultipartFile uploadFile,Integer otherUserId);
17
+    ResponseBean addFace(UserElement userElement, MultipartFile uploadFile,Integer otherUserId);
18 18
 
19 19
     /**
20 20
      * 更新当前人脸
21
-     * @param userId 登入人ID
21
+     * @param userElement 登入人ID
22 22
      *  @param  uploadFile
23 23
      *  @param otherUserId 关联家属或者租客ID
24 24
      * @return
25 25
      */
26
-    ResponseBean upDateFace(Integer userId ,MultipartFile uploadFile,Integer otherUserId);
26
+    ResponseBean upDateFace(UserElement userElement, MultipartFile uploadFile,Integer otherUserId);
27 27
 
28 28
     /**
29 29
      * 当前登入人是否有人脸信息
30
-     * @param userId
30
+     * @param userElement
31
+     * @param otherUserId
31 32
      * @return
32 33
      */
33
-    ResponseBean getTaFaceByUserId(Integer userId,Integer otherUserId);
34
+    ResponseBean getTaFaceByUserId(UserElement userElement,Integer otherUserId);
34 35
 
35 36
     /**
36 37
      * 迎宾人员 添加人脸

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java Bestand weergeven

@@ -20,8 +20,8 @@ public interface ITaUserService {
20 20
      * 校验 用户认证状态
21 21
      * @param user
22 22
      */
23
-    default void checkVerifyStatusUser(TaUser user) {
24
-        if (Constant.INVALID_VERIFY_STATUS.equals(user.getVerifyStatus())) {
23
+    default void checkBlacklistStatusUser(TaUser user) {
24
+        if (Constant.BLACKLIST_STATUS.equals(user.getStatus())) {
25 25
             throw new WisdomException("关联账户违反社区规定,无法使用");
26 26
         }
27 27
     }

+ 111
- 121
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java Bestand weergeven

@@ -1,4 +1,5 @@
1 1
 package com.community.huiju.service.impl;
2
+
2 3
 import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.ailiyun.AESDecode;
4 5
 import com.community.commom.constant.Constant;
@@ -9,10 +10,12 @@ import com.community.huiju.common.welcome.WelcomeProperties;
9 10
 import com.community.huiju.dao.TaFaceMapper;
10 11
 import com.community.huiju.dao.TaSysRoleMapper;
11 12
 import com.community.huiju.dao.TaUserMapper;
13
+import com.community.huiju.dao.TaUserVerifyMapper;
12 14
 import com.community.huiju.exception.WisdomException;
13 15
 import com.community.huiju.model.TaFace;
14 16
 import com.community.huiju.model.TaSysRole;
15 17
 import com.community.huiju.model.TaUser;
18
+import com.community.huiju.model.TaUserVerify;
16 19
 import com.community.huiju.service.FaceServiceI;
17 20
 import com.community.huiju.service.ImageServiceI;
18 21
 import lombok.extern.slf4j.Slf4j;
@@ -25,6 +28,7 @@ import org.springframework.stereotype.Service;
25 28
 import org.springframework.transaction.annotation.Transactional;
26 29
 import org.springframework.web.client.RestTemplate;
27 30
 import org.springframework.web.multipart.MultipartFile;
31
+
28 32
 import java.io.IOException;
29 33
 import java.util.ArrayList;
30 34
 import java.util.Date;
@@ -51,10 +55,13 @@ public class FaceServicelimpl implements FaceServiceI {
51 55
     @Autowired
52 56
     private WelcomeProperties welcomeProperties;
53 57
 
58
+    @Autowired
59
+    private TaUserVerifyMapper taUserVerifyMapper;
60
+
54 61
     @Override
55 62
     @Transactional(rollbackFor = Exception.class)
56
-    public ResponseBean addFace(Integer userid, MultipartFile uploadFile,Integer otherUserId) {
57
-        ResponseBean responseBean= new ResponseBean();
63
+    public ResponseBean addFace(UserElement userElement, MultipartFile uploadFile, Integer otherUserId) {
64
+        ResponseBean responseBean = new ResponseBean();
58 65
 
59 66
         // 判断是否是迎宾系统人员
60 67
         TaUser welcomeUser = taUserMapper.selectByPrimaryKey(otherUserId);
@@ -64,65 +71,64 @@ public class FaceServicelimpl implements FaceServiceI {
64 71
             return responseBean;
65 72
         }
66 73
 
74
+        // 当前人脸图片url
75
+        String faceImg = img(uploadFile);
76
+        // 房产审核id
77
+        Integer userVerifyId = userElement.getUserVerifyId();
67 78
 
68
-         String faceImg =img(uploadFile);
69 79
         /**当otherUserId不为空时判断它是否是业主下的租客或者家属*/
70
-        if (null!= otherUserId) {
71
-                 responseBean = getTaFaceParentId(userid, otherUserId);
72
-            if ("1".equals(responseBean.getCode())){
73
-                responseBean.getMessage();
74
-                return responseBean;
75
-            }
80
+        if (null != otherUserId) {
81
+            TaUserVerify otherUserVerify = getTaFaceParentId(userElement, otherUserId);
82
+            userVerifyId = otherUserVerify.getId();
76 83
         }
77
-            Integer activeUser = otherUserId == null?userid:otherUserId;
78
-            TaUser user = taUserMapper.selectByPrimaryKey(activeUser);
79
-            TaFace taFace = new TaFace();
80
-            taFace.setFaceImg(faceImg);
81
-            taFace.setCommunityId(user.getCommunityId());
82
-            taFace.setTaUserId(activeUser);
83
-            taFace.setCreateUser(userid);
84
-            taFace.setUpdateUser(activeUser);
85
-            taFace.setCreateDate(new Date());
86
-            taFace.setUpdateDate(new Date());
84
+        Integer activeUser = otherUserId == null ? userElement.getId() : otherUserId;
85
+        TaUser user = taUserMapper.selectByPrimaryKey(activeUser);
86
+        TaFace taFace = new TaFace();
87
+        taFace.setFaceImg(faceImg);
88
+        taFace.setCommunityId(user.getCommunityId());
89
+        taFace.setTaUserVerifyId(userVerifyId);
90
+        taFace.setCreateUser(userElement.getId());
91
+        taFace.setUpdateUser(activeUser);
92
+        taFace.setCreateDate(new Date());
93
+        taFace.setUpdateDate(new Date());
87 94
 
88 95
         /*验证身份*/
89
-        responseBean=addVerify( activeUser,  uploadFile, faceImg, taFace) ;
96
+        responseBean = addVerify(activeUser, userVerifyId, uploadFile, faceImg, taFace);
90 97
         return responseBean;
91 98
     }
92 99
 
93 100
     /**
94 101
      * 修改人脸信息
95
-      * @param userId 登入人ID
96
-     * @param  uploadFile
102
+     *
103
+     * @param userElement 登入人ID
104
+     * @param uploadFile
97 105
      * @param otherUserId 关联家属或者租客ID
98 106
      * @return
99 107
      */
100 108
     @Override
101 109
     @Transactional(rollbackFor = Exception.class)
102
-    public ResponseBean upDateFace(Integer userId, MultipartFile uploadFile,Integer otherUserId) {
103
-        boolean isA = false;
104
-      ResponseBean responseBean= new ResponseBean();
105
-        String faceImg =img(uploadFile);
106
-        if (null!= otherUserId) {
107
-                 responseBean = getTaFaceParentId(userId, otherUserId);
108
-            if ("1".equals(responseBean.getCode())) {
109
-                responseBean.getMessage();
110
-                return responseBean;
111
-               }}
112
-            Integer activeUser = otherUserId == null?userId:otherUserId;
113
-            //当前修改的id否存在
114
-             TaFace face = taFaceMapper.getByUserId(activeUser);
115
-             if (null == face){
116
-                 responseBean.addError("您的信息不存在,请录入人脸");
117
-                 return responseBean;
118
-             }
119
-           TaUser user = taUserMapper.selectByPrimaryKey(activeUser);
120
-            TaFace taFace = new TaFace();
121
-            taFace.setTaUserId(activeUser);
122
-            taFace.setFaceImg(faceImg);
123
-            taFace.setUpdateUser(userId);
124
-            taFace.setUpdateDate(new Date());
125
-            ResponseBean resps = checKout(faceImg, taFace, isA, uploadFile, activeUser);
110
+    public ResponseBean upDateFace(UserElement userElement, MultipartFile uploadFile, Integer otherUserId) {
111
+        ResponseBean responseBean = new ResponseBean();
112
+        // 人脸图片地址url
113
+        String faceImg = img(uploadFile);
114
+        // 房产 审核id
115
+        Integer userVerifyId = userElement.getUserVerifyId();
116
+        if (null != otherUserId) {
117
+            TaUserVerify otherUserVerify = getTaFaceParentId(userElement, otherUserId);
118
+            userVerifyId = otherUserVerify.getId();
119
+        }
120
+        Integer activeUser = otherUserId == null ? userElement.getId() : otherUserId;
121
+        //当前修改的id否存在
122
+        TaFace face = taFaceMapper.getByUserVerifyId(userVerifyId);
123
+        if (null == face) {
124
+            responseBean.addError("您的信息不存在,请录入人脸");
125
+            return responseBean;
126
+        }
127
+        face.setTaUserVerifyId(userVerifyId);
128
+        face.setFaceImg(faceImg);
129
+        face.setUpdateUser(userElement.getId());
130
+        face.setUpdateDate(new Date());
131
+        ResponseBean resps = checKout(faceImg, face, false, uploadFile, activeUser);
126 132
         if (resps.getCode().equals("0")) {
127 133
             resps.addSuccess((Object) faceImg);
128 134
         } else {
@@ -132,7 +138,7 @@ public class FaceServicelimpl implements FaceServiceI {
132 138
     }
133 139
 
134 140
     /**
135
-     *验证图片是否为人脸,推送海康
141
+     * 验证图片是否为人脸,推送海康
136 142
      */
137 143
     public ResponseBean checKout(String faceImg, TaFace taFace, boolean isA, MultipartFile uploadFile, Integer userId) {
138 144
         ResponseBean responseBean = new ResponseBean();
@@ -145,88 +151,88 @@ public class FaceServicelimpl implements FaceServiceI {
145 151
         AESDecode aesd = new AESDecode();
146 152
         String body = "{\"type\": \"0\", \"image_url\":\"" + faceImg + "\"}";
147 153
         try {
148
-                responseBean = aesd.send(body);
149
-                JSONObject jsonObject = JSONObject.parseObject(responseBean.getMessage());
150
-                Integer type = (Integer) jsonObject.get("errno");
151
-                Integer faceNum = (Integer) jsonObject.get("face_num");
152
-
153
-             /*推送海康*/
154
-            String data=HKOpenApi.HKpersonGroupId(uploadFile, user.getHkUserId(), user.getHkPersonNo(), user.getUserName(), user.getHkCardNo());
155
-              /*boolean isA为true进行添加,为false进行修改*/
154
+            responseBean = aesd.send(body);
155
+            JSONObject jsonObject = JSONObject.parseObject(responseBean.getMessage());
156
+            Integer type = (Integer) jsonObject.get("errno");
157
+            Integer faceNum = (Integer) jsonObject.get("face_num");
158
+
159
+            /*推送海康*/
160
+            String data = HKOpenApi.HKpersonGroupId(uploadFile, user.getHkUserId(), user.getHkPersonNo(), user.getUserName(), user.getHkCardNo());
161
+            /*boolean isA为true进行添加,为false进行修改*/
156 162
             if (0 == type && 1 == faceNum) {
157 163
                 if (null == data) {
158 164
                     throw new RuntimeException("海康人脸推送失敗!");
159 165
                 }
160 166
                 if (isA) {
161 167
                     taFaceMapper.insertSelective(taFace);
162
-                }else {
168
+                } else {
163 169
                     taFaceMapper.updateByPrimaryKeySelective(taFace);
164 170
                 }
165 171
                 responseBean.addSuccess("操作成功");
166 172
                 HKOpenApi.downloadFaceAndFingerInfos(String.valueOf(user.getHkUserId()));
167 173
                 //可视对讲时 指定人员人脸权限下载
168
-                List<Integer> userIdList= new ArrayList<>();
174
+                List<Integer> userIdList = new ArrayList<>();
169 175
                 userIdList.add(user.getHkUserId());
170 176
                 //临时设备编号
171 177
                 // TODO 根据期楼栋号,来查询出门口机
172
-                List<String> visualList= new ArrayList<>();
178
+                List<String> visualList = new ArrayList<>();
173 179
                 visualList.add("10010100000");
174
-                HKOpenApi.visualIntercom(null,1,userIdList,visualList);
175
-            }else {
180
+                HKOpenApi.visualIntercom(null, 1, userIdList, visualList);
181
+            } else {
176 182
                 responseBean.addError("请录入正确图片");
177 183
             }
178 184
         } catch (Exception e) {
179 185
             e.printStackTrace();
180
-            log.error("海康人脸推送失敗! {}",e);
186
+            log.error("海康人脸推送失敗! {}", e);
181 187
             throw new RuntimeException("海康人脸推送失敗!");
182 188
         }
183 189
         return responseBean;
184 190
     }
185 191
 
186 192
     /**
187
-     *获得用户,租客,家属,其中一种身份的信息
193
+     * 当前登入人是否有人脸信息
188 194
      */
189 195
     @Override
190
-    public ResponseBean getTaFaceByUserId(Integer userId,Integer otherUserId) {
191
-        ResponseBean responseBean= new ResponseBean();
196
+    public ResponseBean getTaFaceByUserId(UserElement userElement, Integer otherUserId) {
197
+        ResponseBean responseBean = new ResponseBean();
198
+        Integer userVerifyId = userElement.getUserVerifyId();
199
+
192 200
         /**当otherUserId不为空时判断它是否是业主下的租客或者家属*/
193
-        if (null!= otherUserId) {
194
-            responseBean = getTaFaceParentId(userId, otherUserId);
195
-            if ("1".equals(responseBean.getCode())) {
196
-                responseBean.getMessage();
197
-                return responseBean;
198
-            }
201
+        if (null != otherUserId) {
202
+            TaUserVerify userVerify = getTaFaceParentId(userElement, otherUserId);
203
+            userVerifyId = userVerify.getId();
199 204
         }
200
-        Integer id = otherUserId == null?userId:otherUserId;
201
-        TaFace face = taFaceMapper.getByUserId(id);
202
-         if (null!= face){
205
+        TaFace face = taFaceMapper.getByUserVerifyId(userVerifyId);
206
+        if (null != face) {
203 207
             responseBean.addSuccess(face);
204 208
             return responseBean;
205 209
         }
206
-            responseBean.addError("当前用户暂无人脸图片");
207
-            return responseBean;
210
+        responseBean.addError("当前用户暂无人脸图片");
211
+        return responseBean;
208 212
 
209 213
     }
210 214
 
211 215
     /**
212
-     *判断当前用户下的人员关系(家属,租客)
216
+     * 判断当前用户下的人员关系(家属,租客)
213 217
      */
214
-    public ResponseBean getTaFaceParentId(Integer userId,Integer otherUserId){
215
-        ResponseBean  responseBean= new ResponseBean();
216
-        TaUser  users= taUserMapper.selectByPrimaryKey(otherUserId);
217
-        if (null == users || !userId.equals(users.getParentId())){
218
-                responseBean.addError("您输入的家属或租户ID有误");
219
-
220
-        }else if (userId.equals(otherUserId)){
221
-               responseBean.addError("您输入的家属或租户ID有误");
218
+    public TaUserVerify getTaFaceParentId(UserElement userElement, Integer otherUserId) {
219
+        // 根据 家属/租客 的id, 和 当前的房产信息进行查询是否有值,有值就说明是 家属/租客
220
+        TaUserVerify todUserVerify = taUserVerifyMapper.selectCommunityAndAddress(otherUserId, userElement.getCommunityId(), userElement.getPhaseId(), userElement.getBuildingId(), userElement.getUnitId(), userElement.getLevelId(), userElement.getRoomNoId());
221
+        // 判断 家属或者租客 属不属于这个业主的下面
222
+        if (null == todUserVerify) {
223
+            throw new WisdomException("您输入的家属或租户ID有误");
222 224
         }
223
-        return responseBean;
225
+        if (!Constant.VERIFY_STATUS.equals(todUserVerify.getVerifyStatus())) {
226
+            throw new WisdomException("用户房产审核未通过!");
227
+        }
228
+
229
+        return todUserVerify;
224 230
     }
225 231
 
226 232
     /**
227 233
      * 得到当前图片
228 234
      */
229
-    private String img(MultipartFile uploadFile){
235
+    private String img(MultipartFile uploadFile) {
230 236
         String faceImg = null;
231 237
         try {
232 238
             faceImg = imageServiceI.getImageUrl(uploadFile);
@@ -237,50 +243,34 @@ public class FaceServicelimpl implements FaceServiceI {
237 243
     }
238 244
 
239 245
     /**
240
-     *各种身份校验
246
+     * 各种身份校验
241 247
      */
242
-    public ResponseBean addVerify(Integer userid, MultipartFile uploadFile,String faceImg,TaFace taFace) {
248
+    public ResponseBean addVerify(Integer userid, Integer userVerifyId, MultipartFile uploadFile, String faceImg, TaFace taFace) {
243 249
         ResponseBean response = new ResponseBean();
244
-        TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(userid);
250
+
251
+        TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userVerifyId);
245 252
         TaUser taUser = taUserMapper.selectByPrimaryKey(userid);
246
-        if (null!=taUser && null!=sysRole
247
-                && Constant.INVALID.equals(taUser.getStatus())&& Constant.OWNER.equals(sysRole.getRoleName())) {
253
+
254
+        //身份为家属租客,状态为已停用
255
+        if (null != taUser && !Constant.EFFECTIVE_STATUS.equals(taUser.getStatus())) {
248 256
             response.addError("9996", "您的身份已停用,请联系物业");
249 257
             return response;
250 258
         }
251
-        //身份为家属租客,状态为已停用
252
-        if (null!=taUser && null!=sysRole){
253
-            if (Constant.INVALID.equals(taUser.getStatus()) && ((Constant.RELATION.equals(sysRole.getRoleName())) || Constant.TENANT.equals(sysRole.getRoleName()))){
254
-                response.addError("9996", "您的身份已停用,请联系物业");
255
-                return response;
256
-            }
257
-        }
259
+
258 260
         //查询当前用户是否有人脸记录
259
-        TaFace User = taFaceMapper.getByUserId(userid);
260
-        if (null == User) {
261
+        TaFace face = taFaceMapper.getByUserVerifyId(userVerifyId);
262
+        if (null == face) {
261 263
             boolean isA = true;
262
-            if (Constant.OWNER.equals(sysRole.getRoleName()) && "1".equals(taUser.getVerifyStatus())) {
263
-                ResponseBean resps = checKout(faceImg, taFace, isA, uploadFile, userid);
264
-                if (resps.getCode().equals("0")) {
265
-                    taUser.setFaceStatus("1");
266
-                    taUserMapper.updateByPrimaryKeySelective(taUser);
267
-                    resps.addSuccess("图片录入成功");
268
-                } else {
269
-                    resps.addError(resps.getMessage());
270
-                }
271
-                return resps;
272
-            }
273
-            //家属或者租客,已认证
274
-            if (Constant.RELATION.equals(sysRole.getRoleName()) || Constant.TENANT.equals(sysRole.getRoleName()) && "1".equals(taUser.getVerifyStatus())) {
275
-                ResponseBean resps = checKout(faceImg, taFace, isA, uploadFile, userid);
276
-                if (resps.getCode().equals("0")) {
264
+            if (Constant.EFFECTIVE_STATUS.equals(taUser.getStatus()) && "1".equals(taUser.getVerifyStatus())) {
265
+                ResponseBean responseBean = checKout(faceImg, taFace, isA, uploadFile, userid);
266
+                if (responseBean.getCode().equals("0")) {
277 267
                     taUser.setFaceStatus("1");
278 268
                     taUserMapper.updateByPrimaryKeySelective(taUser);
279
-                    resps.addSuccess("图片录入成功");
269
+                    responseBean.addSuccess("图片录入成功");
280 270
                 } else {
281
-                    resps.addError(resps.getMessage());
271
+                    responseBean.addError(responseBean.getMessage());
282 272
                 }
283
-                return resps;
273
+                return responseBean;
284 274
             }
285 275
         }
286 276
         response.addError("您的信息已存在");
@@ -313,9 +303,9 @@ public class FaceServicelimpl implements FaceServiceI {
313 303
         }
314 304
 
315 305
         JSONObject jsonObject = JSONObject.parseObject(result);
316
-        if (!jsonObject.get("code").equals(200)){
306
+        if (!jsonObject.get("code").equals(200)) {
317 307
             String message = jsonObject.get("message").toString();
318
-            log.error(" 推送 迎宾系统失败! {}",message);
308
+            log.error(" 推送 迎宾系统失败! {}", message);
319 309
             throw new WisdomException(message);
320 310
         }
321 311
 
@@ -324,7 +314,7 @@ public class FaceServicelimpl implements FaceServiceI {
324 314
         taFace.setCommunityId(user.getCommunityId());
325 315
         taFace.setCreateDate(new Date());
326 316
         taFace.setCreateUser(user.getId());
327
-        taFace.setTaUserId(user.getId());
317
+        //taFace.setTaUserId(user.getId());
328 318
         taFace.setUpdateDate(new Date());
329 319
         taFace.setUpdateUser(user.getId());
330 320
         try {

+ 20
- 8
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Bestand weergeven

@@ -114,19 +114,21 @@ public class TaUserServiceImpl implements ITaUserService {
114 114
         }
115 115
 
116 116
         // 校验用户
117
-        checkVerifyStatusUser(currentUser);
117
+        checkBlacklistStatusUser(currentUser);
118
+
119
+        TaUserVO taUserVO = new TaUserVO();
120
+        BeanUtils.copyProperties(currentUser, taUserVO);
118 121
 
119 122
         // 校验房产
120 123
         List<TaUserVerify> taUserVerifies = taUserVerifyMapper.selectByUserId(currentUser.getId());
121 124
         // 无关联房产
122 125
         if (null == taUserVerifies || taUserVerifies.size() == 0) {
123
-            response.addSuccess(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getCode(), UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getMsg());
126
+            response.addSuccess(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getCode(), UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getMsg(), taUserVO);
124 127
             return response;
125 128
         }
126
-        TaUserVO taUserVO = new TaUserVO();
129
+
127 130
         // 关联一个审核通过的房产/关联一个待审核房产/关联一个审核未通过房产
128 131
         if (taUserVerifies.size() == 1) {
129
-            BeanUtils.copyProperties(currentUser, taUserVO);
130 132
             TaUserVerify userVerify = taUserVerifies.get(0);
131 133
 
132 134
             /**
@@ -136,7 +138,6 @@ public class TaUserServiceImpl implements ITaUserService {
136 138
 
137 139
             return checkHouse(response, taUserVO, userVerify);
138 140
         } else if (taUserVerifies.size() >= 2) {
139
-            BeanUtils.copyProperties(currentUser, taUserVO);
140 141
             response.addSuccess(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getCode(), taUserVO);
141 142
             return response;
142 143
         }
@@ -791,6 +792,10 @@ public class TaUserServiceImpl implements ITaUserService {
791 792
             response.addError("用户不存在!");
792 793
             return response;
793 794
         }
795
+
796
+        // 校验用户
797
+        checkBlacklistStatusUser(user);
798
+
794 799
         // 当 解除了这个房产关联关系的时候,就不能获取到用户信息
795 800
         TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
796 801
         if (null == userVerify) {
@@ -800,13 +805,13 @@ public class TaUserServiceImpl implements ITaUserService {
800 805
 
801 806
         // 查询 家属或者租客
802 807
         if (null != userId) {
803
-            TaUser todUser = taUserMapper.selectByPrimaryKey(userId);
804 808
             TaUserVerify todUserVerify = taUserVerifyMapper.selectCommunityAndAddress(userId, userElement.getCommunityId(), userElement.getPhaseId(), userElement.getBuildingId(), userElement.getUnitId(), userElement.getLevelId(), userElement.getRoomNoId());
805 809
             // 判断 家属或者租客 属不属于这个业主的下面
806 810
             if (null == todUserVerify) {
807 811
                 response.addError("您的下面没有该家属或者租客!");
808 812
                 return response;
809 813
             }
814
+            TaUser todUser = taUserMapper.selectByPrimaryKey(userId);
810 815
             user = todUser;
811 816
         }
812 817
 
@@ -848,8 +853,8 @@ public class TaUserServiceImpl implements ITaUserService {
848 853
         setUserVoProperties(user.getCommunityId(), userVO);
849 854
 
850 855
         // 人脸是否已录入
851
-        // 这里目前定死为已录入, 后期根据人脸业务做判断
852
-        if ("1".equals(user.getFaceStatus())) {
856
+        TaFace face = taFaceMapper.getByUserVerifyId(userVerify.getId());
857
+        if (null == face) {
853 858
             userVO.setFace("register");
854 859
         } else {
855 860
             userVO.setFace("unregister");
@@ -967,6 +972,13 @@ public class TaUserServiceImpl implements ITaUserService {
967 972
             taUserVO.setRoomNoId(userVerify.getRoomNoId());
968 973
             taUserVO.setAddressBuilding(userVerify.getPhaseName() + userVerify.getBuildingName() + userVerify.getUnitName() + userVerify.getLevelName() + userVerify.getRoomNoName());
969 974
 
975
+            // 人脸是否已录入
976
+            TaFace face = taFaceMapper.getByUserVerifyId(userVerify.getId());
977
+            if (null == face) {
978
+                taUserVO.setFace("register");
979
+            } else {
980
+                taUserVO.setFace("unregister");
981
+            }
970 982
 
971 983
             TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
972 984
             taUserVO.setRole(taSysRole.getRoleName());

+ 14
- 11
CODE/smart-community/app-api/src/main/resources/mapper/TaFaceMapper.xml Bestand weergeven

@@ -4,7 +4,7 @@
4 4
     <resultMap id="BaseResultMap" type="com.community.huiju.model.TaFace" >
5 5
         <id column="id" property="id" jdbcType="INTEGER" />
6 6
         <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
-        <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
7
+        <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
8 8
         <result column="face_img" property="faceImg" jdbcType="VARCHAR" />
9 9
         <result column="create_user" property="createUser" jdbcType="INTEGER" />
10 10
         <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
@@ -12,7 +12,7 @@
12 12
         <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
13 13
     </resultMap>
14 14
     <sql id="Base_Column_List" >
15
-        id, community_id,ta_user_id,face_img,create_user, create_date, update_user,
15
+        id, community_id,ta_user_verify_id,face_img,create_user, create_date, update_user,
16 16
         update_date
17 17
     </sql>
18 18
     <select id="selectByPrimaryKey" resultMap="BaseResultMap">
@@ -26,9 +26,9 @@
26 26
         where id = #{id,jdbcType=INTEGER}
27 27
     </delete>
28 28
     <insert id="insert" parameterType="com.community.huiju.model.TaFace" >
29
-        insert into ta_face (id, community_id, ta_user_id,face_img, create_user, create_date,
29
+        insert into ta_face (id, community_id, ta_user_verify_id,face_img, create_user, create_date,
30 30
         update_user, update_date)
31
-        values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},#{taUserId,jdbcType=INTEGER},#{faceImg,jdbcType=VARCHAR},#{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
31
+        values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},#{taUserVerifyId,jdbcType=INTEGER},#{faceImg,jdbcType=VARCHAR},#{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
32 32
         #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
33 33
     </insert>
34 34
     <insert id="insertSelective"  parameterType="com.community.huiju.model.TaFace" >
@@ -40,8 +40,8 @@
40 40
             <if test="communityId != null" >
41 41
                 community_id,
42 42
             </if>
43
-            <if test="taUserId != null" >
44
-                ta_user_id,
43
+            <if test="taUserVerifyId != null" >
44
+                ta_user_verify_id,
45 45
             </if>
46 46
             <if test="faceImg != null" >
47 47
                 face_img,
@@ -66,8 +66,8 @@
66 66
             <if test="communityId != null" >
67 67
                 #{communityId,jdbcType=INTEGER},
68 68
             </if>
69
-            <if test="taUserId != null" >
70
-                #{taUserId,jdbcType=INTEGER},
69
+            <if test="taUserVerifyId != null" >
70
+                #{taUserVerifyId,jdbcType=INTEGER},
71 71
             </if>
72 72
             <if test="faceImg != null" >
73 73
                 #{faceImg,jdbcType=VARCHAR},
@@ -92,6 +92,9 @@
92 92
             <if test="communityId != null" >
93 93
                 community_id = #{communityId,jdbcType=INTEGER},
94 94
             </if>
95
+            <if test="taUserVerifyId != null" >
96
+                ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
97
+            </if>
95 98
             <if test="faceImg != null" >
96 99
                 face_img = #{faceImg,jdbcType=VARCHAR},
97 100
             </if>
@@ -108,14 +111,14 @@
108 111
                 update_date = #{updateDate,jdbcType=TIMESTAMP},
109 112
             </if>
110 113
         </set>
111
-        where ta_user_id = #{taUserId,jdbcType=INTEGER}
114
+        where id = #{id,jdbcType=INTEGER}
112 115
     </update>
113 116
 
114
-    <select id="getByUserId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
117
+    <select id="getByUserVerifyId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
115 118
         select
116 119
         <include refid="Base_Column_List" />
117 120
         from ta_face
118
-        where ta_user_id = #{userid,jdbcType=INTEGER}
121
+        where ta_user_verify_id = #{userVerifyId,jdbcType=INTEGER}
119 122
     </select>
120 123
 
121 124
     <select id="getById" resultMap="BaseResultMap"  parameterType="java.lang.Integer" >

+ 15
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java Bestand weergeven

@@ -204,4 +204,19 @@ public class Constant {
204 204
      * 认证作废
205 205
      */
206 206
     public static final String INVALID_VERIFY_STATUS = "3";
207
+
208
+    /**
209
+     * 人员状态  拉黑 (运营端操作 APP端的用户)
210
+     */
211
+    public static final String BLACKLIST_STATUS = "2";
212
+
213
+    /**
214
+     * 人员状态  有效
215
+     */
216
+    public static final String EFFECTIVE_STATUS = "1";
217
+
218
+    /**
219
+     * 人员状态  无效
220
+     */
221
+    public static final String INVALID_STATUS = "0";
207 222
 }

+ 58
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/TaUserController.java Bestand weergeven

@@ -0,0 +1,58 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.common.base.BaseController;
5
+import com.community.huiju.service.ITaUserService;
6
+import io.swagger.annotations.Api;
7
+import io.swagger.annotations.ApiImplicitParam;
8
+import io.swagger.annotations.ApiImplicitParams;
9
+import io.swagger.annotations.ApiOperation;
10
+import org.springframework.beans.factory.annotation.Autowired;
11
+import org.springframework.cloud.context.config.annotation.RefreshScope;
12
+import org.springframework.web.bind.annotation.*;
13
+
14
+import java.util.List;
15
+
16
+/**
17
+ * 移动端 用户
18
+ */
19
+@RestController
20
+@RequestMapping("/")
21
+@RefreshScope
22
+@Api(value = "移动用户API",description = "移动用户API")
23
+public class TaUserController  extends BaseController {
24
+
25
+    @Autowired
26
+    private ITaUserService iTaUserService;
27
+
28
+    @ApiOperation("查询所有用户")
29
+    @ApiImplicitParams({
30
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "userName", value = "用户名"),
31
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "loginName", value = "手机号"),
32
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "idCard", value = "身份证"),
33
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "pageNum", value = "当前页"),
34
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "pageSize", value = "一页多少行"),
35
+    })
36
+    @RequestMapping(value = "/ta/user/getAll", method = RequestMethod.GET)
37
+    public ResponseBean getAll(@RequestParam(value = "userName", required = false) String userName,
38
+                               @RequestParam(value = "loginName", required = false)String loginName,
39
+                               @RequestParam(value = "idCard", required = false)String idCard,
40
+                               @RequestParam(value = "pageNum", defaultValue = "1")Integer pageNum,
41
+                               @RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize) {
42
+        ResponseBean responseBean = new ResponseBean();
43
+        responseBean = iTaUserService.getAll(userName, loginName, idCard, pageNum, pageSize);
44
+        return responseBean;
45
+    }
46
+
47
+    @ApiOperation("拉黑用户")
48
+    @ApiImplicitParams({
49
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "ids", value = "id集合"),
50
+    })
51
+    @RequestMapping(value = "/ta/user/blacklist", method = RequestMethod.PUT)
52
+    public ResponseBean blacklistTaUser(@RequestBody List<Integer> ids) {
53
+        ResponseBean responseBean = new ResponseBean();
54
+        responseBean = iTaUserService.blacklistTaUser(ids);
55
+        return responseBean;
56
+    }
57
+
58
+}

+ 8
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Bestand weergeven

@@ -3,6 +3,8 @@ package com.community.huiju.dao;
3 3
 import com.community.huiju.model.TaUser;
4 4
 import org.apache.ibatis.annotations.Mapper;
5 5
 import org.apache.ibatis.annotations.Param;
6
+import org.apache.ibatis.annotations.ResultMap;
7
+import org.apache.ibatis.annotations.Select;
6 8
 
7 9
 import java.util.List;
8 10
 import java.util.Map;
@@ -82,4 +84,10 @@ public interface TaUserMapper {
82 84
      * @return
83 85
      */
84 86
     Integer getOwnerCount();
87
+
88
+    /**
89
+     * 查询所有用户列表
90
+     * @return
91
+     */
92
+    List<TaUser> selectAll(String userName, String loginName, String idCard);
85 93
 }

+ 31
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/TaUser.java Bestand weergeven

@@ -39,6 +39,13 @@ public class TaUser {
39 39
 
40 40
     private Date updateDate;
41 41
 
42
+    // 身份证
43
+    private String idCard;
44
+
45
+    private String openid;
46
+
47
+    private String nickname;
48
+
42 49
     /**
43 50
      * 海康人员编号
44 51
      */
@@ -250,4 +257,28 @@ public class TaUser {
250 257
     public void setHkPersonNo(Long hkPersonNo) {
251 258
         this.hkPersonNo = hkPersonNo;
252 259
     }
260
+
261
+    public String getIdCard() {
262
+        return idCard;
263
+    }
264
+
265
+    public void setIdCard(String idCard) {
266
+        this.idCard = idCard;
267
+    }
268
+
269
+    public String getOpenid() {
270
+        return openid;
271
+    }
272
+
273
+    public void setOpenid(String openid) {
274
+        this.openid = openid;
275
+    }
276
+
277
+    public String getNickname() {
278
+        return nickname;
279
+    }
280
+
281
+    public void setNickname(String nickname) {
282
+        this.nickname = nickname;
283
+    }
253 284
 }

+ 20
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/ITaUserService.java Bestand weergeven

@@ -2,6 +2,8 @@ package com.community.huiju.service;
2 2
 
3 3
 import com.community.commom.mode.ResponseBean;
4 4
 
5
+import java.util.List;
6
+
5 7
 public interface ITaUserService {
6 8
 
7 9
     /**
@@ -12,4 +14,22 @@ public interface ITaUserService {
12 14
      */
13 15
     ResponseBean getByUserTypeCount();
14 16
 
17
+    /**
18
+     * 查询所有的 用户
19
+     * @param userName
20
+     * @param loginName
21
+     * @param idCard
22
+     * @param pageNum
23
+     * @param pageSize
24
+     * @return
25
+     */
26
+    ResponseBean getAll(String userName, String loginName, String idCard, Integer pageNum, Integer pageSize);
27
+
28
+    /**
29
+     * 批量拉黑用户
30
+     * @param ids
31
+     * @return
32
+     */
33
+    ResponseBean blacklistTaUser(List<Integer> ids);
34
+
15 35
 }

+ 38
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Bestand weergeven

@@ -2,11 +2,16 @@ package com.community.huiju.service.impl;
2 2
 
3 3
 import com.community.commom.mode.ResponseBean;
4 4
 import com.community.huiju.dao.TaUserMapper;
5
+import com.community.huiju.exception.WisdomException;
6
+import com.community.huiju.model.TaUser;
5 7
 import com.community.huiju.service.ITaUserService;
8
+import com.github.pagehelper.Page;
9
+import com.github.pagehelper.PageHelper;
6 10
 import com.google.common.collect.Lists;
7 11
 import com.google.common.collect.Maps;
8 12
 import org.springframework.beans.factory.annotation.Autowired;
9 13
 import org.springframework.stereotype.Service;
14
+import org.springframework.transaction.annotation.Transactional;
10 15
 
11 16
 import java.util.List;
12 17
 import java.util.Map;
@@ -47,4 +52,37 @@ public class TaUserServiceImpl implements ITaUserService {
47 52
         return responseBean;
48 53
     }
49 54
 
55
+    @Override
56
+    public ResponseBean getAll(String userName, String loginName, String idCard, Integer pageNum, Integer pageSize) {
57
+        ResponseBean responseBean = new ResponseBean();
58
+
59
+        Page<TaUser> page = PageHelper.startPage(pageNum, pageSize);
60
+        List<TaUser> userList = taUserMapper.selectAll(userName, loginName, idCard);
61
+
62
+        Map<String, Object> map = Maps.newHashMap();
63
+        map.put("item", userList);
64
+        map.put("total", page.getTotal());
65
+        map.put("pageNum", page.getPageNum());
66
+        map.put("pageSize", page.getPageSize());
67
+        responseBean.addSuccess(map);
68
+        return responseBean;
69
+    }
70
+
71
+    @Override
72
+    @Transactional(rollbackFor = Exception.class)
73
+    public ResponseBean blacklistTaUser(List<Integer> ids) {
74
+        ResponseBean responseBean = new ResponseBean();
75
+
76
+        ids.forEach(e -> {
77
+            TaUser user = taUserMapper.selectByPrimaryKey(e);
78
+            if (null == user) {
79
+                throw new WisdomException("用户不存在");
80
+            }
81
+            user.setStatus("2");
82
+            taUserMapper.updateByPrimaryKeySelective(user);
83
+        });
84
+
85
+        responseBean.addSuccess("操作成功");
86
+        return responseBean;
87
+    }
50 88
 }

+ 58
- 4
CODE/smart-community/operate-api/src/main/resources/mapper/TaUserMapper.xml Bestand weergeven

@@ -24,11 +24,14 @@
24 24
     <result column="hk_user_id" property="hkUserId" jdbcType="INTEGER" />
25 25
     <result column="hk_card_no" property="hkCardNo" jdbcType="VARCHAR" />
26 26
     <result column="face_status" property="faceStatus" jdbcType="CHAR" />
27
+    <result column="id_card" property="idCard" jdbcType="INTEGER"/>
28
+    <result column="openid" property="openid" jdbcType="VARCHAR" />
29
+    <result column="nickname" property="nickname" jdbcType="VARCHAR" />
27 30
   </resultMap>
28 31
   <sql id="Base_Column_List" >
29 32
     id, community_id, building_owner_info_id, head_portrait, user_name, login_name, login_password,
30 33
     email, gender, status, remark, parent_id, accept_agreement_status, verify_status,
31
-    create_user, create_date, update_user, update_date, hk_person_no , hk_user_id, hk_card_no, face_status
34
+    create_user, create_date, update_user, update_date, hk_person_no, hk_user_id, hk_card_no, face_status, id_card, openid, nickname
32 35
   </sql>
33 36
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
34 37
     select
@@ -47,7 +50,7 @@
47 50
       status, remark, parent_id,
48 51
       accept_agreement_status, verify_status, create_user,
49 52
       create_date, update_user, update_date, hk_person_no,
50
-      hk_user_id, hk_card_no, face_status
53
+      hk_user_id, hk_card_no, face_status, id_card, openid, nickname
51 54
       )
52 55
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{buildingOwnerInfoId,jdbcType=INTEGER},
53 56
       #{headPortrait,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{loginName,jdbcType=VARCHAR},
@@ -55,7 +58,8 @@
55 58
       #{status,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
56 59
       #{acceptAgreementStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER},
57 60
       #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP},
58
-      #{hkPersonNo,jdbcType=BIGINT}, #{hkUserId,jdbcType=INTEGER}, #{hkCardNo,jdbcType=VARCHAR}, #{faceStatus,jdbcType=CHAR}
61
+      #{hkPersonNo,jdbcType=BIGINT}, #{hkUserId,jdbcType=INTEGER}, #{hkCardNo,jdbcType=VARCHAR}, #{faceStatus,jdbcType=CHAR},
62
+      #{idCard,jdbcType=VARCHAR}, #{openid,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR},
59 63
       )
60 64
   </insert>
61 65
   <insert id="insertSelective" parameterType="com.community.huiju.model.TaUser" useGeneratedKeys="true" keyProperty="id" >
@@ -127,6 +131,15 @@
127 131
       <if test="faceStatus != null" >
128 132
         face_status,
129 133
       </if>
134
+      <if test="idCard != null">
135
+        id_card,
136
+      </if>
137
+      <if test="openid != null" >
138
+        openid,
139
+      </if>
140
+      <if test="nickname != null" >
141
+        nickname,
142
+      </if>
130 143
     </trim>
131 144
     <trim prefix="values (" suffix=")" suffixOverrides="," >
132 145
       <if test="id != null" >
@@ -195,6 +208,15 @@
195 208
       <if test="faceStatus != null" >
196 209
         #{faceStatus,jdbcType=CHAR},
197 210
       </if>
211
+      <if test="idCard != null">
212
+        #{idCard,jdbcType=VARCHAR},
213
+      </if>
214
+      <if test="openid != null" >
215
+        #{openid,jdbcType=VARCHAR},
216
+      </if>
217
+      <if test="nickname != null" >
218
+        #{nickname,jdbcType=VARCHAR},
219
+      </if>
198 220
     </trim>
199 221
   </insert>
200 222
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaUser" >
@@ -263,6 +285,15 @@
263 285
       <if test="faceStatus != null" >
264 286
         face_status = #{faceStatus,jdbcType=CHAR},
265 287
       </if>
288
+      <if test="idCard != null">
289
+        id_card = #{idCard,jdbcType=VARCHAR},
290
+      </if>
291
+      <if test="openid != null" >
292
+        openid = #{openid,jdbcType=VARCHAR},
293
+      </if>
294
+      <if test="nickname != null" >
295
+        nickname = #{nickname,jdbcType=VARCHAR},
296
+      </if>
266 297
     </set>
267 298
     where id = #{id,jdbcType=INTEGER}
268 299
   </update>
@@ -288,7 +319,10 @@
288 319
       hk_person_no = #{hkPersonNo,jdbcType=BIGINT},
289 320
       hk_user_id = #{hkUserId,jdbcType=INTEGER},
290 321
       hk_card_no = #{hkCardNo,jdbcType=VARCHAR},
291
-      face_status = #{faceStatus,jdbcType=CHAR}
322
+      face_status = #{faceStatus,jdbcType=CHAR},
323
+      id_card = #{idCard,jdbcType=VARCHAR},
324
+      openid = #{openid,jdbcType=VARCHAR},
325
+      nickname = #{nickname,jdbcType=VARCHAR}
292 326
     where id = #{id,jdbcType=INTEGER}
293 327
   </update>
294 328
 
@@ -357,4 +391,24 @@
357 391
     INNER JOIN ta_sys_user_role tsur on tu.id = tsur.user_id where tsur.role_id != 2
358 392
   </select>
359 393
 
394
+  <select id="selectAll" resultMap="BaseResultMap" >
395
+    select
396
+    <include refid="Base_Column_List"/>
397
+    from ta_user
398
+    <where>
399
+      <trim suffixOverrides="or | and">
400
+        <if test="userName != null and userName != ''" >
401
+          and user_name like CONCAT('%', #{userName,jdbcType=VARCHAR}, '%')
402
+        </if>
403
+        <if test="loginName != null and loginName != ''" >
404
+          and login_name like CONCAT('%', #{loginName,jdbcType=VARCHAR}, '%')
405
+        </if>
406
+        <if test="idCard != null and idCard != ''">
407
+          and id_card like CONCAT('%', #{idCard,jdbcType=VARCHAR}, '%')
408
+        </if>
409
+        and id != -1
410
+      </trim>
411
+    </where>
412
+  </select>
413
+
360 414
 </mapper>

+ 7
- 7
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java Bestand weergeven

@@ -42,9 +42,9 @@ public class BuildingOwnerInfoController extends BaseController {
42 42
 
43 43
     @ApiOperation(value = "获取楼栋业主信息", notes = "根据条件获取")
44 44
     @ApiImplicitParams({
45
-            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter",value = "building栋;" +
46
-                    "unit单元;level楼层;roomNo户号;" +
47
-                    "ownerName业主姓名;" +
45
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter",value = "buildingId栋;" +
46
+                    "unitId单元;levelId楼层;roomNoId户号;" +
47
+                    "ownerName业主姓名;" +"ownerTel业主手机号;" +"idCard身份证;" +
48 48
                     "pageNum第几页;pageSize 一页多少行;")
49 49
     })
50 50
     @RequestMapping(value = "/building/list", method = RequestMethod.POST)
@@ -123,7 +123,7 @@ public class BuildingOwnerInfoController extends BaseController {
123 123
         return responseBean;
124 124
     }
125 125
     
126
-    @ApiOperation(value = "查询 期区", notes = "查询 期区")
126
+    @ApiOperation(value = "查询 楼栋", notes = "查询 楼栋")
127 127
     @ApiImplicitParams({
128 128
             @ApiImplicitParam(paramType = "query", name = "phaseId",value = "期区ID")
129 129
     })
@@ -135,7 +135,7 @@ public class BuildingOwnerInfoController extends BaseController {
135 135
         return responseBean;
136 136
     }
137 137
     
138
-    @ApiOperation(value = "查询 期区", notes = "查询 期区")
138
+    @ApiOperation(value = "查询 单元", notes = "查询 单元")
139 139
     @ApiImplicitParams({
140 140
             @ApiImplicitParam(paramType = "query", name = "buildingId",value = "楼栋ID")
141 141
     })
@@ -147,7 +147,7 @@ public class BuildingOwnerInfoController extends BaseController {
147 147
         return responseBean;
148 148
     }
149 149
     
150
-    @ApiOperation(value = "查询 期区", notes = "查询 期区")
150
+    @ApiOperation(value = "查询 楼层", notes = "查询 楼层")
151 151
     @ApiImplicitParams({
152 152
             @ApiImplicitParam(paramType = "query", name = "unitId",value = "单元ID")
153 153
     })
@@ -159,7 +159,7 @@ public class BuildingOwnerInfoController extends BaseController {
159 159
         return responseBean;
160 160
     }
161 161
     
162
-    @ApiOperation(value = "查询 期区", notes = "查询 期区")
162
+    @ApiOperation(value = "查询 房间号", notes = "查询 房间号")
163 163
     @ApiImplicitParams({
164 164
             @ApiImplicitParam(paramType = "query", name = "levelId",value = "楼层ID")
165 165
     })

+ 2
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java Bestand weergeven

@@ -29,4 +29,6 @@ public interface TpBuildingOwnerInfoMapper extends BaseMapper<TpBuildingOwnerInf
29 29
     int batchInsert(List<TpBuildingOwnerInfo> list);
30 30
 
31 31
     int batchUpdate(List<TpBuildingOwnerInfo> list);
32
+	
33
+	List<TpBuildingOwnerInfo> selectListByParams(Page page,@Param("tpBuildingOwnerInfo") TpBuildingOwnerInfo tpBuildingOwnerInfo);
32 34
 }

+ 6
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java Bestand weergeven

@@ -147,4 +147,10 @@ public class TpBuildingOwnerInfo implements Serializable {
147 147
      */
148 148
     @TableField(exist = false)
149 149
     private String roleName;
150
+    
151
+    /**
152
+     * 更新人
153
+     */
154
+    @TableField(exist = false)
155
+    private String updateName;
150 156
 }

+ 58
- 33
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Bestand weergeven

@@ -98,44 +98,21 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
98 98
 
99 99
         JSONObject jsonObject = JSONObject.parseObject(parameter);
100 100
         TpBuildingOwnerInfo tpBuildingOwnerInfo = jsonObject.toJavaObject(jsonObject,TpBuildingOwnerInfo.class);
101
-
101
+        tpBuildingOwnerInfo.setCommunityId(userElement.getCommunityId());
102 102
         Long pageNum = jsonObject.getLong("pageNum") == null ? 1 : jsonObject.getLong("pageNum");
103 103
         Long pageSize = jsonObject.getLong("pageSize") == null ? 10 : jsonObject.getLong("pageSize");
104 104
 
105
-        Page<TpBuildingOwnerInfo> page = new Page(pageNum,pageSize);
106
-
107
-        Map<String, Object> map = Maps.newHashMap();
108
-        // 小区Id
109
-        map.put("community_id", userElement.getCommunityId());
110
-        map.put("owner_status", "1");
111
-        // 期
112
-        //map.put("phase", tpBuildingOwnerInfo.getPhaseName());
113
-        // 栋
114
-        //map.put("building", tpBuildingOwnerInfo.getBuildingName());
115
-        // 单元
116
-        //map.put("unit", tpBuildingOwnerInfo.getUnitName());
117
-        // 楼层
118
-        //map.put("level", tpBuildingOwnerInfo.getLevelName());
119
-        // 房号
120
-        //map.put("room_no", tpBuildingOwnerInfo.getName());
121
-
122
-        QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
123
-        queryWrapper.allEq(map,false);
124
-        //queryWrapper.like(tpBuildingOwnerInfo.getOwnerName() != null,"owner_name", tpBuildingOwnerInfo.getOwnerName());
125
-        queryWrapper.orderByDesc("create_date");
105
+        Page page = new Page(pageNum,pageSize);
126 106
 
127 107
         // 分页查询
128
-        IPage<TpBuildingOwnerInfo> infoIPage = tpBuildingOwnerInfoMapper.selectPage(page, queryWrapper);
129
-
108
+        List<TpBuildingOwnerInfo> list = tpBuildingOwnerInfoMapper.selectListByParams(page,tpBuildingOwnerInfo);
130 109
 
131 110
         Map<String, Object> retMap = Maps.newHashMap();
132
-        // 获取数据
133
-        List<TpBuildingOwnerInfo> list = infoIPage.getRecords();
134 111
 
135 112
         retMap.put("list", list);
136
-        retMap.put("total", infoIPage.getTotal());
137
-        retMap.put("pageNum", infoIPage.getCurrent());
138
-        retMap.put("pageSize", infoIPage.getSize());
113
+        retMap.put("total", page.getTotal());
114
+        retMap.put("pageNum", page.getCurrent());
115
+        retMap.put("pageSize", page.getSize());
139 116
 
140 117
         responseBean.addSuccess(retMap);
141 118
 
@@ -938,7 +915,19 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
938 915
      */
939 916
     @Override
940 917
     public ResponseBean getBuildingList(Integer phaseId, Integer communityId) {
941
-        return null;
918
+        ResponseBean responseBean = new ResponseBean();
919
+        if (null == communityId || "".equals(communityId)) {
920
+            throw new WisdomException("编号:%s 小区不存在!", communityId);
921
+        }
922
+    
923
+        QueryWrapper<TpBuilding> queryWrapper = new QueryWrapper<>();
924
+        queryWrapper.eq("community_id", communityId);
925
+        queryWrapper.eq("phase_id", phaseId);
926
+    
927
+        List<TpBuilding> tpBuildingList = tpBuildingMapper.selectList(queryWrapper);
928
+        responseBean.addSuccess(tpBuildingList);
929
+    
930
+        return responseBean;
942 931
     }
943 932
     
944 933
     /**
@@ -950,7 +939,19 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
950 939
      */
951 940
     @Override
952 941
     public ResponseBean getUnitList(Integer buildingId, Integer communityId) {
953
-        return null;
942
+        ResponseBean responseBean = new ResponseBean();
943
+        if (null == communityId || "".equals(communityId)) {
944
+            throw new WisdomException("编号:%s 小区不存在!", communityId);
945
+        }
946
+    
947
+        QueryWrapper<TpUnit> queryWrapper = new QueryWrapper<>();
948
+        queryWrapper.eq("community_id", communityId);
949
+        queryWrapper.eq("building_id", buildingId);
950
+    
951
+        List<TpUnit> tpUnitList = tpUnitMapper.selectList(queryWrapper);
952
+        responseBean.addSuccess(tpUnitList);
953
+    
954
+        return responseBean;
954 955
     }
955 956
     
956 957
     /**
@@ -962,7 +963,19 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
962 963
      */
963 964
     @Override
964 965
     public ResponseBean getLevelList(Integer unitId, Integer communityId) {
965
-        return null;
966
+        ResponseBean responseBean = new ResponseBean();
967
+        if (null == communityId || "".equals(communityId)) {
968
+            throw new WisdomException("编号:%s 小区不存在!", communityId);
969
+        }
970
+    
971
+        QueryWrapper<TpLevel> queryWrapper = new QueryWrapper<>();
972
+        queryWrapper.eq("community_id", communityId);
973
+        queryWrapper.eq("unit_id", unitId);
974
+    
975
+        List<TpLevel> tpLevelList = tpLevelMapper.selectList(queryWrapper);
976
+        responseBean.addSuccess(tpLevelList);
977
+    
978
+        return responseBean;
966 979
     }
967 980
     
968 981
     /**
@@ -974,6 +987,18 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
974 987
      */
975 988
     @Override
976 989
     public ResponseBean getRoomNoList(Integer levelId, Integer communityId) {
977
-        return null;
990
+        ResponseBean responseBean = new ResponseBean();
991
+        if (null == communityId || "".equals(communityId)) {
992
+            throw new WisdomException("编号:%s 小区不存在!", communityId);
993
+        }
994
+    
995
+        QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
996
+        queryWrapper.eq("community_id", communityId);
997
+        queryWrapper.eq("level_id", levelId);
998
+    
999
+        List<TpBuildingOwnerInfo> tpLevelList = tpBuildingOwnerInfoMapper.selectList(queryWrapper);
1000
+        responseBean.addSuccess(tpLevelList);
1001
+    
1002
+        return responseBean;
978 1003
     }
979 1004
 }

+ 44
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml Bestand weergeven

@@ -58,4 +58,48 @@
58 58
         </foreach>
59 59
     </update>
60 60
 
61
+    <select id="selectListByParams" resultType="com.community.huiju.model.TpBuildingOwnerInfo">
62
+        SELECT
63
+            t.id,
64
+            t.community_id,
65
+            t.owner_tel,
66
+            t.owner_name,
67
+            t.id_card,
68
+            r.description as role_name,
69
+            u.verify_status,
70
+            m.user_name AS update_name,
71
+            t.update_date
72
+        FROM
73
+            tp_building_owner_info t
74
+            LEFT JOIN ta_user_verify u ON t.id = u.room_no_id
75
+            LEFT JOIN ta_sys_role r ON u.role_id = r.id
76
+            LEFT JOIN tp_user m ON t.update_user = m.id
77
+        WHERE
78
+            t.owner_status = 1
79
+        and t.community_id=#{tpBuildingOwnerInfo.communityId,jdbcType=INTEGER}
80
+        <if test="tpBuildingOwnerInfo.phaseId != null and tpBuildingOwnerInfo.phaseId != ''">
81
+            and t.phase_id = #{tpBuildingOwnerInfo.phaseId,jdbcType=INTEGER}
82
+        </if>
83
+        <if test="tpBuildingOwnerInfo.buildingId != null and tpBuildingOwnerInfo.buildingId != ''">
84
+            and t.building_id = #{tpBuildingOwnerInfo.buildingId,jdbcType=INTEGER}
85
+        </if>
86
+        <if test="tpBuildingOwnerInfo.unitId != null and tpBuildingOwnerInfo.unitId != ''">
87
+            and t.unit_id = #{tpBuildingOwnerInfo.unitId,jdbcType=INTEGER}
88
+        </if>
89
+        <if test="tpBuildingOwnerInfo.levelId != null and tpBuildingOwnerInfo.levelId != ''">
90
+            and t.level_id = #{tpBuildingOwnerInfo.levelId,jdbcType=INTEGER}
91
+        </if>
92
+        <if test="tpBuildingOwnerInfo.id != null and tpBuildingOwnerInfo.id != ''">
93
+            and t.id = #{tpBuildingOwnerInfo.id,jdbcType=INTEGER}
94
+        </if>
95
+        <if test="tpBuildingOwnerInfo.ownerName != null and tpBuildingOwnerInfo.ownerName != ''">
96
+            and t.owner_name like concat('%',#{tpBuildingOwnerInfo.ownerName,jdbcType=VARCHAR},'%')
97
+        </if>
98
+        <if test="tpBuildingOwnerInfo.ownerTel != null and tpBuildingOwnerInfo.ownerTel != ''">
99
+            and t.owner_tel like concat('%',#{tpBuildingOwnerInfo.ownerTel,jdbcType=VARCHAR},'%')
100
+        </if>
101
+        <if test="tpBuildingOwnerInfo.idCard != null and tpBuildingOwnerInfo.idCard != ''">
102
+            and t.id_card like concat('%',#{tpBuildingOwnerInfo.idCard,jdbcType=VARCHAR},'%')
103
+        </if>
104
+    </select>
61 105
 </mapper>

+ 25
- 0
VUECODE/smart-operate-manage/src/api/user.js Bestand weergeven

@@ -79,3 +79,28 @@ export function upDateStatus(data) {
79 79
     }
80 80
   })
81 81
 }
82
+
83
+// 查询所有的 移动端用户
84
+export function getTaUserAll(data) {
85
+  return request({
86
+    url: '/ta/user/getAll',
87
+    method: 'get',
88
+    params: {
89
+      userName: data.userName, // 用户名
90
+      loginName: data.loginName, // 手机号
91
+      idCard: data.idCard, // 身份证号
92
+      pageNum: data.pageNum,
93
+      pageSize: data.pageSize
94
+    }
95
+  })
96
+}
97
+
98
+// 拉黑 移动端用户用户
99
+export function blacklistUser(data) {
100
+  return request({
101
+    url: '/ta/user/blacklist',
102
+    method: 'put',
103
+    data
104
+  })
105
+}
106
+

+ 12
- 0
VUECODE/smart-operate-manage/src/router/index.js Bestand weergeven

@@ -35,6 +35,18 @@ export const constantRouterMap = [
35 35
         component: () => import('@/views/community/communityTable'),
36 36
         name: 'community',
37 37
         meta: { title: '社区列表', icon: 'community' }
38
+      },
39
+      {
40
+        path: '/user/management',
41
+        component: () => import('@/views/community/user/index'),
42
+        name: 'user-management',
43
+        meta: { title: '用户列表', icon: 'user' }
44
+      },
45
+      {
46
+        path: '/user/log',
47
+        component: () => import('@/views/community/user/log/index'),
48
+        name: 'user-log',
49
+        meta: { title: '用户日志', icon: 'user' }
38 50
       }
39 51
     ]
40 52
   },

+ 19
- 1
VUECODE/smart-operate-manage/src/store/modules/user.js Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 import { login, logOut, getInfo, sendCode } from '@/api/login'
2 2
 import { getToken, setToken, removeToken } from '@/utils/auth'
3
-import { employeesList, userRoleById, addUser, selectUser, upDate, upDateStatus } from '@/api/user'
3
+import { employeesList, userRoleById, addUser, selectUser, upDate, upDateStatus, getTaUserAll, blacklistUser } from '@/api/user'
4 4
 
5 5
 const user = {
6 6
   state: {
@@ -161,6 +161,24 @@ const user = {
161 161
           reject(error)
162 162
         })
163 163
       })
164
+    },
165
+    GetTaUserAll({ commit }, data) { // 获取所有 移动端用户
166
+      return new Promise((resolve, reject) => {
167
+        getTaUserAll(data).then(response => {
168
+          resolve(response)
169
+        }).catch(error => {
170
+          reject(error)
171
+        })
172
+      })
173
+    },
174
+    BlacklistUser({ commit }, data) { // 拉黑移动端用户
175
+      return new Promise((resolve, reject) => {
176
+        blacklistUser(data).then(response => {
177
+          resolve(response)
178
+        }).catch(error => {
179
+          reject(error)
180
+        })
181
+      })
164 182
     }
165 183
   }
166 184
 }

+ 1
- 1
VUECODE/smart-operate-manage/src/views/account/role/edi/index.vue Bestand weergeven

@@ -59,7 +59,7 @@ export default {
59 59
     }
60 60
   },
61 61
   mounted() {
62
-    this.ruleForm.id = this.$route.params.id
62
+    this.ruleForm.id = this.$route.query.id
63 63
     // 获取用户数据
64 64
     this.getInfo()
65 65
   },

+ 2
- 2
VUECODE/smart-operate-manage/src/views/account/role/index.vue Bestand weergeven

@@ -181,13 +181,13 @@ export default {
181 181
         this.$message.error('只能选择一行数据!')
182 182
         return
183 183
       }
184
-      this.$router.push({ name: 'role-edi', params: { id: ids[0] }})
184
+      this.$router.push({ name: 'role-edi', query: { id: ids[0] }})
185 185
     },
186 186
     addRole() { // 添加角色
187 187
       this.$router.push({ name: 'role-add' })
188 188
     },
189 189
     infoRole(id) { // 查看角色详情
190
-      this.$router.push({ name: 'role-info', params: { id: id }})
190
+      this.$router.push({ name: 'role-info', query: { id: id }})
191 191
     }
192 192
   }
193 193
 }

+ 2
- 2
VUECODE/smart-operate-manage/src/views/account/role/info/index.vue Bestand weergeven

@@ -59,13 +59,13 @@ export default {
59 59
     }
60 60
   },
61 61
   mounted() {
62
-    this.ruleForm.id = this.$route.params.id
62
+    this.ruleForm.id = this.$route.query.id
63 63
     // 获取用户数据
64 64
     this.getInfo()
65 65
   },
66 66
   methods: {
67 67
     submitForm(formName) {
68
-      this.$router.push({ name: 'role-edi', params: { id: this.ruleForm.id }})
68
+      this.$router.push({ name: 'role-edi', query: { id: this.ruleForm.id }})
69 69
     },
70 70
     resetForm() {
71 71
       // this.$refs[formName].resetFields()

+ 190
- 0
VUECODE/smart-operate-manage/src/views/community/user/index.vue Bestand weergeven

@@ -0,0 +1,190 @@
1
+<template>
2
+  <div id="root">
3
+    <el-form :inline="true" :model="formInline" class="demo-form-inline">
4
+      <el-form-item label="用户姓名">
5
+        <el-input v-model="formInline.userName" placeholder="用户姓名"/>
6
+      </el-form-item>
7
+      <el-form-item label="手机号">
8
+        <el-input v-model="formInline.loginName" placeholder="手机号"/>
9
+      </el-form-item>
10
+      <el-form-item label="身份证号">
11
+        <el-input v-model="formInline.idCard" placeholder="身份证号"/>
12
+      </el-form-item>
13
+      <el-form-item>
14
+        <el-button type="info" @click="clear">清空</el-button>
15
+        <el-button type="primary" @click="searchData">查询</el-button>
16
+      </el-form-item>
17
+    </el-form>
18
+    <div class="button-div">
19
+      <el-button type="warning" @click="blacklistUser">拉黑</el-button>
20
+    </div>
21
+    <el-table
22
+      ref="multipleTable"
23
+      :data="users"
24
+      border
25
+      tooltip-effect="dark"
26
+      style="width: 100%;margin-top: 20px;"
27
+      @selection-change="handleSelectionChange">
28
+      <el-table-column
29
+        align="center"
30
+        type="selection"
31
+        width="55"/>
32
+      <el-table-column
33
+        align="center"
34
+        prop="userName"
35
+        label="姓名"/>
36
+      <el-table-column
37
+        align="center"
38
+        prop="loginName"
39
+        label="手机号"
40
+        width="120"/>
41
+      <el-table-column
42
+        align="center"
43
+        prop="idCard"
44
+        label="身份证号"/>
45
+      <el-table-column
46
+        align="center"
47
+        prop="gender"
48
+        label="性别">
49
+        <template slot-scope="scope">{{ scope.row.gender === '1' ? '男' : '女' }}</template>
50
+      </el-table-column>
51
+      <el-table-column
52
+        align="center"
53
+        prop="status"
54
+        label="账号状态">
55
+        <template slot-scope="scope">{{ scope.row.status === '2' ? '黑名单' : '正常' }}</template>
56
+      </el-table-column>
57
+      <el-table-column
58
+        align="center"
59
+        prop="createDate"
60
+        label="注册时间">
61
+        <template slot-scope="scope">{{ formatDate(scope.row.createDate) }}</template>
62
+      </el-table-column>
63
+      <el-table-column
64
+        align="center"
65
+        label="日志数据">
66
+        <template slot-scope="scope">
67
+          <el-button type="primary" @click="lookUserLog(scope.row.id)">查看</el-button>
68
+        </template>
69
+      </el-table-column>
70
+    </el-table>
71
+    <div class="footer-page">
72
+      <el-pagination
73
+        :current-page="formInline.pageNum"
74
+        :page-sizes="[10, 20, 40, 100]"
75
+        :page-size="formInline.pageSize"
76
+        :total="total"
77
+        layout="total, sizes, prev, pager, next, jumper"
78
+        @size-change="handleSizeChange"
79
+        @current-change="handleCurrentChange"/>
80
+    </div>
81
+  </div>
82
+</template>
83
+
84
+<script>
85
+export default {
86
+  name: 'UserManagement',
87
+  data() {
88
+    return {
89
+      formInline: {
90
+        userName: '', // 用户名
91
+        loginName: '', // 手机号
92
+        idCard: '', // 身份证号
93
+        pageNum: 1,
94
+        pageSize: 10
95
+      },
96
+      total: 0, // 总数
97
+      users: [], // 用户数据
98
+      ids: [] // 选中的id 集合
99
+    }
100
+  },
101
+  mounted() {
102
+    this.getData()
103
+  },
104
+  methods: {
105
+    clear() { // 清除
106
+      this.formInline.userName = ''
107
+      this.formInline.loginName = ''
108
+      this.formInline.idCard = ''
109
+      this.formInline.pageNum = 1
110
+      this.formInline.pageSize = 10
111
+      this.getData()
112
+    },
113
+    handleSelectionChange(val) { // 选中
114
+      this.ids = []
115
+      val.map((item, index) => {
116
+        this.ids.push(item.id)
117
+      })
118
+    },
119
+    handleSizeChange(val) {
120
+      console.log(`每页 ${val} 条`)
121
+    },
122
+    handleCurrentChange(val) {
123
+      console.log(`当前页: ${val}`)
124
+    },
125
+    searchData() { // 搜索
126
+      this.formInline.pageNum = 1
127
+      this.formInline.pageSize = 10
128
+      this.getData()
129
+    },
130
+    getData() {
131
+      this.$store.dispatch('GetTaUserAll', this.formInline).then((res) => {
132
+        const resCode = res.code
133
+        if (resCode === '0') {
134
+          const resData = res.data
135
+          this.users = resData.item
136
+          this.total = resData.total
137
+          this.formInline.pageNum = resData.pageNum
138
+          this.formInline.pageSize = resData.pageSize
139
+        }
140
+      }).catch(() => {
141
+        console.log('GetTaUserAll error')
142
+      })
143
+    },
144
+    formatDate(val) {
145
+      if (val === null) {
146
+        return
147
+      }
148
+      var value = new Date(val)
149
+      var year = value.getFullYear()
150
+      var month = value.getMonth() + 1
151
+      var day = value.getDate()
152
+      // var hour = value.getHours()
153
+      // var minutes = value.getMinutes()
154
+      // var seconds = value.getSeconds()
155
+      // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
156
+      return year + '-' + month + '-' + day
157
+    },
158
+    lookUserLog(id) { // 跳转查看用户日志
159
+      this.$router.push({ name: 'user-log', query: { id: id }})
160
+    },
161
+    blacklistUser() { // 拉黑移动端用户
162
+      this.$store.dispatch('BlacklistUser', this.ids).then((res) => {
163
+        const resCode = res.code
164
+        if (resCode === '1') {
165
+          this.$message.error(res.message)
166
+          return
167
+        }
168
+        this.$message.success(res.message)
169
+        this.getData()
170
+      }).catch(() => {
171
+        console.log('BlacklistUser error')
172
+      })
173
+    }
174
+  }
175
+}
176
+</script>
177
+
178
+<style scoped>
179
+.demo-form-inline {
180
+  margin-left: 20px;
181
+  margin-top: 20px;
182
+}
183
+.button-div {
184
+  margin-left: 20px;
185
+}
186
+.footer-page {
187
+  display: flex;
188
+  justify-content: flex-end;
189
+}
190
+</style>

+ 100
- 0
VUECODE/smart-operate-manage/src/views/community/user/log/index.vue Bestand weergeven

@@ -0,0 +1,100 @@
1
+<template>
2
+  <div id="root">
3
+    <el-form :inline="true" :model="formInline" class="demo-form-inline">
4
+      <el-form-item label="操作类型">
5
+        <el-select v-model="formInline.logType" placeholder="操作类型">
6
+          <el-option label="账号相关操作" value="shanghai"/>
7
+          <el-option label="话题相关操作" value="beijing"/>
8
+          <el-option label="工单相关操作" value="beijing"/>
9
+          <el-option label="费用相关操作" value="beijing"/>
10
+          <el-option label="其他操作" value="beijing"/>
11
+        </el-select>
12
+      </el-form-item>
13
+      <el-form-item label="日志关键字">
14
+        <el-input v-model="formInline.logContext" placeholder="日志关键字"/>
15
+      </el-form-item>
16
+      <el-form-item label="日志日期">
17
+        <el-date-picker
18
+          v-model="formInline.logDate"
19
+          type="daterange"
20
+          range-separator="至"
21
+          start-placeholder="开始日期"
22
+          end-placeholder="结束日期"/>
23
+      </el-form-item>
24
+      <el-form-item>
25
+        <el-button type="info">清空</el-button>
26
+        <el-button type="primary">查询</el-button>
27
+      </el-form-item>
28
+    </el-form>
29
+
30
+    <!-- 表格 -->
31
+    <el-table
32
+      :data="logData"
33
+      border
34
+      style="width: 100%">
35
+      <el-table-column
36
+        prop="date"
37
+        label="编号"
38
+        width="180"/>
39
+      <el-table-column
40
+        prop="name"
41
+        label="操作类型"
42
+        width="180"/>
43
+      <el-table-column
44
+        prop="address"
45
+        label="日志类型"/>
46
+      <el-table-column
47
+        prop="address"
48
+        label="日志时间"/>
49
+    </el-table>
50
+
51
+    <div class="footer-page">
52
+      <el-pagination
53
+        :current-page="formInline.pageNum"
54
+        :page-sizes="[100, 200, 300, 400]"
55
+        :page-size="formInline.pageSize"
56
+        :total="total"
57
+        layout="total, sizes, prev, pager, next, jumper"
58
+        @size-change="handleSizeChange"
59
+        @current-change="handleCurrentChange"/>
60
+    </div>
61
+  </div>
62
+</template>
63
+
64
+<script>
65
+export default {
66
+  name: 'UserLog',
67
+  data() {
68
+    return {
69
+      formInline: {
70
+        logDate: '',
71
+        logContext: '',
72
+        logType: '',
73
+        pageNum: 0,
74
+        pageSize: 10
75
+      },
76
+      total: 0, // 总数
77
+      logData: [] // 数据
78
+    }
79
+  },
80
+  methods: {
81
+    handleSizeChange(val) {
82
+      console.log(`每页 ${val} 条`)
83
+    },
84
+    handleCurrentChange(val) {
85
+      console.log(`当前页: ${val}`)
86
+    }
87
+  }
88
+}
89
+</script>
90
+
91
+<style scoped>
92
+.demo-form-inline {
93
+  margin-top: 20px;
94
+  margin-left: 20px;
95
+}
96
+.footer-page {
97
+  display: flex;
98
+  justify-content: flex-end;
99
+}
100
+</style>

+ 7
- 5
VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js Bestand weergeven

@@ -51,12 +51,14 @@ export function buildingList(data) {
51 51
     url: '/building/list',
52 52
     method: 'post',
53 53
     data: {
54
-      phase: data.phase,
55
-      building: data.building,
56
-      unit: data.unit,
57
-      level: data.level,
58
-      roomNo: data.roomNo,
54
+      phaseId: data.phaseId,
55
+      buildingId: data.buildingId,
56
+      unitId: data.unitId,
57
+      lelevelIdvel: data.levelId,
58
+      id: data.roomNoId,
59 59
       ownerName: data.ownerName,
60
+      ownerTel: data.ownerTel,
61
+      idCard: data.idCard,
60 62
       pageNum: data.pageNum,
61 63
       pageSize: data.pageSize
62 64
     }

+ 1
- 2
VUECODE/smart-property-manage/src/store/modules/buildingOwnerInfo.js Bestand weergeven

@@ -1,6 +1,5 @@
1 1
 
2
-import { buildingAddress, buildingList, deleteBuilding, addBuilding, updateBuilding, getByIdBuildingId, userPassCertification, updataPassCertification, communityBuildinglist, buildingHouse, communityBuildingAdd, buildingDownloadExcel, addNode, deleteNode } from '@/api/buildingOwnerInfo'
3
-
2
+import { getPhaseList, getBuildingList, getUnitList, buildingList, getLevelList, getRoomNoList, deleteBuilding, addBuilding, updateBuilding, getByIdBuildingId, userPassCertification, updataPassCertification, communityBuildinglist, buildingHouse, communityBuildingAdd, buildingDownloadExcel, addNode, deleteNode } from '@/api/buildingOwnerInfo'
4 3
 
5 4
 const buildingOwnerInfo = {
6 5
   state: {

+ 49
- 32
VUECODE/smart-property-manage/src/views/building/index.vue Bestand weergeven

@@ -43,8 +43,14 @@
43 43
             :label="item.name"
44 44
             :value="item.id"/>
45 45
         </el-select>
46
-        <el-form-item label="业主名称">
47
-          <el-input v-model="listQuery.ownerName" placeholder="业主名称" />
46
+        <el-form-item label="姓名">
47
+          <el-input v-model="listQuery.ownerName" placeholder="姓名" />
48
+        </el-form-item>
49
+        <el-form-item label="手机号">
50
+          <el-input v-model="listQuery.ownerTel" placeholder="手机号" />
51
+        </el-form-item>
52
+        <el-form-item label="身份证号">
53
+          <el-input v-model="listQuery.idCard" placeholder="身份证号" />
48 54
         </el-form-item>
49 55
       </el-form-item>
50 56
       <el-form-item>
@@ -71,18 +77,22 @@
71 77
       style="width: 100%; margin-top: 20px;"
72 78
       @selection-change="handleSelectionChange">
73 79
       <el-table-column type="selection" width="55" align="center"/>
74
-      <el-table-column prop="phase" label="期" align="center" />
75
-      <el-table-column prop="building" label="栋" align="center" />
76
-      <el-table-column prop="unit" label="单元" align="center" />
77
-      <el-table-column prop="level" label="楼层" align="center" />
78
-      <el-table-column prop="roomNo" label="户号" align="center" />
79
-      <el-table-column prop="ownerName" label="业主姓名" align="center"/>
80
-      <el-table-column prop="ownerTel" label="手机号码" align="center" />
81
-      <el-table-column prop="pairStatus" label="关联业主状态" align="center" >
82
-        <template slot-scope="scope">{{ scope.row.verifyStatus === '1' ? '已关联':'未关联' }}</template>
80
+      <el-table-column prop="ownerName" label="姓名" align="center">
81
+        <template slot-scope="scope"><a><span style="color: #63B8FF" @click="clickTitle(scope.row.id)">{{ scope.row.ownerName }}</span></a></template>
82
+      </el-table-column>
83
+      <el-table-column prop="ownerTel" label="手机号" align="center" />
84
+      <el-table-column prop="idCard" label="身份证号" align="center" />
85
+      <el-table-column prop="roleName" label="身份" align="center" />
86
+      <el-table-column prop="verifyStatus" label="审核状态" align="center" >
87
+        <template slot-scope="scope">
88
+          <span v-if="scope.row.verifyStatus === '0'">未审核</span>
89
+          <span v-if="scope.row.verifyStatus === '1'">审核通过</span>
90
+          <span v-if="scope.row.verifyStatus === '2'">审核不通过</span>
91
+        </template>
83 92
       </el-table-column>
84
-      <el-table-column prop="createDate" label="创建时间" align="center" >
85
-        <template slot-scope="scope">{{ formatDate(scope.row.createDate) }}</template>
93
+      <el-table-column prop="updateName" label="编辑人" align="center" />
94
+      <el-table-column prop="updateDate" label="编辑时间" align="center" >
95
+        <template slot-scope="scope">{{ formatDate(scope.row.updateDate) }}</template>
86 96
       </el-table-column>
87 97
     </el-table>
88 98
     <div class="block">
@@ -111,6 +121,8 @@ export default {
111 121
         levelId: '',
112 122
         roomNoId: '',
113 123
         ownerName: '',
124
+        ownerTel: '',
125
+        idCard: '',
114 126
         pageNum: 1,
115 127
         pageSize: 10
116 128
       },
@@ -188,7 +200,7 @@ export default {
188 200
       }
189 201
     },
190 202
     getPhase() { // 获取期
191
-      this.listQuery.phase = ''
203
+      this.listQuery.phaseId = ''
192 204
       this.$store.dispatch('GetPhaseList', this.listQuery).then((res) => {
193 205
         this.phaseList = res.data
194 206
       }).catch(() => {
@@ -204,7 +216,7 @@ export default {
204 216
       })
205 217
     },
206 218
     getUnit() { // 获取单元
207
-      this.listQuery.unit = ''
219
+      this.listQuery.unitId = ''
208 220
       this.$store.dispatch('GetUnitList', this.listQuery).then((res) => {
209 221
         this.unitList = res.data
210 222
       }).catch(() => {
@@ -212,7 +224,7 @@ export default {
212 224
       })
213 225
     },
214 226
     getLevel() { // 获取楼层
215
-      this.listQuery.level = ''
227
+      this.listQuery.levelId = ''
216 228
       this.$store.dispatch('GetLevelList', this.listQuery).then((res) => {
217 229
         this.levelList = res.data
218 230
       }).catch(() => {
@@ -220,7 +232,7 @@ export default {
220 232
       })
221 233
     },
222 234
     getRoomNo() { // 获取户号
223
-      this.listQuery.roomNo = ''
235
+      this.listQuery.roomNoId = ''
224 236
       this.$store.dispatch('GetRoomNoList', this.listQuery).then((res) => {
225 237
         this.roomNoList = res.data
226 238
       }).catch(() => {
@@ -234,31 +246,31 @@ export default {
234 246
           this.unitList = []
235 247
           this.levelList = []
236 248
           this.roomNoList = []
237
-          this.listQuery.building = ''
238
-          this.listQuery.unit = ''
239
-          this.listQuery.level = ''
240
-          this.listQuery.roomNo = ''
249
+          this.listQuery.buildingId = ''
250
+          this.listQuery.unitId = ''
251
+          this.listQuery.levelId = ''
252
+          this.listQuery.roomNoId = ''
241 253
           this.getBuild()
242 254
           break
243 255
         case 1: // 查询 单元
244 256
           this.unitList = []
245 257
           this.levelList = []
246 258
           this.roomNoList = []
247
-          this.listQuery.unit = ''
248
-          this.listQuery.level = ''
249
-          this.listQuery.roomNo = ''
259
+          this.listQuery.unitId = ''
260
+          this.listQuery.levelId = ''
261
+          this.listQuery.roomNoId = ''
250 262
           this.getUnit()
251 263
           break
252 264
         case 2: // 查询 楼层
253 265
           this.levelList = []
254 266
           this.roomNoList = []
255
-          this.listQuery.level = ''
256
-          this.listQuery.roomNo = ''
267
+          this.listQuery.levelId = ''
268
+          this.listQuery.roomNoId = ''
257 269
           this.getLevel()
258 270
           break
259 271
         case 3: // 查询 户号
260 272
           this.roomNoList = []
261
-          this.listQuery.roomNo = ''
273
+          this.listQuery.roomNoId = ''
262 274
           this.getRoomNo()
263 275
           break
264 276
       }
@@ -282,16 +294,21 @@ export default {
282 294
       })
283 295
     },
284 296
     emptyListQuery() { // 清空按钮
285
-      this.listQuery.phase = ''
286
-      this.listQuery.building = ''
287
-      this.listQuery.unit = ''
288
-      this.listQuery.level = ''
289
-      this.listQuery.roomNo = ''
297
+      this.listQuery.phaseId = ''
298
+      this.listQuery.buildingId = ''
299
+      this.listQuery.unitId = ''
300
+      this.listQuery.levelId = ''
301
+      this.listQuery.roomNoId = ''
290 302
       this.listQuery.ownerName = ''
303
+       this.listQuery.ownerTel = ''
304
+        this.listQuery.idCard = ''
291 305
       this.listQuery.pageNum = 1
292 306
       // 获取数据
293 307
       this.dataQuery()
294 308
     },
309
+    clickTitle(id) {
310
+      alert(id)
311
+    },
295 312
     deleteData() { // 删除
296 313
       this.$confirm('您确定要删除吗?')
297 314
         .then(_ => {

+ 5
- 5
文档/MYSQL/smartCommunity.pdm Bestand weergeven

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1554689368" Name="smartCommunity" Objects="857" Symbols="103" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
2
+<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1554714177" Name="smartCommunity" Objects="857" Symbols="103" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
3 3
 <!-- do not edit this file -->
4 4
 
5 5
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@@ -12473,13 +12473,13 @@ LABL 0 新宋体,8,N</a:FontList>
12473 12473
 </o:Column>
12474 12474
 <o:Column Id="o643">
12475 12475
 <a:ObjectID>D7E63227-82C6-4CD8-8C18-FC3A18FDE237</a:ObjectID>
12476
-<a:Name>ta_user_id</a:Name>
12477
-<a:Code>ta_user_id</a:Code>
12476
+<a:Name>ta_user_verify_id</a:Name>
12477
+<a:Code>ta_user_verify_id</a:Code>
12478 12478
 <a:CreationDate>1540878521</a:CreationDate>
12479 12479
 <a:Creator>szc</a:Creator>
12480
-<a:ModificationDate>1540878707</a:ModificationDate>
12480
+<a:ModificationDate>1554714177</a:ModificationDate>
12481 12481
 <a:Modifier>szc</a:Modifier>
12482
-<a:Comment>用户id</a:Comment>
12482
+<a:Comment>用户审核表id</a:Comment>
12483 12483
 <a:DataType>int(11)</a:DataType>
12484 12484
 <a:Length>11</a:Length>
12485 12485
 </o:Column>