question: @ Override public double totalEstimatedQuantityForRE ( final Long woActivityId , Long estimateId , final Long activityId , final WorkOrder workOrder ) { if ( estimateId == null ) estimateId = - 1l ; Object [ ] params = null ; Double estQuantity = null ; params = new Object [ ] { estimateId , workOrder , workOrder , woActivityId , activityId } ; estQuantity = ( Double ) genericService . findByNamedQuery ( "totalEstimatedQuantityInRE" , params ) ; Double estQuantityRE = null ; if ( workOrder . getParent ( ) != null ) params = new Object [ ] { estimateId , workOrder . getParent ( ) , workOrder . getParent ( ) , activityId } ; else params = new Object [ ] { estimateId , workOrder , workOrder , activityId } ; estQuantityRE = ( Double ) genericService . findByNamedQuery ( "totalEstimatedQuantityForREinRE" , params ) ; if ( estQuantity != null && estQuantityRE != null ) estQuantity = estQuantity + estQuantityRE ; if ( estQuantity == null && estQuantityRE != null ) estQuantity = estQuantityRE ; if ( estQuantity == null ) return 0.0d ; else return estQuantity . doubleValue ( ) ; }
target:  This is used by RE screens. Get estimated quantity for Change in quantity of RE for given work order activity. Here work order activities of only non-cancelled Abstract Estimates/REs are considered