@@ -70,6 +70,12 @@ public class WarningConfirmService { | |||
if (!tenantId.equals(warning.getTenantId())) { | |||
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); | |||
} | |||
@@ -69,6 +69,12 @@ public class WarningIgnoreService { | |||
if (!tenantId.equals(warning.getTenantId())) { | |||
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); | |||
} | |||