|
@@ -202,6 +202,19 @@ public class TaUserServiceImpl implements ITaUserService {
|
202
|
202
|
addUserRole(2,response,user);
|
203
|
203
|
|
204
|
204
|
|
|
205
|
+ // 推送海康
|
|
206
|
+ /**
|
|
207
|
+ * 1.获取部门(比如 住户)
|
|
208
|
+ * 2.根据部门编号推送 海康
|
|
209
|
+ */
|
|
210
|
+ addUserAndOpenCard(response,user);
|
|
211
|
+
|
|
212
|
+ // 给用户添加 海康门禁权限
|
|
213
|
+ HKOpenApi.addAuthoritiesByPersonIds(String.valueOf(user.getHkUserId()));
|
|
214
|
+
|
|
215
|
+ // 下发门禁权限
|
|
216
|
+ HKOpenApi.downloadAuthorityByDeviceUuids();
|
|
217
|
+
|
205
|
218
|
|
206
|
219
|
TaUserVO taUserVO = new TaUserVO();
|
207
|
220
|
BeanUtils.copyProperties(user,taUserVO);
|
|
@@ -347,6 +360,12 @@ public class TaUserServiceImpl implements ITaUserService {
|
347
|
360
|
return response;
|
348
|
361
|
}
|
349
|
362
|
|
|
363
|
+ int tempType = type;
|
|
364
|
+ if (tempType != 2 && type != 3) {
|
|
365
|
+ response.addError("对不起! 您只能添加家属或者租客!");
|
|
366
|
+ return response;
|
|
367
|
+ }
|
|
368
|
+
|
350
|
369
|
Map<String,Object> parUserLogin = Maps.newHashMap();
|
351
|
370
|
parUserLogin.put("loginName",phone);
|
352
|
371
|
TaUser parUser = taUserMapper.selectByLoginName(parUserLogin);
|
|
@@ -379,7 +398,6 @@ public class TaUserServiceImpl implements ITaUserService {
|
379
|
398
|
response.addError("添加失败!");
|
380
|
399
|
return response;
|
381
|
400
|
}
|
382
|
|
-
|
383
|
401
|
// 用户添加到本地库
|
384
|
402
|
addUserRole(type,response,user);
|
385
|
403
|
|