diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/IndexController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/IndexController.java index 7da267b..73d2f00 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/IndexController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/IndexController.java @@ -360,7 +360,7 @@ public class IndexController { List data = new ArrayList<>(); List baseAlarmModuleDtos = - baseAlarmModuleService.selectAlarmModuleAmountList(new BaseAlarmModule()); + baseAlarmModuleService.selectAlarmCategoryAmountList(new BaseAlarmModule()); if (baseAlarmModuleDtos.size() > 0) { baseAlarmModuleDtos.forEach( diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseAlarmModuleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseAlarmModuleMapper.java index 7ca5a24..ea53ceb 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseAlarmModuleMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseAlarmModuleMapper.java @@ -69,4 +69,13 @@ public interface BaseAlarmModuleMapper */ public List selectAlarmModuleAmountList(BaseAlarmModule baseAlarmModule); + /** + * 查詢告警类别数量 + * @author WenJY + * @date 2022/5/3 13:45 + * @param baseAlarmModule + * @return java.util.List + */ + public List selectAlarmCategoryAmountList(BaseAlarmModule baseAlarmModule); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseAlarmModuleService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseAlarmModuleService.java index e4f7687..f58eacf 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseAlarmModuleService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBaseAlarmModuleService.java @@ -69,4 +69,12 @@ public interface IBaseAlarmModuleService */ public List selectAlarmModuleAmountList(BaseAlarmModule baseAlarmModule); + /** + * 查詢告警类别数量 + * @author WenJY + * @date 2022/5/3 13:45 + * @param baseAlarmModule + * @return java.util.List + */ + public List selectAlarmCategoryAmountList(BaseAlarmModule baseAlarmModule); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseAlarmModuleServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseAlarmModuleServiceImpl.java index da830b8..b54b7d3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseAlarmModuleServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseAlarmModuleServiceImpl.java @@ -105,4 +105,9 @@ public class BaseAlarmModuleServiceImpl implements IBaseAlarmModuleService public List selectAlarmModuleAmountList(BaseAlarmModule baseAlarmModule) { return baseAlarmModuleMapper.selectAlarmModuleAmountList(baseAlarmModule); } + + @Override + public List selectAlarmCategoryAmountList(BaseAlarmModule baseAlarmModule) { + return baseAlarmModuleMapper.selectAlarmCategoryAmountList(baseAlarmModule); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseAlarmModuleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseAlarmModuleMapper.xml index 86cd38c..8dc39d0 100644 --- a/ruoyi-system/src/main/resources/mapper/system/BaseAlarmModuleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/BaseAlarmModuleMapper.xml @@ -157,4 +157,18 @@ order by t1.Order_Flag + + \ No newline at end of file