微调
This commit is contained in:
@@ -1953,6 +1953,17 @@ public class SocketContrastResponseService {
|
||||
boolean isStar = DetectionCodeEnum.STAR.getCode().equals(monitorListDTO.getConnection());
|
||||
boolean isDelta = DetectionCodeEnum.DELTA.getCode().equals(monitorListDTO.getConnection());
|
||||
|
||||
PreDetection preDetection = FormalTestManager.devList.stream().filter(obj -> obj.getDevIP().equals(split[0])).findFirst().orElse(null);
|
||||
if (ObjectUtil.isNotNull(preDetection)) {
|
||||
if (preDetection.getUsePhaseIndex() == 1) {
|
||||
isStar = true;
|
||||
isDelta = false;
|
||||
} else {
|
||||
isStar = false;
|
||||
isDelta = true;
|
||||
}
|
||||
}
|
||||
|
||||
List<AlignDataVO.RawData> dataList = new ArrayList<>();
|
||||
for (int i = 0; i < channelDevDataList.size(); i++) {
|
||||
DevData.SqlDataDTO.ListDTO list1 = null;
|
||||
@@ -2032,6 +2043,7 @@ public class SocketContrastResponseService {
|
||||
channelDataMap.forEach((channel, channelDevDataList) -> {
|
||||
String standardDevMonitorId = ip + CnSocketUtil.SPLIT_TAG + channel;
|
||||
String devMonitorId = FormalTestManager.pairsIpMap.inverse().get(standardDevMonitorId);
|
||||
String[] split = devMonitorId.split(CnSocketUtil.SPLIT_TAG);
|
||||
PreDetection.MonitorListDTO monitorListDTO = FormalTestManager.monitorMap.get(devMonitorId);
|
||||
List<DevData> devDataList = BeanUtil.copyToList(FormalTestManager.devDataMap.get(devMonitorId), DevData.class);
|
||||
channelDevDataList.sort(Comparator.comparing(obj -> DetectionUtil.getMillis(obj.getTime())));
|
||||
@@ -2042,9 +2054,21 @@ public class SocketContrastResponseService {
|
||||
exportParams.setSheetName(standardDevName + "通道" + channel);
|
||||
sheet.put("title", exportParams);
|
||||
|
||||
List<AlignDataExcel> dataList = new ArrayList<>();
|
||||
boolean isStar = DetectionCodeEnum.STAR.getCode().equals(monitorListDTO.getConnection());
|
||||
boolean isDelta = DetectionCodeEnum.DELTA.getCode().equals(monitorListDTO.getConnection());
|
||||
|
||||
PreDetection preDetection = FormalTestManager.devList.stream().filter(obj -> obj.getDevIP().equals(split[0])).findFirst().orElse(null);
|
||||
if (ObjectUtil.isNotNull(preDetection)) {
|
||||
if (preDetection.getUsePhaseIndex() == 1) {
|
||||
isStar = true;
|
||||
isDelta = false;
|
||||
} else {
|
||||
isStar = false;
|
||||
isDelta = true;
|
||||
}
|
||||
}
|
||||
|
||||
List<AlignDataExcel> dataList = new ArrayList<>();
|
||||
for (int i = 0; i < channelDevDataList.size(); i++) {
|
||||
DevData.SqlDataDTO.ListDTO list1 = null;
|
||||
DevData.SqlDataDTO sqlDataDTO1 = null;
|
||||
@@ -2252,6 +2276,19 @@ public class SocketContrastResponseService {
|
||||
boolean isStar = DetectionCodeEnum.STAR.getCode().equals(monitorListDTO.getConnection());
|
||||
boolean isDelta = DetectionCodeEnum.DELTA.getCode().equals(monitorListDTO.getConnection());
|
||||
|
||||
String[] split = devMonitorId.split(CnSocketUtil.SPLIT_TAG);
|
||||
PreDetection preDetection = FormalTestManager.devList.stream().filter(obj -> obj.getDevIP().equals(split[0])).findFirst().orElse(null);
|
||||
|
||||
if (ObjectUtil.isNotNull(preDetection)) {
|
||||
if (preDetection.getUsePhaseIndex() == 1) {
|
||||
isStar = true;
|
||||
isDelta = false;
|
||||
} else {
|
||||
isStar = false;
|
||||
isDelta = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 电压校验
|
||||
List<DevData.SqlDataDTO> uDev = null;
|
||||
List<DevData.SqlDataDTO> uStd = null;
|
||||
@@ -2374,7 +2411,6 @@ public class SocketContrastResponseService {
|
||||
}
|
||||
|
||||
boolean isPhaseAngle = false;
|
||||
PreDetection preDetection = FormalTestManager.devList.stream().filter(dev -> dev.getDevId().equals(devMonitorId.split(CnSocketUtil.SPLIT_TAG)[0])).findFirst().orElse(null);
|
||||
if (ObjectUtil.isNotNull(preDetection)) {
|
||||
isPhaseAngle = preDetection.getAngle() == 1 ? true : false;
|
||||
}
|
||||
|
||||
@@ -163,10 +163,19 @@ public class PqMonitorServiceImpl extends ServiceImpl<PqMonitorMapper, PqMonitor
|
||||
} else {
|
||||
newWaveNum.set(waveNum);
|
||||
newMonitorResult = waveNumResultMap.get(waveNum);
|
||||
if (newMonitorResult == 2) {
|
||||
newMonitorResult = CheckResultEnum.NOT_ACCORD.getValue();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
newMonitorResult = detectionDataDealService.getMonitorResult(monitorId, adTypes, dataSourceEnum.getValue(), num, null, code);
|
||||
if (newMonitorResult == 2) {
|
||||
newMonitorResult = CheckResultEnum.NOT_ACCORD.getValue();
|
||||
}
|
||||
if (newMonitorResult == 1) {
|
||||
newMonitorResult = CheckResultEnum.ACCORD.getValue();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -3337,8 +3337,17 @@ public class ResultServiceImpl implements IResultService {
|
||||
devMonitorIdMap2.forEach((devMonitorId, value) -> {
|
||||
Map<LocalDateTime, List<ContrastHarmonicResult>> timeListMap = value.stream().collect(Collectors.groupingBy(ContrastHarmonicResult::getTimeId, Collectors.toList()));
|
||||
|
||||
String[] split1 = devMonitorId.split(CnSocketUtil.SPLIT_TAG);
|
||||
timeListMap.forEach((time, value1) -> {
|
||||
DevData devData = info.stream().filter(x -> x.getTime().equals(time.format(DateTimeFormatter.ofPattern(DatePattern.ISO8601_PATTERN)))).findFirst().orElse(null);
|
||||
// DevData devData = info.stream().filter(x -> x.getTime().equals(time.format(DateTimeFormatter.ofPattern(DatePattern.ISO8601_PATTERN)))).findFirst().orElse(null);
|
||||
DevData devData = null;
|
||||
for (int i = 0; i < info.size(); i++) {
|
||||
DevData devData1 = info.get(i);
|
||||
if (time.format(DateTimeFormatter.ofPattern(DatePattern.ISO8601_PATTERN)).equals(devData1.getTime()) && devData1.getId().split(CnSocketUtil.SPLIT_TAG)[1].equals(split1[1])) {
|
||||
devData = devData1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isNotNull(devData)) {
|
||||
String[] split = devMonitorId.split(CnSocketUtil.SPLIT_TAG);
|
||||
if (flag == 0) {
|
||||
|
||||
Reference in New Issue
Block a user