|
@@ -96,14 +96,14 @@ public class PersonDeviceRelationController {
|
|
PersonInfo personInfo = personInfoService.get(personDeviceRelation.getPersonId());
|
|
PersonInfo personInfo = personInfoService.get(personDeviceRelation.getPersonId());
|
|
//如果人员照片不为空
|
|
//如果人员照片不为空
|
|
if(StringUtils.isNotEmpty(personInfo.getFaceImageUrl())){
|
|
if(StringUtils.isNotEmpty(personInfo.getFaceImageUrl())){
|
|
- List<LapiMsgResult> lapiResults = lapiService.addPersonForDeviceIds(personDeviceRelation.getPersonId(),personDeviceRelation.getDeviceId());
|
|
|
|
|
|
+ List<LapiResult> lapiResults = lapiService.addPersonForDeviceIds(personDeviceRelation.getPersonId(),personDeviceRelation.getDeviceId());
|
|
for (int i = 0; i < lapiResults.size(); i++) {
|
|
for (int i = 0; i < lapiResults.size(); i++) {
|
|
- LapiMsgResult lapiMsgResult = lapiResults.get(i);
|
|
|
|
|
|
+ LapiResult lapiMsgResult = lapiResults.get(i);
|
|
if (lapiMsgResult.isSuccess()) {
|
|
if (lapiMsgResult.isSuccess()) {
|
|
msgResult.setResult(true);
|
|
msgResult.setResult(true);
|
|
}else{
|
|
}else{
|
|
throw new Exception("添加失败:" + lapiMsgResult.getMsg());
|
|
throw new Exception("添加失败:" + lapiMsgResult.getMsg());
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
msgResult.setResult(true);
|
|
msgResult.setResult(true);
|
|
@@ -280,18 +280,20 @@ public class PersonDeviceRelationController {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
- List<LapiMsgResult> lapiResults = lapiService.addPersonForDeviceIds(personId,deviceId);
|
|
|
|
|
|
+ List<LapiResult> lapiResults = lapiService.addPersonForDeviceIds(personId,deviceId);
|
|
|
|
|
|
for (int i = 0; i < lapiResults.size(); i++) {
|
|
for (int i = 0; i < lapiResults.size(); i++) {
|
|
- LapiMsgResult lapiMsgResult = lapiResults.get(i);
|
|
|
|
|
|
+ LapiResult lapiMsgResult = lapiResults.get(i);
|
|
if (lapiMsgResult.isSuccess()) {
|
|
if (lapiMsgResult.isSuccess()) {
|
|
msgResult.setResult(true);
|
|
msgResult.setResult(true);
|
|
}else{
|
|
}else{
|
|
|
|
+
|
|
|
|
+ Map resultMap = (Map) lapiMsgResult.getData();
|
|
HSSFRow row = sheet.createRow(sheet.getLastRowNum() + 1);
|
|
HSSFRow row = sheet.createRow(sheet.getLastRowNum() + 1);
|
|
HSSFCell cell1 = row.createCell(0);
|
|
HSSFCell cell1 = row.createCell(0);
|
|
- cell1.setCellValue(lapiMsgResult.getPersonName());
|
|
|
|
|
|
+ cell1.setCellValue(resultMap.get("personName").toString());
|
|
HSSFCell cell2 = row.createCell(1);
|
|
HSSFCell cell2 = row.createCell(1);
|
|
- cell2.setCellValue(lapiMsgResult.getAliasName());
|
|
|
|
|
|
+ cell2.setCellValue(resultMap.get("deviceAliasName").toString());
|
|
HSSFCell cell3 = row.createCell(2);
|
|
HSSFCell cell3 = row.createCell(2);
|
|
cell3.setCellValue("添加失败:" + lapiMsgResult.getMsg());
|
|
cell3.setCellValue("添加失败:" + lapiMsgResult.getMsg());
|
|
HSSFCell cell4 = row.createCell(3);
|
|
HSSFCell cell4 = row.createCell(3);
|