微调
This commit is contained in:
@@ -113,7 +113,7 @@ public class DetectionServiceImpl {
|
||||
*/
|
||||
case HV:
|
||||
AdHarmonicResult harmV = isHarmQualified(dev, devIdMapComm, errDtlsCheckData, U, sourceIssue, dataRule, 2);
|
||||
if (ObjectUtil.isNull(harmV)) {
|
||||
if (ObjectUtil.isNotNull(harmV)) {
|
||||
detectionDataDealService.acceptAdResult(Arrays.asList(harmV), code);
|
||||
return harmV.getResultFlag();
|
||||
}
|
||||
@@ -123,7 +123,7 @@ public class DetectionServiceImpl {
|
||||
*/
|
||||
case HI:
|
||||
AdHarmonicResult harmI = isHarmQualified(dev, devIdMapComm, errDtlsCheckData, I, sourceIssue, dataRule, 2);
|
||||
if (ObjectUtil.isNull(harmI)) {
|
||||
if (ObjectUtil.isNotNull(harmI)) {
|
||||
detectionDataDealService.acceptAdResult(Arrays.asList(harmI), code);
|
||||
return harmI.getResultFlag();
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class DetectionServiceImpl {
|
||||
*/
|
||||
case HSV:
|
||||
AdHarmonicResult harmInV = isHarmQualified(dev, devIdMapComm, errDtlsCheckData, U, sourceIssue, dataRule, 1);
|
||||
if (ObjectUtil.isNull(harmInV)) {
|
||||
if (ObjectUtil.isNotNull(harmInV)) {
|
||||
detectionDataDealService.acceptAdResult(Arrays.asList(harmInV), code);
|
||||
return harmInV.getResultFlag();
|
||||
}
|
||||
@@ -143,7 +143,7 @@ public class DetectionServiceImpl {
|
||||
*/
|
||||
case HSI:
|
||||
AdHarmonicResult harmInI = isHarmQualified(dev, devIdMapComm, errDtlsCheckData, I, sourceIssue, dataRule, 1);
|
||||
if (ObjectUtil.isNull(harmInI)) {
|
||||
if (ObjectUtil.isNotNull(harmInI)) {
|
||||
detectionDataDealService.acceptAdResult(Arrays.asList(harmInI), code);
|
||||
return harmInI.getResultFlag();
|
||||
}
|
||||
@@ -153,7 +153,7 @@ public class DetectionServiceImpl {
|
||||
*/
|
||||
case IMBV:
|
||||
AdNonHarmonicResult vUnban = isUnBalanceOrFlickerQualified(dev, devIdMapComm, errDtlsCheckData, U, sourceIssue, dataRule, "V_UNBAN");
|
||||
if (ObjectUtil.isNull(vUnban)) {
|
||||
if (ObjectUtil.isNotNull(vUnban)) {
|
||||
detectionDataDealService.acceptAdNonResult(Arrays.asList(vUnban), code);
|
||||
return vUnban.getResultFlag();
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class DetectionServiceImpl {
|
||||
*/
|
||||
case IMBA:
|
||||
AdNonHarmonicResult iUnban = isUnBalanceOrFlickerQualified(dev, devIdMapComm, errDtlsCheckData, I, sourceIssue, dataRule, "I_UNBAN");
|
||||
if (ObjectUtil.isNull(iUnban)) {
|
||||
if (ObjectUtil.isNotNull(iUnban)) {
|
||||
detectionDataDealService.acceptAdNonResult(Arrays.asList(iUnban), code);
|
||||
return iUnban.getResultFlag();
|
||||
}
|
||||
@@ -173,7 +173,7 @@ public class DetectionServiceImpl {
|
||||
*/
|
||||
case HP:
|
||||
AdHarmonicResult harmP = isHarmQualified(dev, devIdMapComm, errDtlsCheckData, P, sourceIssue, dataRule, 2);
|
||||
if (ObjectUtil.isNull(harmP)) {
|
||||
if (ObjectUtil.isNotNull(harmP)) {
|
||||
detectionDataDealService.acceptAdResult(Arrays.asList(harmP), code);
|
||||
return harmP.getResultFlag();
|
||||
}
|
||||
@@ -183,7 +183,7 @@ public class DetectionServiceImpl {
|
||||
*/
|
||||
case F:
|
||||
AdNonHarmonicResult pst = isUnBalanceOrFlickerQualified(dev, devIdMapComm, errDtlsCheckData, null, sourceIssue, dataRule, "PST");
|
||||
if (ObjectUtil.isNull(pst)) {
|
||||
if (ObjectUtil.isNotNull(pst)) {
|
||||
detectionDataDealService.acceptAdNonResult(Arrays.asList(pst), code);
|
||||
return pst.getResultFlag();
|
||||
}
|
||||
|
||||
@@ -129,6 +129,8 @@ public class ResultServiceImpl implements IResultService {
|
||||
.ne(PqScriptDtls::getIndex, -1)
|
||||
.eq(PqScriptDtls::getEnable, DataStateEnum.ENABLE.getCode())
|
||||
);
|
||||
Map<Integer, Set<Integer>> resultMap = new HashMap<>(5);
|
||||
if(StrUtil.isNotBlank(param.getDevId())){
|
||||
List<AdBaseResult> allResultList = new ArrayList<>();
|
||||
List<Integer> indexList = new ArrayList<>();
|
||||
if (StrUtil.isNotBlank(param.getScriptType())) {
|
||||
@@ -136,10 +138,10 @@ public class ResultServiceImpl implements IResultService {
|
||||
}
|
||||
allResultList.addAll(adNonHarmonicService.get(param.getScriptId(), indexList, param.getDevId(), param.getDevNum(), param.getCode()));
|
||||
allResultList.addAll(adHarmonicService.get(param.getScriptId(), indexList, param.getDevId(), param.getDevNum(), param.getCode()));
|
||||
Map<Integer, Set<Integer>> resultMap = new HashMap<>(5);
|
||||
if (CollUtil.isNotEmpty(allResultList)) {
|
||||
resultMap = allResultList.stream().collect(Collectors.groupingBy(AdBaseResult::getSort, Collectors.mapping(AdBaseResult::getResultFlag, Collectors.toSet())));
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, List<PqScriptDtls>> dtlsSortMap = dtlsList.stream()
|
||||
.sorted(Comparator.comparing(PqScriptDtls::getIndex))
|
||||
@@ -179,15 +181,15 @@ public class ResultServiceImpl implements IResultService {
|
||||
.collect(Collectors.groupingBy(PqScriptDtls::getIndex, LinkedHashMap::new, Collectors.toList()));
|
||||
List<TreeDataVO> subTypeList = new ArrayList<>();
|
||||
indexMap.forEach((index, scriptDtlIndexList) -> {
|
||||
if (finalResultMap.containsKey(index)) {
|
||||
TreeDataVO dtlType = new TreeDataVO();
|
||||
dtlType.setIndex(index);
|
||||
dtlType.setScriptType(scriptDtlIndexList.get(0).getScriptType());
|
||||
ratedScriptTypeName(scriptDtlIndexList, isValueType, dtlType, dictTree);
|
||||
dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList, isValueType).toString());
|
||||
if (finalResultMap.containsKey(index)) {
|
||||
dtlType.setFly(conform(finalResultMap.get(index)));
|
||||
subTypeList.add(dtlType);
|
||||
}
|
||||
subTypeList.add(dtlType);
|
||||
});
|
||||
if (CollUtil.isNotEmpty(subTypeList)) {
|
||||
subType.setChildren(subTypeList);
|
||||
@@ -221,7 +223,6 @@ public class ResultServiceImpl implements IResultService {
|
||||
.sorted(Comparator.comparing(PqScriptDtls::getIndex))
|
||||
.collect(Collectors.groupingBy(PqScriptDtls::getIndex, LinkedHashMap::new, Collectors.toList()));
|
||||
indexMap.forEach((index, scriptDtlIndexList) -> {
|
||||
if (finalResultMap.containsKey(index)) {
|
||||
TreeDataVO dtlType = new TreeDataVO();
|
||||
dtlType.setIndex(index);
|
||||
if ("Harm".equals(subKey)) {
|
||||
@@ -234,10 +235,10 @@ public class ResultServiceImpl implements IResultService {
|
||||
freqScriptTypeName(scriptDtlIndexList, dictTree, isValueType, dtlType);
|
||||
}
|
||||
dtlType.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList, isValueType).toString());
|
||||
if (finalResultMap.containsKey(index)) {
|
||||
dtlType.setFly(conform(finalResultMap.get(index)));
|
||||
subTypeList.add(dtlType);
|
||||
}
|
||||
|
||||
subTypeList.add(dtlType);
|
||||
});
|
||||
if (CollUtil.isNotEmpty(subTypeList)) {
|
||||
treeDataVO.setChildren(subTypeList);
|
||||
@@ -269,7 +270,6 @@ public class ResultServiceImpl implements IResultService {
|
||||
vo.setScriptTypeName(name);
|
||||
TreeDataVO dlt;
|
||||
for (PqScriptDtls dtls : dip) {
|
||||
if (finalResultMap.containsKey(dtls.getIndex())) {
|
||||
dlt = new TreeDataVO();
|
||||
List<PqScriptDtls> scriptDtlIndexList = subValue.stream().filter(x -> dtls.getIndex().equals(x.getIndex())).collect(Collectors.toList());
|
||||
//特征幅值=20%Un,持续时间=1周波
|
||||
@@ -277,9 +277,10 @@ public class ResultServiceImpl implements IResultService {
|
||||
dlt.setIndex(dtls.getIndex());
|
||||
dlt.setScriptType(scriptDtlIndexList.get(0).getScriptType());
|
||||
dlt.setSourceDesc(ScriptDtlsDesc.getStringBuffer(scriptDtlIndexList, isValueType).toString());
|
||||
if (finalResultMap.containsKey(dtls.getIndex())) {
|
||||
dlt.setFly(conform(finalResultMap.get(dtls.getIndex())));
|
||||
info.add(dlt);
|
||||
}
|
||||
info.add(dlt);
|
||||
|
||||
}
|
||||
if (CollUtil.isNotEmpty(info)) {
|
||||
|
||||
Reference in New Issue
Block a user