|
|
@ -40,22 +40,26 @@ public class IcdFileConfigServiceImpl implements IcdFileConfigService {
|
|
|
|
config.getIedName(), config.getLdeviceInst(), config.getLnClass());
|
|
|
|
config.getIedName(), config.getLdeviceInst(), config.getLnClass());
|
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
|
repository.save(config);
|
|
|
|
repository.save(config);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
config.setId(list.get(0).getId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (config.getAttMap() != null) {
|
|
|
|
attRepository.deleteByIcdConfigTypeId(config.getId());
|
|
|
|
Collection<IcdConfigTypeAtt> attList = config.getAttMap().values();
|
|
|
|
if (config.getAttMap() != null) {
|
|
|
|
for (IcdConfigTypeAtt item : attList) {
|
|
|
|
Collection<IcdConfigTypeAtt> attList = config.getAttMap().values();
|
|
|
|
item.setIcdConfigTypeId(config.getId());
|
|
|
|
for (IcdConfigTypeAtt item : attList) {
|
|
|
|
}
|
|
|
|
item.setIcdConfigTypeId(config.getId());
|
|
|
|
attRepository.saveAll(attList);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
attRepository.saveAll(attList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (config.getInstMap() != null) {
|
|
|
|
instRepository.deleteByIcdConfigTypeId(config.getId());
|
|
|
|
Collection<IcdConfigTypeInst> instList = config.getInstMap().values();
|
|
|
|
if (config.getInstMap() != null) {
|
|
|
|
for (IcdConfigTypeInst item : instList) {
|
|
|
|
Collection<IcdConfigTypeInst> instList = config.getInstMap().values();
|
|
|
|
item.setIcdConfigTypeId(config.getId());
|
|
|
|
for (IcdConfigTypeInst item : instList) {
|
|
|
|
}
|
|
|
|
item.setIcdConfigTypeId(config.getId());
|
|
|
|
instRepository.saveAll(instList);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
instRepository.saveAll(instList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|