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 @@ -37,6 +37,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestHeader;

Check warning on line 40 in src/main/java/com/iemr/common/controller/beneficiary/BeneficiaryRegistrationController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhUUnCDYBCZqcdFk&open=AZ2ulhUUnCDYBCZqcdFk&pullRequest=397
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
Expand Down Expand Up @@ -74,6 +75,8 @@
import com.iemr.common.service.userbeneficiarydata.TitleService;
import com.iemr.common.utils.CookieUtil;
import com.iemr.common.utils.JwtUtil;
import com.iemr.common.utils.CookieUtil;

Check warning on line 78 in src/main/java/com/iemr/common/controller/beneficiary/BeneficiaryRegistrationController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhUUnCDYBCZqcdFl&open=AZ2ulhUUnCDYBCZqcdFl&pullRequest=397
import com.iemr.common.utils.JwtUtil;

Check warning on line 79 in src/main/java/com/iemr/common/controller/beneficiary/BeneficiaryRegistrationController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhUUnCDYBCZqcdFm&open=AZ2ulhUUnCDYBCZqcdFm&pullRequest=397
import com.iemr.common.utils.mapper.InputMapper;
import com.iemr.common.utils.mapper.OutputMapper;
import com.iemr.common.utils.response.OutputResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map;

Check warning on line 29 in src/main/java/com/iemr/common/service/beneficiary/IEMRSearchUserServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhS3nCDYBCZqcdFi&open=AZ2ulhS3nCDYBCZqcdFi&pullRequest=397
import java.util.Objects;

import org.slf4j.Logger;
Expand Down Expand Up @@ -78,6 +79,7 @@
import com.iemr.common.repository.userbeneficiarydata.SexualOrientationRepository;
import com.iemr.common.repository.userbeneficiarydata.TitleRepository;
import com.iemr.common.utils.exception.IEMRException;
import com.iemr.common.utils.exception.IEMRException;

Check warning on line 82 in src/main/java/com/iemr/common/service/beneficiary/IEMRSearchUserServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhS3nCDYBCZqcdFj&open=AZ2ulhS3nCDYBCZqcdFj&pullRequest=397

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,22 @@
*/
package com.iemr.common.service.beneficiary;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.net.URLEncoder;

Check warning on line 26 in src/main/java/com/iemr/common/service/beneficiary/IdentityBeneficiaryServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhPYnCDYBCZqcdFa&open=AZ2ulhPYnCDYBCZqcdFa&pullRequest=397
import java.nio.charset.StandardCharsets;

Check warning on line 27 in src/main/java/com/iemr/common/service/beneficiary/IdentityBeneficiaryServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhPYnCDYBCZqcdFb&open=AZ2ulhPYnCDYBCZqcdFb&pullRequest=397
import java.util.ArrayList;
import java.util.Collections;
import java.util.Collections;

Check warning on line 30 in src/main/java/com/iemr/common/service/beneficiary/IdentityBeneficiaryServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhPYnCDYBCZqcdFc&open=AZ2ulhPYnCDYBCZqcdFc&pullRequest=397
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map;

Check warning on line 35 in src/main/java/com/iemr/common/service/beneficiary/IdentityBeneficiaryServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhPYnCDYBCZqcdFd&open=AZ2ulhPYnCDYBCZqcdFd&pullRequest=397

import com.google.gson.*;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
Expand All @@ -53,6 +58,12 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

import org.springframework.beans.factory.annotation.Value;

Check warning on line 61 in src/main/java/com/iemr/common/service/beneficiary/IdentityBeneficiaryServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhPYnCDYBCZqcdFe&open=AZ2ulhPYnCDYBCZqcdFe&pullRequest=397

import com.fasterxml.jackson.databind.DeserializationFeature;

Check warning on line 63 in src/main/java/com/iemr/common/service/beneficiary/IdentityBeneficiaryServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhPYnCDYBCZqcdFf&open=AZ2ulhPYnCDYBCZqcdFf&pullRequest=397
import com.fasterxml.jackson.databind.JsonNode;

Check warning on line 64 in src/main/java/com/iemr/common/service/beneficiary/IdentityBeneficiaryServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhPYnCDYBCZqcdFg&open=AZ2ulhPYnCDYBCZqcdFg&pullRequest=397
import com.fasterxml.jackson.databind.ObjectMapper;

Check warning on line 65 in src/main/java/com/iemr/common/service/beneficiary/IdentityBeneficiaryServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this duplicated import.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ2ulhPYnCDYBCZqcdFh&open=AZ2ulhPYnCDYBCZqcdFh&pullRequest=397

@Service
public class IdentityBeneficiaryServiceImpl implements IdentityBeneficiaryService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ public void setSubCategoryRepository(SubCategoryRepository subCategoryRepository
@Value("${tempFilePath}")
private String tempFilePath;

@Value("${tempFilePath}")
private String tempFilePath;

@Override
public String getKMFileLists(String request) throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,14 @@ public String sendMeetingLink(VideoCallRequest request) throws Exception {
@Override
public String updateCallStatus(UpdateCallRequest callRequest) throws Exception {
String meetingLink = callRequest.getMeetingLink();
meetingLink,
callRequest.getCallStatus(),
callRequest.getCallDuration(),
callRequest.getModifiedBy(),
callRequest.getIsLinkUsed());


// 1. Verify the row actually exists before attempting update
VideoCallParameters existing = videoCallRepository.findByMeetingLink(meetingLink);
if (existing == null) {
logger.error("[updateCallStatus] No row found in t_videocallparameter for meetingLink={}", meetingLink);
throw new Exception("No meeting found for link: " + meetingLink);
}
existing.getMeetingID(),
existing.getCallStatus(),
existing.isLinkUsed(),
existing.getRecordingFileName());


// 2. Derive the two fields
boolean linkUsed = callRequest.getIsLinkUsed() == null || callRequest.getIsLinkUsed();
String recordingFileName = buildRecordingFileName(meetingLink);
Expand All @@ -149,11 +140,7 @@ public String updateCallStatus(UpdateCallRequest callRequest) throws Exception {

// 4. Re-fetch AFTER the update so the returned JSON reflects what is now in the DB
VideoCallParameters updated = videoCallRepository.findByMeetingLink(meetingLink);
updated.getCallStatus(),
updated.getCallDuration(),
updated.isLinkUsed(),
updated.getRecordingFileName());


return OutputMapper.gsonWithoutExposeRestriction()
.toJson(videoCallMapper.videoCallToResponse(updated));
}
Expand Down
Loading