Skip to content

Commit 6f6dd14

Browse files
Merge pull request #75 from ravishanigarapu/develop
logic change
2 parents 812c205 + 422ee63 commit 6f6dd14

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,14 @@ List<OutboundCalls> getAllocatedRecordsUser(Pageable pageable, @Param("allocated
151151
// @Param("phoneNoType") String phoneNoType);
152152
@Query(value = " SELECT COUNT(1) FROM OutboundCalls AS t WHERE t.allocatedUserId=:allocatedUserId AND "
153153
+ " ((:fDate between t.callDateFrom AND t.callDateTo) OR (:tDate between t.callDateFrom AND t.callDateTo)) AND t.callStatus=:callStatus "
154-
+ " AND t.phoneNumberType=:phoneNoType AND t.childId IS NULL AND t.motherId IS NOT NULL AND t.isFurtherCallRequired != 0")
154+
+ " AND t.phoneNumberType=:phoneNoType AND t.childId IS NULL AND t.motherId IS NOT NULL AND (t.isFurtherCallRequired = true OR t.isFurtherCallRequired IS NULL )")
155155
int getAllocatedRecordsCountMotherUser(@Param("allocatedUserId") Integer allocatedUserId,
156156
@Param("fDate") Timestamp fDate, @Param("tDate") Timestamp tDate, @Param("callStatus") String callStatus,
157157
@Param("phoneNoType") String phoneNoType);
158158

159159
@Query(value = " SELECT COUNT(1) FROM OutboundCalls AS t INNER JOIN MotherRecord AS mv ON t.motherId = mv.ecdIdNo WHERE t.allocatedUserId=:allocatedUserId AND "
160160
+ " ((:fDate between t.callDateFrom AND t.callDateTo) OR (:tDate between t.callDateFrom AND t.callDateTo)) AND t.callStatus=:callStatus "
161-
+ " AND t.phoneNumberType=:phoneNoType AND t.childId IS NULL AND t.motherId IS NOT NULL AND mv.preferredLanguage = :preferredLanguage AND t.isFurtherCallRequired !=0 ")
161+
+ " AND t.phoneNumberType=:phoneNoType AND t.childId IS NULL AND t.motherId IS NOT NULL AND mv.preferredLanguage = :preferredLanguage AND (t.isFurtherCallRequired = true OR t.isFurtherCallRequired IS NULL ) ")
162162
int getAllocatedRecordsCountMotherUserANM(@Param("allocatedUserId") Integer allocatedUserId,
163163
@Param("fDate") Timestamp fDate, @Param("tDate") Timestamp tDate, @Param("callStatus") String callStatus,
164164
@Param("phoneNoType") String phoneNoType,@Param("preferredLanguage") String preferredLanguage);

0 commit comments

Comments
 (0)