|
|
@ -1924,4 +1924,33 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 获取事件数量 |
|
|
|
* |
|
|
|
* @author liuwenge |
|
|
|
* @date 2024/6/6 18:45 |
|
|
|
* @param type 类型 1:告警 2:待确认 3:处置中 |
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public AjaxResult getCountNum(String type){ |
|
|
|
if (StringUtils.isEmpty(type)){ |
|
|
|
return AjaxResult.error("类型不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
Long num = 0L; |
|
|
|
//告警
|
|
|
|
if (type.equals("1")){ |
|
|
|
num = dcWarningMapper.selectWarningNum(); |
|
|
|
} else if (type.equals("2")){ |
|
|
|
num = dcEventMapper.selectEventNumByStatus("0"); |
|
|
|
} else if (type.equals("3")){ |
|
|
|
num = dcEventMapper.selectEventNumByStatus("1"); |
|
|
|
} |
|
|
|
|
|
|
|
return AjaxResult.success(num); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|