From eeccd19f0a7ec8eb10d4c798266002084f194023 Mon Sep 17 00:00:00 2001 From: zq Date: Tue, 27 Jan 2026 17:54:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=9B=91=E6=8E=A7=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2-=E8=AE=BE=E5=A4=87=E5=91=8A=E8=AD=A6=E9=93=83?= =?UTF-8?q?=E9=93=9B=E6=95=B0=E7=94=B1=E6=9F=A5=E8=AF=A2=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E7=82=B9=E4=BD=8D=E6=95=B0=E6=8D=AE=E6=94=B9=E4=B8=BA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=AE=BE=E5=A4=87=E6=95=85=E9=9A=9C=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SingleSiteServiceImpl.java | 50 ++++++++++++------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/ems-system/src/main/java/com/xzzn/ems/service/impl/SingleSiteServiceImpl.java b/ems-system/src/main/java/com/xzzn/ems/service/impl/SingleSiteServiceImpl.java index 22d4514..937bea0 100644 --- a/ems-system/src/main/java/com/xzzn/ems/service/impl/SingleSiteServiceImpl.java +++ b/ems-system/src/main/java/com/xzzn/ems/service/impl/SingleSiteServiceImpl.java @@ -488,10 +488,10 @@ public class SingleSiteServiceImpl implements ISingleSiteService { List pcsBranchInfoList = new ArrayList<>(); processBranchDataInfo(siteId,pcsId,pcsBranchInfoList); pcsDetailInfoVo.setPcsBranchInfoList(pcsBranchInfoList); -// // 报警个数 -// int alarmNum = emsAlarmRecordsMapper.getDeviceAlarmNum(siteId,pcsId); - // 告警设备点位个数 - int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, pcsId, DeviceCategory.PCS.getCode()); + // 报警个数 + int alarmNum = emsAlarmRecordsMapper.getDeviceAlarmNum(siteId,pcsId); +// // 告警设备点位个数 +// int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, pcsId, DeviceCategory.PCS.getCode()); pcsDetailInfoVo.setAlarmNum(alarmNum); pcsDetailInfoVo.setDeviceStatus(pcsDevice.get("deviceStatus") == null ? "" : pcsDevice.get("deviceStatus").toString()); @@ -541,8 +541,10 @@ public class SingleSiteServiceImpl implements ISingleSiteService { bmsOverViewVo.setBatteryDataList(batteryDataLists); } - // 告警设备点位个数 - int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, stackId, DeviceCategory.STACK.getCode()); + // 报警个数 + int alarmNum = emsAlarmRecordsMapper.getDeviceAlarmNum(siteId, stackId); +// // 告警设备点位个数 +// int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, stackId, DeviceCategory.STACK.getCode()); bmsOverViewVo.setAlarmNum(alarmNum); // 处理枚举匹配字段 @@ -604,8 +606,10 @@ public class SingleSiteServiceImpl implements ISingleSiteService { dealWithBatteryClusterData(clusterData,clusterDataList); bmsBatteryClusterVo.setBatteryDataList(clusterDataList); } - // 告警设备点位个数 - int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, clusterId, DeviceCategory.CLUSTER.getCode()); + // 报警个数 + int alarmNum = emsAlarmRecordsMapper.getDeviceAlarmNum(siteId, clusterId); +// // 告警设备点位个数 +// int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, clusterId, DeviceCategory.CLUSTER.getCode()); bmsBatteryClusterVo.setAlarmNum(alarmNum); // 处理枚举匹配字段 @@ -661,8 +665,10 @@ public class SingleSiteServiceImpl implements ISingleSiteService { EmsCoolingData coolingData = redisCache.getCacheObject(RedisKeyConstants.COOLING + siteId + "_" + coolingId); if (coolingData != null) { BeanUtils.copyProperties(coolingData, dataViewVo); - // 告警设备点位个数 - int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, coolingId, DeviceCategory.COOLING.getCode()); + // 报警个数 + int alarmNum = emsAlarmRecordsMapper.getDeviceAlarmNum(siteId, coolingId); +// // 告警设备点位个数 +// int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, coolingId, DeviceCategory.COOLING.getCode()); dataViewVo.setAlarmNum(alarmNum); } @@ -750,8 +756,10 @@ public class SingleSiteServiceImpl implements ISingleSiteService { String ammeterId = ammeterDevice.get("id").toString(); // 从redis取总表详细数据 EmsAmmeterData ammeterData = redisCache.getCacheObject(RedisKeyConstants.AMMETER + siteId + "_" +ammeterId); - // 告警设备点位个数 - int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, ammeterId, DeviceCategory.AMMETER.getCode()); + // 报警个数 + int alarmNum = emsAlarmRecordsMapper.getDeviceAlarmNum(siteId, ammeterId); +// // 告警设备点位个数 +// int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, ammeterId, DeviceCategory.AMMETER.getCode()); AmmeterDataVo ammeterDataVo = new AmmeterDataVo(); ammeterDataVo.setDeviceName(ammeterDevice.get("deviceName").toString()); @@ -852,8 +860,10 @@ public class SingleSiteServiceImpl implements ISingleSiteService { if (dhData != null) { BeanUtils.copyProperties(dhData, dhDataVo); } - // 告警设备点位个数 - int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, dhDeviceId, DeviceCategory.DH.getCode()); + // 报警个数 + int alarmNum = emsAlarmRecordsMapper.getDeviceAlarmNum(siteId, dhDeviceId); +// // 告警设备点位个数 +// int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, dhDeviceId, DeviceCategory.DH.getCode()); dhDataVo.setAlarmNum(alarmNum); // 处理枚举匹配字段 @@ -884,8 +894,10 @@ public class SingleSiteServiceImpl implements ISingleSiteService { if (xfData != null) { BeanUtils.copyProperties(xfData, xfDataVo); xfDataVo.setDataUpdateTime(xfData.getDataTimestamp()); - // 告警设备点位个数 - int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, xfDeviceId, DeviceCategory.XF.getCode()); + // 报警个数 + int alarmNum = emsAlarmRecordsMapper.getDeviceAlarmNum(siteId, xfDeviceId); +// // 告警设备点位个数 +// int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, xfDeviceId, DeviceCategory.XF.getCode()); xfDataVo.setAlarmNum(alarmNum); } xfDataVo.setEmsCommunicationStatus(xfDevice.get("communicationStatus") == null ? "" : xfDevice.get("communicationStatus").toString()); @@ -912,8 +924,10 @@ public class SingleSiteServiceImpl implements ISingleSiteService { EmsEmsData emsData = redisCache.getCacheObject(RedisKeyConstants.EMS + siteId + "_" + emsDeviceId); if (emsData != null) { BeanUtils.copyProperties(emsData, emsDataVo); - // 告警设备点位个数 - int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, emsDeviceId, DeviceCategory.EMS.getCode()); + // 报警个数 + int alarmNum = emsAlarmRecordsMapper.getDeviceAlarmNum(siteId, emsDeviceId); +// // 告警设备点位个数 +// int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, emsDeviceId, DeviceCategory.EMS.getCode()); emsDataVo.setAlarmNum(alarmNum); }