From 3aa3cdac5116241ad807b1b7fc80254804310a73 Mon Sep 17 00:00:00 2001 From: nmohammednawaz-egov Date: Tue, 5 Mar 2024 12:41:34 +0530 Subject: [PATCH 1/3] Root level tenant id passed for localiztion servic call --- .../java/org/egov/works/service/NotificationService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/contracts/src/main/java/org/egov/works/service/NotificationService.java b/backend/contracts/src/main/java/org/egov/works/service/NotificationService.java index 3d4238f949..bae5419b91 100644 --- a/backend/contracts/src/main/java/org/egov/works/service/NotificationService.java +++ b/backend/contracts/src/main/java/org/egov/works/service/NotificationService.java @@ -419,11 +419,12 @@ private String getMessage(ContractRequest request, boolean isCBORole) { */ public String getMessage(ContractRequest request, String msgCode) { String locale = "en_IN"; + String rootTenantId = request.getContract().getTenantId().split("\\.")[0]; if(request.getRequestInfo().getMsgId().split("\\|").length > 1) locale = request.getRequestInfo().getMsgId().split("\\|")[1]; - Map> localizedMessageMap = getLocalisedMessages(request.getRequestInfo(), request.getContract().getTenantId(), + Map> localizedMessageMap = getLocalisedMessages(request.getRequestInfo(), rootTenantId, locale, ContractServiceConstants.CONTRACTS_MODULE_CODE); - return localizedMessageMap.get(locale + "|" + request.getContract().getTenantId()).get(msgCode); + return localizedMessageMap.get(locale + "|" + rootTenantId).get(msgCode); } private String buildMessageForRevisedContract(Map userDetailsForSMS, String message, Boolean isSendBack) { if (Boolean.FALSE.equals(isSendBack)) { From 4019076d733f9e83b7aafd439bad2acbd342f7d9 Mon Sep 17 00:00:00 2001 From: nmohammednawaz-egov Date: Wed, 6 Mar 2024 12:34:42 +0530 Subject: [PATCH 2/3] Root level tenant id added --- .../src/main/java/org/egov/service/NotificationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/muster-roll/src/main/java/org/egov/service/NotificationService.java b/backend/muster-roll/src/main/java/org/egov/service/NotificationService.java index 3766b940d2..9e9945508c 100644 --- a/backend/muster-roll/src/main/java/org/egov/service/NotificationService.java +++ b/backend/muster-roll/src/main/java/org/egov/service/NotificationService.java @@ -69,7 +69,7 @@ public void sendNotificationToCBO(MusterRollRequest musterRollRequest){ * @return */ public String getMessage(MusterRollRequest musterRollRequest, String msgCode){ - String tenantId = musterRollRequest.getMusterRoll().getTenantId(); + String tenantId = musterRollRequest.getMusterRoll().getTenantId().split("\\.")[0];; RequestInfo requestInfo = musterRollRequest.getRequestInfo(); String locale = "en_IN"; if(requestInfo.getMsgId().split("\\|").length > 1) From 956a6af9c6600e839714b1ecf35ad7391a97c786 Mon Sep 17 00:00:00 2001 From: nmohammednawaz-egov Date: Wed, 6 Mar 2024 12:34:58 +0530 Subject: [PATCH 3/3] Root level tenant id added --- .../egov/digit/expense/service/NotificationService.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/expense/src/main/java/org/egov/digit/expense/service/NotificationService.java b/backend/expense/src/main/java/org/egov/digit/expense/service/NotificationService.java index e34d66054b..a455f83247 100644 --- a/backend/expense/src/main/java/org/egov/digit/expense/service/NotificationService.java +++ b/backend/expense/src/main/java/org/egov/digit/expense/service/NotificationService.java @@ -79,14 +79,15 @@ public void sendNotificationForSupervisionBill(BillRequest billRequest){ public String getMessage(RequestInfo requestInfo, String tenantId, String msgCode, Map addtionalFields){ String locale = "en_IN"; + String rootTenantId = tenantId.split("\\.")[0]; if(requestInfo.getMsgId().split("\\|").length > 1) locale = requestInfo.getMsgId().split("\\|")[1]; - Map> localizedMessageMap = localizationUtil.getLocalisedMessages(requestInfo, tenantId, + Map> localizedMessageMap = localizationUtil.getLocalisedMessages(requestInfo, rootTenantId, locale, EXPENSE_CALCULATOR_MODULE_CODE); if(config.isAdditonalFieldRequired()){ - setAdditionalFields(requestInfo,tenantId,msgCode,addtionalFields); + setAdditionalFields(requestInfo,rootTenantId,msgCode,addtionalFields); } - return localizedMessageMap.get(locale + "|" + tenantId).get(msgCode); + return localizedMessageMap.get(locale + "|" + rootTenantId).get(msgCode); } public String buildMessageReplaceVariables(String message, String billNumber, String amount){