if (!tenantId.equals(warning.getTenantId())) { | if (!tenantId.equals(warning.getTenantId())) { | ||||
throw new ServiceException("该租户没有查询该预警信息的权限"); | throw new ServiceException("该租户没有查询该预警信息的权限"); | ||||
} | } | ||||
if (WarningStatusEnum.CONFIRM.getCode() == warning.getStatus()) { | |||||
throw new ServiceException("该预警已确认,请不要重复确认"); | |||||
} | |||||
if (WarningStatusEnum.IGNORE.getCode() == warning.getStatus()) { | |||||
throw new ServiceException("该预警已忽略,不能在确认"); | |||||
} | |||||
return JsonResult.success(warning); | return JsonResult.success(warning); | ||||
} | } | ||||
if (!tenantId.equals(warning.getTenantId())) { | if (!tenantId.equals(warning.getTenantId())) { | ||||
throw new ServiceException("该租户没有查询该预警信息的权限"); | throw new ServiceException("该租户没有查询该预警信息的权限"); | ||||
} | } | ||||
if (WarningStatusEnum.CONFIRM.getCode() == warning.getStatus()) { | |||||
throw new ServiceException("该预警已确认,不能在忽略"); | |||||
} | |||||
if (WarningStatusEnum.IGNORE.getCode() == warning.getStatus()) { | |||||
throw new ServiceException("该预警已忽略,请不要重复忽略"); | |||||
} | |||||
return JsonResult.success(warning); | return JsonResult.success(warning); | ||||
} | } | ||||