feat(REQ-3004) - 调整模型重复的校验逻辑

This commit is contained in:
wangli 2024-12-03 12:30:45 +08:00
parent e0fbfcf039
commit ef80fa98a1
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ public class AggregateModelServiceImpl implements AggregateModelService {
bpmnProcessModelService.updateBpmModel(dto);
// 如果没有表单字段就操作表单模型
if (Objects.nonNull(dto.getFormJsonModel()) && !CollectionUtils.isEmpty(dto.getFormJsonModel().getFormFields())) {
if (Objects.nonNull(dto.getFormJsonModel())) {
FormModelUpdateDTO formModel = new FormModelUpdateDTO();
formModel.setKey(dto.getKey());
formModel.setName(dto.getName());

View File

@ -106,7 +106,6 @@ public class FormModelServiceImpl implements FormModelService {
model.setMetaInfo(JSONUtil.toJsonStr(metaInfoMap));
model.setTenantId(dto.getTenantId());
repositoryService.saveModel(model);
FormDefinitionDTO formDefinition = new FormDefinitionDTO();
formDefinition.setKey(model.getKey());
@ -115,6 +114,7 @@ public class FormModelServiceImpl implements FormModelService {
formDefinition.setFields(dto.getFormFields());
repositoryService.addModelEditorSource(model.getId(), JSON.toJSONString(formDefinition).getBytes(StandardCharsets.UTF_8));
repositoryService.saveModel(model);
}
@Override