Commit c88087cc authored by 梁光意's avatar 梁光意

修改初始化参数1

parent f6a04d4c
Pipeline #9540 passed with stages
in 1 minute 8 seconds
......@@ -112,7 +112,7 @@ public class InstrumentPanelInitServiceImpl extends ServiceImpl<InstrumentPanelM
return null;
}
private void init(String appId, InstrumentPanelGroup one, String initConfig, String initPanelName) {
private void init(String queryAppId, InstrumentPanelGroup one, String initConfig, String initPanelName) {
InstrumentPanelConfig panelConfig = configService.getById(initConfig);
String config;
try {
......@@ -127,20 +127,20 @@ public class InstrumentPanelInitServiceImpl extends ServiceImpl<InstrumentPanelM
where.likeRight(InstrumentPanelTree::getFullId, tree.getFullId() + ".");
where.orderByAsc(InstrumentPanelTree::getAssemblyKey);
List<InstrumentPanelTree> panelTrees = treeService.list(where);
configService.publish(appId, setConfig(one, appId, initPanelName, config, panelTrees));
configService.publish(queryAppId, setConfig(one, queryAppId, initPanelName, config, panelTrees));
}
private InstrumentPanelConfigDTO setConfig(InstrumentPanelGroup one , String appId, String panelName, String panelConfig, List<InstrumentPanelTree> panelTrees){
private InstrumentPanelConfigDTO setConfig(InstrumentPanelGroup one , String queryAppId, String panelName, String panelConfig, List<InstrumentPanelTree> panelTrees){
LambdaQueryWrapper<InstrumentPanel> where1 = new LambdaQueryWrapper<>();
where1.eq(BaseEntity::getAppId, appId);
where1.eq(InstrumentPanel::getName, initPanelName1);
where1.eq(BaseEntity::getAppId, queryAppId);
where1.eq(InstrumentPanel::getName, panelName);
where1.eq(BaseEntity::getRecordStatus, SlmConstants.DATA_VALID);
InstrumentPanel instrumentPanel = baseMapper.selectOne(where1);
if(ObjectUtils.isEmpty(instrumentPanel)) {
SaveInstrumentPanelDTO panelDto = new SaveInstrumentPanelDTO();
panelDto.setName(panelName);
panelDto.setGroupId(one.getId());
String panelId = panelService.savePanel(appId, panelDto);
String panelId = panelService.savePanel(queryAppId, panelDto);
instrumentPanel=baseMapper.selectById(panelId);
}
......
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