diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java index 9a588955..55239bc7 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java @@ -999,7 +999,7 @@ public class SocketDevResponseService { successComm.add(devData.getId()); if (SocketManager.clockMap.containsKey(sourceIssue.getIndex())) { - // SocketManager.clockMap.put(sourceIssue.getIndex(), 0L); + SocketManager.clockMap.put(sourceIssue.getIndex(), 0L); } if (successComm.size() == FormalTestManager.monitorIdListComm.size()) { diff --git a/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java b/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java index 5d0a2563..e1e4e23d 100644 --- a/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java @@ -202,7 +202,7 @@ public class ResultServiceImpl implements IResultService { dtlType.setIndex(index); dtlType.setScriptType(scriptDtlIndexList.get(0).getScriptType()); ratedScriptTypeName(scriptDtlIndexList, isValueType, dtlType, dictTree); - dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList, isValueType).toString()); + dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList,false, isValueType).toString()); if (finalResultMap.containsKey(index)) { dtlType.setFly(conform(finalResultMap.get(index))); } @@ -253,7 +253,7 @@ public class ResultServiceImpl implements IResultService { if ("Freq".equals(subKey)) { freqScriptTypeName(scriptDtlIndexList, dictTree, isValueType, dtlType); } - dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList, isValueType).toString()); + dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList,false, isValueType).toString()); if (finalResultMap.containsKey(index)) { dtlType.setFly(conform(finalResultMap.get(index))); } @@ -296,7 +296,7 @@ public class ResultServiceImpl implements IResultService { dlt.setScriptTypeName("特征幅值=" + dtls.getTransValue() + "%Un,持续时间=" + dtls.getRetainTime().intValue() + "周波"); dlt.setIndex(dtls.getScriptIndex()); dlt.setScriptType(scriptDtlIndexList.get(0).getScriptType()); - dlt.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList, isValueType).toString()); + dlt.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList,false, isValueType).toString()); if (finalResultMap.containsKey(dtls.getScriptIndex())) { dlt.setFly(conform(finalResultMap.get(dtls.getScriptIndex()))); } diff --git a/detection/src/main/java/com/njcn/gather/script/service/impl/PqScriptDtlsServiceImpl.java b/detection/src/main/java/com/njcn/gather/script/service/impl/PqScriptDtlsServiceImpl.java index 5c5656aa..d8e744ea 100644 --- a/detection/src/main/java/com/njcn/gather/script/service/impl/PqScriptDtlsServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/script/service/impl/PqScriptDtlsServiceImpl.java @@ -193,7 +193,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl scriptDtlIndex, Boolean isValueType) { + public static StringBuffer getStringBuffer(List scriptDtlIndex,Boolean isScript, Boolean isValueType) { if (ObjectUtil.isNull(isValueType)) { + isValueType = true; + } + if (isScript) { isValueType = false; } StringBuffer buffer = new StringBuffer(); buffer.append("输入:"); appendValue(scriptDtlIndex, buffer, "Freq", "频率", ResultUnitEnum.FREQ_UNIT.getUnit(), null); - appendValue(scriptDtlIndex, buffer, "VOL", "U", !isValueType ? ResultUnitEnum.V_RELATIVE_UNIT.getUnit() : ResultUnitEnum.V_ABSOLUTELY_UNIT.getUnit(), "相角="); - appendValue(scriptDtlIndex, buffer, "CUR", "I", !isValueType ? ResultUnitEnum.I_RELATIVE_UNIT.getUnit() : ResultUnitEnum.I_ABSOLUTELY_UNIT.getUnit(), "相角="); + appendValue(scriptDtlIndex, buffer, "VOL", "U", isValueType ? ResultUnitEnum.V_RELATIVE_UNIT.getUnit() : ResultUnitEnum.V_ABSOLUTELY_UNIT.getUnit(), "相角="); + appendValue(scriptDtlIndex, buffer, "CUR", "I", isValueType ? ResultUnitEnum.I_RELATIVE_UNIT.getUnit() : ResultUnitEnum.I_ABSOLUTELY_UNIT.getUnit(), "相角="); dtlsSetBuffer(scriptDtlIndex, buffer, "Harm_V", "h", ResultUnitEnum.HV_UNIT.getUnit(), true); dtlsSetBuffer(scriptDtlIndex, buffer, "Harm_I", "h", ResultUnitEnum.HI_UNIT.getUnit(), true); dtlsSetBuffer(scriptDtlIndex, buffer, "InHarm_V", "i", ResultUnitEnum.HSV_UNIT.getUnit(), false);