Bug修改
This commit is contained in:
@@ -534,6 +534,15 @@ public class SocketContrastResponseService {
|
|||||||
|
|
||||||
FormalTestManager.currentStep = SourceOperateCodeEnum.YJC_ALIGN;
|
FormalTestManager.currentStep = SourceOperateCodeEnum.YJC_ALIGN;
|
||||||
|
|
||||||
|
// if (FormalTestManager.isWaveCheck) {
|
||||||
|
// System.out.println("(仅有闪变、录波)模型一致性校验成功!》》》》》》》》》》》》》》》》》》》》》》》》》》》》》开始相序校验》》》》》》》》》》》》》》》》");
|
||||||
|
// this.sendXu(s);
|
||||||
|
// FormalTestManager.currentStep = SourceOperateCodeEnum.YJC_XUJY;
|
||||||
|
// } else {
|
||||||
|
// System.out.println("(仅有闪变)模型一致性校验成功!》》》》》》》》》》》》》》》》》》》》》》》》》》》》》开始数据对齐校验》》》》》》》》》》》》》》》》");
|
||||||
|
// this.sendAlignData(s, requestOperateCode);
|
||||||
|
// FormalTestManager.currentStep = SourceOperateCodeEnum.YJC_ALIGN;
|
||||||
|
// }
|
||||||
this.resetTimer();
|
this.resetTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -644,7 +653,9 @@ public class SocketContrastResponseService {
|
|||||||
SourceResponseCodeEnum dictDataEnumByCode = SourceResponseCodeEnum.getDictDataEnumByCode(socketDataMsg.getCode());
|
SourceResponseCodeEnum dictDataEnumByCode = SourceResponseCodeEnum.getDictDataEnumByCode(socketDataMsg.getCode());
|
||||||
String s = param.getUserPageId() + CnSocketUtil.CONTRAST_DEV_TAG;
|
String s = param.getUserPageId() + CnSocketUtil.CONTRAST_DEV_TAG;
|
||||||
DevData devData = JSON.parseObject(socketDataMsg.getData(), DevData.class);
|
DevData devData = JSON.parseObject(socketDataMsg.getData(), DevData.class);
|
||||||
|
if (SourceOperateCodeEnum.FORMAL_REAL.getValue().equals(socketDataMsg.getRequestId())) {
|
||||||
socketDataMsg.setRequestId(SourceOperateCodeEnum.YJC_MXYZXJY.getValue());
|
socketDataMsg.setRequestId(SourceOperateCodeEnum.YJC_MXYZXJY.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
if (ObjectUtil.isNotNull(dictDataEnumByCode)) {
|
if (ObjectUtil.isNotNull(dictDataEnumByCode)) {
|
||||||
SourceOperateCodeEnum requestOperateCode = this.getRequestOperateCode();
|
SourceOperateCodeEnum requestOperateCode = this.getRequestOperateCode();
|
||||||
@@ -652,6 +663,7 @@ public class SocketContrastResponseService {
|
|||||||
|
|
||||||
switch (dictDataEnumByCode) {
|
switch (dictDataEnumByCode) {
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
|
if (SourceOperateCodeEnum.YJC_MXYZXJY.getValue().equals(socketDataMsg.getRequestId())) {
|
||||||
//成功收到数据后重置超时统计时间
|
//成功收到数据后重置超时统计时间
|
||||||
this.resetTimer();
|
this.resetTimer();
|
||||||
String monitorId1 = devData.getId();
|
String monitorId1 = devData.getId();
|
||||||
@@ -710,6 +722,7 @@ public class SocketContrastResponseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case UNPROCESSED_BUSINESS:
|
case UNPROCESSED_BUSINESS:
|
||||||
WebServiceManager.sendMsg(param.getUserPageId(), JSON.toJSONString(socketDataMsg));
|
WebServiceManager.sendMsg(param.getUserPageId(), JSON.toJSONString(socketDataMsg));
|
||||||
@@ -1513,7 +1526,7 @@ public class SocketContrastResponseService {
|
|||||||
PreDetection.MonitorListDTO monitorListDTO = FormalTestManager.monitorMap.get(devMonitorId);
|
PreDetection.MonitorListDTO monitorListDTO = FormalTestManager.monitorMap.get(devMonitorId);
|
||||||
List<List<DevData>> lists = this.analyzeWaveFile(waveResultDTO1, waveResultDTO2, monitorListDTO, devMonitorId, stdDevMonitorId, FormalTestManager.testItemMap.keySet().stream().collect(Collectors.toList()));
|
List<List<DevData>> lists = this.analyzeWaveFile(waveResultDTO1, waveResultDTO2, monitorListDTO, devMonitorId, stdDevMonitorId, FormalTestManager.testItemMap.keySet().stream().collect(Collectors.toList()));
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(lists) && lists.stream().flatMap(List::stream).allMatch(devData -> CollUtil.isNotEmpty(devData.getSqlData()) || CollUtil.isNotEmpty(devData.getSqlDataHarm()))) {
|
if (CollUtil.isNotEmpty(lists) && lists.stream().flatMap(List::stream).allMatch(devData -> CollUtil.isNotEmpty(devData.getSqlData()) && CollUtil.isNotEmpty(devData.getSqlDataHarm()))) {
|
||||||
// if (false) {
|
// if (false) {
|
||||||
FormalTestManager.devDataMap.put(devMonitorId, lists.get(0));
|
FormalTestManager.devDataMap.put(devMonitorId, lists.get(0));
|
||||||
FormalTestManager.standardDevDataMap.put(stdDevMonitorId, lists.get(1));
|
FormalTestManager.standardDevDataMap.put(stdDevMonitorId, lists.get(1));
|
||||||
@@ -2222,12 +2235,19 @@ public class SocketContrastResponseService {
|
|||||||
*/
|
*/
|
||||||
private boolean singleMonitorXuCheck(String devMonitorId, String standardDevMonitorId, PreDetection.MonitorListDTO monitorListDTO, List<DevData> devData, List<DevData> stdData, Map<String, String> devNameMapComm, String userId) {
|
private boolean singleMonitorXuCheck(String devMonitorId, String standardDevMonitorId, PreDetection.MonitorListDTO monitorListDTO, List<DevData> devData, List<DevData> stdData, Map<String, String> devNameMapComm, String userId) {
|
||||||
DecimalFormat df = new DecimalFormat("0.000000");
|
DecimalFormat df = new DecimalFormat("0.000000");
|
||||||
Boolean flag = true;
|
Boolean flagU = true;
|
||||||
|
Boolean flagI = true;
|
||||||
|
Boolean flagIMBV = true;
|
||||||
|
Boolean flagIMBA = true;
|
||||||
|
Boolean flagPhase = true;
|
||||||
|
|
||||||
|
// 获取被检设备的额定电流
|
||||||
|
Double ratedCurrent = Double.valueOf(monitorListDTO.getCtStr().split("\\:")[1]);
|
||||||
|
|
||||||
String pairStr = MsgUtil.getPairStr(devMonitorId, standardDevMonitorId, devNameMapComm);
|
String pairStr = MsgUtil.getPairStr(devMonitorId, standardDevMonitorId, devNameMapComm);
|
||||||
SocketDataMsg webSend = new SocketDataMsg();
|
SocketDataMsg webSend = new SocketDataMsg();
|
||||||
webSend.setRequestId(SourceOperateCodeEnum.YJC_XUJY.getValue());
|
webSend.setRequestId(SourceOperateCodeEnum.YJC_XUJY.getValue());
|
||||||
webSend.setOperateCode(SourceOperateCodeEnum.DEV_DATA_REQUEST_02.getValue());
|
webSend.setOperateCode(SourceOperateCodeEnum.DEV_DATA_REQUEST_02.getValue());
|
||||||
String detail = "数据为空!";
|
|
||||||
|
|
||||||
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());
|
||||||
@@ -2245,6 +2265,7 @@ public class SocketContrastResponseService {
|
|||||||
uStd = getSingleMonitorSqlData(stdData, DetectionCodeEnum.PVRMS.getCode());
|
uStd = getSingleMonitorSqlData(stdData, DetectionCodeEnum.PVRMS.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String detail = "数据为空!";
|
||||||
if (CollUtil.isNotEmpty(uDev) && CollUtil.isNotEmpty(uStd)) {
|
if (CollUtil.isNotEmpty(uDev) && CollUtil.isNotEmpty(uStd)) {
|
||||||
DevData.SqlDataDTO.ListDTO uDevList = uDev.get(0).getList();
|
DevData.SqlDataDTO.ListDTO uDevList = uDev.get(0).getList();
|
||||||
DevData.SqlDataDTO.ListDTO uStdList = uStd.get(0).getList();
|
DevData.SqlDataDTO.ListDTO uStdList = uStd.get(0).getList();
|
||||||
@@ -2255,7 +2276,7 @@ public class SocketContrastResponseService {
|
|||||||
", " + (isDelta ? "Ubc" : "Ub") + "=" + df.format(uStdList.getB()) +
|
", " + (isDelta ? "Ubc" : "Ub") + "=" + df.format(uStdList.getB()) +
|
||||||
", " + (isDelta ? "Uca" : "Uc") + "=" + df.format(uStdList.getC());
|
", " + (isDelta ? "Uca" : "Uc") + "=" + df.format(uStdList.getC());
|
||||||
if (!voltageOrCurrentCheck(uDevList.getA(), uDevList.getB(), uDevList.getC(), uStdList.getA(), uStdList.getB(), uStdList.getC(), true)) {
|
if (!voltageOrCurrentCheck(uDevList.getA(), uDevList.getB(), uDevList.getC(), uStdList.getA(), uStdList.getB(), uStdList.getC(), true)) {
|
||||||
flag = false;
|
flagU = false;
|
||||||
// 单个检测点电压校验失败,推送失败消息
|
// 单个检测点电压校验失败,推送失败消息
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":电压校验失败!" + detail);
|
webSend.setData(pairStr + ":电压校验失败!" + detail);
|
||||||
@@ -2264,7 +2285,7 @@ public class SocketContrastResponseService {
|
|||||||
webSend.setData(pairStr + ":电压校验成功!" + detail);
|
webSend.setData(pairStr + ":电压校验成功!" + detail);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag = false;
|
flagU = false;
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":电压校验失败!" + (isDelta ? "线" : "相") + "电压" + detail);
|
webSend.setData(pairStr + ":电压校验失败!" + (isDelta ? "线" : "相") + "电压" + detail);
|
||||||
}
|
}
|
||||||
@@ -2278,22 +2299,30 @@ public class SocketContrastResponseService {
|
|||||||
if (CollUtil.isNotEmpty(iDev) && CollUtil.isNotEmpty(iStd)) {
|
if (CollUtil.isNotEmpty(iDev) && CollUtil.isNotEmpty(iStd)) {
|
||||||
DevData.SqlDataDTO.ListDTO iDevList = iDev.get(0).getList();
|
DevData.SqlDataDTO.ListDTO iDevList = iDev.get(0).getList();
|
||||||
DevData.SqlDataDTO.ListDTO iStdList = iStd.get(0).getList();
|
DevData.SqlDataDTO.ListDTO iStdList = iStd.get(0).getList();
|
||||||
|
|
||||||
|
if (!DetectionUtil.isZero(iDevList.getA(), ratedCurrent) && !DetectionUtil.isZero(iDevList.getB(), ratedCurrent) && !DetectionUtil.isZero(iDevList.getC(), ratedCurrent) && !DetectionUtil.isZero(iStdList.getA(), ratedCurrent) && !DetectionUtil.isZero(iStdList.getB(), ratedCurrent) && !DetectionUtil.isZero(iStdList.getC(), ratedCurrent)) {
|
||||||
detail = "被检设备:Ia=" + df.format(iDevList.getA()) + ",Ib=" + df.format(iDevList.getB()) + ",Ic=" + df.format(iDevList.getC()) + ";标准设备:Ia=" + df.format(iStdList.getA()) + ",Ib=" + df.format(iStdList.getB()) + ",Ic=" + df.format(iStdList.getC());
|
detail = "被检设备:Ia=" + df.format(iDevList.getA()) + ",Ib=" + df.format(iDevList.getB()) + ",Ic=" + df.format(iDevList.getC()) + ";标准设备:Ia=" + df.format(iStdList.getA()) + ",Ib=" + df.format(iStdList.getB()) + ",Ic=" + df.format(iStdList.getC());
|
||||||
if (!voltageOrCurrentCheck(iDevList.getA(), iDevList.getB(), iDevList.getC(), iStdList.getA(), iStdList.getB(), iStdList.getC(), false)) {
|
if (!voltageOrCurrentCheck(iDevList.getA(), iDevList.getB(), iDevList.getC(), iStdList.getA(), iStdList.getB(), iStdList.getC(), false)) {
|
||||||
// 单个检测点电流校验失败,推送失败消息
|
// 单个检测点电流校验失败,推送失败消息
|
||||||
flag = false;
|
flagI = false;
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":电流校验失败!" + detail);
|
webSend.setData(pairStr + ":电流校验失败!" + detail);
|
||||||
|
WebServiceManager.sendMsg(userId, JSON.toJSONString(webSend));
|
||||||
} else {
|
} else {
|
||||||
webSend.setCode(SourceResponseCodeEnum.SUCCESS.getCode());
|
webSend.setCode(SourceResponseCodeEnum.SUCCESS.getCode());
|
||||||
webSend.setData(pairStr + ":电流校验成功!" + detail);
|
webSend.setData(pairStr + ":电流校验成功!" + detail);
|
||||||
|
WebServiceManager.sendMsg(userId, JSON.toJSONString(webSend));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag = false;
|
// 什么都不做,不推送消息
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
flagI = false;
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":电流校验失败!" + detail);
|
webSend.setData(pairStr + ":电流校验失败!" + detail);
|
||||||
}
|
|
||||||
WebServiceManager.sendMsg(userId, JSON.toJSONString(webSend));
|
WebServiceManager.sendMsg(userId, JSON.toJSONString(webSend));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 根据接线方式(星型、角型)来决定是否进行三项不平衡校验
|
// 根据接线方式(星型、角型)来决定是否进行三项不平衡校验
|
||||||
detail = "数据为空!";
|
detail = "数据为空!";
|
||||||
@@ -2308,7 +2337,7 @@ public class SocketContrastResponseService {
|
|||||||
detail = "被检设备:IMBV=" + df.format(uUnblanceDevList.getB()) + ";标准设备:IMBV=" + df.format(uUnblanceStdList.getB());
|
detail = "被检设备:IMBV=" + df.format(uUnblanceDevList.getB()) + ";标准设备:IMBV=" + df.format(uUnblanceStdList.getB());
|
||||||
if (!unbalanceCheck(uUnblanceDevList.getB(), uUnblanceStdList.getB(), true)) {
|
if (!unbalanceCheck(uUnblanceDevList.getB(), uUnblanceStdList.getB(), true)) {
|
||||||
// 单个检测点三项电压不平衡校验失败,推送失败消息
|
// 单个检测点三项电压不平衡校验失败,推送失败消息
|
||||||
flag = false;
|
flagIMBV = false;
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":三项电压不平衡校验失败!" + detail);
|
webSend.setData(pairStr + ":三项电压不平衡校验失败!" + detail);
|
||||||
} else {
|
} else {
|
||||||
@@ -2316,7 +2345,7 @@ public class SocketContrastResponseService {
|
|||||||
webSend.setData(pairStr + ":三项电压不平衡校验成功!" + detail);
|
webSend.setData(pairStr + ":三项电压不平衡校验成功!" + detail);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag = false;
|
flagIMBV = false;
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":三项电压不平衡校验失败!" + detail);
|
webSend.setData(pairStr + ":三项电压不平衡校验失败!" + detail);
|
||||||
}
|
}
|
||||||
@@ -2329,7 +2358,7 @@ public class SocketContrastResponseService {
|
|||||||
DevData.SqlDataDTO.ListDTO iUnblanceStdList = iUnblanceStd.get(0).getList();
|
DevData.SqlDataDTO.ListDTO iUnblanceStdList = iUnblanceStd.get(0).getList();
|
||||||
detail = "被检设备:IMBA=" + df.format(iUnblanceDevList.getB()) + ";标准设备:IMBA=" + df.format(iUnblanceStdList.getB());
|
detail = "被检设备:IMBA=" + df.format(iUnblanceDevList.getB()) + ";标准设备:IMBA=" + df.format(iUnblanceStdList.getB());
|
||||||
if (!unbalanceCheck(iUnblanceDevList.getB(), iUnblanceStdList.getB(), false)) {
|
if (!unbalanceCheck(iUnblanceDevList.getB(), iUnblanceStdList.getB(), false)) {
|
||||||
flag = false;
|
flagIMBA = false;
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":三项电流不平衡校验失败!" + detail);
|
webSend.setData(pairStr + ":三项电流不平衡校验失败!" + detail);
|
||||||
} else {
|
} else {
|
||||||
@@ -2337,7 +2366,7 @@ public class SocketContrastResponseService {
|
|||||||
webSend.setData(pairStr + ":三项电流不平衡校验成功!" + detail);
|
webSend.setData(pairStr + ":三项电流不平衡校验成功!" + detail);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag = false;
|
flagIMBA = false;
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":三项电流不平衡校验失败!" + detail);
|
webSend.setData(pairStr + ":三项电流不平衡校验失败!" + detail);
|
||||||
}
|
}
|
||||||
@@ -2352,15 +2381,17 @@ public class SocketContrastResponseService {
|
|||||||
|
|
||||||
// 动态调控是否支持相角差校验
|
// 动态调控是否支持相角差校验
|
||||||
if (isPhaseAngle) {
|
if (isPhaseAngle) {
|
||||||
// 获取被检设备的额定电流
|
if (flagIMBV && flagIMBA) {
|
||||||
Double ratedCurrent = Double.valueOf(monitorListDTO.getCtStr().split("\\:")[1]);
|
|
||||||
|
|
||||||
// 是否存在电流
|
// 是否存在电流
|
||||||
boolean notHasCurrent = iDev.stream().allMatch(
|
boolean hasCurrent = iDev.stream().allMatch(
|
||||||
p -> p.getList().getA() != null && DetectionUtil.isZero(p.getList().getA(), ratedCurrent)
|
p -> p.getList().getA() != null && !DetectionUtil.isZero(p.getList().getA(), ratedCurrent)
|
||||||
&& p.getList().getB() != null && DetectionUtil.isZero(p.getList().getB(), ratedCurrent)
|
&& p.getList().getB() != null && !DetectionUtil.isZero(p.getList().getB(), ratedCurrent)
|
||||||
&& p.getList().getC() != null && DetectionUtil.isZero(p.getList().getC(), ratedCurrent));
|
&& p.getList().getC() != null && !DetectionUtil.isZero(p.getList().getC(), ratedCurrent));
|
||||||
if (!notHasCurrent) {
|
hasCurrent = hasCurrent && iStd.stream().allMatch(
|
||||||
|
p -> p.getList().getA() != null && !DetectionUtil.isZero(p.getList().getA(), ratedCurrent)
|
||||||
|
&& p.getList().getB() != null && !DetectionUtil.isZero(p.getList().getB(), ratedCurrent)
|
||||||
|
&& p.getList().getC() != null && !DetectionUtil.isZero(p.getList().getC(), ratedCurrent));
|
||||||
|
if (hasCurrent) {
|
||||||
detail = "数据为空!";
|
detail = "数据为空!";
|
||||||
// 相角差校验
|
// 相角差校验
|
||||||
List<DevData.SqlDataDTO> vaDev = null;
|
List<DevData.SqlDataDTO> vaDev = null;
|
||||||
@@ -2396,7 +2427,7 @@ public class SocketContrastResponseService {
|
|||||||
|
|
||||||
if (!phaseCheck(vaDevList, iaDevList, vaStdList, iaStdList)) {
|
if (!phaseCheck(vaDevList, iaDevList, vaStdList, iaStdList)) {
|
||||||
// 单个检测点相角校验失败,推送失败消息
|
// 单个检测点相角校验失败,推送失败消息
|
||||||
flag = false;
|
flagPhase = false;
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":相角差校验失败!" + detail);
|
webSend.setData(pairStr + ":相角差校验失败!" + detail);
|
||||||
} else {
|
} else {
|
||||||
@@ -2404,14 +2435,15 @@ public class SocketContrastResponseService {
|
|||||||
webSend.setData(pairStr + ":相角差校验成功!" + detail);
|
webSend.setData(pairStr + ":相角差校验成功!" + detail);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag = false;
|
flagPhase = false;
|
||||||
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
webSend.setCode(SourceResponseCodeEnum.FAIL.getCode());
|
||||||
webSend.setData(pairStr + ":相角差校验失败!相角差" + detail);
|
webSend.setData(pairStr + ":相角差校验失败!相角差" + detail);
|
||||||
}
|
}
|
||||||
WebServiceManager.sendMsg(userId, JSON.toJSONString(webSend));
|
WebServiceManager.sendMsg(userId, JSON.toJSONString(webSend));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return flag;
|
}
|
||||||
|
return flagU && flagI && flagIMBV && flagIMBA && flagPhase;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2909,6 +2941,18 @@ public class SocketContrastResponseService {
|
|||||||
targetDatStream,
|
targetDatStream,
|
||||||
isStar ? 0 : isDelta ? 1 : 2);
|
isStar ? 0 : isDelta ? 1 : 2);
|
||||||
if (ObjectUtil.isNotNull(compareWaveDTO) && ObjectUtil.isNotNull(compareWaveDTO.getSourceResults()) && ObjectUtil.isNotNull(compareWaveDTO.getTargetResults())) {
|
if (ObjectUtil.isNotNull(compareWaveDTO) && ObjectUtil.isNotNull(compareWaveDTO.getSourceResults()) && ObjectUtil.isNotNull(compareWaveDTO.getTargetResults())) {
|
||||||
|
// DetectionCodeEnum prefixEnum = this.getPrefixEnum();
|
||||||
|
// adTypeCodeList = Arrays.asList(prefixEnum.getCode() + DetectionCodeEnum.VRMS.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.PVRMS.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.IRMS.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.V_UNBAN.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.I_UNBAN.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.V2_50.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.P2_50.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.PV2_50.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.SV_1_49.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.SI_1_49.getCode(),
|
||||||
|
// prefixEnum.getCode() + DetectionCodeEnum.I2_50.getCode());
|
||||||
return this.getDevData(compareWaveDTO.getSourceResults(), compareWaveDTO.getTargetResults(), devMonitorId, stdDevMonitorId, adTypeCodeList);
|
return this.getDevData(compareWaveDTO.getSourceResults(), compareWaveDTO.getTargetResults(), devMonitorId, stdDevMonitorId, adTypeCodeList);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
@@ -2934,8 +2978,8 @@ public class SocketContrastResponseService {
|
|||||||
List<DevData> stdDevDataList = new ArrayList<>();
|
List<DevData> stdDevDataList = new ArrayList<>();
|
||||||
int dataPoints = Math.min(sourceDataList.size(), targetDataList.size());
|
int dataPoints = Math.min(sourceDataList.size(), targetDataList.size());
|
||||||
for (int i = 0; i < dataPoints; i++) {
|
for (int i = 0; i < dataPoints; i++) {
|
||||||
devDataList.add(getSinglePointDevData(sourceDataList.get(i), devMonitorId, adTypeCodeList));
|
devDataList.add(getSinglePointDevData(targetDataList.get(i), devMonitorId, adTypeCodeList));
|
||||||
stdDevDataList.add(getSinglePointDevData(targetDataList.get(i), stdDevMonitorId, adTypeCodeList));
|
stdDevDataList.add(getSinglePointDevData(sourceDataList.get(i), stdDevMonitorId, adTypeCodeList));
|
||||||
}
|
}
|
||||||
result.add(devDataList);
|
result.add(devDataList);
|
||||||
result.add(stdDevDataList);
|
result.add(stdDevDataList);
|
||||||
@@ -2975,7 +3019,7 @@ public class SocketContrastResponseService {
|
|||||||
List<String> cListI = null;
|
List<String> cListI = null;
|
||||||
|
|
||||||
for (String adTypeCode : adTypeCodeList) {
|
for (String adTypeCode : adTypeCodeList) {
|
||||||
String code = adTypeCode.replace(DetectionCodeEnum.REAL_PREFIX.getCode(), "");
|
String code = adTypeCode.replace(this.getPrefixEnum().getCode(), "");
|
||||||
DetectionCodeEnum detectionCodeEnum = DetectionCodeEnum.getDetectionCodeByCode(code);
|
DetectionCodeEnum detectionCodeEnum = DetectionCodeEnum.getDetectionCodeByCode(code);
|
||||||
switch (detectionCodeEnum) {
|
switch (detectionCodeEnum) {
|
||||||
// case FREQ:
|
// case FREQ:
|
||||||
@@ -2992,7 +3036,7 @@ public class SocketContrastResponseService {
|
|||||||
// 相电压有效值
|
// 相电压有效值
|
||||||
sqlDataDTO = new DevData.SqlDataDTO();
|
sqlDataDTO = new DevData.SqlDataDTO();
|
||||||
sqlDataDTO.setDesc(DetectionCodeEnum.VRMS.getCode());
|
sqlDataDTO.setDesc(DetectionCodeEnum.VRMS.getCode());
|
||||||
sqlDataDTO.setType("real");
|
sqlDataDTO.setType("wave");
|
||||||
listDTO = new DevData.SqlDataDTO.ListDTO();
|
listDTO = new DevData.SqlDataDTO.ListDTO();
|
||||||
listDTO.setA((double) pointDevData.getRms()[0]);
|
listDTO.setA((double) pointDevData.getRms()[0]);
|
||||||
listDTO.setB((double) pointDevData.getRms()[1]);
|
listDTO.setB((double) pointDevData.getRms()[1]);
|
||||||
@@ -3004,7 +3048,7 @@ public class SocketContrastResponseService {
|
|||||||
// 线电压有效值
|
// 线电压有效值
|
||||||
sqlDataDTO = new DevData.SqlDataDTO();
|
sqlDataDTO = new DevData.SqlDataDTO();
|
||||||
sqlDataDTO.setDesc(DetectionCodeEnum.PVRMS.getCode());
|
sqlDataDTO.setDesc(DetectionCodeEnum.PVRMS.getCode());
|
||||||
sqlDataDTO.setType("real");
|
sqlDataDTO.setType("wave");
|
||||||
listDTO = new DevData.SqlDataDTO.ListDTO();
|
listDTO = new DevData.SqlDataDTO.ListDTO();
|
||||||
listDTO.setA((double) pointDevData.getRms()[6]);
|
listDTO.setA((double) pointDevData.getRms()[6]);
|
||||||
listDTO.setB((double) pointDevData.getRms()[7]);
|
listDTO.setB((double) pointDevData.getRms()[7]);
|
||||||
@@ -3016,7 +3060,7 @@ public class SocketContrastResponseService {
|
|||||||
// 相电流有效值
|
// 相电流有效值
|
||||||
sqlDataDTO = new DevData.SqlDataDTO();
|
sqlDataDTO = new DevData.SqlDataDTO();
|
||||||
sqlDataDTO.setDesc(DetectionCodeEnum.IRMS.getCode());
|
sqlDataDTO.setDesc(DetectionCodeEnum.IRMS.getCode());
|
||||||
sqlDataDTO.setType("real");
|
sqlDataDTO.setType("wave");
|
||||||
listDTO = new DevData.SqlDataDTO.ListDTO();
|
listDTO = new DevData.SqlDataDTO.ListDTO();
|
||||||
listDTO.setA((double) pointDevData.getRms()[3]);
|
listDTO.setA((double) pointDevData.getRms()[3]);
|
||||||
listDTO.setB((double) pointDevData.getRms()[4]);
|
listDTO.setB((double) pointDevData.getRms()[4]);
|
||||||
@@ -3028,7 +3072,7 @@ public class SocketContrastResponseService {
|
|||||||
// 三项电压不平衡度
|
// 三项电压不平衡度
|
||||||
sqlDataDTO = new DevData.SqlDataDTO();
|
sqlDataDTO = new DevData.SqlDataDTO();
|
||||||
sqlDataDTO.setDesc(DetectionCodeEnum.V_UNBAN.getCode());
|
sqlDataDTO.setDesc(DetectionCodeEnum.V_UNBAN.getCode());
|
||||||
sqlDataDTO.setType("real");
|
sqlDataDTO.setType("wave");
|
||||||
listDTO = new DevData.SqlDataDTO.ListDTO();
|
listDTO = new DevData.SqlDataDTO.ListDTO();
|
||||||
listDTO.setB((double) pointDevData.getUiSeq()[0][4]);
|
listDTO.setB((double) pointDevData.getUiSeq()[0][4]);
|
||||||
sqlDataDTO.setList(listDTO);
|
sqlDataDTO.setList(listDTO);
|
||||||
@@ -3038,7 +3082,7 @@ public class SocketContrastResponseService {
|
|||||||
// 三项电流不平衡度
|
// 三项电流不平衡度
|
||||||
sqlDataDTO = new DevData.SqlDataDTO();
|
sqlDataDTO = new DevData.SqlDataDTO();
|
||||||
sqlDataDTO.setDesc(DetectionCodeEnum.I_UNBAN.getCode());
|
sqlDataDTO.setDesc(DetectionCodeEnum.I_UNBAN.getCode());
|
||||||
sqlDataDTO.setType("real");
|
sqlDataDTO.setType("wave");
|
||||||
listDTO = new DevData.SqlDataDTO.ListDTO();
|
listDTO = new DevData.SqlDataDTO.ListDTO();
|
||||||
listDTO.setB((double) pointDevData.getUiSeq()[1][4]);
|
listDTO.setB((double) pointDevData.getUiSeq()[1][4]);
|
||||||
sqlDataDTO.setList(listDTO);
|
sqlDataDTO.setList(listDTO);
|
||||||
@@ -3048,7 +3092,7 @@ public class SocketContrastResponseService {
|
|||||||
// 谐波电压含有率
|
// 谐波电压含有率
|
||||||
sqlDataDTO = new DevData.SqlDataDTO();
|
sqlDataDTO = new DevData.SqlDataDTO();
|
||||||
sqlDataDTO.setDesc(DetectionCodeEnum.U1.getCode());
|
sqlDataDTO.setDesc(DetectionCodeEnum.U1.getCode());
|
||||||
sqlDataDTO.setType("real");
|
sqlDataDTO.setType("wave");
|
||||||
listDTO = new DevData.SqlDataDTO.ListDTO();
|
listDTO = new DevData.SqlDataDTO.ListDTO();
|
||||||
u1A = (double) pointDevData.getFuHarm()[0][0];
|
u1A = (double) pointDevData.getFuHarm()[0][0];
|
||||||
u1B = (double) pointDevData.getFuHarm()[1][0];
|
u1B = (double) pointDevData.getFuHarm()[1][0];
|
||||||
@@ -3061,7 +3105,7 @@ public class SocketContrastResponseService {
|
|||||||
|
|
||||||
sqlDataHarmDTOV = new DevData.SqlDataHarmDTO();
|
sqlDataHarmDTOV = new DevData.SqlDataHarmDTO();
|
||||||
sqlDataHarmDTOV.setDesc(DetectionCodeEnum.V2_50.getCode());
|
sqlDataHarmDTOV.setDesc(DetectionCodeEnum.V2_50.getCode());
|
||||||
sqlDataHarmDTOV.setType("real");
|
sqlDataHarmDTOV.setType("wave");
|
||||||
listDTOHarmV = new DevData.SqlDataHarmDTO.ListDTO();
|
listDTOHarmV = new DevData.SqlDataHarmDTO.ListDTO();
|
||||||
|
|
||||||
aListV = new ArrayList<>();
|
aListV = new ArrayList<>();
|
||||||
@@ -3086,7 +3130,7 @@ public class SocketContrastResponseService {
|
|||||||
// 谐波电流幅值
|
// 谐波电流幅值
|
||||||
sqlDataDTO = new DevData.SqlDataDTO();
|
sqlDataDTO = new DevData.SqlDataDTO();
|
||||||
sqlDataDTO.setDesc(DetectionCodeEnum.I1.getCode());
|
sqlDataDTO.setDesc(DetectionCodeEnum.I1.getCode());
|
||||||
sqlDataDTO.setType("real");
|
sqlDataDTO.setType("wave");
|
||||||
listDTO = new DevData.SqlDataDTO.ListDTO();
|
listDTO = new DevData.SqlDataDTO.ListDTO();
|
||||||
listDTO.setA((double) pointDevData.getInHarm()[3][0]);
|
listDTO.setA((double) pointDevData.getInHarm()[3][0]);
|
||||||
listDTO.setB((double) pointDevData.getInHarm()[4][0]);
|
listDTO.setB((double) pointDevData.getInHarm()[4][0]);
|
||||||
@@ -3096,7 +3140,7 @@ public class SocketContrastResponseService {
|
|||||||
|
|
||||||
DevData.SqlDataHarmDTO sqlDataHarmDTOI = new DevData.SqlDataHarmDTO();
|
DevData.SqlDataHarmDTO sqlDataHarmDTOI = new DevData.SqlDataHarmDTO();
|
||||||
sqlDataHarmDTOI.setDesc(DetectionCodeEnum.I2_50.getCode());
|
sqlDataHarmDTOI.setDesc(DetectionCodeEnum.I2_50.getCode());
|
||||||
sqlDataHarmDTOI.setType("real");
|
sqlDataHarmDTOI.setType("wave");
|
||||||
DevData.SqlDataHarmDTO.ListDTO listDTOHarmI = new DevData.SqlDataHarmDTO.ListDTO();
|
DevData.SqlDataHarmDTO.ListDTO listDTOHarmI = new DevData.SqlDataHarmDTO.ListDTO();
|
||||||
|
|
||||||
aListI = new ArrayList<>();
|
aListI = new ArrayList<>();
|
||||||
@@ -3142,7 +3186,7 @@ public class SocketContrastResponseService {
|
|||||||
// 间谐波电压含有率
|
// 间谐波电压含有率
|
||||||
sqlDataDTO = new DevData.SqlDataDTO();
|
sqlDataDTO = new DevData.SqlDataDTO();
|
||||||
sqlDataDTO.setDesc(DetectionCodeEnum.U1.getCode());
|
sqlDataDTO.setDesc(DetectionCodeEnum.U1.getCode());
|
||||||
sqlDataDTO.setType("real");
|
sqlDataDTO.setType("wave");
|
||||||
listDTO = new DevData.SqlDataDTO.ListDTO();
|
listDTO = new DevData.SqlDataDTO.ListDTO();
|
||||||
u1A = (double) pointDevData.getFuHarm()[0][0];
|
u1A = (double) pointDevData.getFuHarm()[0][0];
|
||||||
u1B = (double) pointDevData.getFuHarm()[1][0];
|
u1B = (double) pointDevData.getFuHarm()[1][0];
|
||||||
@@ -3155,7 +3199,7 @@ public class SocketContrastResponseService {
|
|||||||
|
|
||||||
sqlDataHarmDTOV = new DevData.SqlDataHarmDTO();
|
sqlDataHarmDTOV = new DevData.SqlDataHarmDTO();
|
||||||
sqlDataHarmDTOV.setDesc(DetectionCodeEnum.SV_1_49.getCode());
|
sqlDataHarmDTOV.setDesc(DetectionCodeEnum.SV_1_49.getCode());
|
||||||
sqlDataHarmDTOV.setType("real");
|
sqlDataHarmDTOV.setType("wave");
|
||||||
listDTOHarmV = new DevData.SqlDataHarmDTO.ListDTO();
|
listDTOHarmV = new DevData.SqlDataHarmDTO.ListDTO();
|
||||||
|
|
||||||
aListV = new ArrayList<>();
|
aListV = new ArrayList<>();
|
||||||
@@ -3179,7 +3223,7 @@ public class SocketContrastResponseService {
|
|||||||
case SI_1_49:
|
case SI_1_49:
|
||||||
sqlDataDTO = new DevData.SqlDataDTO();
|
sqlDataDTO = new DevData.SqlDataDTO();
|
||||||
sqlDataDTO.setDesc(DetectionCodeEnum.I1.getCode());
|
sqlDataDTO.setDesc(DetectionCodeEnum.I1.getCode());
|
||||||
sqlDataDTO.setType("real");
|
sqlDataDTO.setType("wave");
|
||||||
listDTO = new DevData.SqlDataDTO.ListDTO();
|
listDTO = new DevData.SqlDataDTO.ListDTO();
|
||||||
listDTO.setA((double) pointDevData.getInHarm()[3][0]);
|
listDTO.setA((double) pointDevData.getInHarm()[3][0]);
|
||||||
listDTO.setB((double) pointDevData.getInHarm()[4][0]);
|
listDTO.setB((double) pointDevData.getInHarm()[4][0]);
|
||||||
@@ -3190,7 +3234,7 @@ public class SocketContrastResponseService {
|
|||||||
// 间谐波电流幅值
|
// 间谐波电流幅值
|
||||||
sqlDataHarmDTOI = new DevData.SqlDataHarmDTO();
|
sqlDataHarmDTOI = new DevData.SqlDataHarmDTO();
|
||||||
sqlDataHarmDTOI.setDesc(DetectionCodeEnum.SI_1_49.getCode());
|
sqlDataHarmDTOI.setDesc(DetectionCodeEnum.SI_1_49.getCode());
|
||||||
sqlDataHarmDTOI.setType("real");
|
sqlDataHarmDTOI.setType("wave");
|
||||||
listDTOHarmI = new DevData.SqlDataHarmDTO.ListDTO();
|
listDTOHarmI = new DevData.SqlDataHarmDTO.ListDTO();
|
||||||
|
|
||||||
aListI = new ArrayList<>();
|
aListI = new ArrayList<>();
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ public enum SourceResponseCodeEnum {
|
|||||||
FAIL(25002,"失败"),
|
FAIL(25002,"失败"),
|
||||||
ALL_FAIL(25003,"校验失败"),
|
ALL_FAIL(25003,"校验失败"),
|
||||||
RECEIVE_DATA_TIME_OUT(25004,"接收数据超时"),
|
RECEIVE_DATA_TIME_OUT(25004,"接收数据超时"),
|
||||||
REAL_DATA_CHECK_FAIL(25005,"实时数据校验失败"),
|
REAL_DATA_CHECK_FAIL(25005,"实时数据不符合"),
|
||||||
STATISTICS_DATA_CHECK_FAIL(25006,"统计数据校验失败"),
|
STATISTICS_DATA_CHECK_FAIL(25006,"统计数据不符合"),
|
||||||
FLICKER_DATA_START(25007,"开始接收闪变数据")
|
FLICKER_DATA_START(25007,"开始接收闪变数据")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
order by dev.Create_Time DESC,dev.Name
|
order by dev.Create_Time DESC, dev.Name ASC
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@@ -111,4 +111,9 @@ public class PqDevVO extends PqDev {
|
|||||||
* 是否已经分配。0-未分配、1-已分配、2-所有
|
* 是否已经分配。0-未分配、1-已分配、2-所有
|
||||||
*/
|
*/
|
||||||
private Integer assign;
|
private Integer assign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测点结果
|
||||||
|
*/
|
||||||
|
private List<Integer> monitorResults;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import com.njcn.gather.device.service.IPqDevSubService;
|
|||||||
import com.njcn.gather.monitor.pojo.po.PqMonitor;
|
import com.njcn.gather.monitor.pojo.po.PqMonitor;
|
||||||
import com.njcn.gather.monitor.pojo.vo.PqMonitorExcel;
|
import com.njcn.gather.monitor.pojo.vo.PqMonitorExcel;
|
||||||
import com.njcn.gather.monitor.service.IPqMonitorService;
|
import com.njcn.gather.monitor.service.IPqMonitorService;
|
||||||
|
import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
|
||||||
import com.njcn.gather.pojo.enums.DetectionResponseEnum;
|
import com.njcn.gather.pojo.enums.DetectionResponseEnum;
|
||||||
import com.njcn.gather.storage.service.DetectionDataDealService;
|
import com.njcn.gather.storage.service.DetectionDataDealService;
|
||||||
import com.njcn.gather.system.cfg.pojo.enums.SceneEnum;
|
import com.njcn.gather.system.cfg.pojo.enums.SceneEnum;
|
||||||
@@ -216,7 +217,8 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
|||||||
if (PatternEnum.CONTRAST.getValue().equals(dictDataService.getDictDataById(param.getPattern()).getCode())) {
|
if (PatternEnum.CONTRAST.getValue().equals(dictDataService.getDictDataById(param.getPattern()).getCode())) {
|
||||||
for (String id : param.getIds()) {
|
for (String id : param.getIds()) {
|
||||||
if (ObjectUtils.isNotEmpty(pqMonitorService.listPqMonitorByDevIds(Collections.singletonList(id)))) {
|
if (ObjectUtils.isNotEmpty(pqMonitorService.listPqMonitorByDevIds(Collections.singletonList(id)))) {
|
||||||
throw new BusinessException(DetectionResponseEnum.PQ_DEV_HAS_MONITOR);
|
// throw new BusinessException(DetectionResponseEnum.PQ_DEV_HAS_MONITOR);
|
||||||
|
pqMonitorService.removeByDevId(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -290,6 +292,33 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
|||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
List<PqDevVO> pqDevList = this.baseMapper.selectByQueryParam(param);
|
List<PqDevVO> pqDevList = this.baseMapper.selectByQueryParam(param);
|
||||||
|
pqDevList.forEach(pqDev -> {
|
||||||
|
List<PqMonitor> monitorList = pqMonitorService.listPqMonitorByDevIds(Collections.singletonList(pqDev.getId()));
|
||||||
|
List<PqMonitor> enabledMonitorList = monitorList.stream().filter(x -> x.getCheckFlag() == 1).collect(Collectors.toList());
|
||||||
|
pqDev.setMonitorResults(enabledMonitorList.stream().map(x -> {
|
||||||
|
if (ObjectUtil.isNull(x.getResultType())) {
|
||||||
|
return CheckResultEnum.UNCHECKED.getValue();
|
||||||
|
} else {
|
||||||
|
DataSourceEnum dataSourceEnum = DataSourceEnum.ofByValue(x.getResultType());
|
||||||
|
|
||||||
|
switch (dataSourceEnum) {
|
||||||
|
case REAL_DATA:
|
||||||
|
return x.getRealtimeResult();
|
||||||
|
case MINUTE_STATISTICS_AVG:
|
||||||
|
case MINUTE_STATISTICS_CP95:
|
||||||
|
case MINUTE_STATISTICS_MIN:
|
||||||
|
case MINUTE_STATISTICS_MAX:
|
||||||
|
return x.getStatisticsResult();
|
||||||
|
case WAVE_DATA:
|
||||||
|
return x.getRecordedResult();
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return CheckResultEnum.UNCHECKED.getValue();
|
||||||
|
}).collect(Collectors.toList()));
|
||||||
|
});
|
||||||
|
|
||||||
return pqDevList;
|
return pqDevList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1254,9 +1283,9 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
|||||||
}
|
}
|
||||||
// 校验监测点数量
|
// 校验监测点数量
|
||||||
int devChns = devType.getDevChns();
|
int devChns = devType.getDevChns();
|
||||||
if (pqMonitorExcelList.size() != devChns) {
|
// if (pqMonitorExcelList.size() != devChns) {
|
||||||
throw new BusinessException(DetectionResponseEnum.IMPORT_DATA_FAIL, "【" + name + "】的设备类型必须具备" + devChns + "个监测点信息!");
|
// throw new BusinessException(DetectionResponseEnum.IMPORT_DATA_FAIL, "【" + name + "】的设备类型必须具备" + devChns + "个监测点信息!");
|
||||||
}
|
// }
|
||||||
List<Integer> numList = pqMonitorExcelList.stream().map(PqMonitorExcel::getNum).collect(Collectors.toList());
|
List<Integer> numList = pqMonitorExcelList.stream().map(PqMonitorExcel::getNum).collect(Collectors.toList());
|
||||||
// 判断是否有重复的num
|
// 判断是否有重复的num
|
||||||
Set<Integer> uniqueNumSet = new HashSet<>(numList);
|
Set<Integer> uniqueNumSet = new HashSet<>(numList);
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import com.njcn.gather.monitor.pojo.po.PqMonitor;
|
|||||||
import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
|
import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author caozehui
|
* @author caozehui
|
||||||
@@ -112,4 +111,11 @@ public interface IPqMonitorService extends IService<PqMonitor> {
|
|||||||
*/
|
*/
|
||||||
Integer getDevCheckResult(String devId);
|
Integer getDevCheckResult(String devId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据被检设备id删除监测点信息
|
||||||
|
*
|
||||||
|
* @param devId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean removeByDevId(String devId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,4 +280,11 @@ public class PqMonitorServiceImpl extends ServiceImpl<PqMonitorMapper, PqMonitor
|
|||||||
|
|
||||||
return DetectionDataServiceImpl.isResultFlag(allResultFlags);
|
return DetectionDataServiceImpl.isResultFlag(allResultFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean removeByDevId(String devId) {
|
||||||
|
QueryWrapper<PqMonitor> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("pq_monitor.Dev_Id", devId);
|
||||||
|
return this.remove(wrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2932,6 +2932,7 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
"A_Value_0 json NULL COMMENT 'A相基波有效值',\n" +
|
"A_Value_0 json NULL COMMENT 'A相基波有效值',\n" +
|
||||||
"B_Value_0 json NULL COMMENT 'B相基波有效值',\n" +
|
"B_Value_0 json NULL COMMENT 'B相基波有效值',\n" +
|
||||||
"C_Value_0 json NULL COMMENT 'B相基波有效值',\n" +
|
"C_Value_0 json NULL COMMENT 'B相基波有效值',\n" +
|
||||||
|
"Wave_Num tinyint(1) unsigned DEFAULT null COMMENT '录波数据第几组',\n"+
|
||||||
"PRIMARY KEY (Id)\n"
|
"PRIMARY KEY (Id)\n"
|
||||||
:
|
:
|
||||||
" Script_Id CHAR(32) NOT NULL COMMENT '检测脚本表Id',\n" +
|
" Script_Id CHAR(32) NOT NULL COMMENT '检测脚本表Id',\n" +
|
||||||
@@ -3130,6 +3131,7 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
List<DevData> devData = contrastToList(devNonHarmonicRawDataList, devHarmonicRawDataList, testItemMap, 0);
|
List<DevData> devData = contrastToList(devNonHarmonicRawDataList, devHarmonicRawDataList, testItemMap, 0);
|
||||||
List<DevData> standardDevData = contrastToList(stdDevNonHarmonicRawDataList, stdDevHarmonicRawDataList, testItemMap, 1);
|
List<DevData> standardDevData = contrastToList(stdDevNonHarmonicRawDataList, stdDevHarmonicRawDataList, testItemMap, 1);
|
||||||
|
|
||||||
|
if(CollUtil.isNotEmpty(devData)&&CollUtil.isNotEmpty(standardDevData)){
|
||||||
detectionServiceImpl.processing(devData, standardDevData, parsIp, devIdMapComm, testItemMap.keySet().stream().collect(Collectors.toList()), errorSysId, dataRule, numMap, code, null, finalNonWaveDataSourceEnum);
|
detectionServiceImpl.processing(devData, standardDevData, parsIp, devIdMapComm, testItemMap.keySet().stream().collect(Collectors.toList()), errorSysId, dataRule, numMap, code, null, finalNonWaveDataSourceEnum);
|
||||||
|
|
||||||
parsId.forEach((devMonitorId, stdDevMonitorId) -> {
|
parsId.forEach((devMonitorId, stdDevMonitorId) -> {
|
||||||
@@ -3137,6 +3139,7 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
pqMonitorService.updateMonitorResult(devMonitorId, null, finalNonWaveDataSourceEnum, num, null, oldCode);
|
pqMonitorService.updateMonitorResult(devMonitorId, null, finalNonWaveDataSourceEnum, num, null, oldCode);
|
||||||
pqDevService.updateResult(split[0], null);
|
pqDevService.updateResult(split[0], null);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
AdPlanTestConfig adPlanTestConfig = adPlanTestConfigService.getByPlanId(planId);
|
AdPlanTestConfig adPlanTestConfig = adPlanTestConfigService.getByPlanId(planId);
|
||||||
for (int i = 1; i <= adPlanTestConfig.getWaveRecord(); i++) {
|
for (int i = 1; i <= adPlanTestConfig.getWaveRecord(); i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user