@@ -582,103 +582,6 @@ public ResponseEligibleCallRecordsDTO getEligibleRecordsInfo(int psmId, String p
582582
583583 }
584584
585- // @Transactional(rollbackOn = Exception.class)
586- // public String moveAllocatedCallsToBin(RequestCallAllocationDTO callAllocationDto) {
587- // try {
588- // if (callAllocationDto.getUserId() != null && callAllocationDto.getNoOfCalls() != null
589- // && callAllocationDto.getRecordType() != null && callAllocationDto.getPhoneNoType() != null
590- // && callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) {
591- //
592- // Timestamp tempFDateStamp = null;
593- // Timestamp tempTDateStamp = null;
594- // if (callAllocationDto.getFDate() != null && callAllocationDto.getTDate() != null) {
595- // tempFDateStamp = getTimestampFromString(
596- // callAllocationDto.getFDate().split(Constants.T)[0].concat(Constants.TIME_FORMAT_START_TIME));
597- // tempTDateStamp = getTimestampFromString(
598- // callAllocationDto.getTDate().split(Constants.T)[0].concat(Constants.TIME_FORMAT_END_TIME));
599- // } else
600- // throw new InvalidRequestException(Constants.FROM_DATE_TO_DATE_IS_NULL);
601- //
602- // Pageable pageable = PageRequest.of(0, callAllocationDto.getNoOfCalls());
603- //
604- // Page<OutboundCalls> outboundCallsPage = null;
605- //
606- // if (callAllocationDto.getRecordType().equalsIgnoreCase("Mother")) {
607- // if (null != callAllocationDto.getRoleName()
608- // && callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) {
609- // outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMotherANM(
610- // pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(),
611- // tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage());
612- // } else if(null != callAllocationDto.getRoleName()
613- // && callAllocationDto.getRoleName().equalsIgnoreCase("associate")){
614- // outboundCallsPage = getOutboundCallsForMotherAssociate(pageable,callAllocationDto,tempFDateStamp,tempTDateStamp);
615- //
616- // }
617- // else {
618- // outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeMother(
619- // pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(),
620- // tempFDateStamp, tempTDateStamp);
621- // }
622- // } else if (callAllocationDto.getRecordType().equalsIgnoreCase("Child")) {
623- // if (null != callAllocationDto.getRoleName()
624- // && callAllocationDto.getRoleName().equalsIgnoreCase("ANM")) {
625- // outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChildANM(
626- // pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(),
627- // tempFDateStamp, tempTDateStamp, callAllocationDto.getPreferredLanguage());
628- // }else if(null != callAllocationDto.getRoleName()
629- // && callAllocationDto.getRoleName().equalsIgnoreCase("associate")) {
630- // outboundCallsPage = getOutboundcallsForChildAssociate(pageable,callAllocationDto,tempFDateStamp,tempTDateStamp);
631- // }
632- // else {
633- // outboundCallsPage = outboundCallsRepo.getAllocatedRecordsUserByRecordTypeAndPhoneTypeChild(
634- // pageable, callAllocationDto.getUserId(), "open", callAllocationDto.getPhoneNoType(),
635- // tempFDateStamp, tempTDateStamp);
636- // }
637- // }
638- //
639- // List<Long> motherIds = new ArrayList<>();
640- // List<Long> childIds = new ArrayList<>();
641- //
642- // if (outboundCallsPage != null && outboundCallsPage.getSize() > 0) {
643- // List<OutboundCalls> resultList = outboundCallsPage.getContent();
644- // for (OutboundCalls outboundCalls : resultList) {
645- //
646- // outboundCalls.setAllocatedUserId(null);
647- // outboundCalls.setAllocationStatus("unallocated");
648- //
649- // if (outboundCalls.getEcdCallType() != null
650- // && outboundCalls.getEcdCallType().equalsIgnoreCase("introductory")) {
651- // outboundCalls.setDeleted(true);
652- // // write logic to update in mother or child table also - isAllocated = false
653- // if (outboundCalls.getChildId() != null)
654- // childIds.add(outboundCalls.getChildId());
655- // else if (outboundCalls.getMotherId() != null)
656- // motherIds.add(outboundCalls.getMotherId());
657- //
658- // }
659- //
660- // }
661- //
662- // outboundCallsRepo.saveAll(resultList);
663- //
664- // if (motherIds.size() > 0)
665- // motherRecordRepo.updateIsAllocatedFalse(motherIds);
666- // if (childIds.size() > 0)
667- // childRecordRepo.updateIsAllocatedFalse(childIds);
668- // } else
669- // throw new ECDException("no record available for move to bin. please contact administrator");
670- // } else
671- // throw new InvalidRequestException(callAllocationDto.toString(),
672- // "NULL or part of required request is NULL");
673- //
674- // Map<String, Object> responseMap = new HashMap<>();
675- // responseMap.put("response", "records successfully moved to bin");
676- // return new Gson().toJson(responseMap);
677- // } catch (Exception e) {
678- // throw new ECDException(e);
679- // }
680- //
681- // }
682585
683586 @ Transactional (rollbackOn = Exception .class )
684587 public String moveAllocatedCallsToBin (RequestCallAllocationDTO callAllocationDto ) {
@@ -711,7 +614,8 @@ public String moveAllocatedCallsToBin(RequestCallAllocationDTO callAllocationDto
711614 pageable , callAllocationDto .getUserId (), "open" , callAllocationDto .getPhoneNoType (),
712615 tempFDateStamp , tempTDateStamp , callAllocationDto .getPreferredLanguage ());
713616 } else if (callAllocationDto .getRoleName ().equalsIgnoreCase ("associate" )) {
714- outboundCallsPage = getOutboundCallsForMotherAssociate (pageable , callAllocationDto , tempFDateStamp , tempTDateStamp );
617+ outboundCallsPage = getOutboundCallsForMotherAssociate (pageable , callAllocationDto ,
618+ tempFDateStamp , tempTDateStamp );
715619 } else if (callAllocationDto .getRoleName ().equalsIgnoreCase ("MO" )) {
716620 // MO Role logic for Mother
717621 outboundCallsPage = outboundCallsRepo .getAllocatedRecordsUserByRecordTypeAndPhoneTypeMotherMO (
0 commit comments