|
@@ -367,6 +367,37 @@ public class PersonInfoController {
|
|
PersonInfo personInfo = personInfoService.get(id);
|
|
PersonInfo personInfo = personInfoService.get(id);
|
|
|
|
|
|
if(personInfo.getFaceEnabled()){
|
|
if(personInfo.getFaceEnabled()){
|
|
|
|
+ if (personInfo==null){
|
|
|
|
+ throw new Exception("人员信息不存在!");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //todo 同步终端
|
|
|
|
+ boolean success = true;
|
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
|
+ List<LapiMsgResult> msgResultList = lapiService.deletePerson(id);
|
|
|
|
+ for(int i=0;i<msgResultList.size();i++) {
|
|
|
|
+ LapiMsgResult lapiMsgResult = msgResultList.get(i);
|
|
|
|
+
|
|
|
|
+ if (lapiMsgResult.isSuccess()){
|
|
|
|
+ sb.append("【" + personInfo.getName() + "】" + lapiMsgResult.getAliasName() + "解绑人脸信息成功!");
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ sb.append("【" + personInfo.getName() + "】" + lapiMsgResult.getAliasName() + "解绑人脸信息失败!" + lapiMsgResult.getMsg());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (i!=msgResultList.size()-1){
|
|
|
|
+ sb.append(",");
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ sb.append("。");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ success &= lapiMsgResult.isSuccess();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ personInfo.setFaceBound(false);
|
|
|
|
+ personInfo.setUpdateTime(new Date());
|
|
|
|
+ personInfoService.update(personInfo);
|
|
personInfo.setFaceEnabled(false);
|
|
personInfo.setFaceEnabled(false);
|
|
}else{
|
|
}else{
|
|
personInfo.setFaceEnabled(true);
|
|
personInfo.setFaceEnabled(true);
|