arreglar reporte estadisticas tramite

This commit is contained in:
cruales 2023-02-01 10:46:05 -05:00
parent a2cc63287e
commit 3fcf909bf5
112 changed files with 182 additions and 89 deletions

View File

@ -80,7 +80,14 @@ public class TransactionList extends QueryRule {
htc.close(); htc.close();
} }
} }
/**
* METODO PARA OBTENER EL TIPO DE AUTORIZACION CON LOGSOLICITUDE
*/
/** /**
* Prepara la lista de Tareas. * Prepara la lista de Tareas.
* *
@ -89,12 +96,17 @@ public class TransactionList extends QueryRule {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private void addTransactionList(String language) throws Exception { private void addTransactionList(String language) throws Exception {
List<Object[]> t = htc.getUnfinishedTasksByUser(request.getUser()); List<Object[]> t = htc.getUnfinishedTasksByUser(request.getUser());
Task task = null;
TaskUtil tu = null;
TransactionDTO tr = null;
Integer count = null;
Map<String, Object> mtran = null;
for (Object[] obj : t) { for (Object[] obj : t) {
Task task = (Task) obj[0]; task = (Task) obj[0];
TaskUtil tu = new TaskUtil(task, htc); tu = new TaskUtil(task, htc);
TransactionDTO tr = tu.getTransaction(); tr= tu.getTransaction();
Integer count = trn.get(tr.toString()); count = trn.get(tr.toString());
if (count == null) { if (count == null) {
count = 1; count = 1;
} else { } else {
@ -102,7 +114,7 @@ public class TransactionList extends QueryRule {
} }
trn.put(tr.toString(), count); trn.put(tr.toString(), count);
Map<String, Object> mtran = (Map<String, Object>) mtransaux.get(tr.toString()); mtran = (Map<String, Object>) mtransaux.get(tr.toString());
if (mtran == null) { if (mtran == null) {
mtran = this.addTransactionData(tu); mtran = this.addTransactionData(tu);
mtransaux.put(tr.toString(), mtran); mtransaux.put(tr.toString(), mtran);
@ -117,13 +129,20 @@ public class TransactionList extends QueryRule {
@SuppressWarnings({ "unchecked", "unused", "rawtypes" }) @SuppressWarnings({ "unchecked", "unused", "rawtypes" })
private void addTransactionList(String language, String codSolicitud) throws Exception { private void addTransactionList(String language, String codSolicitud) throws Exception {
List<Object[]> t = htc.getUnfinishedTasksByUser(request.getUser()); List<Object[]> t = htc.getUnfinishedTasksByUser(request.getUser());
Task task ;
Content c;
TaskUtil tu;
TransactionDTO tr ;
String codS ;
Integer count;
Map<String, Object> mtran;
for (Object[] obj : t) { for (Object[] obj : t) {
Task task = (Task) obj[0]; task = (Task) obj[0];
Content c = (Content) obj[1]; c = (Content) obj[1];
TaskUtil tu = new TaskUtil(task, htc); tu = new TaskUtil(task, htc);
((SaveRequest)(((Map)tu.getActualData().get("maia")).get("request"))).get("csolicitud"); ((SaveRequest)(((Map)tu.getActualData().get("maia")).get("request"))).get("csolicitud");
TransactionDTO tr = tu.getTransaction(); tr = tu.getTransaction();
if(tu.getActualData().get("maia") instanceof Map<?, ?>) if(tu.getActualData().get("maia") instanceof Map<?, ?>)
{ {
if(((Map)tu.getActualData().get("maia")).get("request") != null) if(((Map)tu.getActualData().get("maia")).get("request") != null)
@ -132,7 +151,7 @@ public class TransactionList extends QueryRule {
{ {
Object csolicitud = ((SaveRequest)(((Map)tu.getActualData().get("maia")).get("request"))).get("csolicitud"); Object csolicitud = ((SaveRequest)(((Map)tu.getActualData().get("maia")).get("request"))).get("csolicitud");
if(csolicitud!=null){ if(csolicitud!=null){
String codS = csolicitud.toString(); codS = csolicitud.toString();
if(!codS.equals(codSolicitud)) if(!codS.equals(codSolicitud))
{ {
continue; continue;
@ -142,7 +161,7 @@ public class TransactionList extends QueryRule {
} }
} }
Integer count = trn.get(tr.toString()); count = trn.get(tr.toString());
if (count == null) { if (count == null) {
count = 1; count = 1;
} else { } else {
@ -150,7 +169,7 @@ public class TransactionList extends QueryRule {
} }
trn.put(tr.toString(), count); trn.put(tr.toString(), count);
Map<String, Object> mtran = (Map<String, Object>) mtransaux.get(tr.toString()); mtran = (Map<String, Object>) mtransaux.get(tr.toString());
if (mtran == null) { if (mtran == null) {
mtran = this.addTransactionData(tu); mtran = this.addTransactionData(tu);
mtransaux.put(tr.toString(), mtran); mtransaux.put(tr.toString(), mtran);
@ -161,6 +180,7 @@ public class TransactionList extends QueryRule {
TransactionTasks.addTask(mtran, tu, language); TransactionTasks.addTask(mtran, tu, language);
} }
} }
private Map<String, Object> addTransactionData(TaskUtil tu) throws Exception { private Map<String, Object> addTransactionData(TaskUtil tu) throws Exception {
Map<String, Object> rec = new HashMap<String, Object>(); Map<String, Object> rec = new HashMap<String, Object>();

View File

@ -89,5 +89,7 @@ public class TransactionTasks extends QueryRule {
TaskDetail.addTaskDetail(rec, taskUtil, language); TaskDetail.addTaskDetail(rec, taskUtil, language);
ltasks.add(rec); ltasks.add(rec);
} }
} }

View File

@ -41,10 +41,15 @@ public class AsignedTasks extends QueryRule {
try { try {
List<Object[]> t = htc.getAsignedTasks(pQueryRequest.getString("userCri")); List<Object[]> t = htc.getAsignedTasks(pQueryRequest.getString("userCri"));
List<Map<String, Object>> data = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
Task task;
TaskUtil tu;
Map<String, Object> rec;
List<Map<String, Object>> data1;
for (Object[] obj : t) { for (Object[] obj : t) {
Task task = (Task) obj[0]; task = (Task) obj[0];
TaskUtil tu = new TaskUtil(task, htc); tu = new TaskUtil(task, htc);
Map<String, Object> rec = new HashMap<String, Object>(); rec = new HashMap<String, Object>();
rec.put("tid", tu.getTid()); rec.put("tid", tu.getTid());
rec.put("workItem", task.getTaskData().getWorkItemId()); rec.put("workItem", task.getTaskData().getWorkItemId());
rec.put("detail", tu.getSubject()); rec.put("detail", tu.getSubject());
@ -52,7 +57,7 @@ public class AsignedTasks extends QueryRule {
rec.put("nameasigned", GeneralDescriptions.getOfficername(task.getTaskData().getActualOwner().getId())); rec.put("nameasigned", GeneralDescriptions.getOfficername(task.getTaskData().getActualOwner().getId()));
rec.put("logsolicitude", tu.getRequest().get("logsolicitude")); rec.put("logsolicitude", tu.getRequest().get("logsolicitude"));
rec.put("rulename", task.getName()); rec.put("rulename", task.getName());
List<Map<String, Object>> data1 = ProcessUtil.getInstance().transactionData(tu.getRequest().getJournalId(), pQueryRequest, false); data1 = ProcessUtil.getInstance().transactionData(tu.getRequest().getJournalId(), pQueryRequest, false);
for (Map<String, Object> map : data1) { for (Map<String, Object> map : data1) {
rec.put((String) map.get("NAME"), map.get("VALUE")); rec.put((String) map.get("NAME"), map.get("VALUE"));
} }

View File

@ -423,10 +423,13 @@ public class HumanTaskClient {
List<TaskSummary> list; List<TaskSummary> list;
try { try {
list = taskService.getTasksOwnedByStatus(pUserCri, lestatus, "en-UK"); list = taskService.getTasksOwnedByStatus(pUserCri, lestatus, "en-UK");
Object o[] = null;
Task task = null;
Content c = null;
for (TaskSummary obj : list) { for (TaskSummary obj : list) {
Object o[] = new Object[2]; o = new Object[2];
Task task = this.getTaskById(obj.getId()); task = this.getTaskById(obj.getId());
Content c = this.getContentById(task.getTaskData().getDocumentContentId()); c = this.getContentById(task.getTaskData().getDocumentContentId());
o[0] = task; o[0] = task;
o[1] = c; o[1] = c;
lresp.add(o); lresp.add(o);
@ -453,10 +456,13 @@ public class HumanTaskClient {
List<TaskSummary> list = new ArrayList<>(); List<TaskSummary> list = new ArrayList<>();
try { try {
list = taskService.getTasksOwnedByStatus(pUserId, lestatus, "en-UK"); list = taskService.getTasksOwnedByStatus(pUserId, lestatus, "en-UK");
Object o[];
Task task;
Content c;
for (TaskSummary obj : list) { for (TaskSummary obj : list) {
Object o[] = new Object[2]; o = new Object[2];
Task task = this.getTaskById(obj.getId()); task = this.getTaskById(obj.getId());
Content c = this.getContentById(task.getTaskData().getDocumentContentId()); c = this.getContentById(task.getTaskData().getDocumentContentId());
o[0] = task; o[0] = task;
o[1] = c; o[1] = c;
lresp.add(o); lresp.add(o);
@ -509,8 +515,9 @@ public class HumanTaskClient {
* JPQL JPQL_TASK_NOT_COMPLETEBYGROUP * JPQL JPQL_TASK_NOT_COMPLETEBYGROUP
*/ */
private static final String TAREAS_GRUPO = "select t, potentialOwners.id from TaskImpl t, OrganizationalEntityImpl potentialOwners " private static final String TAREAS_GRUPO = "select t, potentialOwners.id from TaskImpl t, OrganizationalEntityImpl potentialOwners "
+ "where potentialOwners.id = :groupIds and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and t.archived = 0 " + "where potentialOwners.id = :groupIds and potentialOwners in elements ( t.peopleAssignments.potentialOwners) and t.archived = 0 "
+ "and t.taskData.actualOwner = null and t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended')"; + "and t.taskData.actualOwner = null and t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') "
+ "order by t.id desc";
/** /**
* Obtiene el valor de unfinished tasks por Grupo. * Obtiene el valor de unfinished tasks por Grupo.
@ -528,7 +535,6 @@ public class HumanTaskClient {
em = PersistenceManager.getInstance().getEntityManagerFactoryAuxiliar("org.jbpm.domain").createEntityManager(); em = PersistenceManager.getInstance().getEntityManagerFactoryAuxiliar("org.jbpm.domain").createEntityManager();
Query qry = em.createQuery(HumanTaskClient.TAREAS_GRUPO); Query qry = em.createQuery(HumanTaskClient.TAREAS_GRUPO);
//Query qry = em.createNativeQuery(TAREAS_GRUPO_NATIVO); //Query qry = em.createNativeQuery(TAREAS_GRUPO_NATIVO);
System.out.println("GROUPS IDS "+pGroupId);
qry.setParameter("groupIds", pGroupId); qry.setParameter("groupIds", pGroupId);
ldatos = qry.getResultList(); ldatos = qry.getResultList();
} catch (Exception e) { } catch (Exception e) {

View File

@ -473,4 +473,7 @@ public class TaskUtil {
} }
return mdata; return mdata;
} }
} }

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:56 ECT 2023 #Wed Feb 01 10:42:16 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.bpm groupId=com.fp.base.bpm
artifactId=bpmlib artifactId=bpmlib

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:51 ECT 2023 #Wed Feb 01 10:42:11 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.bpm groupId=com.fp.base.bpm
artifactId=simple artifactId=simple

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:17 ECT 2023 #Wed Feb 01 10:42:37 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.business groupId=com.fp.base.business
artifactId=armas artifactId=armas

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:10 ECT 2023 #Wed Feb 01 10:42:30 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.business groupId=com.fp.base.business
artifactId=general artifactId=general

Binary file not shown.

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:12 ECT 2023 #Wed Feb 01 10:42:32 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.business groupId=com.fp.base.business
artifactId=log artifactId=log

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:07 ECT 2023 #Wed Feb 01 10:42:28 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.business groupId=com.fp.base.business
artifactId=person artifactId=person

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:11 ECT 2023 #Wed Feb 01 10:42:31 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.business groupId=com.fp.base.business
artifactId=report artifactId=report

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:14 ECT 2023 #Wed Feb 01 10:42:34 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.business groupId=com.fp.base.business
artifactId=viaticos artifactId=viaticos

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:04 ECT 2023 #Wed Feb 01 10:42:25 ECT 2023
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.

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:52 ECT 2023 #Wed Feb 01 10:42:13 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.core groupId=com.fp.base.core
artifactId=bpm artifactId=bpm

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:03 ECT 2023 #Wed Feb 01 10:42:24 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.core groupId=com.fp.base.core
artifactId=firmas artifactId=firmas

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:38 ECT 2023 #Wed Feb 01 10:41:58 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.dto groupId=com.fp.base.dto
artifactId=common artifactId=common

Binary file not shown.

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:36 ECT 2023 #Wed Feb 01 10:41:56 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.dto groupId=com.fp.base.dto
artifactId=dto artifactId=dto

Binary file not shown.

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:20 ECT 2023 #Wed Feb 01 10:42:39 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base groupId=com.fp.base
artifactId=facade artifactId=facade

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:18 ECT 2023 #Wed Feb 01 10:42:38 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base groupId=com.fp.base
artifactId=facadeclient artifactId=facadeclient

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:46 ECT 2023 #Wed Feb 01 10:42:07 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.persistence groupId=com.fp.base.persistence
artifactId=commondb artifactId=commondb

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:02 ECT 2023 #Wed Feb 01 10:42:22 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.persistence groupId=com.fp.base.persistence
artifactId=parmas artifactId=parmas

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:40 ECT 2023 #Wed Feb 01 10:42:00 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.persistence groupId=com.fp.base.persistence
artifactId=pbpm artifactId=pbpm

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:49 ECT 2023 #Wed Feb 01 10:42:09 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.persistence groupId=com.fp.base.persistence
artifactId=pcustomer artifactId=pcustomer

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:59 ECT 2023 #Wed Feb 01 10:42:20 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.persistence groupId=com.fp.base.persistence
artifactId=pfirmas artifactId=pfirmas

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:45 ECT 2023 #Wed Feb 01 10:42:05 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.persistence groupId=com.fp.base.persistence
artifactId=pgeneral artifactId=pgeneral

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:57 ECT 2023 #Wed Feb 01 10:42:17 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.persistence groupId=com.fp.base.persistence
artifactId=plog artifactId=plog

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:58 ECT 2023 #Wed Feb 01 10:42:19 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.persistence groupId=com.fp.base.persistence
artifactId=pviaticos artifactId=pviaticos

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:40:50 ECT 2023 #Wed Feb 01 10:42:10 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base.persistence groupId=com.fp.base.persistence
artifactId=util artifactId=util

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:05 ECT 2023 #Wed Feb 01 10:42:26 ECT 2023
version=2.1 version=2.1
groupId=com.fp.base groupId=com.fp.base
artifactId=sessionbeans artifactId=sessionbeans

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:20 ECT 2023 #Wed Feb 01 10:42:39 ECT 2023
version=2.1 version=2.1
groupId=com.fp.clients.maia groupId=com.fp.clients.maia
artifactId=maiaear artifactId=maiaear

View File

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Mon Jan 30 15:41:20 ECT 2023 #Wed Feb 01 10:42:39 ECT 2023
version=2.1 version=2.1
groupId=com.fp.clients.maia groupId=com.fp.clients.maia
artifactId=environment-eap6 artifactId=environment-eap6

View File

@ -1412,6 +1412,7 @@ private String descategoria;
*/ */
public void onReturnCambioUsuario(SelectEvent event) { public void onReturnCambioUsuario(SelectEvent event) {
nuevoPropietarioArma = (TcustPersonDetail) event.getObject(); nuevoPropietarioArma = (TcustPersonDetail) event.getObject();
} }
/** /**
@ -1527,7 +1528,33 @@ private String descategoria;
return null; return null;
} }
} }
/**
* Buscar armas por carma
* Usado para buscar armas provinientes de solicitudArmas
*
* @param carma
* @return
*/
public static List<TarmArmas> findxCarma(String carma) {
try {
ArmasController cc = new ArmasController();
cc.init();
cc.recperpage = 1000;
cc.addFilter("carma", carma);
cc.querydatabaseFechaMax();
if ((cc.lrecord != null) && !cc.lrecord.isEmpty()) {
return cc.lrecord;
}
return null;
} catch (Throwable e) {
MessageHelper.setMessageError(e);
return null;
}
}
/** /**
* Metodo para obtener el listado de las armas por la lote * Metodo para obtener el listado de las armas por la lote
* *
@ -2329,8 +2356,9 @@ private String descategoria;
numeroDocumento = personaDetailSelecionada.getIdentification(); numeroDocumento = personaDetailSelecionada.getIdentification();
filtroPersona = " and t.cregistro in (select i.pk from TarmRegistroArmas i where i.personcode =" filtroPersona = " and t.cregistro in (select i.pk from TarmRegistroArmas i where i.personcode ="
+ personaDetailSelecionada.getPk().getPersoncode() + ")"; + personaDetailSelecionada.getPk().getPersoncode() + ")";
querydatabase(); querydatabase();
obtenerArmas(personaDetailSelecionada);
} }
/** /**
@ -2378,25 +2406,41 @@ private String descategoria;
} }
/** /**
*ALERTA NUMERO DE ARMAS POR NUMERO DE SOLICITUD *ALERTA NUMERO DE ARMAS POR NUMERO DE SOLICITUD
* @param persona
*/ */
public void obtenerArmas(){ public void obtenerArmas(TcustPersonDetail persona){
List<TarmSolicitud> lSolicitud = SolicitudController.findSolicitudxPersona(nuevoPropietarioArma.getPk().getPersoncode().toString()); List<TarmSolicitud> lSolicitud = SolicitudController.findSolicitudxPersona(persona.getPk().getPersoncode().toString() );
TarmTramite tramite = null; TarmTramite tramite;
Integer numMaxArmas = null; TarmDocumentoHabilitante documentoHabilitante;
List<TarmSolicitudArmas> lstSolicitudArmas = null; Integer numMaxArmas;
int numArmas;
List<TarmArmas> lArmasSolicitud ;
List<TarmSolicitudArmas> lstSolicitudArmas;
String alerta = "Número de armas en la solicitud %s de la persona %s, %s de %s permitidas";
for (TarmSolicitud tarmSolicitud : lSolicitud) { for (TarmSolicitud tarmSolicitud : lSolicitud) {
tramite = TarmTramiteController.findSimple(tarmSolicitud.getCtramite().toString()); numArmas = 0;
if(tramite.getNumeromaxarmas() != null){ documentoHabilitante = DocumentoHabilitanteController.findPorSolicitud(tarmSolicitud.getPk());
numMaxArmas = tramite.getNumeromaxarmas().intValue(); if(!tarmSolicitud.getEstado().startsWith("ANU") &&
lstSolicitudArmas = TarmSolicitudArmasController.findPorCSolicitud(longitud); (documentoHabilitante != null && documentoHabilitante.getEstado().equals("APR") && documentoHabilitante.getFechaexpiracion().after(fechaActual) )){
if(lstSolicitudArmas!= null && !lstSolicitudArmas.isEmpty()){ tramite = TarmTramiteController.findSimple(tarmSolicitud.getCtramite().toString());
for (TarmSolicitudArmas lstSolicitudArma : lstSolicitudArmas) { if(tramite.getNumeromaxarmas() != null){
numMaxArmas = tramite.getNumeromaxarmas().intValue();
lstSolicitudArmas = TarmSolicitudArmasController.findPorCSolicitud(longitud);
if(lstSolicitudArmas!= null && !lstSolicitudArmas.isEmpty()){
for (TarmSolicitudArmas solicitudArma : lstSolicitudArmas) {
lArmasSolicitud = ArmasController.findxCarma(solicitudArma.getPk().getCarma());
if(lArmasSolicitud!=null && !lArmasSolicitud.isEmpty()){
numArmas += lArmasSolicitud.size();
}
}
if(numArmas >= numMaxArmas){
MessageHelper.setMessageWarn(String.format(alerta, tarmSolicitud.getNumerosolicitud(),persona.getName(),numArmas, numMaxArmas));
}
} }
} }
} }
} }
} }

