From 9ea7d89a19a46cef06237278dba7159e26240727 Mon Sep 17 00:00:00 2001 From: SR20290919 Date: Wed, 21 May 2025 17:09:28 +0530 Subject: [PATCH 1/2] added functionality for MO worklist in call unallocation --- .../OutboundCallsRepo.java | 15 + .../CallAllocationImpl.java | 295 ++++++++++++------ 2 files changed, 219 insertions(+), 91 deletions(-) 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 64de2c6..251eca1 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 @@ -364,5 +364,20 @@ int getChildUnAllocatedCountLRByLanguage(@Param("allocationStatus") String alloc @Query(" UPDATE OutboundCalls SET isFurtherCallRequired = :isFurtherCallRequired WHERE motherId = :motherId AND childId IS NULL AND callDateTo>current_date()") public int updateIsFurtherCallRequiredForUpcomingCallForMother(@Param("motherId") Long motherId, @Param("isFurtherCallRequired") Boolean isFurtherCallRequired); + @Query(value = " SELECT t FROM OutboundCalls AS t INNER JOIN MotherRecord AS mv ON t.motherId = mv.ecdIdNo WHERE t.allocatedUserId=:allocatedUserId AND " + + " t.callStatus=:callStatus AND t.phoneNumberType=:phoneNoType " + + " 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 mv.preferredLanguage = :preferredLanguage") + Page getAllocatedRecordsUserByRecordTypeAndPhoneTypeMotherMO(Pageable pageable, + @Param("allocatedUserId") Integer allocatedUserId, @Param("callStatus") String callStatus, + @Param("phoneNoType") String phoneNoType, @Param("fDate") Timestamp fDate, @Param("tDate") Timestamp tDate, @Param("preferredLanguage") String preferredLanguage); + @Query(value = " SELECT t FROM OutboundCalls AS t INNER JOIN ChildRecord AS cv ON t.childId = cv.ecdIdNoChildId WHERE t.allocatedUserId=:allocatedUserId AND " + + " t.callStatus=:callStatus AND t.phoneNumberType=:phoneNoType " + + " AND ((:fDate between t.callDateFrom AND t.callDateTo) OR (:tDate between t.callDateFrom AND t.callDateTo)) AND t.childId IS NOT NULL AND cv.preferredLanguage = :preferredLanguage ") + Page getAllocatedRecordsUserByRecordTypeAndPhoneTypeChildMO(Pageable pageable, + @Param("allocatedUserId") Integer allocatedUserId, @Param("callStatus") String callStatus, + @Param("phoneNoType") String phoneNoType, @Param("fDate") Timestamp fDate, @Param("tDate") Timestamp tDate,@Param("preferredLanguage") String preferredLanguage); + + } diff --git a/src/main/java/com/iemr/ecd/service/call_conf_allocation/CallAllocationImpl.java b/src/main/java/com/iemr/ecd/service/call_conf_allocation/CallAllocationImpl.java index a16dd26..0e16c73 100644 --- a/src/main/java/com/iemr/ecd/service/call_conf_allocation/CallAllocationImpl.java +++ b/src/main/java/com/iemr/ecd/service/call_conf_allocation/CallAllocationImpl.java @@ -582,104 +582,217 @@ public ResponseEligibleCallRecordsDTO getEligibleRecordsInfo(int psmId, String p } +// @Transactional(rollbackOn = Exception.class) +// public String moveAllocatedCallsToBin(RequestCallAllocationDTO callAllocationDto) { +// try { +// if (callAllocationDto.getUserId() != null && callAllocationDto.getNoOfCalls() != null +// && callAllocationDto.getRecordType() != null && callAllocationDto.getPhoneNoType() != null +// && callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) { +// +// Timestamp tempFDateStamp = null; +// Timestamp tempTDateStamp = null; +// if (callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) { +// tempFDateStamp = getTimestampFromString( +// callAllocationDto.getFDate().split(Constants.T)[0].concat(Constants.TIME_FORMAT_START_TIME)); +// tempTDateStamp = getTimestampFromString( +// callAllocationDto.getTDate().split(Constants.T)[0].concat(Constants.TIME_FORMAT_END_TIME)); +// } else +// throw new InvalidRequestException(Constants.FROM_DATE_TO_DATE_IS_NULL); +// +// Pageable pageable = PageRequest.of(0, callAllocationDto.getNoOfCalls()); +// +// Page outboundCallsPage = null; +// +// if (callAllocationDto.getRecordType().equalsIgnoreCase("Mother")) { +// if (null != callAllocationDto.getRoleName() +// && callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) { +// outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMotherANM( +// pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), +// tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); +// } else if(null != callAllocationDto.getRoleName() +// && callAllocationDto.getRoleName().equalsIgnoreCase("associate")){ +// outboundCallsPage = getOutboundCallsForMotherAssociate(pageable,callAllocationDto,tempFDateStamp,tempTDateStamp); +// +// } +// else { +// outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMother( +// pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), +// tempFDateStamp, tempTDateStamp); +// } +// } else if (callAllocationDto.getRecordType().equalsIgnoreCase("Child")) { +// if (null != callAllocationDto.getRoleName() +// && callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) { +// outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChildANM( +// pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), +// tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); +// }else if(null != callAllocationDto.getRoleName() +// && callAllocationDto.getRoleName().equalsIgnoreCase("associate")) { +// outboundCallsPage = getOutboundcallsForChildAssociate(pageable,callAllocationDto,tempFDateStamp,tempTDateStamp); +// } +// else { +// outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChild( +// pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), +// tempFDateStamp, tempTDateStamp); +// } +// } +// +// List motherIds = new ArrayList<>(); +// List childIds = new ArrayList<>(); +// +// if (outboundCallsPage != null && outboundCallsPage.getSize() > 0) { +// List resultList = outboundCallsPage.getContent(); +// for (OutboundCalls outboundCalls : resultList) { +// +// outboundCalls.setAllocatedUserId(null); +// outboundCalls.setAllocationStatus("unallocated"); +// +// if (outboundCalls.getEcdCallType() != null +// && outboundCalls.getEcdCallType().equalsIgnoreCase("introductory")) { +// outboundCalls.setDeleted(true); +// // write logic to update in mother or child table also - isAllocated = false +// if (outboundCalls.getChildId() != null) +// childIds.add(outboundCalls.getChildId()); +// else if (outboundCalls.getMotherId() != null) +// motherIds.add(outboundCalls.getMotherId()); +// +// } +// +// } +// +// outboundCallsRepo.saveAll(resultList); +// +// if (motherIds.size() > 0) +// motherRecordRepo.updateIsAllocatedFalse(motherIds); +// if (childIds.size() > 0) +// childRecordRepo.updateIsAllocatedFalse(childIds); +// } else +// throw new ECDException("no record available for move to bin. please contact administrator"); +// } else +// throw new InvalidRequestException(callAllocationDto.toString(), +// "NULL or part of required request is NULL"); +// +// Map responseMap = new HashMap<>(); +// responseMap.put("response", "records successfully moved to bin"); +// return new Gson().toJson(responseMap); +// } catch (Exception e) { +// throw new ECDException(e); +// } +// +// } + @Transactional(rollbackOn = Exception.class) public String moveAllocatedCallsToBin(RequestCallAllocationDTO callAllocationDto) { - try { - if (callAllocationDto.getUserId() != null && callAllocationDto.getNoOfCalls() != null - && callAllocationDto.getRecordType() != null && callAllocationDto.getPhoneNoType() != null - && callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) { - - Timestamp tempFDateStamp = null; - Timestamp tempTDateStamp = null; - if (callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) { - tempFDateStamp = getTimestampFromString( - callAllocationDto.getFDate().split(Constants.T)[0].concat(Constants.TIME_FORMAT_START_TIME)); - tempTDateStamp = getTimestampFromString( - callAllocationDto.getTDate().split(Constants.T)[0].concat(Constants.TIME_FORMAT_END_TIME)); - } else - throw new InvalidRequestException(Constants.FROM_DATE_TO_DATE_IS_NULL); - - Pageable pageable = PageRequest.of(0, callAllocationDto.getNoOfCalls()); - - Page outboundCallsPage = null; - - if (callAllocationDto.getRecordType().equalsIgnoreCase("Mother")) { - if (null != callAllocationDto.getRoleName() - && callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) { - outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMotherANM( - pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), - tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); - } else if(null != callAllocationDto.getRoleName() - && callAllocationDto.getRoleName().equalsIgnoreCase("associate")){ - outboundCallsPage = getOutboundCallsForMotherAssociate(pageable,callAllocationDto,tempFDateStamp,tempTDateStamp); - - } - else { - outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMother( - pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), - tempFDateStamp, tempTDateStamp); - } - } else if (callAllocationDto.getRecordType().equalsIgnoreCase("Child")) { - if (null != callAllocationDto.getRoleName() - && callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) { - outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChildANM( - pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), - tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); - }else if(null != callAllocationDto.getRoleName() - && callAllocationDto.getRoleName().equalsIgnoreCase("associate")) { - outboundCallsPage = getOutboundcallsForChildAssociate(pageable,callAllocationDto,tempFDateStamp,tempTDateStamp); - } - else { - outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChild( - pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), - tempFDateStamp, tempTDateStamp); - } - } - - List motherIds = new ArrayList<>(); - List childIds = new ArrayList<>(); - - if (outboundCallsPage != null && outboundCallsPage.getSize() > 0) { - List resultList = outboundCallsPage.getContent(); - for (OutboundCalls outboundCalls : resultList) { - - outboundCalls.setAllocatedUserId(null); - outboundCalls.setAllocationStatus("unallocated"); - - if (outboundCalls.getEcdCallType() != null - && outboundCalls.getEcdCallType().equalsIgnoreCase("introductory")) { - outboundCalls.setDeleted(true); - // write logic to update in mother or child table also - isAllocated = false - if (outboundCalls.getChildId() != null) - childIds.add(outboundCalls.getChildId()); - else if (outboundCalls.getMotherId() != null) - motherIds.add(outboundCalls.getMotherId()); - - } - - } - - outboundCallsRepo.saveAll(resultList); + try { + // Check if all required parameters are present + if (callAllocationDto.getUserId() != null && callAllocationDto.getNoOfCalls() != null + && callAllocationDto.getRecordType() != null && callAllocationDto.getPhoneNoType() != null + && callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) { + + // Convert from date and to date to timestamps + Timestamp tempFDateStamp = null; + Timestamp tempTDateStamp = null; + if (callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) { + tempFDateStamp = getTimestampFromString( + callAllocationDto.getFDate().split("T")[0].concat("T00:00:00+05:30")); + tempTDateStamp = getTimestampFromString( + callAllocationDto.getTDate().split("T")[0].concat("T23:59:59+05:30")); + } else + throw new InvalidRequestException("from date / to date is null"); + + Pageable pageable = PageRequest.of(0, callAllocationDto.getNoOfCalls()); + + Page outboundCallsPage = null; + + // Handle the "Mother" record type + if (callAllocationDto.getRecordType().equalsIgnoreCase("Mother")) { + if (callAllocationDto.getRoleName() != null) { + if (callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) { + outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMotherANM( + pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), + tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); + } else if (callAllocationDto.getRoleName().equalsIgnoreCase("associate")) { + outboundCallsPage = getOutboundCallsForMotherAssociate(pageable, callAllocationDto, tempFDateStamp, tempTDateStamp); + } else if (callAllocationDto.getRoleName().equalsIgnoreCase("MO")) { + // MO Role logic for Mother + outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMotherMO( + pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), + tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); + } else { + outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMother( + pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), + tempFDateStamp, tempTDateStamp); + } + } + } + // Handle the "Child" record type + else if (callAllocationDto.getRecordType().equalsIgnoreCase("Child")) { + if (callAllocationDto.getRoleName() != null) { + if (callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) { + outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChildANM( + pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), + tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); + } else if (callAllocationDto.getRoleName().equalsIgnoreCase("associate")) { + outboundCallsPage = getOutboundcallsForChildAssociate(pageable, callAllocationDto, tempFDateStamp, tempTDateStamp); + } else if (callAllocationDto.getRoleName().equalsIgnoreCase("MO")) { + // MO Role logic for Child + outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChildMO( + pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), + tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); + } else { + outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChild( + pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), + tempFDateStamp, tempTDateStamp); + } + } + } - if (motherIds.size() > 0) - motherRecordRepo.updateIsAllocatedFalse(motherIds); - if (childIds.size() > 0) - childRecordRepo.updateIsAllocatedFalse(childIds); - } else - throw new ECDException("no record available for move to bin. please contact administrator"); - } else - throw new InvalidRequestException(callAllocationDto.toString(), - "NULL or part of required request is NULL"); + List motherIds = new ArrayList<>(); + List childIds = new ArrayList<>(); + + if (outboundCallsPage != null && outboundCallsPage.getSize() > 0) { + List resultList = outboundCallsPage.getContent(); + for (OutboundCalls outboundCalls : resultList) { + outboundCalls.setAllocatedUserId(null); + outboundCalls.setAllocationStatus("unallocated"); + + if (outboundCalls.getEcdCallType() != null + && outboundCalls.getEcdCallType().equalsIgnoreCase("introductory")) { + outboundCalls.setDeleted(true); + + // Update in mother or child table as well - isAllocated = false + if (outboundCalls.getChildId() != null) + childIds.add(outboundCalls.getChildId()); + else if (outboundCalls.getMotherId() != null) + motherIds.add(outboundCalls.getMotherId()); + } + } + + // Save the changes to the outbound calls + outboundCallsRepo.saveAll(resultList); + + // Update the mother and child records to mark them as unallocated + if (motherIds.size() > 0) + motherRecordRepo.updateIsAllocatedFalse(motherIds); + if (childIds.size() > 0) + childRecordRepo.updateIsAllocatedFalse(childIds); + } else { + throw new ECDException("No record available for move to bin. Please contact administrator."); + } + } else { + throw new InvalidRequestException(callAllocationDto.toString(), "NULL or part of required request is NULL"); + } - Map responseMap = new HashMap<>(); - responseMap.put("response", "records successfully moved to bin"); - return new Gson().toJson(responseMap); - } catch (Exception e) { - throw new ECDException(e); - } + // Return success response + Map responseMap = new HashMap<>(); + responseMap.put("response", "Records successfully moved to bin"); + return new Gson().toJson(responseMap); + } catch (Exception e) { + throw new ECDException(e); + } } + private Page getOutboundCallsForMotherAssociate(Pageable pageable, RequestCallAllocationDTO callAllocationDto, Timestamp tempFDateStamp, Timestamp tempTDateStamp) { Page outboundCallsPage = null; From 7568777870f86cac73dac91f34d27f8117e3acb3 Mon Sep 17 00:00:00 2001 From: SR20290919 Date: Wed, 21 May 2025 20:51:44 +0530 Subject: [PATCH 2/2] removed commented code --- .../CallAllocationImpl.java | 100 +----------------- 1 file changed, 2 insertions(+), 98 deletions(-) diff --git a/src/main/java/com/iemr/ecd/service/call_conf_allocation/CallAllocationImpl.java b/src/main/java/com/iemr/ecd/service/call_conf_allocation/CallAllocationImpl.java index 0e16c73..d235ced 100644 --- a/src/main/java/com/iemr/ecd/service/call_conf_allocation/CallAllocationImpl.java +++ b/src/main/java/com/iemr/ecd/service/call_conf_allocation/CallAllocationImpl.java @@ -582,103 +582,6 @@ public ResponseEligibleCallRecordsDTO getEligibleRecordsInfo(int psmId, String p } -// @Transactional(rollbackOn = Exception.class) -// public String moveAllocatedCallsToBin(RequestCallAllocationDTO callAllocationDto) { -// try { -// if (callAllocationDto.getUserId() != null && callAllocationDto.getNoOfCalls() != null -// && callAllocationDto.getRecordType() != null && callAllocationDto.getPhoneNoType() != null -// && callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) { -// -// Timestamp tempFDateStamp = null; -// Timestamp tempTDateStamp = null; -// if (callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) { -// tempFDateStamp = getTimestampFromString( -// callAllocationDto.getFDate().split(Constants.T)[0].concat(Constants.TIME_FORMAT_START_TIME)); -// tempTDateStamp = getTimestampFromString( -// callAllocationDto.getTDate().split(Constants.T)[0].concat(Constants.TIME_FORMAT_END_TIME)); -// } else -// throw new InvalidRequestException(Constants.FROM_DATE_TO_DATE_IS_NULL); -// -// Pageable pageable = PageRequest.of(0, callAllocationDto.getNoOfCalls()); -// -// Page outboundCallsPage = null; -// -// if (callAllocationDto.getRecordType().equalsIgnoreCase("Mother")) { -// if (null != callAllocationDto.getRoleName() -// && callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) { -// outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMotherANM( -// pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), -// tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); -// } else if(null != callAllocationDto.getRoleName() -// && callAllocationDto.getRoleName().equalsIgnoreCase("associate")){ -// outboundCallsPage = getOutboundCallsForMotherAssociate(pageable,callAllocationDto,tempFDateStamp,tempTDateStamp); -// -// } -// else { -// outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMother( -// pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), -// tempFDateStamp, tempTDateStamp); -// } -// } else if (callAllocationDto.getRecordType().equalsIgnoreCase("Child")) { -// if (null != callAllocationDto.getRoleName() -// && callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) { -// outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChildANM( -// pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), -// tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); -// }else if(null != callAllocationDto.getRoleName() -// && callAllocationDto.getRoleName().equalsIgnoreCase("associate")) { -// outboundCallsPage = getOutboundcallsForChildAssociate(pageable,callAllocationDto,tempFDateStamp,tempTDateStamp); -// } -// else { -// outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChild( -// pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), -// tempFDateStamp, tempTDateStamp); -// } -// } -// -// List motherIds = new ArrayList<>(); -// List childIds = new ArrayList<>(); -// -// if (outboundCallsPage != null && outboundCallsPage.getSize() > 0) { -// List resultList = outboundCallsPage.getContent(); -// for (OutboundCalls outboundCalls : resultList) { -// -// outboundCalls.setAllocatedUserId(null); -// outboundCalls.setAllocationStatus("unallocated"); -// -// if (outboundCalls.getEcdCallType() != null -// && outboundCalls.getEcdCallType().equalsIgnoreCase("introductory")) { -// outboundCalls.setDeleted(true); -// // write logic to update in mother or child table also - isAllocated = false -// if (outboundCalls.getChildId() != null) -// childIds.add(outboundCalls.getChildId()); -// else if (outboundCalls.getMotherId() != null) -// motherIds.add(outboundCalls.getMotherId()); -// -// } -// -// } -// -// outboundCallsRepo.saveAll(resultList); -// -// if (motherIds.size() > 0) -// motherRecordRepo.updateIsAllocatedFalse(motherIds); -// if (childIds.size() > 0) -// childRecordRepo.updateIsAllocatedFalse(childIds); -// } else -// throw new ECDException("no record available for move to bin. please contact administrator"); -// } else -// throw new InvalidRequestException(callAllocationDto.toString(), -// "NULL or part of required request is NULL"); -// -// Map responseMap = new HashMap<>(); -// responseMap.put("response", "records successfully moved to bin"); -// return new Gson().toJson(responseMap); -// } catch (Exception e) { -// throw new ECDException(e); -// } -// -// } @Transactional(rollbackOn = Exception.class) public String moveAllocatedCallsToBin(RequestCallAllocationDTO callAllocationDto) { @@ -711,7 +614,8 @@ public String moveAllocatedCallsToBin(RequestCallAllocationDTO callAllocationDto pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(), tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage()); } else if (callAllocationDto.getRoleName().equalsIgnoreCase("associate")) { - outboundCallsPage = getOutboundCallsForMotherAssociate(pageable, callAllocationDto, tempFDateStamp, tempTDateStamp); + outboundCallsPage = getOutboundCallsForMotherAssociate(pageable, callAllocationDto, + tempFDateStamp, tempTDateStamp); } else if (callAllocationDto.getRoleName().equalsIgnoreCase("MO")) { // MO Role logic for Mother outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMotherMO(