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());

View File

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