diff --git a/src/main/java/net/gepafin/tendermanagement/constants/GepafinConstant.java b/src/main/java/net/gepafin/tendermanagement/constants/GepafinConstant.java index 3170aafd..9010e157 100644 --- a/src/main/java/net/gepafin/tendermanagement/constants/GepafinConstant.java +++ b/src/main/java/net/gepafin/tendermanagement/constants/GepafinConstant.java @@ -237,6 +237,7 @@ public class GepafinConstant { public static final String EVALUATION_UPDATED_SUCCESSFULLY = "evaluation.updated.successfully"; public static final String EVALUATION_FETCHED_SUCCESSFULLY = "evaluation.fetched.successfully"; public static final String EVALUATION_DELETED_SUCCESSFULLY = "evaluation.deleted.successfully"; + public static final String GET_APPLICATION_EVALUATION_FORM_SUCCESS_MSG = "application.evaluation.form.get.success"; public static final String EVALUATIONS_FETCHED_SUCCESSFULLY = "evaluations.fetched.successfully"; public static final String APPLICATION_EVALUATION_NOT_FOUND = "application.evaluation.not.found"; public static final String APPLICATION_EVALUATION_STATUS_UPDATED_SUCCESSFULLY = "application.evaluation.status.updated.successfully"; @@ -402,6 +403,7 @@ public class GepafinConstant { public static final String EVALUATION_V2_STEP_2 = "EVALUATION_V2_STEP_2"; + public static final String EITHER_APPLICATION_ID_OR_ASSIGNED_APPLICATION_ID_MUST_BE_PROVIDED = "either.applicationId.or.assignedApplicationId.must.be.provided"; public static final String ASSIGNED_APPLICATION_STATUS_UPDATED_SUCCESSFULLY = "assigned.application.status.updated.successfully"; public static final String REQUIRED_REQUESTED_AMOUNT_MSG = "validation.required.requested.amount"; diff --git a/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java b/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java index 174313ca..794e7796 100644 --- a/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java +++ b/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java @@ -669,7 +669,7 @@ public class ApplicationDao { return documentIds; } - private List validateDocumentIds(String documentId) { + public List validateDocumentIds(String documentId) { if (documentId != null && !documentId.isEmpty()) { return Arrays.stream(documentId.split(",")) .map(Long::parseLong) diff --git a/src/main/java/net/gepafin/tendermanagement/dao/ApplicationEvaluationDao.java b/src/main/java/net/gepafin/tendermanagement/dao/ApplicationEvaluationDao.java index 74a14114..edb69587 100644 --- a/src/main/java/net/gepafin/tendermanagement/dao/ApplicationEvaluationDao.java +++ b/src/main/java/net/gepafin/tendermanagement/dao/ApplicationEvaluationDao.java @@ -12,10 +12,7 @@ import net.gepafin.tendermanagement.model.request.*; import net.gepafin.tendermanagement.model.response.*; import net.gepafin.tendermanagement.repositories.*; import net.gepafin.tendermanagement.service.*; -import net.gepafin.tendermanagement.util.DateTimeUtil; -import net.gepafin.tendermanagement.util.LoggingUtil; -import net.gepafin.tendermanagement.util.Utils; -import net.gepafin.tendermanagement.util.Validator; +import net.gepafin.tendermanagement.util.*; import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException; import net.gepafin.tendermanagement.web.rest.api.errors.ResourceNotFoundException; import net.gepafin.tendermanagement.web.rest.api.errors.Status; @@ -25,6 +22,7 @@ import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; +import java.text.MessageFormat; import java.time.Duration; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; @@ -32,6 +30,7 @@ import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; +import static net.gepafin.tendermanagement.util.Utils.log; import static net.gepafin.tendermanagement.util.Utils.setIfUpdated; @Component @@ -116,6 +115,30 @@ public class ApplicationEvaluationDao { @Autowired private HubService hubService; + @Autowired + private EvaluationFormService evaluationFormService; + + @Autowired + private EvaluationFormDao evaluationFormDao; + + @Autowired + private ApplicationEvaluationFormRepository applicationEvaluationFormRepository; + + @Autowired + private ApplicationEvaluationFormFieldRepository applicationEvaluationFormFieldRepository; + + @Autowired + private ApplicationDao applicationDao; + + @Autowired + private ApplicationEvaluationService applicationEvaluationService; + + @Autowired + private CallDao callDao; + + @Autowired + private EvaluationFormRepository evaluationFormRepository; + private ApplicationEvaluationEntity convertToEntity(UserEntity user, ApplicationEvaluationRequest req, Long assignedApplciationId) { ApplicationEvaluationEntity entity = new ApplicationEvaluationEntity(); @@ -1907,5 +1930,262 @@ public class ApplicationEvaluationDao { loggingUtil.addVersionHistory(VersionHistoryRequest.builder().request(request).actionType(VersionActionTypeEnum.UPDATE).oldData(oldApplicationEvaluation).newData(savedEntity).build()); return convertToResponse(savedEntity); } + + public ApplicationEvaluationResponseBean createApplicationEvaluation(HttpServletRequest request, ApplicationRequestBean applicationRequestBean, Long evaluationFormId, Long evaluationId){ + EvaluationFormEntity evaluationFormEntity = evaluationFormService.validateEvaluationForm(evaluationFormId); + validateFormFields(applicationRequestBean,evaluationFormEntity); + ApplicationEvaluationEntity applicationEvaluationEntity = validateApplicationEvaluation(evaluationId); + ApplicationEvaluationFormEntity applicationEvaluationFormEntity = getApplicationEvaluationFormOrCreate(evaluationFormEntity,applicationEvaluationEntity); + createOrUpdateMultipleFormFields(applicationRequestBean.getFormFields(), applicationEvaluationFormEntity, evaluationFormEntity); + return getEvaluationById(applicationEvaluationEntity.getId(),evaluationFormEntity.getId()); + } + + private ApplicationEvaluationFormEntity getApplicationEvaluationFormOrCreate(EvaluationFormEntity evaluationFormEntity, ApplicationEvaluationEntity applicationEvaluationEntity) { + + ApplicationEvaluationFormEntity applicationEvaluationFormEntity = applicationEvaluationFormRepository.findByEvaluationIdAndEvaluationFormId(applicationEvaluationEntity.getId(), evaluationFormEntity.getId()); + ApplicationEvaluationFormEntity oldApplicationEvaluationFormEntity = Utils.getClonedEntityForData(applicationEvaluationFormEntity); + if (applicationEvaluationFormEntity == null) { + applicationEvaluationFormEntity = createApplicationEvaluationFormEntity(applicationEvaluationEntity, evaluationFormEntity); + + /** This code is responsible for adding a version history log for the "Create application evalaution form" operation. **/ + loggingUtil.addVersionHistory( + VersionHistoryRequest.builder().request(request).actionType(VersionActionTypeEnum.INSERT).oldData(oldApplicationEvaluationFormEntity).newData(applicationEvaluationFormEntity) + .build()); + } + return applicationEvaluationFormEntity; + } + + public ApplicationEvaluationFormEntity createApplicationEvaluationFormEntity(ApplicationEvaluationEntity applicationEvaluationEntity, EvaluationFormEntity evaluationFormEntity) { + ApplicationEvaluationFormEntity applicationEvaluationFormEntity = new ApplicationEvaluationFormEntity(); + applicationEvaluationFormEntity.setApplicationId(applicationEvaluationEntity.getApplicationId()); + applicationEvaluationFormEntity.setEvaluationForm(evaluationFormEntity); + applicationEvaluationFormEntity.setApplicationEvaluation(applicationEvaluationEntity); + applicationEvaluationFormEntity.setIsDeleted(false); + return saveApplicationEvaluationFormEntity(applicationEvaluationFormEntity); + } + + public void validateFormFields(ApplicationRequestBean request, EvaluationFormEntity evaluationFormEntity) { + + List contentResponseBeans=evaluationFormDao.convertEvaluationFormEntityToEvaluationFormResponseBean(evaluationFormEntity).getContent(); + + List requestFields = request.getFormFields(); + + Map contentMap = contentResponseBeans.stream() + .collect(Collectors.toMap(ContentResponseBean::getId, ContentResponseBean::getLabel)); // Change getLabel() if needed + FieldValidator validator = FieldValidator.create(); + for (ApplicationFormFieldRequestBean requestField : requestFields) { + String fieldId = requestField.getFieldId(); + + if (!contentMap.containsKey(fieldId)) { + validator.addError(MessageFormat.format(Translator.toLocale(GepafinConstant.FIELD_ID_NOT_FOUND), fieldId)); + } + + } + validator.validate(); + } + + public ApplicationEvaluationFormEntity saveApplicationEvaluationFormEntity(ApplicationEvaluationFormEntity applicationEvaluationFormEntity) { + return applicationEvaluationFormRepository.save(applicationEvaluationFormEntity); + } + + public List createOrUpdateMultipleFormFields(List formFieldRequestBeans, + ApplicationEvaluationFormEntity applicationEvaluationFormEntity, EvaluationFormEntity evaluationFormEntity) { + + List existingFields = applicationEvaluationFormFieldRepository.findByApplicationEvaluationFormId(applicationEvaluationFormEntity.getId()); + + return formFieldRequestBeans.stream().map(requestBean -> createOrUpdateApplicationEvaluationFormField(requestBean, applicationEvaluationFormEntity, existingFields, evaluationFormEntity)) + .collect(Collectors.toList()); + } + + public ApplicationEvaluationFormFieldEntity createOrUpdateApplicationEvaluationFormField(ApplicationFormFieldRequestBean applicationFormFieldRequestBean, + ApplicationEvaluationFormEntity applicationEvaluationFormEntity, + List applicationEvaluationFormFieldEntities, + EvaluationFormEntity evaluationFormEntity){ + ApplicationEvaluationFormFieldEntity applicationEvaluationFormFieldEntity = null; + validateFileUploadDocuments(applicationFormFieldRequestBean, evaluationFormEntity); + VersionActionTypeEnum actionType = VersionActionTypeEnum.INSERT; + ApplicationEvaluationFormFieldEntity oldApplicationEvaluationFormFieldData = null; + if (applicationEvaluationFormFieldEntities == null || applicationEvaluationFormFieldEntities.isEmpty()) { + applicationEvaluationFormFieldEntity = new ApplicationEvaluationFormFieldEntity(); + applicationEvaluationFormFieldEntity.setApplicationEvaluationForm(applicationEvaluationFormEntity); + applicationEvaluationFormFieldEntity.setIsDeleted(false); + }else{ + for (ApplicationEvaluationFormFieldEntity existingFieldEntity : applicationEvaluationFormFieldEntities) { + if (existingFieldEntity.getFieldId().equals(applicationFormFieldRequestBean.getFieldId())) { + applicationEvaluationFormFieldEntity = existingFieldEntity; + oldApplicationEvaluationFormFieldData = Utils.getClonedEntityForData(existingFieldEntity); + actionType = VersionActionTypeEnum.UPDATE; + break; + } else { + applicationEvaluationFormFieldEntity.setApplicationEvaluationForm(applicationEvaluationFormEntity); + } + } + } + Utils.setIfUpdated(applicationEvaluationFormFieldEntity::getFieldId, applicationEvaluationFormFieldEntity::setFieldId, applicationFormFieldRequestBean.getFieldId()); + + if (applicationFormFieldRequestBean.getFieldValue() != null) { + applicationEvaluationFormFieldEntity.setFieldValue(Utils.convertObjectToJsonString(applicationFormFieldRequestBean.getFieldValue())); + } else { + applicationEvaluationFormFieldEntity.setFieldValue(null); + } + + ApplicationEvaluationFormFieldEntity savedEvaluationFormFieldEntity = applicationEvaluationFormFieldRepository.save(applicationEvaluationFormFieldEntity); + + loggingUtil.addVersionHistory(VersionHistoryRequest.builder().request(request).actionType(actionType).oldData(oldApplicationEvaluationFormFieldData).newData(savedEvaluationFormFieldEntity).build()); + + log.info("Version history logged for action: {}, Field ID: {}", actionType, applicationEvaluationFormFieldEntity.getFieldId()); + + return savedEvaluationFormFieldEntity; + } + + private List validateFileUploadDocuments(ApplicationFormFieldRequestBean applicationFormFieldRequestBean, EvaluationFormEntity evaluationFormEntity) { + List documentIds=null; + + List contentResponseBeans=evaluationFormDao.convertEvaluationFormEntityToEvaluationFormResponseBean(evaluationFormEntity).getContent(); + for (ContentResponseBean contentResponseBean:contentResponseBeans){ + if(Boolean.TRUE.equals(contentResponseBean.getName().equals("fileupload"))) { + if (contentResponseBean.getId().equals(applicationFormFieldRequestBean.getFieldId())) { + Object fieldValueObject = applicationFormFieldRequestBean.getFieldValue(); + if (fieldValueObject instanceof String) { + // Safely cast the object to a string + String documentId = (String) fieldValueObject; + // Now you can use documentId as needed + documentIds = applicationDao.validateDocumentIds(documentId); + } + } + } + } + return documentIds; + } + + public ApplicationEvaluationResponseBean getEvaluationById(Long evaluationId, Long evaluationFormId){ + ApplicationEvaluationEntity applicationEvaluationEntity = applicationEvaluationService.validateApplicationEvaluation(evaluationId); + + ApplicationEvaluationFormEntity applicationEvaluationFormEntity = applicationEvaluationFormRepository.findByEvaluationIdAndEvaluationFormId(applicationEvaluationEntity.getId(),evaluationFormId); + List applicationEvaluationFormFieldEntities = applicationEvaluationFormFieldRepository.findByApplicationEvaluationFormId(applicationEvaluationFormEntity.getId()); + List evaluationFormFieldResponseBeans = createEvaluationFormFieldResponse(applicationEvaluationFormFieldEntities, applicationEvaluationFormEntity); + ApplicationEvaluationResponseBean applicationEvaluationResponseBean = convertApplicationEvaluationEntityToApplicationEvaluationResponseBean(applicationEvaluationEntity); + applicationEvaluationResponseBean.setFormFields(evaluationFormFieldResponseBeans); + + return applicationEvaluationResponseBean; + } + + private List createEvaluationFormFieldResponse( + List evaluationFormFieldEntities, + ApplicationEvaluationFormEntity applicationEvaluationFormEntity){ + List evaluationFormFieldResponseBeans = new ArrayList<>(); + List contentResponseBeans =evaluationFormDao.convertEvaluationFormEntityToEvaluationFormResponseBean(applicationEvaluationFormEntity.getEvaluationForm()).getContent(); + + for (ApplicationEvaluationFormFieldEntity applicationEvaluationFormFieldEntity : evaluationFormFieldEntities) { + + Optional fileUploadContent = contentResponseBeans.stream() + .filter(contentResponseBean -> "fileupload".equals(contentResponseBean.getName()) && + contentResponseBean.getId().equals(applicationEvaluationFormFieldEntity.getFieldId())) + .findFirst(); + + List documentResponseBeans = new ArrayList<>(); + if (fileUploadContent.isPresent()) { + String documentId = applicationEvaluationFormFieldEntity.getFieldValue(); + if (documentId != null && !documentId.isEmpty()) { + documentResponseBeans = Arrays.stream(documentId.split(",")) + .map(String::trim) + .map(Long::parseLong) + .map(docId -> { + DocumentEntity documentEntity = documentService.validateDocument(docId); +// if (Boolean.FALSE.equals(DocumentSourceTypeEnum.APPLICATION.getValue().equals(documentEntity.getSource()))) { +// throw new CustomValidationException(Status.NOT_FOUND,Translator.toLocale(GepafinConstant.DOCUMENT_NOT_FOUND)); +// } + return documentEntity; + }) + .map(callDao::convertToDocumentResponseBean) + .collect(Collectors.toList()); + } + } + ApplicationEvaluationFormFieldReponseBean responseBean = convertToEvaluationFormFieldResponseBean( + applicationEvaluationFormFieldEntity, applicationEvaluationFormEntity.getId()); + if (!documentResponseBeans.isEmpty()) { + responseBean.setFieldValue(documentResponseBeans); + } + evaluationFormFieldResponseBeans.add(responseBean); + } + return evaluationFormFieldResponseBeans; + + } + + private ApplicationEvaluationFormFieldReponseBean convertToEvaluationFormFieldResponseBean(ApplicationEvaluationFormFieldEntity entity,Long applicationEvaluationFormId){ + ApplicationEvaluationFormFieldReponseBean applicationEvaluationFormFieldReponseBean = new ApplicationEvaluationFormFieldReponseBean(); + applicationEvaluationFormFieldReponseBean.setApplicationEvaluationFormId(applicationEvaluationFormId); + applicationEvaluationFormFieldReponseBean.setFieldId(entity.getFieldId()); + if(entity.getFieldValue() != null) { + applicationEvaluationFormFieldReponseBean.setFieldValue(Utils.getFieldValueAsObject(entity.getFieldValue())); + } + applicationEvaluationFormFieldReponseBean.setId(entity.getId()); + applicationEvaluationFormFieldReponseBean.setCreatedDate(entity.getCreatedDate()); + applicationEvaluationFormFieldReponseBean.setUpdatedDate(entity.getUpdatedDate()); + return applicationEvaluationFormFieldReponseBean; + } + + private ApplicationEvaluationResponseBean convertApplicationEvaluationEntityToApplicationEvaluationResponseBean(ApplicationEvaluationEntity entity){ + ApplicationEvaluationResponseBean response = new ApplicationEvaluationResponseBean(); + response.setId(entity.getId()); + response.setApplicationId(entity.getApplicationId()); + response.setEvaluationId(entity.getId()); + response.setNote(entity.getNote()); + response.setCreatedDate(entity.getCreatedDate()); + response.setUpdatedDate(entity.getUpdatedDate()); + return response; + } + + public ApplicationEvaluationFormResponse getApplicationEvaluationForm(HttpServletRequest request, Long applicationId, Long assignedApplicationId ){ + + if (applicationId == null && assignedApplicationId == null) { + throw new CustomValidationException(Status.BAD_REQUEST,Translator.toLocale(GepafinConstant.EITHER_APPLICATION_ID_OR_ASSIGNED_APPLICATION_ID_MUST_BE_PROVIDED)); + } + + ApplicationEvaluationEntity evaluationEntity = applicationEvaluationRepository.findByApplicationIdAndAssignedApplicationId(applicationId, assignedApplicationId); + + return (evaluationEntity != null) ? processEvaluationForm(evaluationEntity) : null; + } + + private ApplicationEvaluationFormResponse processEvaluationForm(ApplicationEvaluationEntity evaluationEntity){ + ApplicationEvaluationFormResponse response = new ApplicationEvaluationFormResponse(); + response.setApplicationId(evaluationEntity.getApplicationId()); + response.setNote(evaluationEntity.getNote()); + response.setStatus(evaluationEntity.getStatus()); + response.setAssignedApplicationId(evaluationEntity.getAssignedApplicationsEntity().getId()); + + EvaluationFormEntity evaluationFormEntity = evaluationFormRepository.findByCallIdAndIsDeletedFalse(evaluationEntity.getAssignedApplicationsEntity().getApplication().getCall().getId()); + + if (evaluationFormEntity != null) { + response.setEvaluationFormId(evaluationFormEntity.getId()); + response.setApplicationEvaluationFormResponse(convertEvaluationFormToResponse(evaluationFormEntity, evaluationEntity)); + } + + return response; + } + + private ApplicationEvaluationFormResponseBean convertEvaluationFormToResponse(EvaluationFormEntity evaluationForm, ApplicationEvaluationEntity applicationEvaluationEntity) { + ApplicationEvaluationFormResponseBean applicationEvaluationFormResponseBean = createEvaluationFormResponse(evaluationForm); + + ApplicationEvaluationFormEntity applicationEvaluationFormEntity = applicationEvaluationFormRepository.findByEvaluationIdAndEvaluationFormId(applicationEvaluationEntity.getId(), evaluationForm.getId()); + + if(applicationEvaluationFormEntity!=null) { + List applicationEvaluationFormFieldEntities = applicationEvaluationFormFieldRepository.findByApplicationEvaluationFormId(applicationEvaluationFormEntity.getId()); + List evaluationFormFieldResponseBeans = createEvaluationFormFieldResponse(applicationEvaluationFormFieldEntities, applicationEvaluationFormEntity); + applicationEvaluationFormResponseBean.setFormFields(evaluationFormFieldResponseBeans); + } + + return applicationEvaluationFormResponseBean; + } + + private ApplicationEvaluationFormResponseBean createEvaluationFormResponse(EvaluationFormEntity evaluationFormEntity) { + ApplicationEvaluationFormResponseBean evaluationFormResponseBean = new ApplicationEvaluationFormResponseBean(); + evaluationFormResponseBean.setId(evaluationFormEntity.getId()); + evaluationFormResponseBean.setLabel(evaluationFormEntity.getLabel()); + evaluationFormResponseBean.setCallId(evaluationFormEntity.getCall().getId()); + evaluationFormResponseBean.setContent(evaluationFormDao.convertEvaluationFormEntityToEvaluationFormResponseBean(evaluationFormEntity).getContent()); + return evaluationFormResponseBean; + } + } diff --git a/src/main/java/net/gepafin/tendermanagement/dao/EvaluationFormDao.java b/src/main/java/net/gepafin/tendermanagement/dao/EvaluationFormDao.java index 594aa24d..e5361e83 100644 --- a/src/main/java/net/gepafin/tendermanagement/dao/EvaluationFormDao.java +++ b/src/main/java/net/gepafin/tendermanagement/dao/EvaluationFormDao.java @@ -21,17 +21,13 @@ package net.gepafin.tendermanagement.dao; import org.springframework.stereotype.Component; import java.time.LocalDateTime; - import java.util.Collections; import java.util.List; - import java.util.Optional; - import java.util.Set; - import java.util.stream.Collectors; @Component public class EvaluationFormDao { @Autowired - private EvalualtionFormRepository evaluationFormRepository; + private EvaluationFormRepository evaluationFormRepository; @Autowired private CallDao callDao; diff --git a/src/main/java/net/gepafin/tendermanagement/entities/ApplicationEvaluationFormEntity.java b/src/main/java/net/gepafin/tendermanagement/entities/ApplicationEvaluationFormEntity.java new file mode 100644 index 00000000..251fb262 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/entities/ApplicationEvaluationFormEntity.java @@ -0,0 +1,22 @@ +package net.gepafin.tendermanagement.entities; + +import jakarta.persistence.*; +import lombok.Data; + +@Entity +@Data +@Table(name = "APPLICATION_EVALUATION_FORM") +public class ApplicationEvaluationFormEntity extends BaseEntity{ + private Long applicationId; + + @Column(name="IS_DELETED") + private Boolean isDeleted; + + @ManyToOne + @JoinColumn(name = "EVALUATION_ID") + private ApplicationEvaluationEntity applicationEvaluation; + + @ManyToOne + @JoinColumn(name = "EVALUATION_FORM_ID") + private EvaluationFormEntity evaluationForm; +} diff --git a/src/main/java/net/gepafin/tendermanagement/entities/ApplicationEvaluationFormFieldEntity.java b/src/main/java/net/gepafin/tendermanagement/entities/ApplicationEvaluationFormFieldEntity.java new file mode 100644 index 00000000..913d8831 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/entities/ApplicationEvaluationFormFieldEntity.java @@ -0,0 +1,24 @@ +package net.gepafin.tendermanagement.entities; + +import jakarta.persistence.*; +import lombok.Data; + +@Entity +@Data +@Table(name = "APPLICATION_EVALUATION_FORM_FIELD") +public class ApplicationEvaluationFormFieldEntity extends BaseEntity { + + @ManyToOne + @JoinColumn(name = "APPLICATION_EVALUATION_FORM_ID") + private ApplicationEvaluationFormEntity applicationEvaluationForm; + + @Column(name = "FIELD_ID") + private String fieldId; + + @Column(name = "FIELD_VALUE") + private String fieldValue; + + @Column(name="IS_DELETED") + private Boolean isDeleted; + +} diff --git a/src/main/java/net/gepafin/tendermanagement/enums/UserActionContextEnum.java b/src/main/java/net/gepafin/tendermanagement/enums/UserActionContextEnum.java index 4a4d1109..8a6e43a6 100644 --- a/src/main/java/net/gepafin/tendermanagement/enums/UserActionContextEnum.java +++ b/src/main/java/net/gepafin/tendermanagement/enums/UserActionContextEnum.java @@ -97,6 +97,8 @@ public enum UserActionContextEnum { CREATE_UPDATE_APPLICATION_EVALUATION("CREATE_UPDATE_APPLICATION_EVALUATION"), GET_APPLICATION_EVALUATION("GET_APPLICATION_EVALUATION"), DELETE_APPLICATION_EVALUATION("DELETE_APPLICATION_EVALUATION"), + CREATE_UPDATE_APPLICATION_EVALUATION_FORM("CREATE_UPDATE_APPLICATION_EVALUATION_FORM"), + GET_APPLICATION_EVALUATION_FORM("GET_APPLICATION_EVALUATION_FORM"), /** Beneficiary Preferred Call action context **/ CREATE_BENEFICIARY_PREFERRED_CALL("CREATE_BENEFICIARY_PREFERRED_CALL"), diff --git a/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationFormFieldReponseBean.java b/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationFormFieldReponseBean.java new file mode 100644 index 00000000..62a0aa82 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationFormFieldReponseBean.java @@ -0,0 +1,15 @@ +package net.gepafin.tendermanagement.model.response; + +import lombok.Data; +import net.gepafin.tendermanagement.model.BaseBean; + +@Data +public class ApplicationEvaluationFormFieldReponseBean extends BaseBean { + private Long id; + + private Long applicationEvaluationFormId; + + private String fieldId; + + private Object fieldValue; +} diff --git a/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationFormResponse.java b/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationFormResponse.java new file mode 100644 index 00000000..7c806d39 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationFormResponse.java @@ -0,0 +1,16 @@ +package net.gepafin.tendermanagement.model.response; + +import lombok.Data; + +@Data +public class ApplicationEvaluationFormResponse { + + private Long evaluationFormId; + private Long applicationId; + private Long assignedApplicationId; + private String note; + private String status; + private ApplicationEvaluationFormResponseBean applicationEvaluationFormResponse; + + +} diff --git a/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationFormResponseBean.java b/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationFormResponseBean.java new file mode 100644 index 00000000..804d5845 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationFormResponseBean.java @@ -0,0 +1,19 @@ +package net.gepafin.tendermanagement.model.response; + +import lombok.Data; + +import java.util.List; + +@Data +public class ApplicationEvaluationFormResponseBean { + + private Long id; + + private String label; + + private Long callId; + + private List content; + + private List formFields; +} diff --git a/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationResponseBean.java b/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationResponseBean.java new file mode 100644 index 00000000..cf4b5865 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/model/response/ApplicationEvaluationResponseBean.java @@ -0,0 +1,15 @@ +package net.gepafin.tendermanagement.model.response; + +import lombok.Data; +import net.gepafin.tendermanagement.enums.ApplicationEvaluationStatusTypeEnum; +import net.gepafin.tendermanagement.model.BaseBean; + +import java.util.List; + +@Data +public class ApplicationEvaluationResponseBean extends BaseBean { + private Long applicationId; + private Long evaluationId; + private String note; + private List formFields; +} diff --git a/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationFormFieldRepository.java b/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationFormFieldRepository.java new file mode 100644 index 00000000..07a0d318 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationFormFieldRepository.java @@ -0,0 +1,18 @@ +package net.gepafin.tendermanagement.repositories; + +import net.gepafin.tendermanagement.entities.ApplicationEvaluationFormFieldEntity; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface ApplicationEvaluationFormFieldRepository extends JpaRepository { + @Query("SELECT f FROM ApplicationEvaluationFormFieldEntity f " + + "WHERE f.applicationEvaluationForm.id = :applicationEvaluationFormId " + + "AND f.isDeleted = false") + List findByApplicationEvaluationFormId( + @Param("applicationEvaluationFormId") Long applicationEvaluationFormId); +} diff --git a/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationFormRepository.java b/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationFormRepository.java new file mode 100644 index 00000000..8e2fba81 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationFormRepository.java @@ -0,0 +1,21 @@ +package net.gepafin.tendermanagement.repositories; + +import net.gepafin.tendermanagement.entities.ApplicationEvaluationFormEntity; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +@Repository +public interface ApplicationEvaluationFormRepository extends JpaRepository { + + @Query("SELECT a FROM ApplicationEvaluationFormEntity a " + + "WHERE a.applicationEvaluation.id = :evaluationId " + + "AND a.evaluationForm.id = :evaluationFormId " + + "AND a.isDeleted = false") + ApplicationEvaluationFormEntity findByEvaluationIdAndEvaluationFormId( + @Param("evaluationId") Long evaluationId, + @Param("evaluationFormId") Long evaluationFormId); + + ApplicationEvaluationFormEntity findByApplicationEvaluation_IdAndIsDeletedFalse(Long evaluationId); +} diff --git a/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationRepository.java b/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationRepository.java index c1329470..539e55f9 100644 --- a/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationRepository.java +++ b/src/main/java/net/gepafin/tendermanagement/repositories/ApplicationEvaluationRepository.java @@ -64,5 +64,14 @@ public interface ApplicationEvaluationRepository extends JpaRepository statusList ); + @Query("SELECT ae FROM ApplicationEvaluationEntity ae " + + "WHERE ae.isDeleted = false " + + "AND (:applicationId IS NULL OR ae.applicationId = :applicationId) " + + "AND (:assignedApplicationId IS NULL OR ae.assignedApplicationsEntity.id = :assignedApplicationId)") + ApplicationEvaluationEntity findByApplicationIdAndAssignedApplicationId( + @Param("applicationId") Long applicationId, + @Param("assignedApplicationId") Long assignedApplicationId + ); + } diff --git a/src/main/java/net/gepafin/tendermanagement/repositories/EvalualtionFormRepository.java b/src/main/java/net/gepafin/tendermanagement/repositories/EvaluationFormRepository.java similarity index 76% rename from src/main/java/net/gepafin/tendermanagement/repositories/EvalualtionFormRepository.java rename to src/main/java/net/gepafin/tendermanagement/repositories/EvaluationFormRepository.java index fb658f54..11db32e2 100644 --- a/src/main/java/net/gepafin/tendermanagement/repositories/EvalualtionFormRepository.java +++ b/src/main/java/net/gepafin/tendermanagement/repositories/EvaluationFormRepository.java @@ -1,13 +1,12 @@ package net.gepafin.tendermanagement.repositories; import net.gepafin.tendermanagement.entities.EvaluationFormEntity; -import net.gepafin.tendermanagement.entities.FormEntity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; @Repository -public interface EvalualtionFormRepository extends JpaRepository { +public interface EvaluationFormRepository extends JpaRepository { EvaluationFormEntity findByCallIdAndIsDeletedFalse(Long callId); EvaluationFormEntity findByIdAndIsDeletedFalse(Long formId); diff --git a/src/main/java/net/gepafin/tendermanagement/service/ApplicationEvaluationService.java b/src/main/java/net/gepafin/tendermanagement/service/ApplicationEvaluationService.java index 454030af..51f0b52c 100644 --- a/src/main/java/net/gepafin/tendermanagement/service/ApplicationEvaluationService.java +++ b/src/main/java/net/gepafin/tendermanagement/service/ApplicationEvaluationService.java @@ -2,9 +2,11 @@ package net.gepafin.tendermanagement.service; import jakarta.servlet.http.HttpServletRequest; import net.gepafin.tendermanagement.entities.ApplicationEvaluationEntity; +import net.gepafin.tendermanagement.enums.FormActionEnum; import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest; +import net.gepafin.tendermanagement.model.request.ApplicationRequestBean; import net.gepafin.tendermanagement.model.request.EvaluationDocumentRequest; -import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse; +import net.gepafin.tendermanagement.model.response.*; import java.util.List; @@ -21,4 +23,8 @@ public interface ApplicationEvaluationService { ApplicationEvaluationEntity validateApplicationEvaluationByApplicationId(Long applicationId); + ApplicationEvaluationResponseBean createApplicationEvaluation(HttpServletRequest request, ApplicationRequestBean applicationRequestBean, Long evaluationId, Long evaluationFormId); + + ApplicationEvaluationFormResponse getApplicationEvaluationForm(HttpServletRequest request, Long applicationId, Long assignedApplicationId); + } diff --git a/src/main/java/net/gepafin/tendermanagement/service/impl/ApplicationEvaluationServiceImpl.java b/src/main/java/net/gepafin/tendermanagement/service/impl/ApplicationEvaluationServiceImpl.java index 3dd9035f..cfe4c9df 100644 --- a/src/main/java/net/gepafin/tendermanagement/service/impl/ApplicationEvaluationServiceImpl.java +++ b/src/main/java/net/gepafin/tendermanagement/service/impl/ApplicationEvaluationServiceImpl.java @@ -3,15 +3,20 @@ package net.gepafin.tendermanagement.service.impl; import jakarta.servlet.http.HttpServletRequest; import net.gepafin.tendermanagement.dao.ApplicationEvaluationDao; +import net.gepafin.tendermanagement.entities.ApplicationEntity; import net.gepafin.tendermanagement.entities.ApplicationEvaluationEntity; import net.gepafin.tendermanagement.entities.AssignedApplicationsEntity; import net.gepafin.tendermanagement.entities.UserEntity; import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest; +import net.gepafin.tendermanagement.model.request.ApplicationRequestBean; import net.gepafin.tendermanagement.model.request.EvaluationDocumentRequest; +import net.gepafin.tendermanagement.model.response.ApplicationEvaluationFormResponse; import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse; +import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponseBean; import net.gepafin.tendermanagement.repositories.AssignedApplicationsRepository; import net.gepafin.tendermanagement.service.ApplicationEvaluationService; +import net.gepafin.tendermanagement.service.ApplicationService; import net.gepafin.tendermanagement.service.AssignedApplicationsService; import net.gepafin.tendermanagement.util.Validator; import org.springframework.beans.factory.annotation.Autowired; @@ -34,6 +39,9 @@ public class ApplicationEvaluationServiceImpl implements ApplicationEvaluationSe @Autowired private ApplicationEvaluationService applicationEvaluationService; + @Autowired + private ApplicationService applicationService; + @Override @Transactional(rollbackFor = Exception.class) public ApplicationEvaluationResponse createOrUpdateApplicationEvaluation( @@ -78,4 +86,18 @@ public class ApplicationEvaluationServiceImpl implements ApplicationEvaluationSe return applicationEvaluationDao.validateApplicationEvaluationByApplicationId(applicationId); } + @Override + public ApplicationEvaluationResponseBean createApplicationEvaluation(HttpServletRequest request, ApplicationRequestBean applicationRequestBean, Long evaluationId, Long evaluationFormId) { + ApplicationEvaluationEntity applicationEvaluationEntity = applicationEvaluationService.validateApplicationEvaluation(evaluationId); + validator.validatePreInstructor(request, applicationEvaluationEntity.getUserId()); + return applicationEvaluationDao.createApplicationEvaluation(request,applicationRequestBean,evaluationFormId,evaluationId); + } + + @Override + @Transactional(readOnly = true) + public ApplicationEvaluationFormResponse getApplicationEvaluationForm(HttpServletRequest request, Long applicationId, Long assignedApplicationId) { + validator.validateUser(request); + return applicationEvaluationDao.getApplicationEvaluationForm(request,applicationId,assignedApplicationId); + } + } diff --git a/src/main/java/net/gepafin/tendermanagement/web/rest/api/ApplicationEvaluationApi.java b/src/main/java/net/gepafin/tendermanagement/web/rest/api/ApplicationEvaluationApi.java index 9d168955..1bbc6dac 100644 --- a/src/main/java/net/gepafin/tendermanagement/web/rest/api/ApplicationEvaluationApi.java +++ b/src/main/java/net/gepafin/tendermanagement/web/rest/api/ApplicationEvaluationApi.java @@ -7,9 +7,11 @@ import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.responses.ApiResponse; import jakarta.servlet.http.HttpServletRequest; import jakarta.validation.Valid; +import net.gepafin.tendermanagement.enums.FormActionEnum; import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest; +import net.gepafin.tendermanagement.model.request.ApplicationRequestBean; import net.gepafin.tendermanagement.model.request.EvaluationDocumentRequest; -import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse; +import net.gepafin.tendermanagement.model.response.*; import net.gepafin.tendermanagement.model.util.Response; import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants; import org.springframework.http.MediaType; @@ -45,6 +47,7 @@ public interface ApplicationEvaluationApi { HttpServletRequest request, @Parameter(required = false) @RequestParam(value = "applicationId", required = false) Long applicationId, @Parameter( required = false) @RequestParam(value = "assignedApplicationId", required = false) Long assignedApplicationId); + @Operation(summary = "API to delete ApplicationEvaluation", responses = { @ApiResponse(responseCode = "200", description = "OK"), @@ -56,4 +59,35 @@ public interface ApplicationEvaluationApi { @Parameter( required = true) @PathVariable("id") Long id); + @Operation(summary = "Api to create or update application evaluation form ( Evaluation V2 )", + responses = { + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = { + @ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })), + @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = { + @ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })), + @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = { + @ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) }) + @PutMapping(value = "/{id}/form", + produces = { "application/json" }) + ResponseEntity> createApplicationEvaluation(HttpServletRequest request, + @Valid @RequestBody ApplicationRequestBean applicationRequestBean, + @Parameter(description = "The evaluation id", required = true) @PathVariable(value = "id", required = true) Long id, + @Parameter(description = "The evaluation form ID", required = true) @RequestParam("evaluationFormId") Long evaluationFormId); + + @Operation(summary = "Api to get an application evaluation form (Evaluation V2)", + responses = { + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = { + @ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })), + @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = { + @ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })), + @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = { + @ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) }) + @GetMapping(value = "", produces = "application/json") + ResponseEntity> getApplicationEvaluationForm(HttpServletRequest request, + @Parameter(required = false) @RequestParam(value = "applicationId", required = false) Long applicationId, + @Parameter( required = false) @RequestParam(value = "assignedApplicationId", required = false) Long assignedApplicationId); + + } diff --git a/src/main/java/net/gepafin/tendermanagement/web/rest/api/impl/ApplicationEvaluationApiController.java b/src/main/java/net/gepafin/tendermanagement/web/rest/api/impl/ApplicationEvaluationApiController.java index b299ecc2..de92247c 100644 --- a/src/main/java/net/gepafin/tendermanagement/web/rest/api/impl/ApplicationEvaluationApiController.java +++ b/src/main/java/net/gepafin/tendermanagement/web/rest/api/impl/ApplicationEvaluationApiController.java @@ -3,13 +3,14 @@ package net.gepafin.tendermanagement.web.rest.api.impl; import jakarta.servlet.http.HttpServletRequest; import net.gepafin.tendermanagement.config.Translator; import net.gepafin.tendermanagement.constants.GepafinConstant; +import net.gepafin.tendermanagement.enums.FormActionEnum; import net.gepafin.tendermanagement.enums.UserActionContextEnum; import net.gepafin.tendermanagement.enums.UserActionLogsEnum; import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest; +import net.gepafin.tendermanagement.model.request.ApplicationRequestBean; import net.gepafin.tendermanagement.model.request.EvaluationDocumentRequest; import net.gepafin.tendermanagement.model.request.UserActionRequest; -import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse; -import net.gepafin.tendermanagement.model.response.EvaluationDocumentResponse; +import net.gepafin.tendermanagement.model.response.*; import net.gepafin.tendermanagement.model.util.Response; import net.gepafin.tendermanagement.service.ApplicationEvaluationService; import net.gepafin.tendermanagement.util.LoggingUtil; @@ -83,4 +84,29 @@ public class ApplicationEvaluationApiController implements ApplicationEvaluation .body(new Response<>(null, Status.SUCCESS, Translator.toLocale(GepafinConstant.EVALUATION_DELETED_SUCCESSFULLY))); } + @Override + public ResponseEntity> createApplicationEvaluation(HttpServletRequest request, ApplicationRequestBean applicationRequestBean, Long evaluationId, Long evaluationFormId) { + + /** This code is responsible for creating user action logs for the "Create or update application evaluation form" operation. **/ + loggingUtil.logUserAction( + UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.UPDATE).actionContext(UserActionContextEnum.CREATE_UPDATE_APPLICATION_EVALUATION_FORM).build()); + + ApplicationEvaluationResponseBean applicationEvaluationResponseBean = applicationEvaluationService.createApplicationEvaluation(request, applicationRequestBean, evaluationId, evaluationFormId); + + return ResponseEntity.status(HttpStatus.CREATED) + .body(new Response<>(applicationEvaluationResponseBean, Status.SUCCESS, Translator.toLocale(GepafinConstant.EVALUATION_CREATED_SUCCESSFULLY))); + } + + @Override + public ResponseEntity> getApplicationEvaluationForm(HttpServletRequest request, Long applicationId, Long assignedApplicationId) { + + /** This code is responsible for creating user action logs for the "get application evaluation form" operation. **/ + loggingUtil.logUserAction(UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.VIEW).actionContext(UserActionContextEnum.GET_APPLICATION_EVALUATION_FORM).build()); + + ApplicationEvaluationFormResponse applicationEvaluationFormResponse = applicationEvaluationService.getApplicationEvaluationForm(request,applicationId,assignedApplicationId); + return ResponseEntity.status(HttpStatus.OK) + .body(new Response<>(applicationEvaluationFormResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.GET_APPLICATION_EVALUATION_FORM_SUCCESS_MSG))); + + } + } diff --git a/src/main/resources/db/changelog/db.changelog-1.0.0.xml b/src/main/resources/db/changelog/db.changelog-1.0.0.xml index b987fd7c..f357b08b 100644 --- a/src/main/resources/db/changelog/db.changelog-1.0.0.xml +++ b/src/main/resources/db/changelog/db.changelog-1.0.0.xml @@ -2303,7 +2303,62 @@ EXISTS (SELECT 1 FROM application_evaluation ae WHERE ae.application_id = application.id) - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/message_en.properties b/src/main/resources/message_en.properties index 451dec92..6e058a9f 100644 --- a/src/main/resources/message_en.properties +++ b/src/main/resources/message_en.properties @@ -267,6 +267,7 @@ evaluationCriteria.invalid=This evaluation criterion does not belong to the curr assigned.application.not.found.with.id=Assigned application with this application ID not found either.application.or.assigned.application.id.required=Either applicationId or assignedApplicationId is required. evaluation.already.exists=An application evaluation already exists for this application ID. +application.evaluation.form.get.success = Application Evaluation Form Fetched Successfully. # Hub Messages hub_create_success=Hub created successfully @@ -362,6 +363,7 @@ evaluation.form.deleted.successfully=Evaluation form deleted successfully. evaluation.form.fetched.successfully=Evaluation form fetched successfully. evaluation.form.not.found=Evaluation form not found. +either.applicationId.or.assignedApplicationId.must.be.provided=Either applicationId or assignedApplicationId must be provided. assigned.application.status.updated.successfully=Assigned application status updated successfully. validation.required.requested.amount=The Requested Amount configuration should be mandatory. diff --git a/src/main/resources/message_it.properties b/src/main/resources/message_it.properties index 66595c92..624c7dfe 100644 --- a/src/main/resources/message_it.properties +++ b/src/main/resources/message_it.properties @@ -260,6 +260,7 @@ application.evaluation.status.updated.successfully=Stato della valutazione dell' assigned.application.not.found.with.id=Applicazione assegnata con questo ID dell'applicazione non trovata either.application.or.assigned.application.id.required=? richiesto almeno uno tra applicationId o assignedApplicationId. evaluation.already.exists=Una valutazione dell'applicazione esiste gi? per questo ID applicazione. +application.evaluation.form.get.success =Modulo di valutazione della domanda recuperato correttamente.code application.assigned.success.msg =Domanda assegnata con successo application.already.assigned.msg =La domanda ? gi? assegnata @@ -352,10 +353,11 @@ evaluation.form.deleted.successfully=Modulo di valutazione eliminato con success evaluation.form.fetched.successfully=Modulo di valutazione recuperato con successo. evaluation.form.not.found=Modulo di valutazione non trovato. +either.applicationId.or.assignedApplicationId.must.be.provided = "� necessario fornire applicationId o assegnatoApplicationId." assigned.application.status.updated.successfully=Stato dell'applicazione assegnata aggiornato con successo. -validation.required.requested.amount=La configurazione dell'importo richiesto è obbligatoria. +validation.required.requested.amount=La configurazione dell'importo richiesto � obbligatoria.