1.微调
This commit is contained in:
@@ -77,6 +77,11 @@ public class PqScriptDtlsParam {
|
||||
*/
|
||||
private String valueType;
|
||||
|
||||
/**
|
||||
* 检测指标类型父id
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 数据类型,来源于字典表,包括实时数据(3s)、分钟统计数据(1min/3min/5min/10min)等
|
||||
*/
|
||||
|
||||
@@ -381,12 +381,13 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
if (CollUtil.isNotEmpty(checkDataList)) {
|
||||
List<String> ids = checkDataList.stream().map(PqScriptDtlsParam.CheckData::getValueType).collect(Collectors.toList());
|
||||
List<DictTree> dictTreeById = dictTreeService.getDictTreeById(ids);
|
||||
Map<String, String> dicTreeMap = dictTreeById.stream().collect(Collectors.toMap(DictTree::getId, DictTree::getCode));
|
||||
Map<String, DictTree> dicTreeMap = dictTreeById.stream().collect(Collectors.toMap(DictTree::getId,Function.identity()));
|
||||
PqScriptDtlsParam.CheckData checkData;
|
||||
for (PqScriptDtlsParam.CheckData channelListDTO : checkDataList) {
|
||||
if (dicTreeMap.containsKey(channelListDTO.getValueType())) {
|
||||
String code = dicTreeMap.get(channelListDTO.getValueType());
|
||||
DetectionCodeEnum codeEnum = DetectionCodeEnum.getDetectionCodeByCode(code);
|
||||
DictTree dictTree = dicTreeMap.get(channelListDTO.getValueType());
|
||||
channelListDTO.setPid(dictTree.getPid());
|
||||
DetectionCodeEnum codeEnum = DetectionCodeEnum.getDetectionCodeByCode(dictTree.getCode());
|
||||
List<PqScriptDtlsParam.ChannelListDTO> channelList = sourceIssue.getChannelList();
|
||||
List<PqScriptDtlsParam.ChannelListDTO> list;
|
||||
switch (codeEnum) {
|
||||
@@ -398,6 +399,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setPhase("T");
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
break;
|
||||
case U1:
|
||||
@@ -418,6 +420,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setPhase(listDTO.getChannelType().substring(1, 2));
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
}
|
||||
}
|
||||
@@ -433,6 +436,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setPhase(listDTO.getChannelType().substring(1, 2));
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
}
|
||||
}
|
||||
@@ -476,6 +480,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setPhase(listDTO.getChannelType().substring(1, 2));
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
|
||||
}
|
||||
@@ -506,6 +511,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setPhase(listDTO.getChannelType().substring(1, 2));
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
}
|
||||
break;
|
||||
@@ -519,6 +525,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setPhase(listDTO.getChannelType().substring(1, 2));
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
}
|
||||
break;
|
||||
@@ -539,7 +546,6 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
break;
|
||||
case PST:
|
||||
break;
|
||||
|
||||
case I1:
|
||||
break;
|
||||
case UNKNOWN_ERROR:
|
||||
@@ -606,6 +612,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setPhase("T");
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
}
|
||||
}
|
||||
@@ -620,6 +627,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setPhase(listDTO.getChannelType().substring(1, 2));
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
}
|
||||
}
|
||||
@@ -638,6 +646,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setHarmNum(inharmModel.getInharm());
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
}
|
||||
}
|
||||
@@ -658,6 +667,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setHarmNum(harmModel.getHarm());
|
||||
checkData.setDataType(channelListDTO.getDataType());
|
||||
checkData.setValueType(channelListDTO.getValueType());
|
||||
checkData.setPid(channelListDTO.getPid());
|
||||
info.add(checkData);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user