Added NDG field in the application pagination API
This commit is contained in:
@@ -507,6 +507,7 @@ public class ApplicationDao {
|
||||
responseBean.setAmountRequested(applicationEntity.getAmountRequested());
|
||||
responseBean.setDateAccepted(applicationEntity.getDateAccepted());
|
||||
responseBean.setDateRejected(applicationEntity.getDateRejected());
|
||||
responseBean.setNdg(applicationEntity.getNdg());
|
||||
return responseBean;
|
||||
}
|
||||
|
||||
@@ -2004,8 +2005,13 @@ public class ApplicationDao {
|
||||
searchPattern
|
||||
);
|
||||
|
||||
Predicate ndgPredicate = criteriaBuilder.like(
|
||||
criteriaBuilder.upper(root.get(GepafinConstant.NDG_STRING)),
|
||||
searchPattern
|
||||
);
|
||||
|
||||
// Combine them using a single `or()`
|
||||
Predicate finalPredicate = criteriaBuilder.or(titlePredicate, callTitlePredicate,callNamePredicate,companyName);
|
||||
Predicate finalPredicate = criteriaBuilder.or(titlePredicate, callTitlePredicate,callNamePredicate,companyName, ndgPredicate);
|
||||
predicates.add(finalPredicate);
|
||||
}
|
||||
|
||||
@@ -2071,6 +2077,7 @@ public class ApplicationDao {
|
||||
responseBean.setAmountRequested(applicationView.getAmountRequested());
|
||||
responseBean.setDateAccepted(applicationView.getDateAccepted());
|
||||
responseBean.setDateRejected(applicationView.getDateRejected());
|
||||
responseBean.setNdg(applicationView.getNdg());
|
||||
return responseBean;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,5 +91,7 @@ public class ApplicationView implements Serializable {
|
||||
@Column(name = "CREATED_DATE")
|
||||
private LocalDateTime createdDate;
|
||||
|
||||
@Column(name = "NDG")
|
||||
private String ndg;
|
||||
|
||||
}
|
||||
|
||||
@@ -52,4 +52,6 @@ public class ApplicationResponse{
|
||||
|
||||
private EvaluationVersionEnum evaluationVersion;
|
||||
|
||||
private String ndg;
|
||||
|
||||
}
|
||||
@@ -234,7 +234,7 @@ public interface ApplicationApi {
|
||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE)}))
|
||||
})
|
||||
@GetMapping(value = "/call/{callId}/csv")
|
||||
@PreAuthorize("hasRole('ROLE_SUPER_ADMIN')")
|
||||
@PreAuthorize("hasRole('ROLE_SUPER_ADMIN')|| hasRole('ROLE_INSTRUCTOR_MANAGER')")
|
||||
public ResponseEntity<byte[]> exportCsv(
|
||||
HttpServletRequest request, @Parameter(description = "The call id", required = true) @PathVariable(value = "callId", required = true) Long callId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user