Amendment request mail changes

This commit is contained in:
rajesh
2025-09-17 16:50:53 +05:30
parent e182a550f1
commit 101de0a8a7
2 changed files with 28 additions and 3 deletions

View File

@@ -594,7 +594,26 @@ public class GepafinConstant {
"</body>\n" +
"</html>";
public static final String APPLICATION_SUBMISSION_MAIL_SUBJECT="Modello AR1 GARANZIA PARTECIPAZIONI E FINANZIAMENTI S.P.A. - PER BREVITA' GEPAFIN S.P.A";
public static final String APPLICATION_AMENDMENT_REQUESTED_MAIL_BODY="<html>\n" +
" <body style=\"font-family: Arial, sans-serif; color: #000; line-height: 1.6;\">\n" +
" <div style=\"padding: 20px; border: 1px solid #ddd; border-radius: 8px; max-width: 600px; margin: auto;\">\n" +
" <p><strong>DOCUMENTALE</strong></p>\n" +
" <p>Buongiorno,</p>\n" +
" <p>In riferimento al questionario antiriciclaggio\n" +
" “<strong>{{call_name}}</strong>“ di cui al <strong>Protocollo n. {{protocol_number}} del\n" +
" {{protocol_date}} e {{protocol_time}}</strong>, alla luce dell'attività istruttoria svolta,\n" +
" segnaliamo quanto segue:\n" +
" </p>\n" +
" {{note}}\n" +
" <p>Vi invitiamo a fornire quanto sopra richiesto integrando la documentazione sia caricandola all'interno dello sportello\n" +
" online <a href=\"{{platform_link}}\">{{platform_link}}</a> che inviandola a mezzo PEC all'indirizzo\n" +
" bandi.gepafin@legalmail.it entro e <strong>non oltre {{response_days}} giorni</strong> \n" +
" </p>\n" +
" <p>Distinti Saluti,</p>\n" +
" <p><strong>{{email_signature}}</strong></p>\n" +
" </div>\n" +
" </body>\n" +
"</html>";
}

View File

@@ -18,6 +18,7 @@ import net.gepafin.tendermanagement.service.impl.EmailServiceFactory;
import net.gepafin.tendermanagement.util.DateTimeUtil;
import net.gepafin.tendermanagement.service.impl.SystemEmailService;
import net.gepafin.tendermanagement.util.Utils;
import net.gepafin.tendermanagement.util.Validator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -76,6 +77,9 @@ public class EmailNotificationDao {
@Autowired
private SystemEmailTemplatesDao systemEmailTemplatesDao;
@Autowired
private Validator validator;
private void sendEmail(ApplicationEntity applicationEntity, SystemEmailTemplatesEntity.SystemEmailTemplatesEntityTypeEnum templateType, Map<String, String> bodyPlaceholders,
List<String> additionalRecipients, Long amendmentId) {
@@ -95,7 +99,9 @@ public class EmailNotificationDao {
Map<String, String> bodyPlaceholders
) {
SystemEmailTemplateResponse systemEmailTemplateResponse = systemEmailTemplatesService.retrieveTemplateByTypeAndCall(templateType, hubEntity, null);
if(Boolean.TRUE.equals(templateType.equals(SystemEmailTemplatesEntity.SystemEmailTemplatesEntityTypeEnum.DOCUMENTATION_INTEGRATION_REQUEST)) && Boolean.TRUE.equals(validator.isProductionProfileActivated()) && applicationEntity.getCall().getId().equals(23l)) {
systemEmailTemplateResponse.setHtmlContent(systemEmailTemplatesDao.replaceEmailSignature(hubEntity,GepafinConstant.APPLICATION_AMENDMENT_REQUESTED_MAIL_BODY,null));
}
Map<String, String> subjectPlaceholders = new HashMap<>();
CompanyEntity company = companyService.validateCompany(applicationEntity.getCompanyId());
subjectPlaceholders.put("{{call_name}}", applicationEntity.getCall().getName());