Added motivation text field in application evaluation

This commit is contained in:
rajesh
2024-11-22 14:05:22 +05:30
parent 882905ca51
commit bd66c711fe
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

@@ -29,6 +29,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;

View File

@@ -1798,4 +1798,9 @@
<where>role_type = 'ROLE_PRE_INSTRUCTOR'</where>
</update>
</changeSet>
<changeSet id="22-11-2024_1" author="Rajesh Khore">
<addColumn tableName="application_evaluation">
<column name="MOTIVATION" type="TEXT"></column>
</addColumn>
</changeSet>
</databaseChangeLog>