32 lines
992 B
Plaintext
Executable File
32 lines
992 B
Plaintext
Executable File
package com.fp.armas.rules.query.solicitud;
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
import com.fp.dto.query.QueryRequest;
|
|
import com.fp.dto.rules.QueryRule;
|
|
import com.fp.sessionbeans.helper.Sequence;
|
|
|
|
/**
|
|
* Genera un número secuencial de historico cash management
|
|
* @author Christian Pazmino
|
|
*
|
|
*/
|
|
public class CashHistoricoSecuencial extends QueryRule {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* Obtiene el secuencial de la solicitud y lo reserva para posteriores validaciones
|
|
*/
|
|
@Override
|
|
public QueryRequest process(QueryRequest pQueryRequest) throws Exception {
|
|
// TODO Auto-generated method stub
|
|
System.out.println("Ingresa al secuencial de historico cash management");
|
|
Sequence sequence = new Sequence();
|
|
Integer nextValue = Integer.valueOf(sequence.getNextValue("CCASHHISTORY").toString());
|
|
pQueryRequest.getResponse().put("CASHHISTORICOSEQUENCE", StringUtils.leftPad(String.valueOf(nextValue), 6, '0'));
|
|
return pQueryRequest;
|
|
}
|
|
|
|
}
|