bug修复
This commit is contained in:
parent
58bdefaea5
commit
3cd0c79227
@ -108,7 +108,6 @@ public class AsyncHikvision {
|
||||
}
|
||||
|
||||
private void sendNoticeForWorker(WorkerInfo workerInfo, Exception e, String action) {
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
String title = action + "人员到海康isc失败";
|
||||
String type = "23";
|
||||
String msg;
|
||||
@ -119,6 +118,7 @@ public class AsyncHikvision {
|
||||
} else {
|
||||
msg = "同步失败,人员名称:" + workerInfo.getWorkerName() + ",身份证号:" + workerInfo.getIdCard() + "。失败原因:下发异常";
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, type);
|
||||
}
|
||||
}
|
||||
@ -164,7 +164,6 @@ public class AsyncHikvision {
|
||||
}
|
||||
|
||||
private void sendNoticeForCar(CarInfo carInfo, Exception e, String action) {
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
String title = action + "车辆到海康isc失败";
|
||||
String type = "24";
|
||||
String msg = null;
|
||||
@ -175,6 +174,7 @@ public class AsyncHikvision {
|
||||
} else {
|
||||
msg = "同步失败,车牌号:" + carInfo.getCarNumber() + "。失败原因:下发异常";
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, type);
|
||||
}
|
||||
}
|
||||
@ -231,7 +231,6 @@ public class AsyncHikvision {
|
||||
}
|
||||
|
||||
private void sendNoticeForOrg(String name, Exception e, String action) {
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
String title = action + "组织到海康isc失败";
|
||||
String type = "23";
|
||||
String msg;
|
||||
@ -242,6 +241,7 @@ public class AsyncHikvision {
|
||||
} else {
|
||||
msg = "同步失败,组织名称:" + name + "。失败原因:下发异常";
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, type);
|
||||
}
|
||||
}
|
||||
@ -427,7 +427,6 @@ public class AsyncHikvision {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
String title = "人员下发设备提醒";
|
||||
String type = "1";
|
||||
String msg = "";
|
||||
@ -441,6 +440,7 @@ public class AsyncHikvision {
|
||||
failSbStr = "下发权限失败:" + failSbStr;
|
||||
msg += failSbStr;
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), StringUtils.substring(msg, 0, msg.length() - 1), title, type);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@ -489,7 +489,6 @@ public class AsyncHikvision {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
String title = "人员下发设备提醒";
|
||||
String type = "1";
|
||||
String msg = "";
|
||||
@ -503,6 +502,7 @@ public class AsyncHikvision {
|
||||
failSbStr = "移除权限失败:" + failSbStr;
|
||||
msg += failSbStr + ",";
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, type);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@ -879,7 +879,6 @@ public class HikvisionCall {
|
||||
if (StringUtils.isBlank(rs)) {
|
||||
return;
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
boolean success = HikvisionUtil.isSuccess(rs);
|
||||
String msg = "";
|
||||
if (success) {
|
||||
@ -898,6 +897,7 @@ public class HikvisionCall {
|
||||
title += "失败";
|
||||
}
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, "24");
|
||||
}
|
||||
}
|
||||
@ -906,7 +906,6 @@ public class HikvisionCall {
|
||||
if (StringUtils.isBlank(rs)) {
|
||||
return;
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
boolean success = HikvisionUtil.isSuccess(rs);
|
||||
String msg = "";
|
||||
String type = "25";
|
||||
@ -917,12 +916,12 @@ public class HikvisionCall {
|
||||
msg = "同步失败,组织名称:" + orgName + "。失败原因:" + rs;
|
||||
title += "失败";
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, type);
|
||||
}
|
||||
}
|
||||
|
||||
private void sendNoticeForWorker(String title, String rs, WorkerInfo workerInfo, int type, int operate) {
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
boolean success = HikvisionUtil.isSuccess(rs);
|
||||
String msg = "";
|
||||
String noticeType = "23";
|
||||
@ -958,6 +957,7 @@ public class HikvisionCall {
|
||||
title += "失败";
|
||||
}
|
||||
}
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, noticeType);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user