From 759cfd9a775c62160f5348cae023e97c71fbd05f Mon Sep 17 00:00:00 2001 From: "CITE\\amentis" Date: Thu, 29 Aug 2024 13:35:57 +0300 Subject: [PATCH] import json small fixes --- .../opencdmp/service/description/DescriptionServiceImpl.java | 2 +- .../main/java/org/opencdmp/service/plan/PlanServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/core/src/main/java/org/opencdmp/service/description/DescriptionServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/description/DescriptionServiceImpl.java index 96719ab3c..cd6e15f6e 100644 --- a/backend/core/src/main/java/org/opencdmp/service/description/DescriptionServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/description/DescriptionServiceImpl.java @@ -1769,8 +1769,8 @@ public class DescriptionServiceImpl implements DescriptionService { persist.setTypeId(referenceTypeEntity.getId()); if (referenceEntity == null) { - persist.setLabel(model.getLabel()); persist.setReference(!this.conventionService.isNullOrEmpty(model.getReference()) ? model.getReference() : UUID.randomUUID().toString()); + persist.setLabel(!this.conventionService.isNullOrEmpty(model.getLabel()) ? model.getLabel() : persist.getReference()); persist.setSource("internal"); persist.setSourceType(ReferenceSourceType.Internal); } else { diff --git a/backend/core/src/main/java/org/opencdmp/service/plan/PlanServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/plan/PlanServiceImpl.java index 2b5614af2..e8c0f267d 100644 --- a/backend/core/src/main/java/org/opencdmp/service/plan/PlanServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/plan/PlanServiceImpl.java @@ -2740,8 +2740,8 @@ public class PlanServiceImpl implements PlanService { persist.setTypeId(referenceTypeEntity.getId()); if (referenceEntity == null) { - persist.setLabel(model.getLabel()); persist.setReference(!this.conventionService.isNullOrEmpty(model.getReference()) ? model.getReference() : UUID.randomUUID().toString()); + persist.setLabel(!this.conventionService.isNullOrEmpty(model.getLabel()) ? model.getLabel() : persist.getReference()); persist.setSource("internal"); persist.setSourceType(ReferenceSourceType.Internal); } else { @@ -2818,7 +2818,7 @@ public class PlanServiceImpl implements PlanService { PlanContactPersist persist = new PlanContactPersist(); persist.setEmail(commonModel.getEmail()); - persist.setFirstName(commonModel.getEmail()); + persist.setFirstName(commonModel.getFirstName()); persist.setLastName(commonModel.getLastName()); return persist;