|
@@ -579,23 +579,34 @@ public class DeviceEventListener extends AbstractEventListener { //
|
|
|
}
|
|
|
|
|
|
private void getExceptionList() {
|
|
|
+ log.info("开始获取异常列表");
|
|
|
TExceptionLog tExceptionLog = new TExceptionLog();
|
|
|
if (ObjectUtils.isNotEmpty(mTIronData)) {
|
|
|
- tExceptionLog.setIronDataId(mTIronData.getId());
|
|
|
+ // tExceptionLog.setIronDataId(mTIronData.getId());
|
|
|
+ log.info("查询条件: ironDataId={}", mTIronData.getId());
|
|
|
+ } else {
|
|
|
+ log.info("查询条件: 无ironDataId");
|
|
|
}
|
|
|
List<TExceptionLogBigScreenVo> list = exceptionLogService.getRealTimeExceptionLogList(tExceptionLog);
|
|
|
PushData.send2Exception(list);
|
|
|
+ log.info("异常列表获取完成,共{}条记录", list != null ? list.size() : 0);
|
|
|
}
|
|
|
|
|
|
private void saveException(ExceptionTypeEnum exceptionTypeEnum, String exceptionDesc) {
|
|
|
+ log.info("开始保存异常信息: 类型={}, 描述={}", exceptionTypeEnum, exceptionDesc);
|
|
|
try {
|
|
|
TExceptionLogCreateValidate build = TExceptionLogCreateValidate.builder().exceptionType(exceptionTypeEnum.getCode()).exceptionDesc(exceptionDesc).build();
|
|
|
+ log.info("保存属性: exceptionType={}, exceptionDesc={}", exceptionTypeEnum.getCode(), exceptionDesc);
|
|
|
if (ObjectUtils.isNotEmpty(mTIronData)) {
|
|
|
build.setIronDataId(mTIronData.getId());
|
|
|
+ log.info("保存属性: ironDataId={}", mTIronData.getId());
|
|
|
+ } else {
|
|
|
+ log.info("保存属性: 无ironDataId");
|
|
|
}
|
|
|
exceptionLogService.add(build);
|
|
|
+ log.info("异常信息保存成功: 类型={}, 描述={}", exceptionTypeEnum, exceptionDesc);
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.error("保存异常信息失败: 类型={}, 描述={}, 异常={}", exceptionTypeEnum, exceptionDesc, e.getMessage(), e);
|
|
|
}
|
|
|
}
|
|
|
|