question: @ Override public double prevCumulativeQuantity ( final Long woActivityId , Long mbHeaderId ) { if ( mbHeaderId == null ) mbHeaderId = - 1l ; final Object [ ] params = new Object [ ] { mbHeaderId , mbHeaderId , WorksConstants . CANCELLED_STATUS , woActivityId } ; final Double pQuant = ( Double ) genericService . findByNamedQuery ( "prevCumulativeQuantity" , params ) ; if ( pQuant == null ) return 0.0d ; else return pQuant . doubleValue ( ) ; }
target:  Get previous cumulative amount(approved, approval pending and draft entries) based on workorder activity Id. This will search list of MBDetail and then get cmulative amount.