diff --git a/src/main/java/com/iemr/ecd/repo/call_conf_allocation/MotherRecordRepo.java b/src/main/java/com/iemr/ecd/repo/call_conf_allocation/MotherRecordRepo.java index 22bde02..c82008e 100644 --- a/src/main/java/com/iemr/ecd/repo/call_conf_allocation/MotherRecordRepo.java +++ b/src/main/java/com/iemr/ecd/repo/call_conf_allocation/MotherRecordRepo.java @@ -64,7 +64,7 @@ public List getMotherRecordForAllocation(@Param("fDate") Timestamp // get eligible introductory Records @Query(value = " SELECT COUNT(1) FROM MotherRecord as t WHERE t.isAllocated=:isAllocated AND " - + " t.createdDate >=:fDate AND t.createdDate <=:tDate AND t.whomPhoneNo=:whomPhoneNo AND (t.isFurtherCallRequired = true OR t.isFurtherCallRequired IS NULL ) ") + + " t.createdDate >=:fDate AND t.createdDate <=:tDate AND t.whomPhoneNo=:whomPhoneNo") public int getRecordCount(@Param("isAllocated") Boolean isAllocated, @Param("fDate") Timestamp fDate, @Param("tDate") Timestamp tDate, @Param("whomPhoneNo") String whomPhoneNo); diff --git a/src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java b/src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java index f5a96f3..ea4b286 100644 --- a/src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java +++ b/src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java @@ -342,7 +342,7 @@ List getIntroductoryRecordsUser(@Param("psmId") Integer psmId, @Query(value = " SELECT COUNT(1) FROM OutboundCalls AS t INNER JOIN MotherRecord AS mv ON t.motherId = mv.ecdIdNo WHERE t.allocationStatus =:allocationStatus AND " + " t.psmId=:psmId AND ((:fDate between t.callDateFrom AND t.callDateTo) OR (:tDate between t.callDateFrom AND t.callDateTo)) AND " + " t.childId IS NULL AND t.motherId IS NOT NULL AND (t.isHighRisk = false OR t.isHighRisk IS NULL ) " - + " AND t.phoneNumberType=:phoneNoType AND t.deleted = false AND mv.preferredLanguage = :preferredLanguage ") + + " AND t.phoneNumberType=:phoneNoType AND t.deleted = false AND mv.preferredLanguage = :preferredLanguage AND (t.isFurtherCallRequired = true OR t.isFurtherCallRequired IS NULL ) ") int getMotherUnAllocatedCountLRByLanguage(@Param("allocationStatus") String allocationStatus, @Param("psmId") Integer psmId, @Param("fDate") Timestamp fDate, @Param("tDate") Timestamp tDate, @Param("phoneNoType") String phoneNoType, @Param("preferredLanguage") String preferredLanguage); @@ -350,7 +350,7 @@ int getMotherUnAllocatedCountLRByLanguage(@Param("allocationStatus") String allo @Query(value = " SELECT COUNT(1) FROM OutboundCalls AS t INNER JOIN ChildRecord AS cv ON t.childId = cv.ecdIdNoChildId WHERE t.allocationStatus =:allocationStatus AND " + " t.psmId=:psmId AND ((:fDate between t.callDateFrom AND t.callDateTo) OR (:tDate between t.callDateFrom AND t.callDateTo)) AND " + " t.childId IS NOT NULL AND (t.isHrni = false OR t.isHrni IS NULL ) " - + " AND t.phoneNumberType=:phoneNoType AND t.deleted = false AND cv.preferredLanguage = :preferredLanguage") + + " AND t.phoneNumberType=:phoneNoType AND t.deleted = false AND cv.preferredLanguage = :preferredLanguage AND (t.isFurtherCallRequired = true OR t.isFurtherCallRequired IS NULL )") int getChildUnAllocatedCountLRByLanguage(@Param("allocationStatus") String allocationStatus, @Param("psmId") Integer psmId, @Param("fDate") Timestamp fDate, @Param("tDate") Timestamp tDate, @Param("phoneNoType") String phoneNoType, @Param("preferredLanguage") String preferredLanguage);