This commit is contained in:
caozehui
2025-10-24 16:25:21 +08:00
parent 98f4ecef6c
commit 57c419eb70
3 changed files with 57 additions and 3 deletions

View File

@@ -1953,6 +1953,17 @@ public class SocketContrastResponseService {
boolean isStar = DetectionCodeEnum.STAR.getCode().equals(monitorListDTO.getConnection()); boolean isStar = DetectionCodeEnum.STAR.getCode().equals(monitorListDTO.getConnection());
boolean isDelta = DetectionCodeEnum.DELTA.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<>(); List<AlignDataVO.RawData> dataList = new ArrayList<>();
for (int i = 0; i < channelDevDataList.size(); i++) { for (int i = 0; i < channelDevDataList.size(); i++) {
DevData.SqlDataDTO.ListDTO list1 = null; DevData.SqlDataDTO.ListDTO list1 = null;
@@ -2032,6 +2043,7 @@ public class SocketContrastResponseService {
channelDataMap.forEach((channel, channelDevDataList) -> { channelDataMap.forEach((channel, channelDevDataList) -> {
String standardDevMonitorId = ip + CnSocketUtil.SPLIT_TAG + channel; String standardDevMonitorId = ip + CnSocketUtil.SPLIT_TAG + channel;
String devMonitorId = FormalTestManager.pairsIpMap.inverse().get(standardDevMonitorId); String devMonitorId = FormalTestManager.pairsIpMap.inverse().get(standardDevMonitorId);
String[] split = devMonitorId.split(CnSocketUtil.SPLIT_TAG);
PreDetection.MonitorListDTO monitorListDTO = FormalTestManager.monitorMap.get(devMonitorId); PreDetection.MonitorListDTO monitorListDTO = FormalTestManager.monitorMap.get(devMonitorId);
List<DevData> devDataList = BeanUtil.copyToList(FormalTestManager.devDataMap.get(devMonitorId), DevData.class); List<DevData> devDataList = BeanUtil.copyToList(FormalTestManager.devDataMap.get(devMonitorId), DevData.class);
channelDevDataList.sort(Comparator.comparing(obj -> DetectionUtil.getMillis(obj.getTime()))); channelDevDataList.sort(Comparator.comparing(obj -> DetectionUtil.getMillis(obj.getTime())));
@@ -2042,9 +2054,21 @@ public class SocketContrastResponseService {
exportParams.setSheetName(standardDevName + "通道" + channel); exportParams.setSheetName(standardDevName + "通道" + channel);
sheet.put("title", exportParams); sheet.put("title", exportParams);
List<AlignDataExcel> dataList = new ArrayList<>();
boolean isStar = DetectionCodeEnum.STAR.getCode().equals(monitorListDTO.getConnection()); boolean isStar = DetectionCodeEnum.STAR.getCode().equals(monitorListDTO.getConnection());
boolean isDelta = DetectionCodeEnum.DELTA.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++) { for (int i = 0; i < channelDevDataList.size(); i++) {
DevData.SqlDataDTO.ListDTO list1 = null; DevData.SqlDataDTO.ListDTO list1 = null;
DevData.SqlDataDTO sqlDataDTO1 = null; DevData.SqlDataDTO sqlDataDTO1 = null;
@@ -2252,6 +2276,19 @@ public class SocketContrastResponseService {
boolean isStar = DetectionCodeEnum.STAR.getCode().equals(monitorListDTO.getConnection()); boolean isStar = DetectionCodeEnum.STAR.getCode().equals(monitorListDTO.getConnection());
boolean isDelta = DetectionCodeEnum.DELTA.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> uDev = null;
List<DevData.SqlDataDTO> uStd = null; List<DevData.SqlDataDTO> uStd = null;
@@ -2374,7 +2411,6 @@ public class SocketContrastResponseService {
} }
boolean isPhaseAngle = false; 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)) { if (ObjectUtil.isNotNull(preDetection)) {
isPhaseAngle = preDetection.getAngle() == 1 ? true : false; isPhaseAngle = preDetection.getAngle() == 1 ? true : false;
} }

View File

@@ -163,10 +163,19 @@ public class PqMonitorServiceImpl extends ServiceImpl<PqMonitorMapper, PqMonitor
} else { } else {
newWaveNum.set(waveNum); newWaveNum.set(waveNum);
newMonitorResult = waveNumResultMap.get(waveNum); newMonitorResult = waveNumResultMap.get(waveNum);
if (newMonitorResult == 2) {
newMonitorResult = CheckResultEnum.NOT_ACCORD.getValue();
}
} }
break; break;
default: default:
newMonitorResult = detectionDataDealService.getMonitorResult(monitorId, adTypes, dataSourceEnum.getValue(), num, null, code); 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; break;
} }

View File

@@ -3337,8 +3337,17 @@ public class ResultServiceImpl implements IResultService {
devMonitorIdMap2.forEach((devMonitorId, value) -> { devMonitorIdMap2.forEach((devMonitorId, value) -> {
Map<LocalDateTime, List<ContrastHarmonicResult>> timeListMap = value.stream().collect(Collectors.groupingBy(ContrastHarmonicResult::getTimeId, Collectors.toList())); 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) -> { 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)) { if (ObjectUtil.isNotNull(devData)) {
String[] split = devMonitorId.split(CnSocketUtil.SPLIT_TAG); String[] split = devMonitorId.split(CnSocketUtil.SPLIT_TAG);
if (flag == 0) { if (flag == 0) {