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"),