45 lines
1.3 KiB
Plaintext
Executable File
45 lines
1.3 KiB
Plaintext
Executable File
package com.fp.armas.task;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
import com.fp.simple.action.TaskAction;
|
|
|
|
/**
|
|
* Clase que se encarga de fijar el valor de deposito para la solicitud
|
|
* @author Christian Pazmino
|
|
* @version 2.1
|
|
*/
|
|
public class GenerarValorACancelar extends TaskAction {
|
|
|
|
/*
|
|
* (non-Javadoc)
|
|
* @see com.fp.simple.action.TaskAction#assignOwner(com.fp.dto.Request)
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@Override
|
|
public void assignOwner(Object pParam) throws Exception {
|
|
System.out.println("Rutina que genera el valor de deposito");
|
|
HashMap<String, Object> m = (HashMap<String, Object>) pParam;
|
|
Map<String, Object> mrequest = (Map<String, Object>) m.get("request");
|
|
if (mrequest.get("csolicitud") == null) {
|
|
return;
|
|
}
|
|
Map<String,Object>datosmail = (Map<String, Object>) m.get("datosmail");
|
|
BigDecimal costoTramite = new BigDecimal("0");
|
|
if(datosmail!=null && datosmail.get("costoTramite")!=null){
|
|
costoTramite = (BigDecimal) datosmail.get("costoTramite");
|
|
}
|
|
|
|
if(costoTramite.compareTo(new BigDecimal("0"))!=0){
|
|
m.put("BPMStatus","A");
|
|
}
|
|
else{
|
|
m.put("BPMStatus","D");
|
|
}
|
|
|
|
}
|
|
|
|
}
|