fix 修改资源实例未展示模型关系
parent
b6088a779e
commit
89efe085c9
|
@ -984,6 +984,17 @@ public class InstanceServiceImpl implements InstanceService {
|
||||||
}
|
}
|
||||||
instanceHistoryHelper.history(instance, InstanceEnum.catalog.INSTANCE.name(),
|
instanceHistoryHelper.history(instance, InstanceEnum.catalog.INSTANCE.name(),
|
||||||
InstanceEnum.category.MODIFY.name(), userId);
|
InstanceEnum.category.MODIFY.name(), userId);
|
||||||
|
|
||||||
|
// 修改资源实例重新创建模型实例关联关系
|
||||||
|
List<ModuleRelation> relations = moduleRelationRepository.queryByModuleId(instance.getModuleId());
|
||||||
|
for (ModuleRelation relation : relations) {
|
||||||
|
String relationTable =
|
||||||
|
CmdbUtils.CMDB_INSTANCE_RELATION + relation.getRelationCategoryCode().toLowerCase();
|
||||||
|
instanceRelationRepository.removeByInstanceId(instance.getId(), instance.getModuleId(), relationTable, userId);
|
||||||
|
}
|
||||||
|
// 触发与已有实例之间绑定关系的任务
|
||||||
|
instanceAutoRelationService.instanceAutoRelation(instance, userId);
|
||||||
|
|
||||||
// 操作审计
|
// 操作审计
|
||||||
instanceValues = instanceValueRepository.listByInstanceId(instance.getId(), valueTable);
|
instanceValues = instanceValueRepository.listByInstanceId(instance.getId(), valueTable);
|
||||||
instanceValues.forEach(item -> {
|
instanceValues.forEach(item -> {
|
||||||
|
|
Loading…
Reference in New Issue