Merge branch 'develop' of https://github.com/Kitzanos/GEPAFIN-BE into develop

This commit is contained in:
rajesh
2026-02-23 14:36:53 +05:30
14 changed files with 96 additions and 17 deletions

View File

@@ -1859,6 +1859,11 @@ public class ApplicationAmendmentRequestDao {
ApplicationEvaluationEntity oldApplicationEvaluationEntity = Utils.getClonedEntityForData(applicationEvaluationEntity);
ApplicationEntity applicationEntity=applicationDao.validateApplication(applicationEvaluationEntity.getApplicationId());
ApplicationEntity oldApplicationEntity = Utils.getClonedEntityForData(applicationEntity);
if(Boolean.TRUE.equals(applicationAmendmentRequest.getAmendmentDocumentType().equals(AmendmentDocumentTypeEnum.BLUE_TONGUE))) {
if(applicationAmendmentRequest.getBlueTongueField1()==null || applicationAmendmentRequest.getBlueTongueField2()==null){
throw new CustomValidationException(Status.VALIDATION_ERROR,Translator.toLocale(GepafinConstant.REQUIRED_AMOUNT_FIELD_NOT_PROVIDED));
}
}
if(Boolean.FALSE.equals(applicationEntity.getStatus().equals(ApplicationStatusTypeEnum.ADMISSIBLE.getValue()))) {
throw new CustomValidationException(Status.VALIDATION_ERROR,Translator.toLocale(GepafinConstant.INVALID_APPLICATION_STATUS));
@@ -1922,6 +1927,8 @@ public class ApplicationAmendmentRequestDao {
protocolDao.saveProtocolEntity(protocolEntity);
applicationAmendmentRequestEntity.setProtocol(protocolEntity);
applicationAmendmentRequestEntity.setAmendmentDocumentType(applicationAmendmentRequest.getAmendmentDocumentType().getValue());
applicationAmendmentRequestEntity.setBlueTongueField1(applicationAmendmentRequest.getBlueTongueField1());
applicationAmendmentRequestEntity.setBlueTongueField2(applicationAmendmentRequest.getBlueTongueField2());
ApplicationAmendmentRequestEntity applicationAmendment = saveApplicationAmendmentRequestEntity(applicationAmendmentRequestEntity, null, VersionActionTypeEnum.INSERT);
log.info("Amendment request saved with ID={}", applicationAmendment.getId());

View File

@@ -145,7 +145,7 @@ public class EmailNotificationDao {
List<AttachmentRequest> attachmentRequests =new ArrayList<>();
List<String> urls=new ArrayList<>();
List<DocumentEntity> documentEntities=new ArrayList<>();
if(systemEmailTemplateResponse.getEmailScenario().equals(EmailScenarioTypeEnum.SPECIAL_APPLICATION_AMENDMENT_REQUESTED)) {
if(systemEmailTemplateResponse.getEmailScenario().equals(EmailScenarioTypeEnum.SPECIAL_APPLICATION_AMENDMENT_REQUESTED) || systemEmailTemplateResponse.getEmailScenario().equals(EmailScenarioTypeEnum.SPECIAL_APPLICATION_AMENDMENT_REQUESTED_BLUE_TONGUE)) {
if(Boolean.TRUE.equals(AmendmentDocumentTypeEnum.ALTRE_GARANZIE.getValue().equals(applicationAmendmentRequest.getAmendmentDocumentType()))){
documentEntities=documentRepository.findBySourceInAndIsDeletedFalse(List.of(applicationAmendmentRequest.getAmendmentDocumentType(),"MODELLO_AUTOCERTIFICAZIONE","MODELLO_PRIVACY"));
}else {
@@ -517,7 +517,11 @@ public class EmailNotificationDao {
public void sendMailforSpecialAmendment(ApplicationAmendmentRequestEntity applicationAmendmentRequestEntity,ApplicationEntity applicationEntity) {
Map<String, String> bodyPlaceholders = prepareEmailPlaceholders(applicationEntity, applicationAmendmentRequestEntity);
sendEmail(applicationEntity, SystemEmailTemplatesEntity.SystemEmailTemplatesEntityTypeEnum.SPECIAL_APPLICATION_AMENDMENT_REQUESTED, bodyPlaceholders, null,
SystemEmailTemplatesEntity.SystemEmailTemplatesEntityTypeEnum systemEmailTemplatesEntityTypeEnum= SystemEmailTemplatesEntity.SystemEmailTemplatesEntityTypeEnum.SPECIAL_APPLICATION_AMENDMENT_REQUESTED;
if(applicationAmendmentRequestEntity.getAmendmentDocumentType().equals(AmendmentDocumentTypeEnum.BLUE_TONGUE.getValue())){
systemEmailTemplatesEntityTypeEnum= SystemEmailTemplatesEntity.SystemEmailTemplatesEntityTypeEnum.SPECIAL_APPLICATION_AMENDMENT_REQUESTED_BLUE_TONGUE;
}
sendEmail(applicationEntity,systemEmailTemplatesEntityTypeEnum, bodyPlaceholders, null,
applicationAmendmentRequestEntity.getId(),null);
}
public void sendEmailForApplicationContracted(ApplicationEntity applicationEntity,ApplicationContractEntity applicationContractEntity,UserEntity user) {