Merge pull request #105 from Kitzanos/added-field-motivation

GEPAFINBE-96 (Added motivation text field in application evaluation)
This commit is contained in:
rbonazzo-KZ
2024-11-22 10:10:05 +01:00
committed by GitHub
5 changed files with 14 additions and 0 deletions

View File

@@ -99,6 +99,7 @@ public class ApplicationEvaluationDao {
entity.setChecklist(Utils.convertObjectToJson(req.getChecklist()));
entity.setFile(Utils.convertObjectToJson(req.getFiles()));
entity.setNote(req.getNote());
entity.setMotivation(req.getMotivation());
entity.setIsDeleted(false);
entity.setStatus(ApplicationEvaluationStatusTypeEnum.OPEN.getValue());
return entity;
@@ -130,6 +131,7 @@ public class ApplicationEvaluationDao {
AssignedApplicationsEntity assignedApplications = assignedApplicationsRepository.findByIdAndIsDeletedFalse(entity.getAssignedApplicationsEntity().getId()).orElse(null);
response.setAssignedApplicationId(assignedApplications.getId());
response.setNote(entity.getNote());
response.setMotivation(entity.getMotivation());
response.setStatus(ApplicationEvaluationStatusTypeEnum.valueOf(entity.getStatus()));
response.setCreatedDate(entity.getCreatedDate());
response.setUpdatedDate(entity.getUpdatedDate());
@@ -437,6 +439,7 @@ public class ApplicationEvaluationDao {
entity.setFile(Utils.convertObjectToJson(filterNonNullFields(processField(entity, req))));
entity.setIsDeleted(false);
setIfUpdated(entity::getNote, entity::setNote, req.getNote());
setIfUpdated(entity::getMotivation, entity::setMotivation, req.getMotivation());
} else {
entity = convertToEntity(user, req, assignedApplicationId);
}
@@ -636,6 +639,7 @@ public class ApplicationEvaluationDao {
response.setApplicationId(application.getId());
response.setAssignedApplicationId(assignedApplications.getId());
response.setNote(null);
response.setMotivation(null);
response.setApplicationStatus(ApplicationStatusTypeEnum.valueOf(application.getStatus()));
response.setStatus(ApplicationEvaluationStatusTypeEnum.valueOf(ApplicationEvaluationStatusTypeEnum.OPEN.getValue()));
response.setMinScore(call.getThreshold()!=null?call.getThreshold():null);

View File

@@ -28,6 +28,9 @@ public class ApplicationEvaluationEntity extends BaseEntity{
@Column(name = "status")
private String status;
@Column(name = "MOTIVATION")
private String motivation;
@Column(name="IS_DELETED")
private Boolean isDeleted;

View File

@@ -12,4 +12,5 @@ public class ApplicationEvaluationRequest {
private List<FieldRequest> files;
private String note;
private ApplicationStatusForEvaluation applicationStatus;
private String motivation;
}

View File

@@ -26,6 +26,7 @@ public class ApplicationEvaluationResponse {
private String beneficiary;
private Long protocolNumber;
private String callName;
private String motivation;
private LocalDateTime submissionDate;
private LocalDateTime evaluationDate;
private LocalDateTime callEndDate;