From c688d07e46f15ea56656cc07571872fba4a7707f Mon Sep 17 00:00:00 2001 From: zch Date: Fri, 13 Dec 2024 11:04:00 +0800 Subject: [PATCH] =?UTF-8?q?change(ems):=20=E9=87=8D=E6=9E=84=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=8C=87=E5=AE=9A=E8=83=BD=E6=BA=90=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=95=B0=E9=87=8F=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=20-=20=E4=BF=AE=E6=94=B9=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=EF=BC=8C=E6=8F=90=E9=AB=98=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=8F=AF=E8=AF=BB=E6=80=A7=20-=20=E6=9B=B4=E6=96=B0=20API?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=EF=BC=8C=E4=BD=BF=E7=94=A8=E6=9B=B4=E5=85=B7?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E6=80=A7=E7=9A=84=E5=91=BD=E5=90=8D=20-=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20mapper=20XML=20=E4=B8=AD=E7=9A=84=20SQL=20?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=20-=20=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A7=E5=88=B6=E5=99=A8=E3=80=81=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=92=8C=20mapper=20=E6=8E=A5=E5=8F=A3=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ems/base/controller/EmsBaseMonitorInfoController.java | 6 +++--- .../com/ruoyi/ems/base/mapper/EmsBaseMonitorInfoMapper.java | 2 +- .../ruoyi/ems/base/service/IEmsBaseMonitorInfoService.java | 2 +- .../base/service/impl/EmsBaseMonitorInfoServiceImpl.java | 4 ++-- .../resources/mapper/ems/base/EmsBaseMonitorInfoMapper.xml | 2 +- ruoyi-ui/src/api/ems/base/baseMonitorInfo.js | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ruoyi-ems/src/main/java/com/ruoyi/ems/base/controller/EmsBaseMonitorInfoController.java b/ruoyi-ems/src/main/java/com/ruoyi/ems/base/controller/EmsBaseMonitorInfoController.java index c7ec706..61e02a5 100644 --- a/ruoyi-ems/src/main/java/com/ruoyi/ems/base/controller/EmsBaseMonitorInfoController.java +++ b/ruoyi-ems/src/main/java/com/ruoyi/ems/base/controller/EmsBaseMonitorInfoController.java @@ -119,8 +119,8 @@ public class EmsBaseMonitorInfoController extends BaseController * @param energyType 需要查询的能源类型。 * @return 返回指定能源类型的数量。 */ - @PostMapping("/getEnergyTypeCount/{energyType}") - public int getEnergyTypeCount(@PathVariable("energyType")String energyType){ - return emsBaseMonitorInfoService.getEnergyTypeCount(energyType); + @PostMapping("/getMonitorCountByEnergyType/{energyType}") + public int getMonitorCountByEnergyType(@PathVariable("energyType")String energyType){ + return emsBaseMonitorInfoService.getMonitorCountByEnergyType(energyType); } } diff --git a/ruoyi-ems/src/main/java/com/ruoyi/ems/base/mapper/EmsBaseMonitorInfoMapper.java b/ruoyi-ems/src/main/java/com/ruoyi/ems/base/mapper/EmsBaseMonitorInfoMapper.java index 2eaeb99..b75c826 100644 --- a/ruoyi-ems/src/main/java/com/ruoyi/ems/base/mapper/EmsBaseMonitorInfoMapper.java +++ b/ruoyi-ems/src/main/java/com/ruoyi/ems/base/mapper/EmsBaseMonitorInfoMapper.java @@ -71,5 +71,5 @@ public interface EmsBaseMonitorInfoMapper * @param energyType 需要查询的能源类型。 * @return 返回指定能源类型的数量。 */ - public int getEnergyTypeCount(String energyType); + public int getMonitorCountByEnergyType(String energyType); } diff --git a/ruoyi-ems/src/main/java/com/ruoyi/ems/base/service/IEmsBaseMonitorInfoService.java b/ruoyi-ems/src/main/java/com/ruoyi/ems/base/service/IEmsBaseMonitorInfoService.java index 63687d7..0da94d1 100644 --- a/ruoyi-ems/src/main/java/com/ruoyi/ems/base/service/IEmsBaseMonitorInfoService.java +++ b/ruoyi-ems/src/main/java/com/ruoyi/ems/base/service/IEmsBaseMonitorInfoService.java @@ -92,5 +92,5 @@ public interface IEmsBaseMonitorInfoService * @param energyType 需要查询的能源类型。 * @return 返回指定能源类型的数量。 */ - public int getEnergyTypeCount(String energyType); + public int getMonitorCountByEnergyType(String energyType); } diff --git a/ruoyi-ems/src/main/java/com/ruoyi/ems/base/service/impl/EmsBaseMonitorInfoServiceImpl.java b/ruoyi-ems/src/main/java/com/ruoyi/ems/base/service/impl/EmsBaseMonitorInfoServiceImpl.java index 5a0ac7b..848f269 100644 --- a/ruoyi-ems/src/main/java/com/ruoyi/ems/base/service/impl/EmsBaseMonitorInfoServiceImpl.java +++ b/ruoyi-ems/src/main/java/com/ruoyi/ems/base/service/impl/EmsBaseMonitorInfoServiceImpl.java @@ -207,8 +207,8 @@ public class EmsBaseMonitorInfoServiceImpl implements IEmsBaseMonitorInfoService * @return 返回指定能源类型的数量。 */ @Override - public int getEnergyTypeCount(String energyType){ - return emsBaseMonitorInfoMapper.getEnergyTypeCount(energyType); + public int getMonitorCountByEnergyType(String energyType){ + return emsBaseMonitorInfoMapper.getMonitorCountByEnergyType(energyType); } } diff --git a/ruoyi-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorInfoMapper.xml b/ruoyi-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorInfoMapper.xml index fff4856..2577fad 100644 --- a/ruoyi-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorInfoMapper.xml +++ b/ruoyi-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorInfoMapper.xml @@ -172,7 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select count(1) from ems_base_monitor_info where monitor_type = #{energyType} diff --git a/ruoyi-ui/src/api/ems/base/baseMonitorInfo.js b/ruoyi-ui/src/api/ems/base/baseMonitorInfo.js index 9354921..82835e1 100644 --- a/ruoyi-ui/src/api/ems/base/baseMonitorInfo.js +++ b/ruoyi-ui/src/api/ems/base/baseMonitorInfo.js @@ -52,10 +52,10 @@ export function getMonitorInfoTree(data) { }) } - -export function getEnergyTypeCount(energyType) { +//获取指定能源类型的设备数量。 +export function getMonitorCountByEnergyType(energyType) { return request({ - url: '/ems/base/baseMonitorInfo/getEnergyTypeCount/' + energyType, + url: '/ems/base/baseMonitorInfo/getMonitorCountByEnergyType/' + energyType, method: 'post' }) }