1.技术监督计划bug修改

This commit is contained in:
cdf
2024-04-15 19:20:33 +08:00
parent f8d77e4e5c
commit dfd38dbb24
2 changed files with 33 additions and 3 deletions

View File

@@ -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<DictData> supvObjTypeDicList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SUPV_OBJ_TYPE.getCode()).getData();
Map<String, DictData> mapSubvObjType = supvObjTypeDicList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
List<DictData> supvEvaluationReportList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.evaluation_report.getCode()).getData();
Map<String, DictData> mapSupvEvaluationReport = supvEvaluationReportList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
List<DictData> supvUserClassList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.user_class.getCode()).getData();
Map<String, DictData> mapSupvUserClass = supvUserClassList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
List<DictData> supvVoltageDicList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
Map<String, DictData> 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());