Commit 9ed069eb authored by linruibiao's avatar linruibiao

Merge remote-tracking branch 'origin/develop' into develop

parents 7145d3f1 4a762af8
......@@ -49,10 +49,10 @@ public class InstrumentPanelInitServiceImpl extends ServiceImpl<InstrumentPanelM
@Value("${initPanelName2:售后服务综合看板}")
private String initPanelName2;
@Value("${initConfigId1:82752b5ba8b2bd379c771a72c83f4b3a}")
@Value("${initConfigId1:e5138f8a54415a3bac86e2be638e09c8}")
private String initConfig1 ;
@Value("${initConfigId2:29727c771a6fcb492d206a9e811e585d}")
@Value("${initConfigId2:1fffa826bc6ed38031288e2ef7a2173d}")
private String initConfig2;
@Autowired
......@@ -107,12 +107,12 @@ public class InstrumentPanelInitServiceImpl extends ServiceImpl<InstrumentPanelM
one= panelGroupService.getById(groupId);
}
init(appId, one, initConfig1, initPanelName1);
init(appId, one, initConfig2, initPanelName2);
init(queryAppId, one, initConfig1, initPanelName1);
init(queryAppId, one, initConfig2, initPanelName2);
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