From dfd38dbb248e5e6fd65659b9e23f461c4ecf2b26 Mon Sep 17 00:00:00 2001 From: cdf <857448963@qq.com> Date: Mon, 15 Apr 2024 19:20:33 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8A=80=E6=9C=AF=E7=9B=91=E7=9D=A3=E8=AE=A1?= =?UTF-8?q?=E5=88=92bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SupvPushGwServiceImpl.java | 31 +++++++++++++++++-- .../njcn/system/enums/DicDataTypeEnum.java | 5 +++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java index 9bd14567d..391ff0aa1 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java @@ -84,7 +84,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { @Value("${gw.url}") private String gwUrl; - + @Value("${gw.code}") private String code; @@ -112,6 +112,15 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { List supvObjTypeDicList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SUPV_OBJ_TYPE.getCode()).getData(); Map mapSubvObjType = supvObjTypeDicList.stream().collect(Collectors.toMap(DictData::getId, Function.identity())); + + List supvEvaluationReportList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.evaluation_report.getCode()).getData(); + Map mapSupvEvaluationReport = supvEvaluationReportList.stream().collect(Collectors.toMap(DictData::getId, Function.identity())); + + List supvUserClassList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.user_class.getCode()).getData(); + Map mapSupvUserClass = supvUserClassList.stream().collect(Collectors.toMap(DictData::getId, Function.identity())); + + + List supvVoltageDicList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData(); Map mapVoltage = supvVoltageDicList.stream().collect(Collectors.toMap(DictData::getId, Function.identity())); @@ -181,10 +190,26 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { } //监督对象类型 - if (mapSubvObjType.containsKey(supvPlan.getSupvObjType())) { - supvPlan.setSupvObjType(String.format("%02d", mapSubvObjType.get(supvPlan.getSupvObjType()).getAlgoDescribe())); + if(StrUtil.isNotBlank(supvPlan.getSupvObjType())){ + if(supvPlan.getSupvType().equals("01")){ + + }else if(supvPlan.getSupvType().equals("02")){ + supvPlan.setSupvObjType(mapSubvObjType.get(supvPlan.getSupvObjType()).getValue()); + }else if(supvPlan.getSupvType().equals("03")){ + supvPlan.setSupvObjType(mapSupvUserClass.get(supvPlan.getSupvObjType()).getValue()); + }else if(supvPlan.getSupvType().equals("04")){ + + }else if(supvPlan.getSupvType().equals("05")){ + + }else if(supvPlan.getSupvType().equals("06")){ + supvPlan.setSupvObjType(mapSupvEvaluationReport.get(supvPlan.getSupvObjType()).getValue()); + } + if (mapSubvObjType.containsKey(supvPlan.getSupvObjType())) { + supvPlan.setSupvObjType(String.format("%02d", mapSubvObjType.get(supvPlan.getSupvObjType()).getAlgoDescribe())); + } } + //电站等级 if (mapVoltage.containsKey(supvPlan.getSubstationVoltageLevel())) { supvPlan.setSubstationVoltageLevelName(mapVoltage.get(supvPlan.getSubstationVoltageLevel()).getName()); diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java b/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java index 64df5691e..508b7ed99 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/enums/DicDataTypeEnum.java @@ -92,6 +92,11 @@ public enum DicDataTypeEnum { DEVICE_USERNATURE("设备使用性质代码","Device_UseNature"), SUPV_TYPE("监督类型","supv_type"), SUPV_OBJ_TYPE("监督对象类型","supv_obj_type"), + + evaluation_report("评估用户或报告分类编码","evaluation_report"), + + user_class("用户分类","user_class"), + SUPV_STAGE("监督阶段","supv_stage"), EFFECT_STATUS("实施状态","effect_status"), MONITOR_TYPE("监督监测点类型","monitor_type"),