Correccion fecha abs
This commit is contained in:
parent
f1c8d617e4
commit
2c0aae0c7c
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Wed Dec 14 14:28:24 ECT 2022
|
#Wed Dec 21 09:05:10 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
|
||||||
#Wed Dec 14 14:28:19 ECT 2022
|
#Wed Dec 21 09:05:04 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.
|
|
@ -49,7 +49,7 @@ public class VerificarArmaQuery extends QueryRule {
|
||||||
|
|
||||||
//Filtro por estados, fecha, enBodega
|
//Filtro por estados, fecha, enBodega
|
||||||
bufferFiltro.append("select t.* from tarmdecomisoarma t join tarmdecomiso td on t.cdecomiso = td.cdecomiso join tarmarmas ta on t.carma = ta.carma "
|
bufferFiltro.append("select t.* from tarmdecomisoarma t join tarmdecomiso td on t.cdecomiso = td.cdecomiso join tarmarmas ta on t.carma = ta.carma "
|
||||||
+ "where t.fdecomiso <= TO_DATE('"+fechacorte+"','yyyy-mm-dd') and abs(TO_DATE('"+fechacorte+"','yyyy-mm-dd') - t.fdecomiso)>= "+codigoDiasDecomiso);
|
+ "where t.fdecomiso <= TO_DATE('"+fechacorte+"','yyyy-mm-dd') and abs(TO_DATE('"+fechacorte+"','yyyy-mm-dd') - to_date(to_char(t.fdecomiso,'yyyy-mm-dd'),'yyyy-mm-dd'))>= "+codigoDiasDecomiso);
|
||||||
bufferFiltro.append(" and (t.estado='"+codigoDecomiso+"' or t.estado='"+codigoIncautacion+"' or t.estado='"+codigoEntVol+"' or t.estado='"+codigoAbandono+"' or t.estado='"+codigoReclamo+"') and t.enbodega= 'Y'");
|
bufferFiltro.append(" and (t.estado='"+codigoDecomiso+"' or t.estado='"+codigoIncautacion+"' or t.estado='"+codigoEntVol+"' or t.estado='"+codigoAbandono+"' or t.estado='"+codigoReclamo+"') and t.enbodega= 'Y'");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Wed Dec 14 14:28:44 ECT 2022
|
#Wed Dec 21 09:05:31 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
|
||||||
#Wed Dec 14 14:28:38 ECT 2022
|
#Wed Dec 21 09:05:24 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
|
||||||
#Wed Dec 14 14:28:40 ECT 2022
|
#Wed Dec 21 09:05:26 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
|
||||||
#Wed Dec 14 14:28:35 ECT 2022
|
#Wed Dec 21 09:05:21 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
|
||||||
#Wed Dec 14 14:28:39 ECT 2022
|
#Wed Dec 21 09:05:25 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
|
||||||
#Wed Dec 14 14:28:42 ECT 2022
|
#Wed Dec 21 09:05:28 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
|
||||||
#Wed Dec 14 14:28:32 ECT 2022
|
#Wed Dec 21 09:05:18 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
|
||||||
#Wed Dec 14 14:28:20 ECT 2022
|
#Wed Dec 21 09:05:06 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
|
||||||
#Wed Dec 14 14:28:31 ECT 2022
|
#Wed Dec 21 09:05:17 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
|
||||||
#Wed Dec 14 14:28:06 ECT 2022
|
#Wed Dec 21 09:04:49 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
|
||||||
#Wed Dec 14 14:28:04 ECT 2022
|
#Wed Dec 21 09:04:47 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
|
||||||
#Wed Dec 14 14:28:46 ECT 2022
|
#Wed Dec 21 09:05:33 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
|
||||||
#Wed Dec 14 14:28:45 ECT 2022
|
#Wed Dec 21 09:05:32 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
|
||||||
#Wed Dec 14 14:28:14 ECT 2022
|
#Wed Dec 21 09:04:59 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
|
||||||
#Wed Dec 14 14:28:30 ECT 2022
|
#Wed Dec 21 09:05:16 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
|
||||||
#Wed Dec 14 14:28:07 ECT 2022
|
#Wed Dec 21 09:04:51 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
|
||||||
#Wed Dec 14 14:28:17 ECT 2022
|
#Wed Dec 21 09:05:02 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
|
||||||
#Wed Dec 14 14:28:27 ECT 2022
|
#Wed Dec 21 09:05:13 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
|
||||||
#Wed Dec 14 14:28:12 ECT 2022
|
#Wed Dec 21 09:04:57 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
|
||||||
#Wed Dec 14 14:28:25 ECT 2022
|
#Wed Dec 21 09:05:11 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
|
||||||
#Wed Dec 14 14:28:26 ECT 2022
|
#Wed Dec 21 09:05:13 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
|
||||||
#Wed Dec 14 14:28:18 ECT 2022
|
#Wed Dec 21 09:05:03 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
|
||||||
#Wed Dec 14 14:28:33 ECT 2022
|
#Wed Dec 21 09:05:19 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
|
||||||
#Wed Dec 14 14:28:47 ECT 2022
|
#Wed Dec 21 09:05:33 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.clients.maia
|
groupId=com.fp.clients.maia
|
||||||
artifactId=maiaear
|
artifactId=maiaear
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Wed Dec 14 14:28:47 ECT 2022
|
#Wed Dec 21 09:05:33 ECT 2022
|
||||||
version=2.1
|
version=2.1
|
||||||
groupId=com.fp.clients.maia
|
groupId=com.fp.clients.maia
|
||||||
artifactId=environment-eap6
|
artifactId=environment-eap6
|
||||||
|
|
|
||||||
|
|
@ -1127,7 +1127,9 @@ public class DocumentoHabilitanteController extends
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* BUSCAR PERMISOS A PUNTO DE CADUCARSE
|
||||||
|
*/
|
||||||
public static List<TarmDocumentoHabilitante> findpersoncode(String personcode, String categoria) {
|
public static List<TarmDocumentoHabilitante> findpersoncode(String personcode, String categoria) {
|
||||||
try {
|
try {
|
||||||
DocumentoHabilitanteController cc = new DocumentoHabilitanteController();
|
DocumentoHabilitanteController cc = new DocumentoHabilitanteController();
|
||||||
|
|
@ -1204,6 +1206,7 @@ public class DocumentoHabilitanteController extends
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Metodo que busca los documentos habilitantes por persona cercano a fecha de expiracion
|
* Metodo que busca los documentos habilitantes por persona cercano a fecha de expiracion
|
||||||
* @param personCode
|
* @param personCode
|
||||||
|
|
@ -1219,8 +1222,7 @@ public class DocumentoHabilitanteController extends
|
||||||
cc.addFilter("estado", "APR");
|
cc.addFilter("estado", "APR");
|
||||||
// FILTROS: tipoautorizacion='1' --> 1 AUTORIZACION
|
// FILTROS: tipoautorizacion='1' --> 1 AUTORIZACION
|
||||||
// FILTROS: tra.categoria='8' --> 8 IMPORTADOR
|
// FILTROS: tra.categoria='8' --> 8 IMPORTADOR
|
||||||
cc.getMfilelds().put("fechafiltro",String.format("extract(day from (t.fechaexpiracion - now())) <= %s and extract(day from (t.fechaexpiracion - now()))>=0", numeroDias) );
|
cc.getMfilelds().put("fechafiltro",String.format("t.fechaexpiracion is not null AND ((t.fechaexpiracion -current_date) between 0 and %s) and t.pathSuspencion is null", numeroDias));
|
||||||
|
|
||||||
cc.querybasesimle();
|
cc.querybasesimle();
|
||||||
if (cc.lrecord != null) {
|
if (cc.lrecord != null) {
|
||||||
return cc.lrecord;
|
return cc.lrecord;
|
||||||
|
|
@ -1360,6 +1362,7 @@ public class DocumentoHabilitanteController extends
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static List<TarmDocumentoHabilitante> findByPersonCode(Integer personcode) {
|
public static List<TarmDocumentoHabilitante> findByPersonCode(Integer personcode) {
|
||||||
try {
|
try {
|
||||||
DocumentoHabilitanteController cc = new DocumentoHabilitanteController();
|
DocumentoHabilitanteController cc = new DocumentoHabilitanteController();
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,17 @@ import com.fp.dto.Response;
|
||||||
import com.fp.dto.query.DtoQuery;
|
import com.fp.dto.query.DtoQuery;
|
||||||
import com.fp.dto.query.SubQuery;
|
import com.fp.dto.query.SubQuery;
|
||||||
import com.fp.frontend.controller.AbstractController;
|
import com.fp.frontend.controller.AbstractController;
|
||||||
|
import com.fp.frontend.controller.armas.solicitud.DocumentoHabilitanteController;
|
||||||
|
import com.fp.frontend.controller.pcustomer.PersonDetailController;
|
||||||
|
import com.fp.frontend.controller.pgeneral.gene.ParametersController;
|
||||||
import com.fp.frontend.helper.MessageHelper;
|
import com.fp.frontend.helper.MessageHelper;
|
||||||
|
import com.fp.persistence.parmas.soli.TarmDocumentoHabilitante;
|
||||||
import com.fp.persistence.pbpm.gene.TbpmGroupsUsers;
|
import com.fp.persistence.pbpm.gene.TbpmGroupsUsers;
|
||||||
|
import com.fp.persistence.pcustomer.gene.TcustPersonDetail;
|
||||||
|
import com.fp.persistence.pgeneral.gene.TgeneParameters;
|
||||||
import com.fp.persistence.pgeneral.log.TgeneTransactionLog;
|
import com.fp.persistence.pgeneral.log.TgeneTransactionLog;
|
||||||
|
import com.fp.persistence.pgeneral.safe.TsafeUserDetail;
|
||||||
|
import org.primefaces.context.RequestContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clase que muestra
|
* Clase que muestra
|
||||||
|
|
@ -78,6 +86,8 @@ public class InboxController extends AbstractController<TgeneTransactionLog> {
|
||||||
try {
|
try {
|
||||||
beanGroupsName = "BPMGROUPS";
|
beanGroupsName = "BPMGROUPS";
|
||||||
this.listGroups();
|
this.listGroups();
|
||||||
|
alertarPermisosCaducarse(); //alerta para permisos prontos a caducarse
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
MessageHelper.setMessageError(e);
|
MessageHelper.setMessageError(e);
|
||||||
}
|
}
|
||||||
|
|
@ -558,5 +568,52 @@ public class InboxController extends AbstractController<TgeneTransactionLog> {
|
||||||
fc.getExternalContext().invalidateSession();
|
fc.getExternalContext().invalidateSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
================== METODOS DE ALERTAS ==================
|
||||||
|
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* PERMISOS PROXIMOS A CADUCARSE
|
||||||
|
*/
|
||||||
|
private void alertarPermisosCaducarse(){
|
||||||
|
TcustPersonDetail personaSesion = buscarPersonaSesion();
|
||||||
|
if(personaSesion != null){
|
||||||
|
TgeneParameters param = ParametersController.find("DIASPREVIOSCADUCAR", "1");
|
||||||
|
int numeroDias = param != null ? param.getNumbervalue().intValue() : 5;
|
||||||
|
List<TarmDocumentoHabilitante>lstDocs = DocumentoHabilitanteController.findByPersonCercaCaducarse(personaSesion.getPk().getPersoncode().toString(),numeroDias+"");
|
||||||
|
|
||||||
|
if(lstDocs != null && !lstDocs.isEmpty()){
|
||||||
|
for (TarmDocumentoHabilitante doc : lstDocs) {
|
||||||
|
|
||||||
|
String mensaje = param != null ?
|
||||||
|
String.format(param.getTextvalue(), doc.getNumerodocumento(),doc.getFechacambioexpiracion()) :
|
||||||
|
String.format("Su permiso asociado a %s esta a punto de caducar en la fecha %s", doc.getNumerodocumento(),doc.getFechaexpiracion());
|
||||||
|
System.out.println("Mensaje: "+mensaje);
|
||||||
|
|
||||||
|
MessageHelper.setMessageInfo(mensaje);
|
||||||
|
RequestContext.getCurrentInstance().execute("PF('advicesDialog').show()");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OBTENER PERSONA DE USUARIO LOGEADO
|
||||||
|
*/
|
||||||
|
private TcustPersonDetail buscarPersonaSesion(){
|
||||||
|
TcustPersonDetail person = null;
|
||||||
|
try {
|
||||||
|
TsafeUserDetail tsafeUserDetail = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL");
|
||||||
|
person = PersonDetailController.find(tsafeUserDetail.getPk().getPersoncode().toString());
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
MessageHelper.setMessageError(String.format("Verifique que el usuario este asociado a una persona: %s", e.getMessage()));
|
||||||
|
}
|
||||||
|
return person;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,5 +123,6 @@ public class TerminosCondicionesController extends AbstractController<TarmTermin
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ public class TransactionProcessController extends AbstractController<TgeneTransa
|
||||||
|
|
||||||
// subqueries 1
|
// subqueries 1
|
||||||
SubQuery subquery1 = new SubQuery("TgeneMessageTemplates", "description", "messagedesc",
|
SubQuery subquery1 = new SubQuery("TgeneMessageTemplates", "description", "messagedesc",
|
||||||
"i.pk = t.flowmessagecode");
|
"i.pk = cast(t.flowmessagecode as int)");
|
||||||
dto.addSubQuery(subquery1);
|
dto.addSubQuery(subquery1);
|
||||||
|
|
||||||
// subqueries 2
|
// subqueries 2
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,12 @@ import com.fp.persistence.pgeneral.safe.TsafeUserDetail;
|
||||||
import com.fp.persistence.pgeneral.safe.TsafeUserProfile;
|
import com.fp.persistence.pgeneral.safe.TsafeUserProfile;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.annotation.PreDestroy;
|
import javax.annotation.PreDestroy;
|
||||||
import javax.faces.application.NavigationHandler;
|
import javax.faces.application.NavigationHandler;
|
||||||
|
|
@ -59,7 +62,8 @@ public class LoginController {
|
||||||
private String profilecode;
|
private String profilecode;
|
||||||
private String rutaTerminos;
|
private String rutaTerminos;
|
||||||
private StreamedContent content;
|
private StreamedContent content;
|
||||||
|
private boolean alertaInicio = Boolean.FALSE;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
private void postconstruct() {
|
private void postconstruct() {
|
||||||
this.request = new Request();
|
this.request = new Request();
|
||||||
|
|
@ -86,6 +90,7 @@ public class LoginController {
|
||||||
Response resp = ch.login(this.request, user, pass);
|
Response resp = ch.login(this.request, user, pass);
|
||||||
TarmTerminos terminos = TerminosCondicionesController.findxIdentificacion(user);
|
TarmTerminos terminos = TerminosCondicionesController.findxIdentificacion(user);
|
||||||
if ((resp.getResponseCode().compareTo("0") == 0) && (terminos == null)) {
|
if ((resp.getResponseCode().compareTo("0") == 0) && (terminos == null)) {
|
||||||
|
|
||||||
System.out.println("terminos");
|
System.out.println("terminos");
|
||||||
try {
|
try {
|
||||||
this.rutaTerminos = ParametersController.find("CODIGO.TERMINOS.COND", "1").getTextvalue();
|
this.rutaTerminos = ParametersController.find("CODIGO.TERMINOS.COND", "1").getTextvalue();
|
||||||
|
|
@ -227,6 +232,7 @@ public class LoginController {
|
||||||
this.changepassword = userdetail.getChangepassword();
|
this.changepassword = userdetail.getChangepassword();
|
||||||
this.lprofile = ((List) userdetail.get("lprofile"));
|
this.lprofile = ((List) userdetail.get("lprofile"));
|
||||||
this.request.setProfile(((TsafeUserProfile) this.lprofile.get(0)).getPk().getProfilecode());
|
this.request.setProfile(((TsafeUserProfile) this.lprofile.get(0)).getPk().getProfilecode());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void obtenerCentroControl(TsafeUserDetail userdetail) {
|
private void obtenerCentroControl(TsafeUserDetail userdetail) {
|
||||||
|
|
@ -270,11 +276,12 @@ public class LoginController {
|
||||||
public void changeprofile()
|
public void changeprofile()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (this.profilecode != null) {
|
if (this.profilecode != null) {
|
||||||
this.request.setProfile(this.profilecode);
|
this.request.setProfile(this.profilecode);
|
||||||
//generarAlertaArmas();
|
//generarAlertaArmas();
|
||||||
alertarPermisosCaducarse();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CallerHelper ch = new CallerHelper();
|
CallerHelper ch = new CallerHelper();
|
||||||
Response resp = ch.menu(this.request);
|
Response resp = ch.menu(this.request);
|
||||||
if (resp.getResponseCode().compareTo("0") == 0) {
|
if (resp.getResponseCode().compareTo("0") == 0) {
|
||||||
|
|
@ -284,10 +291,14 @@ public class LoginController {
|
||||||
} else {
|
} else {
|
||||||
MessageHelper.setMessageError(resp);
|
MessageHelper.setMessageError(resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
MessageHelper.setMessageError(e);
|
MessageHelper.setMessageError(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GENERA ALERTA DE MAXIMO DE ARMAS
|
* GENERA ALERTA DE MAXIMO DE ARMAS
|
||||||
* unicamente en el perfil de CLIENTE
|
* unicamente en el perfil de CLIENTE
|
||||||
|
|
@ -295,9 +306,7 @@ public class LoginController {
|
||||||
private void generarAlertaArmas(){
|
private void generarAlertaArmas(){
|
||||||
|
|
||||||
if(profilecode != null && profilecode.equals("24")){
|
if(profilecode != null && profilecode.equals("24")){
|
||||||
TsafeUserDetail tsafeUserDetail = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL");
|
List <TarmSolicitud> lstSolicitudes = SolicitudController.findSolicitudxPersona(buscarPersonaSesion().getPk().getPersoncode().toString());
|
||||||
TcustPersonDetail persona = PersonDetailController.find(tsafeUserDetail.getPk().getPersoncode().toString());
|
|
||||||
List <TarmSolicitud> lstSolicitudes = SolicitudController.findSolicitudxPersona(tsafeUserDetail.getPk().getPersoncode().toString());
|
|
||||||
if(lstSolicitudes != null && !lstSolicitudes.isEmpty()){
|
if(lstSolicitudes != null && !lstSolicitudes.isEmpty()){
|
||||||
for (TarmSolicitud sol : lstSolicitudes) {
|
for (TarmSolicitud sol : lstSolicitudes) {
|
||||||
validarArmas(sol);
|
validarArmas(sol);
|
||||||
|
|
@ -314,8 +323,16 @@ public class LoginController {
|
||||||
TarmTramite tramite = TarmTramiteController.findSimple(solicitud.getCtramite().toString());
|
TarmTramite tramite = TarmTramiteController.findSimple(solicitud.getCtramite().toString());
|
||||||
int maxArmas = tramite.getNumeromaxarmas() != null ? tramite.getNumeromaxarmas().intValue() : 0;
|
int maxArmas = tramite.getNumeromaxarmas() != null ? tramite.getNumeromaxarmas().intValue() : 0;
|
||||||
List<TarmDocumentoHabilitante>lstDocs = DocumentoHabilitanteController.findByCsolicitud(solicitud.getPk(),"APR");
|
List<TarmDocumentoHabilitante>lstDocs = DocumentoHabilitanteController.findByCsolicitud(solicitud.getPk(),"APR");
|
||||||
int narmas = lstDocs != null ? lstDocs.size() : 0;
|
int narmas = 0;
|
||||||
|
if(lstDocs != null && !lstDocs.isEmpty()){
|
||||||
|
String[] armas = new String[lstDocs.size()];
|
||||||
|
for (int i = 0; i < lstDocs.size(); i++) {
|
||||||
|
armas[i]=lstDocs.get(i).getCarma();
|
||||||
|
}
|
||||||
|
narmas = eliminarDuplicados(armas).size();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if(tramite.getNumeromaxarmas() != null && narmas > maxArmas){
|
if(tramite.getNumeromaxarmas() != null && narmas > maxArmas){
|
||||||
MessageHelper.setMessageWarn(String.format("La solicitud %s posee %s armas registradas, Máximas permitidas %s", solicitud.getNumerosolicitud(),narmas, maxArmas));
|
MessageHelper.setMessageWarn(String.format("La solicitud %s posee %s armas registradas, Máximas permitidas %s", solicitud.getNumerosolicitud(),narmas, maxArmas));
|
||||||
}
|
}
|
||||||
|
|
@ -323,29 +340,35 @@ public class LoginController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PERMISOS PROXIMOS A CADUCARSE
|
* Eliminar elementos duplicados jdk7
|
||||||
*/
|
*/
|
||||||
private void alertarPermisosCaducarse(){
|
|
||||||
if(profilecode != null && profilecode.equals("24")){
|
public static List<String> eliminarDuplicados(String[] arreglo){
|
||||||
TsafeUserDetail tsafeUserDetail = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL");
|
List<String> arregloLista = Arrays.asList(arreglo);
|
||||||
if(tsafeUserDetail != null){
|
Set<String> hashSet = new HashSet<String>(arregloLista);
|
||||||
TgeneParameters param = ParametersController.find("DIASPREVIOSCADUCAR", "1");
|
arregloLista.clear();
|
||||||
int numeroDias = param != null ? param.getNumbervalue().intValue() : 5;
|
arregloLista.addAll(hashSet);
|
||||||
List<TarmDocumentoHabilitante>lstDocs = DocumentoHabilitanteController.findByPersonCercaCaducarse(tsafeUserDetail.getPk().getPersoncode().toString(),numeroDias+"");
|
return arregloLista;
|
||||||
if(lstDocs != null && !lstDocs.isEmpty()){
|
|
||||||
for (TarmDocumentoHabilitante doc : lstDocs) {
|
|
||||||
String mensaje = param != null ?
|
|
||||||
String.format(param.getTextvalue(), doc.getPk().intValue(),doc.getFechacambioexpiracion()) :
|
|
||||||
String.format("Su permiso código %s esta a punto de caducar en la fecha %s", doc.getPk().intValue(),doc.getFechacambioexpiracion());
|
|
||||||
MessageHelper.setMessageWarn(mensaje);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OBTENER PERSONA DE USUARIO LOGEADO
|
||||||
|
*/
|
||||||
|
|
||||||
|
private TcustPersonDetail buscarPersonaSesion(){
|
||||||
|
TcustPersonDetail person = null;
|
||||||
|
try {
|
||||||
|
TsafeUserDetail tsafeUserDetail = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL");
|
||||||
|
person = PersonDetailController.find(tsafeUserDetail.getPk().getPersoncode().toString());
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
MessageHelper.setMessageError(String.format("Verifique que el usuario este asociado a una persona: %s", e.getMessage()));
|
||||||
|
}
|
||||||
|
return person;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void fillCompanies() {
|
private void fillCompanies() {
|
||||||
try {
|
try {
|
||||||
CallerHelper ch = new CallerHelper();
|
CallerHelper ch = new CallerHelper();
|
||||||
|
|
@ -562,4 +585,15 @@ public class LoginController {
|
||||||
public void setContent(StreamedContent content) {
|
public void setContent(StreamedContent content) {
|
||||||
this.content = content;
|
this.content = content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isAlertaInicio() {
|
||||||
|
return alertaInicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlertaInicio(boolean alertaInicio) {
|
||||||
|
this.alertaInicio = alertaInicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
top.showTimer(#{request.session.maxInactiveInterval}*1000);
|
top.showTimer(#{request.session.maxInactiveInterval}*1000);
|
||||||
});
|
});
|
||||||
|
/** INTENTAMOS MOSTRAR LA ALERTA*/
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -33,7 +34,7 @@
|
||||||
closable="false">
|
closable="false">
|
||||||
<p:graphicImage value="/resources/images/ajaxloadingbar.gif" />
|
<p:graphicImage value="/resources/images/ajaxloadingbar.gif" />
|
||||||
</p:dialog>
|
</p:dialog>
|
||||||
|
|
||||||
<!--p:dialog autosized="true" widgetVar="popupTimeout" closable="false"
|
<!--p:dialog autosized="true" widgetVar="popupTimeout" closable="false"
|
||||||
modal="true" draggable="false" closeOnEscape="false"
|
modal="true" draggable="false" closeOnEscape="false"
|
||||||
resizable="false" header="Sesión expirada">
|
resizable="false" header="Sesión expirada">
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
xmlns:pe="http://primefaces.org/ui/extensions"
|
xmlns:pe="http://primefaces.org/ui/extensions"
|
||||||
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
|
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
|
||||||
xmlns:maia="http://java.sun.com/jsf/composite/maiaComponents"
|
xmlns:maia="http://java.sun.com/jsf/composite/maiaComponents"
|
||||||
template="/WEB-INF/templates/template.xhtml">
|
template="/WEB-INF/templates/template.xhtml"
|
||||||
|
>
|
||||||
<ui:define name="content">
|
<ui:define name="content">
|
||||||
<h:form id="formTable">
|
<h:form id="formTable">
|
||||||
<maia:pageEvents controller="#{armasController}"
|
<maia:pageEvents controller="#{armasController}"
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,8 @@
|
||||||
xmlns:p="http://primefaces.org/ui"
|
xmlns:p="http://primefaces.org/ui"
|
||||||
xmlns:pe="http://primefaces.org/ui/extensions"
|
xmlns:pe="http://primefaces.org/ui/extensions"
|
||||||
template="/WEB-INF/templates/template.xhtml">
|
template="/WEB-INF/templates/template.xhtml">
|
||||||
<ui:define name="content"></ui:define>
|
<ui:define name="content">
|
||||||
|
|
||||||
|
|
||||||
|
</ui:define>
|
||||||
</ui:composition>
|
</ui:composition>
|
||||||
|
|
@ -309,7 +309,12 @@
|
||||||
<ui:include src="/pages/security/_changepasswordExpired.xhtml" />
|
<ui:include src="/pages/security/_changepasswordExpired.xhtml" />
|
||||||
</h:form>
|
</h:form>
|
||||||
</p:dialog>
|
</p:dialog>
|
||||||
|
<p:dialog closable="true" widgetVar="advicesDialog"
|
||||||
|
modal="true" draggable="true" closeOnEscape="true"
|
||||||
|
resizable="false" header="Aviso">
|
||||||
|
<p:messages id="messagesError" autoUpdate="true" globalOnly="true"/>
|
||||||
|
|
||||||
|
</p:dialog>
|
||||||
<p:dialog autosized="true" widgetVar="popupTimeout" closable="false"
|
<p:dialog autosized="true" widgetVar="popupTimeout" closable="false"
|
||||||
modal="true" draggable="false" closeOnEscape="false"
|
modal="true" draggable="false" closeOnEscape="false"
|
||||||
resizable="false" header="Sesión expirada">
|
resizable="false" header="Sesión expirada">
|
||||||
|
|
|
||||||
|
|
@ -36,17 +36,21 @@ var Maiaworkspace = {
|
||||||
if(k===13 || k === 1){
|
if(k===13 || k === 1){
|
||||||
key = jmodule.val()+"-"+jtransaction.val()+"-1";
|
key = jmodule.val()+"-"+jtransaction.val()+"-1";
|
||||||
if(jmodule.val() && jtransaction.val()){
|
if(jmodule.val() && jtransaction.val()){
|
||||||
var transaction = this.menuTransactionMap[key];
|
|
||||||
if(transaction==null){
|
var transaction = this.menuTransactionMap[key];
|
||||||
tranMsgDialog.show();
|
if(transaction === null){
|
||||||
}else{
|
$("#tranMsgDialog").show();
|
||||||
this.loadPage(this.menuTransactionMap[key]["url"], this.menuTransactionMap[key]["name"], null);
|
|
||||||
}
|
}else{
|
||||||
|
this.loadPage(this.menuTransactionMap[key]["url"], this.menuTransactionMap[key]["name"], null);
|
||||||
|
}
|
||||||
|
|
||||||
$("#transactionMenuPanel").hide();
|
$("#transactionMenuPanel").hide();
|
||||||
jmodule.val("");
|
jmodule.val("");
|
||||||
jtransaction.val("");
|
jtransaction.val("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
loadPageFromTransactionKey: function(key, params){
|
loadPageFromTransactionKey: function(key, params){
|
||||||
|
|
@ -61,7 +65,7 @@ var Maiaworkspace = {
|
||||||
other.focus();
|
other.focus();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
getContext: function(){
|
getContext: function(){
|
||||||
var dieccion = window.location.pathname.split("/");
|
var dieccion = window.location.pathname.split("/");
|
||||||
return dieccion[1];
|
return dieccion[1];
|
||||||
|
|
|
||||||
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