View File

@ -160,8 +160,16 @@ public class ReporteEstadisticasTramitesController extends AbstractController<Ab
parameters.put("unidadmilitar", institucionCentroControl); parameters.put("unidadmilitar", institucionCentroControl);
parameters.put("lugarFecha", Utilidades.armarFormatoFechaConHora(fechaActualCldr)); parameters.put("lugarFecha", Utilidades.armarFormatoFechaConHora(fechaActualCldr));
parameters.put("usuario", nombreUsuario); parameters.put("usuario", nombreUsuario);
parameters.put("idCentroControl", "TODOS".equalsIgnoreCase(idCentroControl) ? null : idCentroControl); if(!idCentroControl.equals("TODOS")){
parameters.put("idAutorizacion", "TODOS".equalsIgnoreCase(idAutorizacion) ? null : idAutorizacion); //parameters.put("filtro1",String.format("and h.ccentrocontrol = '%s'", idCentroControl) );
parameters.put("idCentroControl", idCentroControl);
}
if(!idAutorizacion.equals("TODOS")){
//parameters.put("filtro2",String.format("and a.tipoautorizacion = '%s' ", idAutorizacion) );
parameters.put("idAutorizacion", idAutorizacion);
}
//parameters.put("idCentroControl", "TODOS".equalsIgnoreCase(idCentroControl) ? null : idCentroControl);
//parameters.put("idAutorizacion", "TODOS".equalsIgnoreCase(idAutorizacion) ? null : idAutorizacion);
parameters.put("fechaInicio", this.fechaInicio == null ? null : Utilidades.armarFormatoFechaSinHora(this.fechaInicio)); parameters.put("fechaInicio", this.fechaInicio == null ? null : Utilidades.armarFormatoFechaSinHora(this.fechaInicio));
parameters.put("fechaFin", this.fechaFin == null ? null : Utilidades.armarFormatoFechaSinHora(this.fechaFin)); parameters.put("fechaFin", this.fechaFin == null ? null : Utilidades.armarFormatoFechaSinHora(this.fechaFin));

