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