谐波溯源的窗口期调整
This commit is contained in:
@@ -153,7 +153,11 @@ public class RespDataServiceImpl extends ServiceImpl<RespDataMapper, RespData> i
|
|||||||
int lineInterval = pNumAndInterval.getLineInterval();
|
int lineInterval = pNumAndInterval.getLineInterval();
|
||||||
//第三个参数win,根据起始时间和截止时间的间隔
|
//第三个参数win,根据起始时间和截止时间的间隔
|
||||||
if (dateStr.size() > 1) {
|
if (dateStr.size() > 1) {
|
||||||
win = 96;
|
if(userIntervalTime == 15){
|
||||||
|
win = 96;
|
||||||
|
}else{
|
||||||
|
win = 48;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
win = 4;
|
win = 4;
|
||||||
}
|
}
|
||||||
@@ -171,7 +175,7 @@ public class RespDataServiceImpl extends ServiceImpl<RespDataMapper, RespData> i
|
|||||||
Set<String> userNamesFinal = finalData.keySet();
|
Set<String> userNamesFinal = finalData.keySet();
|
||||||
for (String userName : userNamesFinal) {
|
for (String userName : userNamesFinal) {
|
||||||
List<UserDataExcel> tempData = new ArrayList<>();
|
List<UserDataExcel> tempData = new ArrayList<>();
|
||||||
//根据日期将日期数据全部获取出来
|
//根据日期将日期数据全部获取出来z
|
||||||
Map<String, List<UserDataExcel>> tempResult = finalData.get(userName);
|
Map<String, List<UserDataExcel>> tempResult = finalData.get(userName);
|
||||||
for (String date : dateStr) {
|
for (String date : dateStr) {
|
||||||
tempData.addAll(tempResult.get(date));
|
tempData.addAll(tempResult.get(date));
|
||||||
|
|||||||
@@ -383,10 +383,11 @@ public class ResponsibilityAlgorithm {
|
|||||||
// System.out.printf("窗宽超限...\r\n");
|
// System.out.printf("窗宽超限...\r\n");
|
||||||
throw new BusinessException(AdvanceResponseEnum.EVENT_DATA_MISS);
|
throw new BusinessException(AdvanceResponseEnum.EVENT_DATA_MISS);
|
||||||
}
|
}
|
||||||
// if (TL < (2 * wdith)) {
|
|
||||||
// System.out.printf("窗宽和数据长度不匹配...\r\n");
|
if (TL < (2 * wdith)) {
|
||||||
// return -1;
|
System.out.printf("窗宽和数据长度不匹配...\r\n");
|
||||||
// }
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if ((P > QvvrDataEntity.MAX_P_NODE) || (TL > QvvrDataEntity.MAX_P_NUM) || (LL > QvvrDataEntity.MAX_HARM_NUM)) {
|
if ((P > QvvrDataEntity.MAX_P_NODE) || (TL > QvvrDataEntity.MAX_P_NUM) || (LL > QvvrDataEntity.MAX_HARM_NUM)) {
|
||||||
System.out.printf("数据长度超限...\r\n");
|
System.out.printf("数据长度超限...\r\n");
|
||||||
|
|||||||
@@ -1200,6 +1200,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
|||||||
//如果数据为空,则提示给用户暂无数据
|
//如果数据为空,则提示给用户暂无数据
|
||||||
throw new BusinessException(HarmonicResponseEnum.NO_DATA);
|
throw new BusinessException(HarmonicResponseEnum.NO_DATA);
|
||||||
}
|
}
|
||||||
|
historyData = historyData.stream().filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
int lineInterval = getInterval(lineDetailData.getInterval(), PubUtils.instantToDate(historyData.get(historyData.size() - 1).getTime()), PubUtils.instantToDate(historyData.get(historyData.size() - 2).getTime()));
|
int lineInterval = getInterval(lineDetailData.getInterval(), PubUtils.instantToDate(historyData.get(historyData.size() - 1).getTime()), PubUtils.instantToDate(historyData.get(historyData.size() - 2).getTime()));
|
||||||
//最新两条数据的间隔与监测点查出的间隔做对比,返回一个合理的间隔
|
//最新两条数据的间隔与监测点查出的间隔做对比,返回一个合理的间隔
|
||||||
historyData = dealHistoryData(historyData, lineInterval);
|
historyData = dealHistoryData(historyData, lineInterval);
|
||||||
|
|||||||
Reference in New Issue
Block a user