Skip to content

Commit d7a3c6b

Browse files
SR20290919SR20290919
authored andcommitted
adding code rabbit fixes
1 parent 9b83271 commit d7a3c6b

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/GrievanceResponse.java

src/main/java/com/iemr/common/repository/grievance/GrievanceDataRepo.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ int updateComplaintResolution(@Param("complaintResolution") String complaintReso
100100
public List<Object[]> getCallCounter(@Param("complaintID") String complaintID);
101101

102102
@Modifying
103-
@Query("UPDATE GrievanceDetails g SET g.isCompleted = :isCompleted "
103+
@Query("UPDATE GrievanceDetails g SET g.isCompleted = :isCompleted, g. g.retryNeeded = :retryNeeded "
104104
+ "WHERE g.complaintID = :complaintID AND g.userID = :userID AND g.beneficiaryRegID = :beneficiaryRegID "
105105
+ "AND g.providerServiceMapID = :providerServiceMapID")
106106
@Transactional
107107
public int updateCompletedStatusInCall(@Param("isCompleted") Boolean isCompleted,
108+
@Param("retryNeeded") Boolean retryNeeded,
108109
@Param("complaintID") String complaintID,
109110
@Param("userID") Integer userID,
110111
@Param("beneficiaryRegID") Long beneficiaryRegID,

src/main/java/com/iemr/common/service/grievance/GrievanceDataSyncImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,10 @@ public String completeGrievanceCall(String request) throws Exception {
558558
else {
559559
response = "failure";
560560
}
561-
} else if (callCounter == grievanceAllocationRetryConfiguration) {
561+
} else if (grievanceCallStatus.getCallCounter()== grievanceAllocationRetryConfiguration) {
562562
// Max attempts reached, no further reattempt
563-
updateCount = grievanceDataRepo.updateCompletedStatusInCall(isCompleted, complaintID, userID, beneficiaryRegID, providerServiceMapId);
564563
grievanceCallStatus.setRetryNeeded(false);
564+
updateCount = grievanceDataRepo.updateCompletedStatusInCall(isCompleted, grievanceCallStatus.getRetryNeeded(), complaintID, userID, beneficiaryRegID, providerServiceMapId);
565565
response = "max_attempts_reached"; // Indicate that max attempts are reached
566566

567567

0 commit comments

Comments
 (0)