From 84879b8d18f7b4265f6ebf942ca7be417d8176e1 Mon Sep 17 00:00:00 2001 From: wr <1754607820@qq.com> Date: Fri, 21 Feb 2025 15:59:29 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/pojo/param/PqScriptDtlsParam.java | 5 ++++ .../service/impl/PqScriptDtlsServiceImpl.java | 18 ++++++++++---- .../mapper/PqScriptCheckdataMapper.xml | 24 ------------------- 3 files changed, 19 insertions(+), 28 deletions(-) delete mode 100644 detection/src/main/resources/mapper/PqScriptCheckdataMapper.xml 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 - -