Updated code
This commit is contained in:
@@ -272,7 +272,7 @@ public class ApplicationAmendmentRequestDao {
|
||||
String formFieldsJson = Utils.convertObjectToJson(formFieldRequestBean);
|
||||
applicationAmendmentRequestEntity.setFormFields(formFieldsJson);
|
||||
}
|
||||
if(Boolean.FALSE.equals(applicationAmendmentRequest.getAmendmentDocument().isEmpty())) {
|
||||
if(applicationAmendmentRequest.getAmendmentDocument()!=null || Boolean.FALSE.equals(applicationAmendmentRequest.getAmendmentDocument().isEmpty())) {
|
||||
setAmendmentDocuments(applicationAmendmentRequest.getAmendmentDocument(), applicationAmendmentRequestEntity);
|
||||
}
|
||||
List<ApplicationAmendmentRequestEntity> amendmentRequest = applicationAmendmentRequestRepository.findAllByApplicationEvaluationIdAndIsDeletedFalse(applicationEvaluationEntity.getId());
|
||||
|
||||
@@ -582,10 +582,11 @@ public class ApplicationEvaluationDao {
|
||||
applicationAmendmentRequestRepository.findAllByApplicationEvaluationIdAndIsDeletedFalse(entity.getId());
|
||||
|
||||
// Fetch amendment details from the request
|
||||
if(req.getAmendmentDetails()!=null) {
|
||||
List<AmendmentDetailsRequest> amendmentDetailsRequests = req.getAmendmentDetails();
|
||||
|
||||
updateAmendmentDocumentsAndFormFields(applicationAmendmentRequestEntities, amendmentDetailsRequests);
|
||||
|
||||
}
|
||||
|
||||
ApplicationEvaluationEntity savedEntity = applicationEvaluationRepository.save(entity);
|
||||
|
||||
|
||||
@@ -121,6 +121,14 @@ public class DocumentDao {
|
||||
userActionContext = UserActionContextEnum.UPLOAD_APPLICATION_DOCUMENT;
|
||||
} else if (fileType.equals(DocumentTypeEnum.IMAGES) && sourceType.equals(DocumentSourceTypeEnum.APPLICATION)) {
|
||||
userActionContext = UserActionContextEnum.UPLOAD_APPLICATION_IMAGES;
|
||||
}else if (fileType.equals(DocumentTypeEnum.DOCUMENT) && sourceType.equals(DocumentSourceTypeEnum.AMENDMENT)) {
|
||||
userActionContext = UserActionContextEnum.UPLOAD_AMENDMENT_DOCUMENT;
|
||||
} else if (fileType.equals(DocumentTypeEnum.IMAGES) && sourceType.equals(DocumentSourceTypeEnum.AMENDMENT)) {
|
||||
userActionContext = UserActionContextEnum.UPLOAD_AMENDMENT_IMAGES;
|
||||
}else if (fileType.equals(DocumentTypeEnum.DOCUMENT) && sourceType.equals(DocumentSourceTypeEnum.EVALUATION)) {
|
||||
userActionContext = UserActionContextEnum.UPLOAD_EVALUATION_DOCUMENT;
|
||||
} else if (fileType.equals(DocumentTypeEnum.IMAGES) && sourceType.equals(DocumentSourceTypeEnum.EVALUATION)) {
|
||||
userActionContext = UserActionContextEnum.UPLOAD_EVALUATION_IMAGES;
|
||||
}
|
||||
|
||||
return userActionContext;
|
||||
|
||||
@@ -118,6 +118,10 @@ public enum UserActionContextEnum {
|
||||
UPDATE_DOCUMENT("UPDATE_DOCUEMENT"),
|
||||
UPDATE_IMAGES("UPDATE_IMAGES"),
|
||||
GET_DOCUMENT("GET_DOCUMENT"),
|
||||
UPLOAD_AMENDMENT_DOCUMENT("UPLOAD_AMENDMENT_DOCUMENT"),
|
||||
UPLOAD_AMENDMENT_IMAGES("UPLOAD_AMENDMENT_IMAGES"),
|
||||
UPLOAD_EVALUATION_DOCUMENT("UPLOAD_EVALUATION_DOCUMENT"),
|
||||
UPLOAD_EVALUATION_IMAGES("UPLOAD_EVALUATION_IMAGES"),
|
||||
|
||||
/** Assigned flow context **/
|
||||
CREATE_UPDATE_FLOW("CREATE_UPDATE_FLOW"),
|
||||
|
||||
@@ -65,9 +65,9 @@ public interface ApplicationEvaluationApi {
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) }))
|
||||
})
|
||||
@PutMapping(value = "/assignedApplicationId/{id}", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@PutMapping(value = "/assignedApplication/{assignedApplicationId}", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
ResponseEntity<Response<ApplicationEvaluationResponse>> updateApplicationEvaluation(HttpServletRequest request,
|
||||
@Parameter(description = "The AssignedApplication id", required = true) @PathVariable("id") Long id,
|
||||
@Parameter(description = "The AssignedApplication id", required = true) @PathVariable("assignedApplicationId") Long assignedApplicationId,
|
||||
@Parameter(description = "Application Evaluation request object", required = true) @Valid @RequestBody List<EvaluationDocumentRequest> applicationEvaluationDocRequest);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user