Resolved conflicts

This commit is contained in:
nisha
2025-02-17 16:37:34 +05:30
112 changed files with 3861 additions and 293 deletions

View File

@@ -598,7 +598,7 @@ public class ApplicationAmendmentRequestDao {
return response;
}
public List<ApplicationAmendmentRequestResponse> getAllApplicationAmendmentRequest(HttpServletRequest request, Long userId) {
public List<GetAllAmendmentResponseBean> getAllApplicationAmendmentRequest(HttpServletRequest request, Long userId) {
if (validator.checkIsPreInstructor() && userId == null) {
throw new CustomValidationException(Status.BAD_REQUEST, Translator.toLocale(GepafinConstant.USER_ID_NOT_NULL_MSG));
}
@@ -610,7 +610,7 @@ public class ApplicationAmendmentRequestDao {
applicationAmendmentRequestRepository.findAll(spec);
return applicationAmendmentRequestEntities.stream()
.map(entity -> convertEntityToResponse(entity, false))
.map(this::initializeGetAllBasicResponse)
.collect(Collectors.toList());
}
@@ -996,7 +996,7 @@ public class ApplicationAmendmentRequestDao {
}
setIfUpdated(existingApplicationAmendment::getInternalNote, existingApplicationAmendment::setInternalNote, closeAmendmentRequest.getInternalNote());
setIfUpdated(existingApplicationAmendment::getStatus, existingApplicationAmendment::setStatus, ApplicationAmendmentRequestEnum.CLOSE.getValue());
existingApplicationAmendment.setClosingDate(LocalDateTime.now());
ApplicationAmendmentRequestEntity updatedApplicationAmendment = saveApplicationAmendmentRequestEntity(existingApplicationAmendment, oldApplicationAmendmentEntity,
VersionActionTypeEnum.UPDATE);
ApplicationAmendmentRequestResponse response = convertEntityToResponse(updatedApplicationAmendment,false);
@@ -1089,7 +1089,7 @@ public class ApplicationAmendmentRequestDao {
List<ApplicationAmendmentRequestResponse> response = new ArrayList<>();
if (applicationAmendmentRequestEntity != null) {
response = applicationAmendmentRequestEntity.stream()
.map(entity -> convertEntityToResponse(entity, false))
.map(entity -> convertEntityToResponse(entity, true))
.collect(Collectors.toList());
}
return response;
@@ -1184,6 +1184,37 @@ public class ApplicationAmendmentRequestDao {
return applicationEvaluation;
}
private GetAllAmendmentResponseBean initializeGetAllBasicResponse(ApplicationAmendmentRequestEntity entity) {
GetAllAmendmentResponseBean response = new GetAllAmendmentResponseBean();
ApplicationEntity applicationEntity = entity.getApplicationEvaluationEntity().getAssignedApplicationsEntity().getApplication();
response.setId(entity.getId());
response.setApplicationId(entity.getApplicationId());
response.setApplicationEvaluationId(entity.getApplicationEvaluationEntity().getId());
response.setNote(entity.getNote());
response.setStatus(ApplicationAmendmentRequestEnum.valueOf(entity.getStatus()));
response.setResponseDays(entity.getResponseDays());
response.setInternalNote(entity.getInternalNote());
LocalDateTime startDate = entity.getStartDate();
response.setStartDate(startDate);
response.setExpirationDate(entity.getEndDate());
response.setEvaluationEndDate(entity.getApplicationEvaluationEntity().getEndDate());
response.setIsSendEmail(entity.getIsEmail());
response.setIsSendNotification(entity.getIsNotification());
ApplicationEntity application = applicationService.validateApplication(entity.getApplicationId());
response.setCallEmail(application.getCall().getEmail());
response.setCallName(application.getCall().getName());
UserEntity userEntity = userService.validateUser(application.getUserId());
response.setBeneficiaryName(buildBeneficiaryName(userEntity));
CompanyEntity company = companyService.validateCompany(application.getCompanyId());
response.setCompanyName(company.getCompanyName());
Long protocolNumber = entity.getProtocol() != null ? entity.getProtocol().getProtocolNumber() : null;
response.setProtocolNumber(protocolNumber);
return response;
}
private void softDeleteDocument(Long documentId) {
documentService.deleteFile(documentId);