|
@@ -130,9 +130,10 @@ public class LapiServiceImpl implements ILapiService {
|
|
|
map.put("PersonInfoList", listMap1);
|
|
|
|
|
|
|
|
|
+ String faceDbId = getFaceDbId(deviceInfo, companyInfo.getName());
|
|
|
try {
|
|
|
//获取人员人脸库id
|
|
|
- String faceDbId = getFaceDbId(deviceInfo, companyInfo.getName());
|
|
|
+
|
|
|
JSONObject jsonObject = LApiUtil.PostRequest(deviceInfo.getIpAddress() + ":" + deviceInfo.getPort() + LApiConstant.ADDPERSON + faceDbId + "/People", map);
|
|
|
JSONObject dataJson = jsonObject.getJSONObject("Response");
|
|
|
JSONObject response = LApiUtil.getResponse(dataJson);
|
|
@@ -173,7 +174,7 @@ public class LapiServiceImpl implements ILapiService {
|
|
|
JSONObject response = LApiUtil.getResponse(dataJson);
|
|
|
List listData = response.getJSONArray("LibList");
|
|
|
if (listData.size() <= 0) {
|
|
|
- throw new Exception("设备没有配置人脸库");
|
|
|
+ throw new Exception(deviceInfo.getAliasName()+"设备没有配置人脸库");
|
|
|
}
|
|
|
for (int i = 0; i < listData.size(); i++) {
|
|
|
JSONObject jsonObject1 = (JSONObject) JSONArray.toJSON(listData.get(i));
|
|
@@ -184,7 +185,8 @@ public class LapiServiceImpl implements ILapiService {
|
|
|
}
|
|
|
//人员所属的公司库不存在,保存到默认库
|
|
|
if (StringUtils.isBlank(faceDbId)) {
|
|
|
- faceDbId = deviceInfo.getDefaultFaceLibraryId();
|
|
|
+ throw new Exception(deviceInfo.getAliasName()+"设备中未配置"+companyName+"人脸库");
|
|
|
+ // faceDbId = deviceInfo.getDefaultFaceLibraryId();
|
|
|
}
|
|
|
return faceDbId;
|
|
|
}
|