public Map < String , String > getEOStateReview ( ProposalDevelopmentDocumentContract pdDoc ) { Map < String , String > stateReview = new HashMap <> ( ) ; List < ? extends AnswerHeaderContract > answerHeaders = propDevQuestionAnswerService . getQuestionnaireAnswerHeaders ( pdDoc . getDevelopmentProposal ( ) . getProposalNumber ( ) ) ; if ( ! answerHeaders . isEmpty ( ) ) { for ( AnswerContract answers : answerHeaders . get ( 0 ) . getAnswers ( ) ) { Integer questionSeqId = getQuestionAnswerService ( ) . findQuestionById ( answers . getQuestionId ( ) ) . getQuestionSeqId ( ) ; if ( questionSeqId != null && questionSeqId . equals ( PROPOSAL_YNQ_QUESTION_129 ) ) { stateReview . putIfAbsent ( YNQ_ANSWER , answers . getAnswer ( ) ) ; } if ( questionSeqId != null && questionSeqId . equals ( PROPOSAL_YNQ_QUESTION_130 ) ) { stateReview . putIfAbsent ( YNQ_REVIEW_DATE , answers . getAnswer ( ) ) ; } if ( questionSeqId != null && questionSeqId . equals ( PROPOSAL_YNQ_QUESTION_131 ) ) { stateReview . putIfAbsent ( YNQ_STATE_REVIEW_DATA , answers . getAnswer ( ) ) ; } } } // If question is not answered or question is inactive if ( stateReview . size ( ) == 0 ) { stateReview . put ( YNQ_ANSWER , YNQ_NOT_REVIEWED ) ; stateReview . put ( YNQ_REVIEW_DATE , null ) ; } return stateReview ; }
This method returns a map containing the answers related to EOState REview for a given proposal