From 3a6ba151dcfe94ccc6aecce57562bcc1f614429e Mon Sep 17 00:00:00 2001 From: arybakov Date: Wed, 15 Nov 2023 10:37:54 -0700 Subject: [PATCH] User Request Blank Certificate Adult Dogwood to Advanced Education fail --- ...lankDistributionRunCompletionNotificationListener.java | 8 +++++--- .../model/BlankCredentialDistribution.java | 2 +- .../api/batchgraduation/model/BlankCredentialRequest.java | 2 ++ .../reader/DistributionRunPartitionerBlankUserReq.java | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/UserReqBlankDistributionRunCompletionNotificationListener.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/UserReqBlankDistributionRunCompletionNotificationListener.java index 8360a520..7dd9a14c 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/UserReqBlankDistributionRunCompletionNotificationListener.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/UserReqBlankDistributionRunCompletionNotificationListener.java @@ -77,14 +77,16 @@ public void afterJob(JobExecution jobExecution) { BlankDistributionSummaryDTO finalSummaryDTO = summaryDTO; summaryDTO.getCredentialCountMap().forEach((key, value) -> LOGGER.info(" {} count : {}", key, finalSummaryDTO.getCredentialCountMap().get(key))); + StudentSearchRequest studentSearchRequestObject = (StudentSearchRequest)jsonTransformer.unmarshall(studentSearchRequest, StudentSearchRequest.class); + ResponseObj obj = restUtils.getTokenResponseObject(); LOGGER.info("Starting Report Process --------------------------------------------------------------------------"); - processGlobalList(credentialType,summaryDTO.getGlobalList(),jobExecutionId,summaryDTO.getMapDist(),obj.getAccess_token(),localDownLoad,properName); + processGlobalList(studentSearchRequestObject, credentialType,summaryDTO.getGlobalList(),jobExecutionId,summaryDTO.getMapDist(),obj.getAccess_token(),localDownLoad,properName); LOGGER.info(LOG_SEPARATION); } } - private void processGlobalList(String credentialType, List cList, Long batchId, Map mapDist, String accessToken,String localDownload,String properName) { + private void processGlobalList(StudentSearchRequest studentSearchRequest , String credentialType, List cList, Long batchId, Map mapDist, String accessToken,String localDownload,String properName) { List uniqueSchoolList = cList.stream().map(BlankCredentialDistribution::getSchoolOfRecord).distinct().collect(Collectors.toList()); uniqueSchoolList.forEach(usl->{ List yed4List = new ArrayList<>(); @@ -109,7 +111,7 @@ private void processGlobalList(String credentialType, List schoolOfRecords; private List credentialTypeCode; + private String user; + private Address address; private int quantity; String localDownload; } diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/DistributionRunPartitionerBlankUserReq.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/DistributionRunPartitionerBlankUserReq.java index c97ac3e1..9c254db5 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/DistributionRunPartitionerBlankUserReq.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/DistributionRunPartitionerBlankUserReq.java @@ -75,6 +75,7 @@ private List getRecordsForBlankUserReqDisRun(BlankC bcd.setQuantity(req.getQuantity()); bcd.setSchoolOfRecord(sch); bcd.setCredentialTypeCode(ctc); + bcd.setAddress(req.getAddress()); blankList.add(bcd); } });