diff --git a/detection/src/main/java/com/njcn/gather/script/pojo/param/PqScriptDtlsParam.java b/detection/src/main/java/com/njcn/gather/script/pojo/param/PqScriptDtlsParam.java index 27166c09..f7233c03 100644 --- a/detection/src/main/java/com/njcn/gather/script/pojo/param/PqScriptDtlsParam.java +++ b/detection/src/main/java/com/njcn/gather/script/pojo/param/PqScriptDtlsParam.java @@ -77,6 +77,11 @@ public class PqScriptDtlsParam { */ private String valueType; + /** + * 检测指标类型父id + */ + private String pid; + /** * 数据类型,来源于字典表,包括实时数据(3s)、分钟统计数据(1min/3min/5min/10min)等 */ 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 409a75d5..40314a49 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 @@ -381,12 +381,13 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl ids = checkDataList.stream().map(PqScriptDtlsParam.CheckData::getValueType).collect(Collectors.toList()); List dictTreeById = dictTreeService.getDictTreeById(ids); - Map dicTreeMap = dictTreeById.stream().collect(Collectors.toMap(DictTree::getId, DictTree::getCode)); + Map 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 channelList = sourceIssue.getChannelList(); List list; switch (codeEnum) { @@ -398,6 +399,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl - - - - - - - - - - - - - - - - - Id,Script_Id,Index, - Value_Type,Data_Type,Phase, - Value,HarmNum,Enable - -