|
@@ -131,6 +131,7 @@ public class HKServiceImpl implements IHKService {
|
131
|
131
|
map.put("secret", tpEquipmentTree.getSecret());
|
132
|
132
|
map.put("appkey", tpEquipmentTree.getAppkey());
|
133
|
133
|
map.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
|
|
134
|
+ map.put("opUserUuid", tpEquipmentTree.getOpUserUuid());
|
134
|
135
|
HKOpenApi.addAuthoritiesByPersonIds(map);
|
135
|
136
|
|
136
|
137
|
// 下发门禁权限
|
|
@@ -142,6 +143,7 @@ public class HKServiceImpl implements IHKService {
|
142
|
143
|
downloadAuthorityByPersonIdsMap.put("secret", tpEquipmentTree.getSecret());
|
143
|
144
|
downloadAuthorityByPersonIdsMap.put("appkey", tpEquipmentTree.getAppkey());
|
144
|
145
|
downloadAuthorityByPersonIdsMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
|
|
146
|
+ downloadAuthorityByPersonIdsMap.put("opUserUuid", tpEquipmentTree.getOpUserUuid());
|
145
|
147
|
HKOpenApi.downloadAuthorityByPersonIds(downloadAuthorityByPersonIdsMap);
|
146
|
148
|
|
147
|
149
|
}
|
|
@@ -154,6 +156,7 @@ public class HKServiceImpl implements IHKService {
|
154
|
156
|
addOutDoorAuthMap.put("secret", tpEquipmentTree.getSecret());
|
155
|
157
|
addOutDoorAuthMap.put("appkey", tpEquipmentTree.getAppkey());
|
156
|
158
|
addOutDoorAuthMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
|
|
159
|
+ addOutDoorAuthMap.put("opUserUuid", tpEquipmentTree.getOpUserUuid());
|
157
|
160
|
|
158
|
161
|
// 单元门口机
|
159
|
162
|
List<TpEquipment> visualEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(userVerify.getCommunityId(), userVerify.getUnitId(), 3);
|
|
@@ -197,6 +200,7 @@ public class HKServiceImpl implements IHKService {
|
197
|
200
|
parDept.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
|
198
|
201
|
parDept.put("appkey", tpEquipmentTree.getAppkey());
|
199
|
202
|
parDept.put("secret", tpEquipmentTree.getSecret());
|
|
203
|
+ parDept.put("opUserUuid", tpEquipmentTree.getOpUserUuid());
|
200
|
204
|
// 部门UUID
|
201
|
205
|
//String deptUuid = getDeptUUID(parDept);
|
202
|
206
|
|
|
@@ -204,11 +208,13 @@ public class HKServiceImpl implements IHKService {
|
204
|
208
|
Map<String, Object> parUser = Maps.newHashMap();
|
205
|
209
|
parUser.put("personNo", user.getHkPersonNo());
|
206
|
210
|
parUser.put("personName", user.getUserName());
|
207
|
|
- parUser.put("phoneNo", user.getLoginName());
|
|
211
|
+ // parUser.put("phoneNo", user.getLoginName());
|
|
212
|
+ parUser.put("remark", user.getLoginName());
|
208
|
213
|
//parUser.put("deptUuid", deptUuid);
|
209
|
214
|
parUser.put("secret", tpEquipmentTree.getSecret());
|
210
|
215
|
parUser.put("appkey", tpEquipmentTree.getAppkey());
|
211
|
216
|
parUser.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
|
|
217
|
+ parUser.put("opUserUuid", tpEquipmentTree.getOpUserUuid());
|
212
|
218
|
Map<String, Object> resultMap = JSONObject.parseObject(HKOpenApi.addUser(parUser), HashMap.class);
|
213
|
219
|
Integer errorCode = (Integer) resultMap.get("errorCode");
|
214
|
220
|
if (errorCode == 0) {
|
|
@@ -253,6 +259,7 @@ public class HKServiceImpl implements IHKService {
|
253
|
259
|
addCardsMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
|
254
|
260
|
addCardsMap.put("startCardNo", cardNo);
|
255
|
261
|
addCardsMap.put("endCardNo", cardNo);
|
|
262
|
+ addCardsMap.put("opUserUuid", tpEquipmentTree.getOpUserUuid());
|
256
|
263
|
String addCardsJSON = HKOpenApi.addCards(addCardsMap);
|
257
|
264
|
JSONObject addCardsJsonObject = JSONObject.parseObject(addCardsJSON);
|
258
|
265
|
Integer addCardsResultCode = addCardsJsonObject.getInteger("errorCode");
|
|
@@ -306,6 +313,7 @@ public class HKServiceImpl implements IHKService {
|
306
|
313
|
parOpenCard.put("secret", tpEquipmentTree.getSecret());
|
307
|
314
|
parOpenCard.put("appkey", tpEquipmentTree.getAppkey());
|
308
|
315
|
parOpenCard.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
|
|
316
|
+ parOpenCard.put("opUserUuid", tpEquipmentTree.getOpUserUuid());
|
309
|
317
|
JSONObject openCardJSON = JSONObject.parseObject(HKOpenApi.openCard(parOpenCard));
|
310
|
318
|
int code = (int) openCardJSON.get("errorCode");
|
311
|
319
|
if (code == 0) {
|
|
@@ -365,6 +373,7 @@ public class HKServiceImpl implements IHKService {
|
365
|
373
|
downloadFingerMap.put("personIds", map.get("personIds"));
|
366
|
374
|
downloadFingerMap.put("longNums", map.get("longNums"));
|
367
|
375
|
downloadFingerMap.put("openapi_ip_port_http", map.get("openapi_ip_port_http"));
|
|
376
|
+ downloadFingerMap.put("opUserUuid", map.get("opUserUuid"));
|
368
|
377
|
// 可视对讲 指定人员指纹权限下载
|
369
|
378
|
HKOpenApi.downloadFinger(downloadFingerMap);
|
370
|
379
|
}
|
|
@@ -402,6 +411,7 @@ public class HKServiceImpl implements IHKService {
|
402
|
411
|
parMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
|
403
|
412
|
parMap.put("secret", tpEquipmentTree.getSecret());
|
404
|
413
|
parMap.put("appkey", tpEquipmentTree.getAppkey());
|
|
414
|
+ parMap.put("opUserUuid", tpEquipmentTree.getOpUserUuid());
|
405
|
415
|
String data = HKOpenApi.syncControl(parMap);
|
406
|
416
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
407
|
417
|
int errorCode = jsonObject.getInteger("errorCode");
|