Commit 863c94e7 authored by 梁光意's avatar 梁光意

修复获取不到仪表盘配置接口,获取不到分组名称的问题

parent c5234716
...@@ -57,6 +57,9 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane ...@@ -57,6 +57,9 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
@Autowired @Autowired
private InstrumentPanelDraftService draftService; private InstrumentPanelDraftService draftService;
@Autowired
private InstrumentPanelGroupService panelGroupService;
@Override @Override
@Transactional(readOnly = true) @Transactional(readOnly = true)
public InstrumentPanelConfigVo getPublishConfigByPanelId(@NotNull String instrumentPanelId) { public InstrumentPanelConfigVo getPublishConfigByPanelId(@NotNull String instrumentPanelId) {
...@@ -339,10 +342,12 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane ...@@ -339,10 +342,12 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
if (PublishedStatus.PUBLISHED.value.equals(published.value)) { if (PublishedStatus.PUBLISHED.value.equals(published.value)) {
InstrumentPanelDraft panel = draftService.getByPanelId(instrumentPanelId); InstrumentPanelDraft panel = draftService.getByPanelId(instrumentPanelId);
BeanUtils.copyProperties(panel, panelVo); BeanUtils.copyProperties(panel, panelVo);
panelVo.setGroupName(panelGroupService.getById(panel.getGroupId()).getName());
} else { } else {
InstrumentPanel panel = panelService.getById(instrumentPanelId); InstrumentPanel panel = panelService.getById(instrumentPanelId);
BeanUtils.copyProperties(panel, panelVo); BeanUtils.copyProperties(panel, panelVo);
vo.setPanelId(instrumentPanelId); vo.setPanelId(instrumentPanelId);
panelVo.setGroupName(panelGroupService.getById(panel.getGroupId()).getName());
} }
vo.setPanel(panelVo); vo.setPanel(panelVo);
return vo; return vo;
......
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