Commit 4b45662d authored by linruibiao's avatar linruibiao

接口编写

parent 3c103baf
...@@ -278,6 +278,8 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane ...@@ -278,6 +278,8 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
where.eq(BaseEntity::getRecordStatus, SlmConstants.DATA_VALID); where.eq(BaseEntity::getRecordStatus, SlmConstants.DATA_VALID);
where.eq(InstrumentPanelConfig::getPanelId, panelId); where.eq(InstrumentPanelConfig::getPanelId, panelId);
List<InstrumentPanelConfig> configs = baseMapper.selectList(where); List<InstrumentPanelConfig> configs = baseMapper.selectList(where);
String waitPublished =null;
String published=null;
if(CollectionUtils.isNotEmpty(configs)){ if(CollectionUtils.isNotEmpty(configs)){
InstrumentPanelConfig waitConfig = configs.stream() InstrumentPanelConfig waitConfig = configs.stream()
.filter(x -> PublishedStatus.WAIT_PUBLISHED.value.equals(x.getPublished())) .filter(x -> PublishedStatus.WAIT_PUBLISHED.value.equals(x.getPublished()))
...@@ -285,7 +287,7 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane ...@@ -285,7 +287,7 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
.orElse(null); .orElse(null);
if(ObjectUtils.isNotEmpty(waitConfig)){ if(ObjectUtils.isNotEmpty(waitConfig)){
try { 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){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
...@@ -296,12 +298,14 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane ...@@ -296,12 +298,14 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
.orElse(null); .orElse(null);
if(ObjectUtils.isNotEmpty(publishConfig)){ if(ObjectUtils.isNotEmpty(publishConfig)){
try { 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){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
maps.put(PublishedStatus.WAIT_PUBLISHED.value,waitPublished);
maps.put(PublishedStatus.PUBLISHED.value,published);
return maps; 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