From d5e4f91d5828f2b30fe05c8c34bd08e275affadc Mon Sep 17 00:00:00 2001 From: devikasuresh20 <57424483+devikasuresh20@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:21:52 +0530 Subject: [PATCH] Change in Phone No Comparison while fetching call audit details (#94) * Added limit condition while fetching Item stock entry details in eaushadha API * Minor modifications in 1097 referral sms template * Added institute name along with referral SMS * Removed myapp propeties and minor change in interceptor. * Change in Phone No comparison while fetching call audit details --------- Co-authored-by: Devika --- .../callhandling/BeneficiaryCallServiceImpl.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/iemr/common/service/callhandling/BeneficiaryCallServiceImpl.java b/src/main/java/com/iemr/common/service/callhandling/BeneficiaryCallServiceImpl.java index c554ee8d..55f6b09c 100644 --- a/src/main/java/com/iemr/common/service/callhandling/BeneficiaryCallServiceImpl.java +++ b/src/main/java/com/iemr/common/service/callhandling/BeneficiaryCallServiceImpl.java @@ -1070,8 +1070,12 @@ private Long getTotalCallCount(CriteriaBuilder criteriaBuilder, BeneficiaryCall predicates.add(criteriaBuilder.equal(entityRoot.get("callTypeID"), callRequest.getCallTypeID())); } - predicates.add(criteriaBuilder.like(entityRoot.get("phoneNo"), - (callRequest.getPhoneNo() == null) ? "%%" : callRequest.getPhoneNo())); +// predicates.add(criteriaBuilder.like(entityRoot.get("phoneNo"), +// (callRequest.getPhoneNo() == null) ? "%%" : callRequest.getPhoneNo())); + + if (callRequest.getPhoneNo() != null) { + predicates.add(criteriaBuilder.equal(entityRoot.get("phoneNo"), callRequest.getPhoneNo())); + } if (callRequest.getInboundOutbound() != null) { callRequest.setIsOutbound(callRequest.getInboundOutbound().equalsIgnoreCase("outbound") ? true : false); @@ -1211,8 +1215,12 @@ public String filterCallList(String request, String auth) throws IEMRException { predicates.add(criteriaBuilder.equal(root.get("callTypeID"), callRequest.getCallTypeID())); } - predicates.add(criteriaBuilder.like(root.get("phoneNo"), - (callRequest.getPhoneNo() == null) ? "%%" : callRequest.getPhoneNo())); +// predicates.add(criteriaBuilder.like(root.get("phoneNo"), +// (callRequest.getPhoneNo() == null) ? "%%" : callRequest.getPhoneNo())); + + if (callRequest.getPhoneNo() != null) { + predicates.add(criteriaBuilder.equal(root.get("phoneNo"), callRequest.getPhoneNo())); + } if (callRequest.getInboundOutbound() != null) { callRequest.setIsOutbound(callRequest.getInboundOutbound().equalsIgnoreCase("outbound") ? true : false);