关闭流
This commit is contained in:
@@ -131,44 +131,51 @@ public class SpecialAnalysisServiceImpl implements ISpecialAnalysisService {
|
|||||||
ObjectInputStream ois = new ObjectInputStream(bis);
|
ObjectInputStream ois = new ObjectInputStream(bis);
|
||||||
//强转成WaveDataDTO
|
//强转成WaveDataDTO
|
||||||
waveDataDTO = (WaveDataDTO) ois.readObject();
|
waveDataDTO = (WaveDataDTO) ois.readObject();
|
||||||
|
bis.close();
|
||||||
|
ois.close();
|
||||||
|
bytes=null;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
System.gc();
|
||||||
}
|
}
|
||||||
//标称电压
|
if (ObjectUtil.isNotNull(waveDataDTO)) {
|
||||||
if (line.getScale() != null) {
|
//标称电压
|
||||||
BigDecimal voltageLevel = BigDecimal.valueOf(Float.parseFloat(line.getScale()))
|
if (line.getScale() != null) {
|
||||||
.divide(BigDecimal.valueOf(1.732), 2, RoundingMode.HALF_UP);
|
BigDecimal voltageLevel = BigDecimal.valueOf(Float.parseFloat(line.getScale()))
|
||||||
//格式化数据源
|
.divide(BigDecimal.valueOf(1.732), 2, RoundingMode.HALF_UP);
|
||||||
List<List<String>> newListRmsData = listRmsTimeDataFormat(waveDataDTO);
|
//格式化数据源
|
||||||
//暂升事件
|
List<List<String>> newListRmsData = listRmsTimeDataFormat(waveDataDTO);
|
||||||
if (rmpEventDetailPO.getEventType().equals(rise.getId())) {
|
//暂升事件
|
||||||
if (BooleanUtil.or(isRiseThrough(125, 130, 500, voltageLevel, newListRmsData),
|
if (rmpEventDetailPO.getEventType().equals(rise.getId())) {
|
||||||
isRiseThrough(120, 125, 1000, voltageLevel, newListRmsData),
|
if (BooleanUtil.or(isRiseThrough(125, 130, 500, voltageLevel, newListRmsData),
|
||||||
isRiseThrough(110, 120, 10000, voltageLevel, newListRmsData))) {
|
isRiseThrough(120, 125, 1000, voltageLevel, newListRmsData),
|
||||||
spThroughPO.setIsOrNot(1);
|
isRiseThrough(110, 120, 10000, voltageLevel, newListRmsData))) {
|
||||||
}
|
spThroughPO.setIsOrNot(1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//暂降事件
|
//暂降事件
|
||||||
if (rmpEventDetailPO.getEventType().equals(dip.getId())) {
|
if (rmpEventDetailPO.getEventType().equals(dip.getId())) {
|
||||||
//风电场
|
//风电场
|
||||||
if (line.getBigObjType().equals(windFarms.getId())) {
|
if (line.getBigObjType().equals(windFarms.getId())) {
|
||||||
if (BooleanUtil.or(isDipThrough(20, 625, 1, voltageLevel, newListRmsData),
|
if (BooleanUtil.or(isDipThrough(20, 625, 1, voltageLevel, newListRmsData),
|
||||||
isDipThrough(20, 2000, 2, voltageLevel, newListRmsData))
|
isDipThrough(20, 2000, 2, voltageLevel, newListRmsData))
|
||||||
) {
|
) {
|
||||||
spThroughPO.setIsOrNot(1);
|
spThroughPO.setIsOrNot(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//光伏电站
|
//光伏电站
|
||||||
if (line.getBigObjType().equals(powerStation.getId())) {
|
if (line.getBigObjType().equals(powerStation.getId())) {
|
||||||
if (BooleanUtil.or(isDipThrough(0, 150, 1, voltageLevel, newListRmsData),
|
if (BooleanUtil.or(isDipThrough(0, 150, 1, voltageLevel, newListRmsData),
|
||||||
isDipThrough(20, 625, 1, voltageLevel, newListRmsData),
|
isDipThrough(20, 625, 1, voltageLevel, newListRmsData),
|
||||||
isDipThrough(20, 90, null, voltageLevel, newListRmsData))) {
|
isDipThrough(20, 90, null, voltageLevel, newListRmsData))) {
|
||||||
spThroughPO.setIsOrNot(1);
|
spThroughPO.setIsOrNot(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
info.add(spThroughPO);
|
||||||
}
|
}
|
||||||
info.add(spThroughPO);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,9 +245,8 @@ public class SpecialAnalysisServiceImpl implements ISpecialAnalysisService {
|
|||||||
minTime.setAccessible(true);
|
minTime.setAccessible(true);
|
||||||
minNum.setAccessible(true);
|
minNum.setAccessible(true);
|
||||||
isOrNot.setAccessible(true);
|
isOrNot.setAccessible(true);
|
||||||
if (CollUtil.isEmpty(min[i])) {
|
minTime.set(dto, "[]");
|
||||||
minTime.set(dto, "[]");
|
if (CollUtil.isNotEmpty(min[i])) {
|
||||||
} else {
|
|
||||||
List<String> mins = min[i].stream().distinct().collect(Collectors.toList());
|
List<String> mins = min[i].stream().distinct().collect(Collectors.toList());
|
||||||
List<String> limitTime = dataLimitRateDetailFeignClient.getLimitRateDetailTime(lineId, calculatedParam.getDataDate()).getData();
|
List<String> limitTime = dataLimitRateDetailFeignClient.getLimitRateDetailTime(lineId, calculatedParam.getDataDate()).getData();
|
||||||
if (CollUtil.isNotEmpty(limitTime)) {
|
if (CollUtil.isNotEmpty(limitTime)) {
|
||||||
@@ -248,6 +254,8 @@ public class SpecialAnalysisServiceImpl implements ISpecialAnalysisService {
|
|||||||
if (CollUtil.isNotEmpty(collect)) {
|
if (CollUtil.isNotEmpty(collect)) {
|
||||||
minTime.set(dto, JSON.toJSONString(collect));
|
minTime.set(dto, JSON.toJSONString(collect));
|
||||||
isOrNot.set(dto, 1);
|
isOrNot.set(dto, 1);
|
||||||
|
} else {
|
||||||
|
minTime.set(dto, "[]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user