reference fixes

This commit is contained in:
CITE\amentis 2024-08-01 12:50:56 +03:00
parent a0f7621f60
commit 811eb4eddd
3 changed files with 8 additions and 5 deletions

View File

@ -745,6 +745,7 @@ public class DescriptionServiceImpl implements DescriptionService {
referenceEntity = new ReferenceEntity();
referenceEntity.setId(UUID.randomUUID());
referenceEntity.setLabel(referencePersist.getLabel());
referenceEntity.setDescription(referencePersist.getDescription());
referenceEntity.setIsActive(IsActive.Active);
referenceEntity.setCreatedAt(Instant.now());
referenceEntity.setTypeId(fieldEntity.getReferenceTypeId());
@ -882,7 +883,7 @@ public class DescriptionServiceImpl implements DescriptionService {
data.setCode(persist.getCode());
data.setDataType(persist.getDataType());
data.setCode(persist.getCode());
data.setValue(persist.getValue());
return data;
}

View File

@ -1093,6 +1093,7 @@ public class PlanServiceImpl implements PlanService {
referenceEntity = new ReferenceEntity();
referenceEntity.setId(UUID.randomUUID());
referenceEntity.setLabel(referencePersist.getLabel());
referenceEntity.setDescription(referencePersist.getDescription());
referenceEntity.setIsActive(IsActive.Active);
referenceEntity.setCreatedAt(Instant.now());
referenceEntity.setTypeId(fieldEntity.getReferenceTypeId());
@ -1179,7 +1180,7 @@ public class PlanServiceImpl implements PlanService {
if (!this.conventionService.isListNullOrEmpty(persist.getFields())){
data.setFields(new ArrayList<>());
for (FieldPersist fieldPersist: persist.getFields()) {
data.getFields().add(this.buildPlanContactEntity(fieldPersist));
data.getFields().add(this.buildFieldEntity(fieldPersist));
}
}
@ -1193,13 +1194,13 @@ public class PlanServiceImpl implements PlanService {
return data;
}
private @NotNull FieldEntity buildPlanContactEntity(FieldPersist persist){
private @NotNull FieldEntity buildFieldEntity(FieldPersist persist){
FieldEntity data = new FieldEntity();
if (persist == null) return data;
data.setCode(persist.getCode());
data.setDataType(persist.getDataType());
data.setCode(persist.getCode());
data.setValue(persist.getValue());
return data;
}

View File

@ -223,6 +223,7 @@ public class UserServiceImpl implements UserService {
referenceEntity = new ReferenceEntity();
referenceEntity.setId(UUID.randomUUID());
referenceEntity.setLabel(model.getLabel());
referenceEntity.setDescription(model.getDescription());
referenceEntity.setIsActive(IsActive.Active);
referenceEntity.setCreatedAt(Instant.now());
referenceEntity.setTypeId(model.getTypeId());
@ -272,7 +273,7 @@ public class UserServiceImpl implements UserService {
data.setCode(persist.getCode());
data.setDataType(persist.getDataType());
data.setCode(persist.getCode());
data.setValue(persist.getValue());
return data;
}