arreglo problemas querys en postgres
This commit is contained in:
parent
2bf1117b97
commit
1ccba14eb3
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:00 ECT 2022
|
#Mon Oct 31 16:00:16 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.bpm
|
groupId=com.fp.base.bpm
|
||||||
artifactId=bpmlib
|
artifactId=bpmlib
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:52:54 ECT 2022
|
#Mon Oct 31 16:00:10 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.bpm
|
groupId=com.fp.base.bpm
|
||||||
artifactId=simple
|
artifactId=simple
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -19,6 +19,7 @@ import com.fp.persistence.pgeneral.gene.TgeneCatalogDetail;
|
||||||
import com.fp.persistence.pgeneral.gene.TgeneCity;
|
import com.fp.persistence.pgeneral.gene.TgeneCity;
|
||||||
import com.fp.persistence.pgeneral.gene.TgeneCityKey;
|
import com.fp.persistence.pgeneral.gene.TgeneCityKey;
|
||||||
import com.fp.persistence.pgeneral.gene.TgeneParameters;
|
import com.fp.persistence.pgeneral.gene.TgeneParameters;
|
||||||
|
import com.fp.persistence.pgeneral.gene.TgeneParametersKey;
|
||||||
import com.fp.persistence.pgeneral.gene.TgeneSolicitude;
|
import com.fp.persistence.pgeneral.gene.TgeneSolicitude;
|
||||||
import com.fp.sessionbeans.helper.Sequence;
|
import com.fp.sessionbeans.helper.Sequence;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
|
@ -34,6 +35,7 @@ import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.logging.Level;
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.ejb.Schedule;
|
import javax.ejb.Schedule;
|
||||||
import javax.ejb.Singleton;
|
import javax.ejb.Singleton;
|
||||||
|
|
@ -63,9 +65,9 @@ import org.w3c.dom.Element;
|
||||||
public class ScheduleXMLSolicitud {
|
public class ScheduleXMLSolicitud {
|
||||||
|
|
||||||
private final Logger LOG = Logger.getLogger(ScheduleNotificacionCliente.class.getName());
|
private final Logger LOG = Logger.getLogger(ScheduleNotificacionCliente.class.getName());
|
||||||
|
|
||||||
private EntityManagerFactory emf;
|
private EntityManagerFactory emf;
|
||||||
|
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
private final void crearManager() {
|
private final void crearManager() {
|
||||||
try {
|
try {
|
||||||
|
|
@ -140,12 +142,10 @@ public class ScheduleXMLSolicitud {
|
||||||
String serie = facturaObj[25] != null ? facturaObj[25].toString().replace("-", "") : noDisponible;
|
String serie = facturaObj[25] != null ? facturaObj[25].toString().replace("-", "") : noDisponible;
|
||||||
|
|
||||||
crearAgregarHijo(doc, factura, "serie", serie);
|
crearAgregarHijo(doc, factura, "serie", serie);
|
||||||
|
|
||||||
//Fecha de emision
|
//Fecha de emision
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
|
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
|
||||||
String fechaEmision = sdf.format(Calendar.getInstance().getTime());
|
String fechaEmision = sdf.format(Calendar.getInstance().getTime());
|
||||||
crearAgregarHijo(doc, factura, "fecha", fechaEmision);
|
crearAgregarHijo(doc, factura, "fecha", fechaEmision);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ============================= DATOS DE PERSONA
|
* ============================= DATOS DE PERSONA
|
||||||
*/
|
*/
|
||||||
|
|
@ -155,7 +155,6 @@ public class ScheduleXMLSolicitud {
|
||||||
crearAgregarHijo(doc, factura, "tipoIdComprador", tipoDocumento);
|
crearAgregarHijo(doc, factura, "tipoIdComprador", tipoDocumento);
|
||||||
crearAgregarHijo(doc, factura, "razonSocialComprador", nombre);
|
crearAgregarHijo(doc, factura, "razonSocialComprador", nombre);
|
||||||
crearAgregarHijo(doc, factura, "identificacionComprador", identificacion);
|
crearAgregarHijo(doc, factura, "identificacionComprador", identificacion);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Direccion
|
* Direccion
|
||||||
*/
|
*/
|
||||||
|
|
@ -194,8 +193,6 @@ public class ScheduleXMLSolicitud {
|
||||||
/**
|
/**
|
||||||
* ========================= Detalles ================================
|
* ========================= Detalles ================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// aun no estoy seguro de esos datos
|
|
||||||
String []servicio = facturaObj[23] != null ? facturaObj[23].toString().split("-"): null;
|
String []servicio = facturaObj[23] != null ? facturaObj[23].toString().split("-"): null;
|
||||||
String codigoPrincipal = servicio != null ? servicio[0].toString() : ""; /**===> IMPORTANTE REVISAR*/
|
String codigoPrincipal = servicio != null ? servicio[0].toString() : ""; /**===> IMPORTANTE REVISAR*/
|
||||||
String descripcion = servicio != null ? servicio[1].toString() : "";/**===> IMPORTANTE REVISAR*/
|
String descripcion = servicio != null ? servicio[1].toString() : "";/**===> IMPORTANTE REVISAR*/
|
||||||
|
|
@ -323,23 +320,31 @@ public class ScheduleXMLSolicitud {
|
||||||
.getResultList();
|
.getResultList();
|
||||||
return lstPath.get(0);
|
return lstPath.get(0);
|
||||||
}
|
}
|
||||||
@Schedule(second = "1", minute = "1,10,20,30,40,50", hour = "*", persistent = false)
|
public TgeneParameters obtenerParametro(String code, EntityManager entityManager) throws Exception{
|
||||||
|
return TgeneParameters.find(entityManager, new TgeneParametersKey(code, 1));
|
||||||
|
}
|
||||||
|
@Schedule( hour = "*",second = "0", minute = "1,10,20,30,40,50", persistent = false)
|
||||||
public void generarXMLs() {
|
public void generarXMLs() {
|
||||||
try {
|
try {
|
||||||
StringBuilder comandoParametro = new StringBuilder("select t from TgeneParameters t WHERE t.pk.code = :code AND t.pk.companycode = :companycode ");
|
|
||||||
EntityManager entityManager = emf.createEntityManager();
|
|
||||||
|
|
||||||
|
|
||||||
TgeneParameters tParameter = obtenerParametroSQL("PATHFACTURASXML", comandoParametro, entityManager);
|
EntityManager entityManager = emf.createEntityManager();
|
||||||
|
|
||||||
|
TgeneParameters ejecucion = obtenerParametro("PATHFACTURASXML", entityManager);
|
||||||
|
|
||||||
|
if(ejecucion.getNumbervalue().compareTo(BigDecimal.ZERO) == 0){
|
||||||
|
throw new Exception(new Date().toString().concat(": Ejecucion de la facturacion desactivada"));
|
||||||
|
}
|
||||||
|
|
||||||
|
TgeneParameters tParameter = obtenerParametro("PATHFACTURASXML", entityManager);
|
||||||
|
|
||||||
String folderPath = tParameter.getTextvalue();
|
String folderPath = tParameter.getTextvalue();
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HHmmss");
|
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HHmmss");
|
||||||
String fechaActual = sdf.format(Calendar.getInstance().getTime()).replace(" ", "_");
|
String fechaActual = sdf.format(Calendar.getInstance().getTime()).replace(" ", "_");
|
||||||
folderPath = folderPath.concat(fechaActual).concat("/");
|
folderPath = folderPath.concat(fechaActual).concat("/");
|
||||||
|
|
||||||
//TgeneParameters sequence = obtenerParametroSQL("SECUENCIAFACTURA", comandoParametro, entityManager);
|
TgeneParameters rucComaco = obtenerParametro("RUCCOMACO", entityManager);
|
||||||
TgeneParameters rucComaco = obtenerParametroSQL("RUCCOMACO", comandoParametro, entityManager);
|
TgeneParameters custodio = obtenerParametro("CUSTODIOSFACTURA",entityManager);
|
||||||
TgeneParameters custodio = obtenerParametroSQL("CUSTODIOSFACTURA", comandoParametro, entityManager);
|
|
||||||
StringBuilder strSolicitud = new StringBuilder(
|
StringBuilder strSolicitud = new StringBuilder(
|
||||||
"SELECT t.CSOLICITUD, t.NUMEROSOLICITUD, p.PERSONCODE FROM TARMSOLICITUD t\n"
|
"SELECT t.CSOLICITUD, t.NUMEROSOLICITUD, p.PERSONCODE FROM TARMSOLICITUD t\n"
|
||||||
+ "LEFT JOIN TARMSOLICITUDTRAMITE t2 \n"
|
+ "LEFT JOIN TARMSOLICITUDTRAMITE t2 \n"
|
||||||
|
|
@ -385,11 +390,10 @@ public class ScheduleXMLSolicitud {
|
||||||
carpetaBase.mkdirs();
|
carpetaBase.mkdirs();
|
||||||
Query q = null;
|
Query q = null;
|
||||||
StringBuilder insertAuditoria = new StringBuilder("INSERT INTO TARMINVOICEHISTORY\n" +
|
StringBuilder insertAuditoria = new StringBuilder("INSERT INTO TARMINVOICEHISTORY\n" +
|
||||||
"(ID, USERCODE, REGISTRATIONDATE, CSOLICITUD, SOLICITUDNUMBER, TRAMITENUMBER, PATHFILE, CONTENTFILE)\n" +
|
"(USERCODE, REGISTRATIONDATE, CSOLICITUD, SOLICITUDNUMBER, TRAMITENUMBER, PATHFILE, CONTENTFILE)\n" +
|
||||||
"VALUES(:id, :usercode, (select now()), :csolicitud, :solicitudnumber, :tramitenumber, :pathfile, :content)"
|
"VALUES (:usercode, now(), :csolicitud, :solicitudnumber, :tramitenumber, :pathfile, :content)"
|
||||||
);
|
);
|
||||||
|
|
||||||
int id = 0;
|
|
||||||
List<Object[]> lstFilaId = new ArrayList<>();
|
List<Object[]> lstFilaId = new ArrayList<>();
|
||||||
String pathFactura = null;
|
String pathFactura = null;
|
||||||
for (Object[] solicitudesPers : lstSolicitudesPersona) {
|
for (Object[] solicitudesPers : lstSolicitudesPersona) {
|
||||||
|
|
@ -486,8 +490,7 @@ public class ScheduleXMLSolicitud {
|
||||||
.setParameter("ccentro", codigoCentro);
|
.setParameter("ccentro", codigoCentro);
|
||||||
q.executeUpdate();
|
q.executeUpdate();
|
||||||
try {
|
try {
|
||||||
id = obtenerIdAuditoria(entityManager, lstFilaId, id);
|
guardarAuditoriaXML(q, entityManager, insertAuditoria.toString(), "BATCH", cSolicitud,
|
||||||
guardarAuditoriaXML(q, entityManager, insertAuditoria.toString(), id, "BATCH", cSolicitud,
|
|
||||||
factura[1]!= null ? factura[1].toString() : null,
|
factura[1]!= null ? factura[1].toString() : null,
|
||||||
null, pathFactura, obtenerContenidoArchivo(pathFactura));
|
null, pathFactura, obtenerContenidoArchivo(pathFactura));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -501,7 +504,7 @@ public class ScheduleXMLSolicitud {
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
System.out.println("Error al guardar el parametro >>>> " + ex.toString());
|
System.out.println("Error de ejecucion de facturacion automatica >>>> " + ex.toString());
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -518,10 +521,9 @@ public class ScheduleXMLSolicitud {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void guardarAuditoriaXML(Query q, EntityManager entityManager, String sUpdate,
|
public void guardarAuditoriaXML(Query q, EntityManager entityManager, String sUpdate,
|
||||||
int id, String usercode, String csolicitud, String solicitudnumber, String tramitenumber, String pathfile,
|
String usercode, String csolicitud, String solicitudnumber, String tramitenumber, String pathfile,
|
||||||
String content){
|
String content){
|
||||||
q = entityManager.createNativeQuery(sUpdate)
|
q = entityManager.createNativeQuery(sUpdate)
|
||||||
.setParameter("id", id)
|
|
||||||
.setParameter("usercode", usercode)
|
.setParameter("usercode", usercode)
|
||||||
.setParameter("csolicitud", csolicitud)
|
.setParameter("csolicitud", csolicitud)
|
||||||
.setParameter("solicitudnumber", solicitudnumber)
|
.setParameter("solicitudnumber", solicitudnumber)
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:21 ECT 2022
|
#Mon Oct 31 16:00:43 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.business
|
groupId=com.fp.base.business
|
||||||
artifactId=armas
|
artifactId=armas
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:15 ECT 2022
|
#Mon Oct 31 16:00:35 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.business
|
groupId=com.fp.base.business
|
||||||
artifactId=general
|
artifactId=general
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:17 ECT 2022
|
#Mon Oct 31 16:00:38 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.business
|
groupId=com.fp.base.business
|
||||||
artifactId=log
|
artifactId=log
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:12 ECT 2022
|
#Mon Oct 31 16:00:30 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.business
|
groupId=com.fp.base.business
|
||||||
artifactId=person
|
artifactId=person
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:16 ECT 2022
|
#Mon Oct 31 16:00:36 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.business
|
groupId=com.fp.base.business
|
||||||
artifactId=report
|
artifactId=report
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:18 ECT 2022
|
#Mon Oct 31 16:00:40 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.business
|
groupId=com.fp.base.business
|
||||||
artifactId=viaticos
|
artifactId=viaticos
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:09 ECT 2022
|
#Mon Oct 31 16:00:26 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.core
|
groupId=com.fp.base.core
|
||||||
artifactId=alfresco-client
|
artifactId=alfresco-client
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:52:56 ECT 2022
|
#Mon Oct 31 16:00:11 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.core
|
groupId=com.fp.base.core
|
||||||
artifactId=bpm
|
artifactId=bpm
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:08 ECT 2022
|
#Mon Oct 31 16:00:25 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.core
|
groupId=com.fp.base.core
|
||||||
artifactId=firmas
|
artifactId=firmas
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:52:39 ECT 2022
|
#Mon Oct 31 15:59:54 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.dto
|
groupId=com.fp.base.dto
|
||||||
artifactId=common
|
artifactId=common
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:52:37 ECT 2022
|
#Mon Oct 31 15:59:51 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.dto
|
groupId=com.fp.base.dto
|
||||||
artifactId=dto
|
artifactId=dto
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:23 ECT 2022
|
#Mon Oct 31 16:00:45 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base
|
groupId=com.fp.base
|
||||||
artifactId=facade
|
artifactId=facade
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:22 ECT 2022
|
#Mon Oct 31 16:00:44 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base
|
groupId=com.fp.base
|
||||||
artifactId=facadeclient
|
artifactId=facadeclient
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:52:49 ECT 2022
|
#Mon Oct 31 16:00:04 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.persistence
|
groupId=com.fp.base.persistence
|
||||||
artifactId=commondb
|
artifactId=commondb
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:06 ECT 2022
|
#Mon Oct 31 16:00:23 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.persistence
|
groupId=com.fp.base.persistence
|
||||||
artifactId=parmas
|
artifactId=parmas
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:52:41 ECT 2022
|
#Mon Oct 31 15:59:56 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.persistence
|
groupId=com.fp.base.persistence
|
||||||
artifactId=pbpm
|
artifactId=pbpm
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:52:52 ECT 2022
|
#Mon Oct 31 16:00:07 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.persistence
|
groupId=com.fp.base.persistence
|
||||||
artifactId=pcustomer
|
artifactId=pcustomer
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:03 ECT 2022
|
#Mon Oct 31 16:00:20 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.persistence
|
groupId=com.fp.base.persistence
|
||||||
artifactId=pfirmas
|
artifactId=pfirmas
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:52:47 ECT 2022
|
#Mon Oct 31 16:00:02 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.persistence
|
groupId=com.fp.base.persistence
|
||||||
artifactId=pgeneral
|
artifactId=pgeneral
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:01 ECT 2022
|
#Mon Oct 31 16:00:17 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.persistence
|
groupId=com.fp.base.persistence
|
||||||
artifactId=plog
|
artifactId=plog
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:03 ECT 2022
|
#Mon Oct 31 16:00:19 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.persistence
|
groupId=com.fp.base.persistence
|
||||||
artifactId=pviaticos
|
artifactId=pviaticos
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:52:53 ECT 2022
|
#Mon Oct 31 16:00:09 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base.persistence
|
groupId=com.fp.base.persistence
|
||||||
artifactId=util
|
artifactId=util
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:10 ECT 2022
|
#Mon Oct 31 16:00:28 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.base
|
groupId=com.fp.base
|
||||||
artifactId=sessionbeans
|
artifactId=sessionbeans
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:23 ECT 2022
|
#Mon Oct 31 16:00:46 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.clients.maia
|
groupId=com.fp.clients.maia
|
||||||
artifactId=maiaear
|
artifactId=maiaear
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,8 @@
|
||||||
where
|
where
|
||||||
t.archived = 0 and
|
t.archived = 0 and
|
||||||
excludedOwners.id = :userId and
|
excludedOwners.id = :userId and
|
||||||
excludedOwners in elements ( t.peopleAssignments.excludedOwners )
|
excludedOwners in elements ( t.peopleAssignments.excludedOwners )
|
||||||
|
order by t.id DESC
|
||||||
|
|
||||||
order by t.id DESC
|
|
||||||
</query>
|
</query>
|
||||||
<!-- hint name="org.hibernate.timeout" value="200"/ -->
|
<!-- hint name="org.hibernate.timeout" value="200"/ -->
|
||||||
</named-query>
|
</named-query>
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,8 @@
|
||||||
where
|
where
|
||||||
t.archived = 0 and
|
t.archived = 0 and
|
||||||
excludedOwners.id = :userId and
|
excludedOwners.id = :userId and
|
||||||
excludedOwners in elements ( t.peopleAssignments.excludedOwners )
|
excludedOwners in elements ( t.peopleAssignments.excludedOwners )
|
||||||
|
order by t.id DESC
|
||||||
|
|
||||||
order by t.id DESC
|
|
||||||
</query>
|
</query>
|
||||||
<!-- hint name="org.hibernate.timeout" value="200"/ -->
|
<!-- hint name="org.hibernate.timeout" value="200"/ -->
|
||||||
</named-query>
|
</named-query>
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Thu Oct 27 16:53:23 ECT 2022
|
#Mon Oct 31 16:00:45 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.clients.maia
|
groupId=com.fp.clients.maia
|
||||||
artifactId=environment-eap6
|
artifactId=environment-eap6
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ package com.fp.frontend.controller.armas.solicitud;
|
||||||
import com.fp.dto.Request;
|
import com.fp.dto.Request;
|
||||||
import com.fp.dto.Response;
|
import com.fp.dto.Response;
|
||||||
import com.fp.dto.query.DtoQuery;
|
import com.fp.dto.query.DtoQuery;
|
||||||
|
import com.fp.dto.save.DtoSave;
|
||||||
import com.fp.frontend.controller.AbstractController;
|
import com.fp.frontend.controller.AbstractController;
|
||||||
import com.fp.frontend.helper.MessageHelper;
|
import com.fp.frontend.helper.MessageHelper;
|
||||||
import com.fp.persistence.parmas.soli.TarmInvoiceHistory;
|
import com.fp.persistence.parmas.soli.TarmInvoiceHistory;
|
||||||
|
|
@ -42,7 +43,7 @@ public class InvoiceHistoryController extends AbstractController<TarmInvoiceHist
|
||||||
try {
|
try {
|
||||||
this.recperpage = 10; // Cambiar al # reg a mirar.
|
this.recperpage = 10; // Cambiar al # reg a mirar.
|
||||||
this.lrecord = new ArrayList<>();
|
this.lrecord = new ArrayList<>();
|
||||||
this.beanalias = "INVOICEHISTORYS";
|
this.beanalias = "TARMINVOICEHISTORY";
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
MessageHelper.setMessageError(e);
|
MessageHelper.setMessageError(e);
|
||||||
}
|
}
|
||||||
|
|
@ -58,6 +59,37 @@ public class InvoiceHistoryController extends AbstractController<TarmInvoiceHist
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save() {
|
||||||
|
try {
|
||||||
|
Request request = this.callerhelper.getRequest();
|
||||||
|
DtoSave dtosave = super.getDtoSave();
|
||||||
|
dtosave.setReturnpk(true);
|
||||||
|
if (!dtosave.pendingProcess()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
HashMap<String, DtoSave> msave = new HashMap<String, DtoSave>();
|
||||||
|
msave.put(this.beanalias, dtosave);
|
||||||
|
|
||||||
|
request.setSaveTables(msave);
|
||||||
|
Response resp = this.callerhelper.executeSave(request);
|
||||||
|
if (resp.getResponseCode().compareTo(Response.RESPONSE_OK) == 0) {
|
||||||
|
this.postCommit(resp);
|
||||||
|
//MessageHelper.setMessageInfo(resp);
|
||||||
|
} else {
|
||||||
|
System.out.println("Error al guardar");
|
||||||
|
// MessageHelper.setMessageError(resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Throwable e) {
|
||||||
|
MessageHelper.setMessageError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void postCommit(Response response) throws Exception {
|
||||||
|
super.postCommitGeneric(response, this.beanalias);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void querydatabase() {
|
protected void querydatabase() {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -355,6 +355,10 @@ public class ReporteConsultaSolicitudController extends
|
||||||
MessageHelper.setMessageError(e);
|
MessageHelper.setMessageError(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*Accion para generar xml desde el boton
|
||||||
|
*/
|
||||||
|
|
||||||
public void crearXML(){
|
public void crearXML(){
|
||||||
try {
|
try {
|
||||||
this.parametersController.generarFacturas(this.solicitud.getRecord().getPk());
|
this.parametersController.generarFacturas(this.solicitud.getRecord().getPk());
|
||||||
|
|
|
||||||
|
|
@ -251,22 +251,16 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
|
|
||||||
public File sacarFactura(String codigoSolicitud, File carpetaBase, TsafeUserDetail tsafeUserDetail) throws Exception {
|
public File sacarFactura(String codigoSolicitud, File carpetaBase, TsafeUserDetail tsafeUserDetail) throws Exception {
|
||||||
CentroControlArmasController cac = new CentroControlArmasController();
|
CentroControlArmasController cac = new CentroControlArmasController();
|
||||||
/**
|
|
||||||
* ============================ NO ESTATICAS ===============0
|
|
||||||
*/
|
|
||||||
TgeneParameters tCustodio = find("CUSTODIOSFACTURA", "1");
|
TgeneParameters tCustodio = find("CUSTODIOSFACTURA", "1");
|
||||||
|
|
||||||
String noDisponible = "";
|
String noDisponible = ""; /**SE SUELE UTILIZAR SI ES QUE SE REQUIERE UN MENSAJE EN DATOS VACIOS*/
|
||||||
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
|
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
|
||||||
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
|
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
|
||||||
|
|
||||||
//Elemento raíz
|
//Elemento raíz
|
||||||
Document doc = docBuilder.newDocument();
|
Document doc = docBuilder.newDocument();
|
||||||
Element factura = doc.createElement("factura");
|
Element factura = doc.createElement("factura");
|
||||||
doc.appendChild(factura);
|
doc.appendChild(factura);
|
||||||
|
|
||||||
PersonAddressController pac = new PersonAddressController();
|
|
||||||
|
|
||||||
TarmSolicitudTramite solicitudTramite = SolicitudTramiteController.findByCSolicitud(codigoSolicitud);
|
TarmSolicitudTramite solicitudTramite = SolicitudTramiteController.findByCSolicitud(codigoSolicitud);
|
||||||
TarmSolicitud solicitud = SolicitudController.findSolicitudxcodsolicitud(codigoSolicitud);
|
TarmSolicitud solicitud = SolicitudController.findSolicitudxcodsolicitud(codigoSolicitud);
|
||||||
Integer personCode = solicitud.getPersoncode();
|
Integer personCode = solicitud.getPersoncode();
|
||||||
|
|
@ -274,9 +268,7 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
TgeneParameters parametroRUC = find("RUCCOMACO", "1");
|
TgeneParameters parametroRUC = find("RUCCOMACO", "1");
|
||||||
TarmTramite tTramite = TarmTramiteController.findSimple(solicitud.getCtramite().toString());
|
TarmTramite tTramite = TarmTramiteController.findSimple(solicitud.getCtramite().toString());
|
||||||
String rucComaco = parametroRUC.getTextvalue();
|
String rucComaco = parametroRUC.getTextvalue();
|
||||||
|
|
||||||
crearAgregarHijo(doc, factura, "ruc", rucComaco);
|
crearAgregarHijo(doc, factura, "ruc", rucComaco);
|
||||||
|
|
||||||
|
|
||||||
String ccentro = solicitud.getCcentrocontrol();
|
String ccentro = solicitud.getCcentrocontrol();
|
||||||
TarmCentroControl centroControl = CentroControlArmasController.findPorCodigo(ccentro);
|
TarmCentroControl centroControl = CentroControlArmasController.findPorCodigo(ccentro);
|
||||||
|
|
@ -284,9 +276,9 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
centroControl.getPuntofacturacion().replace("-", "") : "";
|
centroControl.getPuntofacturacion().replace("-", "") : "";
|
||||||
|
|
||||||
crearAgregarHijo(doc, factura, "secuencia",String.format("%09d", centroControl.getSecuenciafacturacion()));
|
crearAgregarHijo(doc, factura, "secuencia",String.format("%09d", centroControl.getSecuenciafacturacion()));
|
||||||
|
/**
|
||||||
//String claveNombreInstitucion = centroControl.getNombreinstitucion();
|
* ACTUALIZAR LA SECUENCIA DEL CENTRO DE CONTROL
|
||||||
//String puntoFact= tciudad != null ? tciudad.getPuntofacturacion() : null;
|
*/
|
||||||
centroControl.setSecuenciafacturacion(centroControl.getSecuenciafacturacion()+1);
|
centroControl.setSecuenciafacturacion(centroControl.getSecuenciafacturacion()+1);
|
||||||
cac.update(centroControl);
|
cac.update(centroControl);
|
||||||
cac.save();
|
cac.save();
|
||||||
|
|
@ -364,7 +356,6 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
String impuesto = "IVA";
|
String impuesto = "IVA";
|
||||||
int porcentajeDescuento = 0;
|
int porcentajeDescuento = 0;
|
||||||
|
|
||||||
Double descuento = 0.00;
|
|
||||||
Element impuestoTotal = crearElementoSinTexto(doc, "impuestoTotal");
|
Element impuestoTotal = crearElementoSinTexto(doc, "impuestoTotal");
|
||||||
Element totalImpuesto1 = crearElementoSinTexto(doc, "totalImpuesto");
|
Element totalImpuesto1 = crearElementoSinTexto(doc, "totalImpuesto");
|
||||||
Element totalImpuesto2 = crearElementoSinTexto(doc, "totalImpuesto");
|
Element totalImpuesto2 = crearElementoSinTexto(doc, "totalImpuesto");
|
||||||
|
|
@ -385,14 +376,11 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
* ========================= Detalles ================================
|
* ========================= Detalles ================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// aun no estoy seguro de esos datos
|
|
||||||
TgeneCatalogDetail tTipoAutorizacion = CatalogDetailController.findCatalogo(tTramite.getTipoautorizacion(), tTramite.getTipoautorizacioncodigo());
|
|
||||||
String []servicios = tTramite.getServicio() != null ? tTramite.getServicio().split("-"):null;
|
String []servicios = tTramite.getServicio() != null ? tTramite.getServicio().split("-"):null;
|
||||||
|
|
||||||
String codigoPrincipal = servicios != null ? servicios[0]: ""; /**IMPORTANTE REVISAR*/
|
String codigoPrincipal = servicios != null ? servicios[0]: ""; /**IMPORTANTE REVISAR*/
|
||||||
String descripcion = servicios != null ? servicios[1]: "";
|
String descripcion = servicios != null ? servicios[1]: "";
|
||||||
//tTipoAutorizacion != null ? tTipoAutorizacion.getDescription() : "";
|
int cantidad = 1; /**Cantidad de productos en solicitud*/
|
||||||
int cantidad = 1;
|
|
||||||
Double precioUnitario = solicitudTramite.getValortramitearmas().doubleValue();
|
Double precioUnitario = solicitudTramite.getValortramitearmas().doubleValue();
|
||||||
Double precioTotalSinImpuestos = precioUnitario * cantidad;
|
Double precioTotalSinImpuestos = precioUnitario * cantidad;
|
||||||
Element detalles = crearElementoSinTexto(doc, "detalles");
|
Element detalles = crearElementoSinTexto(doc, "detalles");
|
||||||
|
|
@ -413,8 +401,7 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
agregarHijoPadre(doc, impuestoItem, impueste);
|
agregarHijoPadre(doc, impuestoItem, impueste);
|
||||||
agregarHijoPadre(doc, detalle1, impuestoItem);
|
agregarHijoPadre(doc, detalle1, impuestoItem);
|
||||||
agregarHijoPadre(doc, detalles, detalle1);
|
agregarHijoPadre(doc, detalles, detalle1);
|
||||||
String porcentaje = "0";
|
|
||||||
Double baseImponible = precioTotalSinImpuestos;
|
|
||||||
/**
|
/**
|
||||||
* **** custodios
|
* **** custodios
|
||||||
*/
|
*/
|
||||||
|
|
@ -423,9 +410,7 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
String codigoPrincipal2 = tCustodio.getNumbervalue().toString().contains(".")
|
String codigoPrincipal2 = tCustodio.getNumbervalue().toString().contains(".")
|
||||||
? tCustodio.getNumbervalue().toString().split("\\.")[0] : tCustodio.getNumbervalue().toString() ; int numeroDias = solicitud != null && solicitud.getNumerodiascustodios() != null ? solicitud.getNumerodiascustodios() : null;
|
? tCustodio.getNumbervalue().toString().split("\\.")[0] : tCustodio.getNumbervalue().toString() ; int numeroDias = solicitud != null && solicitud.getNumerodiascustodios() != null ? solicitud.getNumerodiascustodios() : null;
|
||||||
int numeroCustodios=solicitud != null ? solicitud.getNumerocustodios() : null;
|
int numeroCustodios=solicitud != null ? solicitud.getNumerocustodios() : null;
|
||||||
/**
|
|
||||||
* ======================= no tengo la menor idea
|
|
||||||
*/
|
|
||||||
String descripcion2 = String.format(tCustodio.getTextvalue(), numeroDias);
|
String descripcion2 = String.format(tCustodio.getTextvalue(), numeroDias);
|
||||||
Double precioUnitario2 = solicitudTramite.getValorcustodios().doubleValue()/ numeroCustodios;
|
Double precioUnitario2 = solicitudTramite.getValorcustodios().doubleValue()/ numeroCustodios;
|
||||||
Double precioTotalSinImpuestos2 = solicitudTramite.getValorcustodios().doubleValue() ;
|
Double precioTotalSinImpuestos2 = solicitudTramite.getValorcustodios().doubleValue() ;
|
||||||
|
|
@ -456,10 +441,11 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
Element pagos = crearElementoSinTexto(doc, "pagos");
|
Element pagos = crearElementoSinTexto(doc, "pagos");
|
||||||
|
|
||||||
Element pago = crearElementoSinTexto(doc, "pago");
|
Element pago = crearElementoSinTexto(doc, "pago");
|
||||||
String formaPago = "EF";
|
|
||||||
/**
|
/**
|
||||||
* de momento, tocaria ver los nemonicos a futuro para pago con tarjeta
|
* formaPago: de momento, tocaria ver los nemonicos a futuro para pago con tarjeta
|
||||||
*/
|
*/
|
||||||
|
String formaPago = "EF";
|
||||||
|
|
||||||
Double totalPagar = valorAPagar;
|
Double totalPagar = valorAPagar;
|
||||||
crearAgregarHijo(doc, pago, "formaPago", formaPago);
|
crearAgregarHijo(doc, pago, "formaPago", formaPago);
|
||||||
crearAgregarHijo(doc, pago, "total", totalPagar.toString());
|
crearAgregarHijo(doc, pago, "total", totalPagar.toString());
|
||||||
|
|
@ -491,24 +477,18 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
||||||
Transformer transformer = transformerFactory.newTransformer();
|
Transformer transformer = transformerFactory.newTransformer();
|
||||||
DOMSource source = new DOMSource(doc);
|
DOMSource source = new DOMSource(doc);
|
||||||
/**
|
|
||||||
* String path = carpetaBase.getAbsolutePath(); if(!path.endsWith("/")){
|
|
||||||
* path = path.concat("/");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
//path=path.concat(String.format("Factura-%s.xml", solicitud.getNumerosolicitud()));
|
|
||||||
File archivo = new File(carpetaBase, String.format("%s.xml", solicitud.getNumerosolicitud()));
|
File archivo = new File(carpetaBase, String.format("%s.xml", solicitud.getNumerosolicitud()));
|
||||||
StreamResult result = new StreamResult(archivo);
|
StreamResult result = new StreamResult(archivo);
|
||||||
transformer.transform(source, result);
|
transformer.transform(source, result);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
crearAuditoria(1201, solicitud.getPk(), tsafeUserDetail.getPk().getUsercode(),
|
crearAuditoria(solicitud.getPk(), tsafeUserDetail.getPk().getUsercode(),
|
||||||
solicitud.getNumerosolicitud(), solicitudTramite.getNumerotramite(),
|
solicitud.getNumerosolicitud(), solicitudTramite.getNumerotramite(),
|
||||||
archivo.getAbsolutePath());
|
archivo.getAbsolutePath());
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Error al generar auditoria desde el front>>< "+ e.toString());
|
System.out.println("Error al generar auditoria desde el front>>< "+ e.toString());
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
return archivo;
|
return archivo;
|
||||||
}
|
}
|
||||||
|
|
@ -523,10 +503,9 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
b.close();
|
b.close();
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
public void crearAuditoria(Integer id, String csoli,String user, String solicitudNumber, String tramiteNumber,String path) throws Exception{
|
public void crearAuditoria( String csoli,String user, String solicitudNumber, String tramiteNumber,String path) throws Exception{
|
||||||
InvoiceHistoryController iv = new InvoiceHistoryController(); /**========> NO OPTIMO, USADO PARA PRUEBAS*/
|
InvoiceHistoryController iv = new InvoiceHistoryController(); /**========> NO OPTIMO, USADO PARA PRUEBAS*/
|
||||||
TarmInvoiceHistory tih = new TarmInvoiceHistory();
|
TarmInvoiceHistory tih = new TarmInvoiceHistory();
|
||||||
tih.setPk(id);
|
|
||||||
tih.setCsolicitud(csoli);
|
tih.setCsolicitud(csoli);
|
||||||
tih.setUsercode(user);
|
tih.setUsercode(user);
|
||||||
tih.setRegistrationdate(new java.sql.Timestamp(Calendar.getInstance().getTimeInMillis()));
|
tih.setRegistrationdate(new java.sql.Timestamp(Calendar.getInstance().getTimeInMillis()));
|
||||||
|
|
@ -534,7 +513,7 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
tih.setTramitenumber(tramiteNumber);
|
tih.setTramitenumber(tramiteNumber);
|
||||||
tih.setPathfile(path);
|
tih.setPathfile(path);
|
||||||
tih.setContentfile(obtenerContenidoArchivo(path));
|
tih.setContentfile(obtenerContenidoArchivo(path));
|
||||||
iv.update(tih);
|
iv.setRecord(tih);
|
||||||
iv.save();
|
iv.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -543,33 +522,13 @@ public class ParametersController extends AbstractController<TgeneParameters> {
|
||||||
TsafeUserDetail tsafeUserDetail = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL");
|
TsafeUserDetail tsafeUserDetail = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL");
|
||||||
|
|
||||||
String folderPath = find("PATHFACTURASXML", "1").getTextvalue();
|
String folderPath = find("PATHFACTURASXML", "1").getTextvalue();
|
||||||
//String fechaActual = new Date().toString().replace("/", "-").replace(" ", "_").replace(":", "");
|
|
||||||
folderPath = folderPath.concat("FRONTEND").concat("/");
|
folderPath = folderPath.concat("FRONTEND").concat("/");
|
||||||
File carpetaBase = new File(folderPath);
|
File carpetaBase = new File(folderPath);
|
||||||
carpetaBase.mkdirs();
|
carpetaBase.mkdirs();
|
||||||
File arch = sacarFactura(csolicitud, carpetaBase, tsafeUserDetail );
|
File arch = sacarFactura(csolicitud, carpetaBase, tsafeUserDetail );
|
||||||
//factSq = factSq + acum;
|
byte[] fileContent = Files.readAllBytes(Paths.get(arch.getAbsolutePath()));
|
||||||
|
downloadFile(fileContent, "application/xml", arch.getName());
|
||||||
|
|
||||||
byte[] fileContent = Files.readAllBytes(Paths.get(arch.getAbsolutePath()));
|
|
||||||
downloadFile(fileContent, "application/xml", arch.getName());
|
|
||||||
/** ================== DEBERIA HABERSE ECHO POR CONTROLLER PERO POR ERRORES SE MANTIENE CON QUERY */
|
|
||||||
// Query qu = entityManager.createNativeQuery(sUpdate.toString())
|
|
||||||
// .setParameter("numero", factSq);
|
|
||||||
// qu.executeUpdate();
|
|
||||||
//sequence.setNumbervalue(new BigDecimal(factSq));
|
|
||||||
//TgeneCatalogDetail sequencia = CatalogDetailController.findCatalogo( "QUERY", "SEQ");
|
|
||||||
//sequencia.setRecordversion(factSq);
|
|
||||||
//CatalogDetailController dc = new CatalogDetailController();
|
|
||||||
///dc.setRecord(sequencia);
|
|
||||||
//dc.update();
|
|
||||||
//dc.save();
|
|
||||||
|
|
||||||
//sequence.setIsnew(false);
|
|
||||||
//setRecord(sequence);
|
|
||||||
//update();
|
|
||||||
//save();
|
|
||||||
//updateParametro(sequence);
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|
|
||||||
|
|
@ -109,10 +109,11 @@
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
<h:panelGrid columns="2" id="pnlGridTramite">
|
<h:panelGrid columns="2" id="pnlGridTramite">
|
||||||
<!-- tipo de pago para cuando se desarrolle el BOTON DE PAGO -->
|
<!-- tipo de pago para cuando se desarrolle el BOTON DE PAGO -->
|
||||||
|
<!--
|
||||||
<p:outputLabel for="selTipoPago" value="#{msg_armas['lbl_tipoPago']}:" style="width:150px;"/>
|
<p:outputLabel for="selTipoPago" value="#{msg_armas['lbl_tipoPago']}:" style="width:150px;"/>
|
||||||
<p:selectOneMenu id="selTipoPago" value="#{tramiteArmasController.solicitud.record.tipopago}" var="p" required="true" style="width:290px;" disabled="#{tramiteArmasController.deshabilitarPantalla}">
|
<p:selectOneMenu id="selTipoPago" value="#{tramiteArmasController.solicitud.record.tipopago}" var="p" required="true" style="width:290px;" disabled="#{tramiteArmasController.deshabilitarPantalla}">
|
||||||
<f:selectItems value="#{tramiteArmasController.ltipopago}" var="tipopago" itemLabel="#{tipopago.description}" itemValue="#{tipopago.pk.catalog}"/>
|
<f:selectItems value="#{tramiteArmasController.ltipopago}" var="tipopago" itemLabel="#{tipopago.description}" itemValue="#{tipopago.pk.catalog}"/>
|
||||||
</p:selectOneMenu>
|
</p:selectOneMenu>-->
|
||||||
<p:outputLabel for="txtLovTramite" value="#{msg_armas['lbl_tramite']}:" style="width:150px;display:block;"/>
|
<p:outputLabel for="txtLovTramite" value="#{msg_armas['lbl_tramite']}:" style="width:150px;display:block;"/>
|
||||||
<p:inputText id="txtLovTramite" value="#{tramiteArmasController.solicitud.mfilelds['tipoAutorizacion']}" disabled="true" required="true" style="width:500px;"/>
|
<p:inputText id="txtLovTramite" value="#{tramiteArmasController.solicitud.mfilelds['tipoAutorizacion']}" disabled="true" required="true" style="width:500px;"/>
|
||||||
<p:outputLabel for="txtLovCategoria" value="#{msg_armas['lbl_categoria']}:" style="width:150px;display:block;"/>
|
<p:outputLabel for="txtLovCategoria" value="#{msg_armas['lbl_categoria']}:" style="width:150px;display:block;"/>
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue