平台修改意见20251120-点位上传根据设备ID区分
This commit is contained in:
@ -169,7 +169,7 @@ public interface EmsPointMatchMapper
|
||||
|
||||
List<DevicePointMatchExportVo> selectEmsPointMatchExportList(EmsPointMatch emsPointMatch);
|
||||
|
||||
int getDevicePointAlarmNum(@Param("siteId") String siteId, @Param("deviceCategory") String deviceCategory);
|
||||
int getDevicePointAlarmNum(@Param("siteId") String siteId, @Param("deviceId") String deviceId, @Param("deviceCategory") String deviceCategory);
|
||||
|
||||
EmsPointMatch selectDeviceStatusPoint(@Param("request") DeviceUpdateRequest request);
|
||||
}
|
||||
|
||||
@ -415,8 +415,6 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
List<PcsDetailInfoVo> pcsDetailInfoVoList = new ArrayList<>();
|
||||
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
// 告警设备个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, DeviceCategory.PCS.getCode());
|
||||
// 获取该设备下所有pcs的id
|
||||
List<Map<String, Object>> pcsIds = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.PCS.getCode());
|
||||
|
||||
@ -437,6 +435,8 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
pcsDetailInfoVo.setPcsBranchInfoList(pcsBranchInfoList);
|
||||
// // 报警个数
|
||||
// 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());
|
||||
|
||||
@ -464,8 +464,6 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
public List<BMSOverViewVo> getBMSOverView(String siteId) {
|
||||
List<BMSOverViewVo> bmsOverViewVoList = new ArrayList<>();
|
||||
|
||||
// 告警设备个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, DeviceCategory.STACK.getCode());
|
||||
// 获取所有电池堆
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
List<Map<String, Object>> stackIds = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.STACK.getCode());
|
||||
@ -484,6 +482,9 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
batteryDataLists = getBMSClusterListInfo(siteId,stackId,null);
|
||||
bmsOverViewVo.setBatteryDataList(batteryDataLists);
|
||||
}
|
||||
|
||||
// 告警设备点位个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, stackId, DeviceCategory.STACK.getCode());
|
||||
bmsOverViewVo.setAlarmNum(alarmNum);
|
||||
bmsOverViewVoList.add(bmsOverViewVo);
|
||||
}
|
||||
@ -523,8 +524,6 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
public List<BMSBatteryClusterVo> getBMSBatteryCluster(String siteId) {
|
||||
List<BMSBatteryClusterVo> bmsBatteryClusterVoList = new ArrayList<>();
|
||||
|
||||
// 告警设备个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, DeviceCategory.CLUSTER.getCode());
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
// 获取所有设备下的电池簇id
|
||||
List<Map<String, Object>> clusterIds = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.CLUSTER.getCode());
|
||||
@ -543,6 +542,8 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
dealWithBatteryClusterData(clusterData,clusterDataList);
|
||||
bmsBatteryClusterVo.setBatteryDataList(clusterDataList);
|
||||
}
|
||||
// 告警设备点位个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, clusterId, DeviceCategory.CLUSTER.getCode());
|
||||
bmsBatteryClusterVo.setAlarmNum(alarmNum);
|
||||
bmsBatteryClusterVoList.add(bmsBatteryClusterVo);
|
||||
}
|
||||
@ -585,8 +586,6 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
public List<CoolingDataViewVo> getCoolingDataList(String siteId) {
|
||||
List<CoolingDataViewVo> emsCoolingDataList = new ArrayList<>();
|
||||
|
||||
// 告警设备个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, DeviceCategory.COOLING.getCode());
|
||||
List<Map<String, Object>> deviceIds = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.COOLING.getCode());
|
||||
for (Map<String, Object> deviceId : deviceIds) {
|
||||
CoolingDataViewVo dataViewVo = new CoolingDataViewVo();
|
||||
@ -596,6 +595,8 @@ 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());
|
||||
dataViewVo.setAlarmNum(alarmNum);
|
||||
}
|
||||
|
||||
@ -678,8 +679,6 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
if (ammeterIdList == null || ammeterIdList.isEmpty()) {
|
||||
return ammeterResponse;
|
||||
}
|
||||
// 告警设备个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, DeviceCategory.AMMETER.getCode());
|
||||
for (Map<String, Object> ammeterDevice : ammeterIdList) {
|
||||
String ammeterId = ammeterDevice.get("id").toString();
|
||||
if (!ammeterDeviceIds.contains(ammeterId)) {
|
||||
@ -687,6 +686,8 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
}
|
||||
// 从redis取总表详细数据
|
||||
EmsAmmeterData ammeterData = redisCache.getCacheObject(RedisKeyConstants.AMMETER + siteId + "_" +ammeterId);
|
||||
// 告警设备点位个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, ammeterId, DeviceCategory.AMMETER.getCode());
|
||||
|
||||
AmmeterDataVo ammeterDataVo = new AmmeterDataVo();
|
||||
ammeterDataVo.setDeviceName(ammeterDevice.get("deviceName").toString());
|
||||
@ -773,8 +774,6 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
public List<DhDataVo> getDhDataList(String siteId) {
|
||||
List<DhDataVo> emsDhDataList = new ArrayList<>();
|
||||
|
||||
// 告警设备个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, DeviceCategory.DH.getCode());
|
||||
List<Map<String, Object>> dhDeviceList = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.DH.getCode());
|
||||
for (Map<String, Object> dhDevice : dhDeviceList) {
|
||||
DhDataVo dhDataVo = new DhDataVo();
|
||||
@ -785,6 +784,8 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
if (dhData != null) {
|
||||
BeanUtils.copyProperties(dhData, dhDataVo);
|
||||
}
|
||||
// 告警设备点位个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, dhDeviceId, DeviceCategory.DH.getCode());
|
||||
dhDataVo.setAlarmNum(alarmNum);
|
||||
emsDhDataList.add(dhDataVo);
|
||||
}
|
||||
@ -801,8 +802,6 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
List<XfDataVo> emsXfDataList = new ArrayList<>();
|
||||
|
||||
List<Map<String, Object>> xfDeviceList = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.XF.getCode());
|
||||
// 告警设备个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, DeviceCategory.XF.getCode());
|
||||
for (Map<String, Object> xfDevice : xfDeviceList) {
|
||||
XfDataVo xfDataVo = new XfDataVo();
|
||||
xfDataVo.setDeviceName(xfDevice.get("deviceName").toString());
|
||||
@ -812,6 +811,8 @@ 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());
|
||||
xfDataVo.setAlarmNum(alarmNum);
|
||||
}
|
||||
xfDataVo.setEmsCommunicationStatus(xfDevice.get("communicationStatus") == null ? "" : xfDevice.get("communicationStatus").toString());
|
||||
@ -825,8 +826,7 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
List<EmsDataVo> emsDataList = new ArrayList<>();
|
||||
|
||||
List<Map<String, Object>> xfDeviceList = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.EMS.getCode());
|
||||
// 告警设备个数
|
||||
int alarmNum = emsPointMatchMapper.getDevicePointAlarmNum(siteId, DeviceCategory.EMS.getCode());
|
||||
|
||||
for (Map<String, Object> emsDevice : xfDeviceList) {
|
||||
EmsDataVo emsDataVo = new EmsDataVo();
|
||||
emsDataVo.setDeviceName(emsDevice.get("deviceName").toString());
|
||||
@ -835,6 +835,8 @@ 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());
|
||||
emsDataVo.setAlarmNum(alarmNum);
|
||||
}
|
||||
emsDataList.add(emsDataVo);
|
||||
|
||||
Reference in New Issue
Block a user