bug修改
This commit is contained in:
@@ -1442,22 +1442,6 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
.map(Line::getId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
this.removeByIds(deviceIds);
|
||||
deviceMapper.deleteBatchIds(deviceIds);
|
||||
devFuctionMapper.deleteBatchIds(deviceIds);
|
||||
|
||||
Map<String,Line> devMap = devices.stream().collect(Collectors.toMap(Line::getId,Function.identity()));
|
||||
List<Device> deviceList = deviceMapper.selectList(new LambdaQueryWrapper<Device>().select(Device::getId,Device::getNodeId).in(Device::getId,deviceIds));
|
||||
String userName= RequestUtil.getUserNickname();
|
||||
Map<String,DictData> dictDataMap = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_TYPE.getCode()).getData().stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
DictData dicDataByCode = dicDataFeignClient.getDicDataByCode(DicDataEnum.DEV_PARAMETER.getCode()).getData();
|
||||
//
|
||||
/* List<PqsTerminalLogs> pqsTerminalLogsList = new ArrayList<>();
|
||||
deviceList.forEach(dev->{
|
||||
Line devicePO = devMap.get(dev.getId());
|
||||
devLogsCat(Param.DEL_ZN,null,devicePO,ledgerList.get(0),dev,pqsTerminalLogsList,dictDataMap,dicDataByCode,userName);
|
||||
});*/
|
||||
|
||||
// 2. 对每个装置删除其下级
|
||||
deviceIds.forEach(it-> deleteDeviceAndChildren(it,ledgerList,logsList,nodeMap));
|
||||
}
|
||||
@@ -1469,19 +1453,16 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
|
||||
this.removeById(deviceId);
|
||||
deviceMapper.deleteById(deviceId);
|
||||
|
||||
|
||||
devFuctionMapper.delete(new LambdaQueryWrapper<DevFuction>().eq(DevFuction::getLineId,deviceId));
|
||||
|
||||
// 1. 查询并删除所有母线
|
||||
List<Line> busbars = findChildren(deviceId);
|
||||
if (CollectionUtil.isEmpty(busbars)) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> busbarIds = busbars.stream()
|
||||
.map(Line::getId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
this.removeByIds(busbarIds);
|
||||
voltageMapper.deleteBatchIds(busbarIds);
|
||||
|
||||
@@ -1495,9 +1476,6 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
voltageMapper.deleteById(busbarId);
|
||||
// 1. 查询并删除所有监测点
|
||||
List<Line> monitoringPoints = findChildren(busbarId);
|
||||
|
||||
|
||||
|
||||
if (CollectionUtil.isEmpty(monitoringPoints)) {
|
||||
return;
|
||||
}
|
||||
@@ -1506,9 +1484,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
List<String> pointIds = monitoringPoints.stream()
|
||||
.map(Line::getId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
deleteMonitoringPoints(pointIds);
|
||||
|
||||
}
|
||||
|
||||
private void deleteMonitoringPoints(List<String> pointIds) {
|
||||
@@ -1583,7 +1559,6 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
default:
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
|
||||
if(CollUtil.isNotEmpty(logsLedger)){
|
||||
terminalLogsCat(logsLedger,Param.DEL,allLogs,nodeMap);
|
||||
for(PqsTerminalLogs pqsTerminalLogs: allLogs){
|
||||
|
||||
Reference in New Issue
Block a user