Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ public Integer updateBenificiary(BeneficiaryModel benificiaryDetails, String aut
Integer updatedRows = 0;

IdentityEditDTO identityEditDTO = identityBenEditMapper.BenToIdentityEditMapper(benificiaryDetails);
if(null != benificiaryDetails.getI_bendemographics())
if(null != benificiaryDetails.getI_bendemographics()) {
identityEditDTO.setCommunity(benificiaryDetails.getI_bendemographics().getCommunityName());
identityEditDTO.setCommunityName(benificiaryDetails.getI_bendemographics().getCommunityName());
}
if (benificiaryDetails.getBeneficiaryIdentities() != null
&& benificiaryDetails.getBeneficiaryIdentities().size() > 0) {
identityEditDTO.setIdentities(Identity.createIdentity(benificiaryDetails.getBeneficiaryIdentities(),
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,9 @@ private static String getSubstringInRange(String input, int startIndex, int endI
@Override
public void publishSMS() {
RestTemplate restTemplateLogin = new RestTemplate();
if (!SMSServiceImpl.publishingSMS) {
try {

try {
if (!SMSServiceImpl.publishingSMS) {
SMSServiceImpl.publishingSMS = true;
Boolean doSendSMS = ConfigProperties.getBoolean("send-sms");
String sendSMSURL = ConfigProperties.getPropertyByName("send-message-url");
Expand Down Expand Up @@ -875,11 +876,11 @@ public void publishSMS() {
sms = smsNotification.save(sms);
}
}
} catch (Exception e) {
logger.error("publishSMS failed with error " + e.getMessage());
} finally {
SMSServiceImpl.publishingSMS = false;
}
} catch (Exception e) {
logger.error("publishSMS failed with error " + e.getMessage());
} finally {
SMSServiceImpl.publishingSMS = false;
}
}

Expand Down
Loading