View File

@ -186,16 +186,18 @@ public class InboxController extends AbstractController<TgeneTransactionLog> {
} else { } else {
//Manipular la respuesta de transacciones 'No conozco la base del jbpm' //Manipular la respuesta de transacciones 'No conozco la base del jbpm'
List<Map<String, Object>> lstAux = (List<Map<String, Object>>) resp.get("transactions"); List<Map<String, Object>> lstAux = (List<Map<String, Object>>) resp.get("transactions");
List<Map<String, Object>> lTasks = null; List<Map<String, Object>> lTasks;
Map<String,Object> mapaPadre;
Map<String, Object> lTask;
for (int i = 0; i < lstAux.size(); i++) { for (int i = 0; i < lstAux.size(); i++) {
Map<String,Object> mapaPadre = lstAux.get(i); mapaPadre = lstAux.get(i);
lTasks =(List<Map<String, Object>>) mapaPadre.get("tasks"); lTasks =(List<Map<String, Object>>) mapaPadre.get("tasks");
if(lTasks !=null){ if(lTasks !=null){
for (int j = 0; j < lTasks.size(); j++) { for (int j = 0; j < lTasks.size(); j++) {
logSolicitude = lTasks.get(j).get("logsolicitude").toString(); logSolicitude = lTasks.get(j).get("logsolicitude").toString();
tipoAutorizacion = verificarTipoAutorizacion(logSolicitude, solicitud, tramite, tipoAutorizacionAux); tipoAutorizacion = verificarTipoAutorizacion(logSolicitude, solicitud, tramite, tipoAutorizacionAux);
Map<String, Object> lTask = (Map<String, Object>) lTasks.get(j); lTask = (Map<String, Object>) lTasks.get(j);
lTask.put("tipoAutorizacion", tipoAutorizacion); lTask.put("tipoAutorizacion", tipoAutorizacion);
lTasks.set(j, lTask); lTasks.set(j, lTask);
} }
@ -240,10 +242,13 @@ public class InboxController extends AbstractController<TgeneTransactionLog> {
return tipoAutorizacion; return tipoAutorizacion;
} }
private void fillTransactions(List<Map<String, Object>> lTransactions, boolean isGroup) { private void fillTransactions(List<Map<String, Object>> lTransactions, boolean isGroup) {
String tModule;
Integer tCode;
Integer tVersion;
for (Map<String, Object> map : lTransactions) { for (Map<String, Object> map : lTransactions) {
String tModule = (String) map.get("m"); tModule = (String) map.get("m");
Integer tCode = (Integer) map.get("t"); tCode = (Integer) map.get("t");
Integer tVersion = (Integer) map.get("v"); tVersion = (Integer) map.get("v");
this.fillTasks(map, tModule, tCode, tVersion, isGroup); this.fillTasks(map, tModule, tCode, tVersion, isGroup);
} }
} }
@ -276,8 +281,8 @@ public class InboxController extends AbstractController<TgeneTransactionLog> {
/** /**
* BUSCANDO EL TIPO AUTORIZACION * BUSCANDO EL TIPO AUTORIZACION
*/ */
String logSolicitude = null; String logSolicitude;
String tipoAutorizacion = null; String tipoAutorizacion;
TarmSolicitud solicitud= null; TarmSolicitud solicitud= null;
TarmTramite tramite = null; TarmTramite tramite = null;
String tipoAutorizacionAux = null; String tipoAutorizacionAux = null;
@ -308,11 +313,7 @@ public class InboxController extends AbstractController<TgeneTransactionLog> {
MessageHelper.setMessageError(resp); MessageHelper.setMessageError(resp);
} else { } else {
Map<String, Object> param = (Map<String, Object>) resp.get("param"); Map<String, Object> param = (Map<String, Object>) resp.get("param");
for (Map.Entry<String, Object> entry : mapTask.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
}
param.put("TID", mapTask.get("tid")); param.put("TID", mapTask.get("tid"));
param.put("KIND", resp.get("k")); param.put("KIND", resp.get("k"));
mapTask.put("taskDetail", resp); mapTask.put("taskDetail", resp);
@ -415,10 +416,14 @@ public class InboxController extends AbstractController<TgeneTransactionLog> {
} }
private Map<String, Object> getTransactionMap(List<Map<String, Object>> lTransactions, String tModule, Integer tCode, Integer tVersion) { private Map<String, Object> getTransactionMap(List<Map<String, Object>> lTransactions, String tModule, Integer tCode, Integer tVersion) {
String module = null;
Integer transaction = null;
Integer version = null;
for (Map<String, Object> map : lTransactions) { for (Map<String, Object> map : lTransactions) {
String module = (String) map.get("m");
Integer transaction = (Integer) map.get("t"); module = (String) map.get("m");
Integer version = (Integer) map.get("v"); transaction = (Integer) map.get("t");
version = (Integer) map.get("v");
if ((tModule.compareTo(module) == 0) && (tCode.compareTo(transaction) == 0) && (tVersion.compareTo(version) == 0)) { if ((tModule.compareTo(module) == 0) && (tCode.compareTo(transaction) == 0) && (tVersion.compareTo(version) == 0)) {
return map; return map;

View File

@ -341,7 +341,7 @@ public class LoginController {
MessageHelper.setMessageInfo(String.format("Documento %s, perteneciente a %s expira el %s.",doc.getNumerodocumento(), personaPermiso.getName(), doc.getFechaexpiracion())); MessageHelper.setMessageInfo(String.format("Documento %s, perteneciente a %s expira el %s.",doc.getNumerodocumento(), personaPermiso.getName(), doc.getFechaexpiracion()));
} }
//RequestContext.getCurrentInstance().execute("PF('advicesDialog').show()"); RequestContext.getCurrentInstance().execute("PF('advicesDialog').show()");
} }
} }
} }

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More