protected Boolean hasPersonnelBudget ( KeyPersonDto keyPerson , int period ) { List < ? extends BudgetLineItemContract > budgetLineItemList = new ArrayList <> ( ) ; ProposalDevelopmentBudgetExtContract budget = s2SCommonBudgetService . getBudget ( pdDoc . getDevelopmentProposal ( ) ) ; budgetLineItemList = budget . getBudgetPeriods ( ) . get ( period - 1 ) . getBudgetLineItems ( ) ; for ( BudgetLineItemContract budgetLineItem : budgetLineItemList ) { for ( BudgetPersonnelDetailsContract budgetPersonnelDetails : budgetLineItem . getBudgetPersonnelDetailsList ( ) ) { if ( budgetPersonnelDetails . getPersonId ( ) . equals ( keyPerson . getPersonId ( ) ) ) { return true ; } else if ( keyPerson . getRolodexId ( ) != null && budgetPersonnelDetails . getPersonId ( ) . equals ( keyPerson . getRolodexId ( ) . toString ( ) ) ) { return true ; } } } return false ; }
This method check whether the key person has a personnel budget