Commit 4b45662d authored by linruibiao's avatar linruibiao

接口编写

parent 3c103baf
......@@ -278,6 +278,8 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
where.eq(BaseEntity::getRecordStatus, SlmConstants.DATA_VALID);
where.eq(InstrumentPanelConfig::getPanelId, panelId);
List<InstrumentPanelConfig> configs = baseMapper.selectList(where);
String waitPublished =null;
String published=null;
if(CollectionUtils.isNotEmpty(configs)){
InstrumentPanelConfig waitConfig = configs.stream()
.filter(x -> PublishedStatus.WAIT_PUBLISHED.value.equals(x.getPublished()))
......@@ -285,7 +287,7 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
.orElse(null);
if(ObjectUtils.isNotEmpty(waitConfig)){
try {
maps.put(PublishedStatus.WAIT_PUBLISHED.value,URLDecoder.decode(waitConfig.getConfigDetails(),StandardCharsets.UTF_8.name()));
waitPublished = URLDecoder.decode(waitConfig.getConfigDetails(), StandardCharsets.UTF_8.name());
}catch (Exception e){
e.printStackTrace();
}
......@@ -296,12 +298,14 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
.orElse(null);
if(ObjectUtils.isNotEmpty(publishConfig)){
try {
maps.put(PublishedStatus.PUBLISHED.value,URLDecoder.decode(publishConfig.getConfigDetails(),StandardCharsets.UTF_8.name()));
published = URLDecoder.decode(publishConfig.getConfigDetails(), StandardCharsets.UTF_8.name());
}catch (Exception e){
e.printStackTrace();
}
}
}
maps.put(PublishedStatus.WAIT_PUBLISHED.value,waitPublished);
maps.put(PublishedStatus.PUBLISHED.value,published);
return maps;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment