Done ticket GEPAFINBE-227
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package net.gepafin.tendermanagement.dao;
|
||||
|
||||
import com.amazonaws.services.dynamodbv2.xspec.S;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
@@ -1153,8 +1154,16 @@ public class ApplicationDao {
|
||||
// Create the map for body placeholders
|
||||
Map<String, String> bodyPlaceholders = new HashMap<>();
|
||||
bodyPlaceholders.put("{{call_name}}", call.getName());
|
||||
bodyPlaceholders.put("{{protocol_number}}", protocol.getProtocolNumber().toString());
|
||||
bodyPlaceholders.put("{{date}}", DateTimeUtil.formatLocalDateTime(protocol.getCreatedDate(), GepafinConstant.DD_MM_YYYY));
|
||||
String protocolNumber=applicationEntity.getProtocol().getExternalProtocolNumber();
|
||||
if(protocolNumber==null){
|
||||
protocolNumber= String.valueOf(applicationEntity.getProtocol().getProtocolNumber());
|
||||
}
|
||||
bodyPlaceholders.put("{{protocol_number}}",protocolNumber);
|
||||
String protocolDate= DateTimeUtil.formatLocalDateTime(protocol.getCreatedDate(), GepafinConstant.DD_MM_YYYY);
|
||||
if(protocol.getExternalProtocolDate()!=null){
|
||||
protocolDate= DateTimeUtil.formatLocalDateTime(protocol.getExternalProtocolDate(), GepafinConstant.DD_MM_YYYY);
|
||||
}
|
||||
bodyPlaceholders.put("{{date}}", protocolDate);
|
||||
bodyPlaceholders.put("{{time}}", DateTimeUtil.parseLocalTimeToString(protocol.getTime(), GepafinConstant.HH_MM_SS));
|
||||
|
||||
// Replace placeholders in the subject and body
|
||||
@@ -1204,8 +1213,17 @@ public class ApplicationDao {
|
||||
// Create the map for body placeholders
|
||||
Map<String, String> bodyPlaceholders = new HashMap<>();
|
||||
bodyPlaceholders.put("{{call_name}}", call.getName());
|
||||
bodyPlaceholders.put("{{protocol_number}}", protocol.getProtocolNumber().toString());
|
||||
bodyPlaceholders.put("{{date}}", DateTimeUtil.formatLocalDateTime(protocol.getCreatedDate(), GepafinConstant.DD_MM_YYYY));
|
||||
String protocolNumber=applicationEntity.getProtocol().getExternalProtocolNumber();
|
||||
|
||||
if(protocolNumber==null){
|
||||
protocolNumber= String.valueOf(applicationEntity.getProtocol().getProtocolNumber());
|
||||
}
|
||||
String protocolDate= DateTimeUtil.formatLocalDateTime(protocol.getCreatedDate(), GepafinConstant.DD_MM_YYYY);
|
||||
if(protocol.getExternalProtocolDate()!=null){
|
||||
protocolDate= DateTimeUtil.formatLocalDateTime(protocol.getExternalProtocolDate(), GepafinConstant.DD_MM_YYYY);
|
||||
}
|
||||
bodyPlaceholders.put("{{protocol_number}}", protocolNumber);
|
||||
bodyPlaceholders.put("{{date}}",protocolDate);
|
||||
bodyPlaceholders.put("{{time}}", DateTimeUtil.parseLocalTimeToString(protocol.getTime(), GepafinConstant.HH_MM_SS));
|
||||
|
||||
// Replace placeholders in the subject and body
|
||||
@@ -2323,7 +2341,11 @@ public class ApplicationDao {
|
||||
bodyPlaceholders.put("{{call_name}}", call.getName());
|
||||
bodyPlaceholders.put("{{application_id}}", applicationEntity.getId().toString());
|
||||
bodyPlaceholders.put("{{company_name}}", company.getCompanyName());
|
||||
bodyPlaceholders.put("{{protocol_number}}", applicationEntity.getProtocol().getProtocolNumber().toString());
|
||||
String protocolNumber=applicationEntity.getProtocol().getExternalProtocolNumber();
|
||||
if(protocolNumber==null){
|
||||
protocolNumber= String.valueOf(applicationEntity.getProtocol().getProtocolNumber());
|
||||
}
|
||||
bodyPlaceholders.put("{{protocol_number}}", protocolNumber);
|
||||
bodyPlaceholders.put("{{user_action_id}}",emailLogRequest.getUserActionId().toString());
|
||||
|
||||
String subject = Utils.replacePlaceholders(systemEmailTemplateResponse.getSubject(), subjectPlaceholders);
|
||||
|
||||
Reference in New Issue
Block a user