diff --git a/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/flow/FlowUtil.java b/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/flow/FlowUtil.java index 9653561..c42cce3 100644 --- a/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/flow/FlowUtil.java +++ b/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/flow/FlowUtil.java @@ -227,7 +227,7 @@ public final class FlowUtil { if (!lemail.isEmpty()) { HashMap m = (HashMap) pParam; ((Request) m.get("request")).put("cusuariobpm", taskinfo.getUserId()); - //RuleUtil.sendMail((Request) m.get("request")); + RuleUtil.sendMail((Request) m.get("request")); } } @@ -261,7 +261,7 @@ public final class FlowUtil { if(taskinfo!=null && taskinfo.getAditionalData()!=null && taskinfo.getAditionalData().get("datosmail")!=null && !taskinfo.getAditionalData().get("datosmail").equals("")){ ((Request) m.get("request")).putAll((Map)taskinfo.getAditionalData().get("datosmail")); } - //RuleUtil.sendMail((Request) m.get("request")); + RuleUtil.sendMail((Request) m.get("request")); }else{ RuleUtil.setSubjectTemplate(63); TgeneParameters addres=TgeneParameters.find(PersistenceHelper.getEntityManager(), new TgeneParametersKey("MAIL.CENTRAL", 1)); @@ -271,7 +271,7 @@ public final class FlowUtil { if(taskinfo!=null && taskinfo.getAditionalData()!=null && taskinfo.getAditionalData().get("datosmail")!=null && !taskinfo.getAditionalData().get("datosmail").equals("")){ ((Request) m.get("request")).putAll((Map)taskinfo.getAditionalData().get("datosmail")); } - //RuleUtil.sendMail((Request) m.get("request")); + RuleUtil.sendMail((Request) m.get("request")); } } @@ -305,7 +305,7 @@ public final class FlowUtil { if(taskinfo!=null && taskinfo.getAditionalData()!=null && taskinfo.getAditionalData().get("datosmail")!=null){ ((Request) m.get("request")).putAll((Map)taskinfo.getAditionalData().get("datosmail")); } - // RuleUtil.sendMail((Request) m.get("request")); + RuleUtil.sendMail((Request) m.get("request")); }else{ RuleUtil.setSubjectTemplate(63); TgeneParameters addres=TgeneParameters.find(PersistenceHelper.getEntityManager(), new TgeneParametersKey("MAIL.CENTRAL", 1)); @@ -315,7 +315,7 @@ public final class FlowUtil { if(taskinfo!=null && taskinfo.getAditionalData()!=null && taskinfo.getAditionalData().get("datosmail")!=null){ ((Request) m.get("request")).putAll((Map)taskinfo.getAditionalData().get("datosmail")); } - // RuleUtil.sendMail((Request) m.get("request")); + RuleUtil.sendMail((Request) m.get("request")); } } diff --git a/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/query/inbox/TransactionListGroup.java b/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/query/inbox/TransactionListGroup.java index ea0e1ce..143ecf0 100644 --- a/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/query/inbox/TransactionListGroup.java +++ b/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/query/inbox/TransactionListGroup.java @@ -56,10 +56,12 @@ public class TransactionListGroup extends QueryRule { request = pQueryRequest; this.prepareList(); List> data = new ArrayList>(); + Map rec = null; + TransactionDTO tr = null; for (Entry e : trn.entrySet()) { - Map rec = new HashMap(); + rec = new HashMap(); rec.put("c", e.getValue()); - TransactionDTO tr = trnDTO.get(e.getKey()); + tr = trnDTO.get(e.getKey()); rec.put("m", tr.getModule()); rec.put("t", tr.getTransaction()); rec.put("v", tr.getVersion()); @@ -82,12 +84,17 @@ public class TransactionListGroup extends QueryRule { if (request.get("groupId") == null) { return; } + List t = htc.getTasksByGroup(request.getString("groupId"), "%"); + Task task = null; + TaskUtil tu = null; + TransactionDTO tr=null; + Integer count = null; for (Object[] obj : t) { - Task task = (Task) obj[0]; - TaskUtil tu = new TaskUtil(task, htc); - TransactionDTO tr = tu.getTransaction(); - Integer count = trn.get(tr.toString()); + task = (Task) obj[0]; + tu = new TaskUtil(task, htc); + tr = tu.getTransaction(); + count = trn.get(tr.toString()); if (count == null) { count = 1; } else { diff --git a/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/task/client/HumanTaskClient.java b/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/task/client/HumanTaskClient.java index 21bf0a2..151c92f 100644 --- a/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/task/client/HumanTaskClient.java +++ b/base/bpm/bpmlib/src/main/java/com/fp/bpmlib/task/client/HumanTaskClient.java @@ -467,12 +467,49 @@ public class HumanTaskClient { return lresp; } - + + /** + * QUERY NATIVO DE TAREAS NO COMPLETADAS + */ + private static final String TAREAS_GRUPO_NATIVO = "select\n" + + " taskimpl0_,\n"+ +" organizati1_.id\n" + +" from\n" + +" jbpm6.Task taskimpl0_ cross \n" + +" join\n" + +" jbpm6.OrganizationalEntity organizati1_ \n" + +" where\n" + +" (\n" + +" organizati1_.id in (\n" + +" :groupIds\n" + +" )\n" + +" ) \n" + +" and (\n" + +" organizati1_.id in (\n" + +" select\n" + +" potentialo2_.entity_id \n" + +" from\n" + +" jbpm6.PeopleAssignments_PotOwners potentialo2_ \n" + +" where\n" + +" taskimpl0_.id=potentialo2_.task_id\n" + +" )\n" + +" ) \n" + +" and taskimpl0_.archived=0 \n" + +" and (\n" + +" taskimpl0_.actualOwner_id is null\n" + +" ) \n" + +" and (\n" + +" taskimpl0_.status in (\n" + +" 'Created' , 'Ready' , 'Reserved' , 'InProgress' , 'Suspended'\n" + +" )\n" + +" )"; + + /** * JPQL JPQL_TASK_NOT_COMPLETEBYGROUP */ private static final String TAREAS_GRUPO = "select t, potentialOwners.id from TaskImpl t, OrganizationalEntityImpl potentialOwners " - + "where potentialOwners.id in (: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')"; /** @@ -490,6 +527,8 @@ public class HumanTaskClient { try { em = PersistenceManager.getInstance().getEntityManagerFactoryAuxiliar("org.jbpm.domain").createEntityManager(); Query qry = em.createQuery(HumanTaskClient.TAREAS_GRUPO); + //Query qry = em.createNativeQuery(TAREAS_GRUPO_NATIVO); + System.out.println("GROUPS IDS "+pGroupId); qry.setParameter("groupIds", pGroupId); ldatos = qry.getResultList(); } catch (Exception e) { diff --git a/base/bpm/bpmlib/target/bpmlib-2.1.jar b/base/bpm/bpmlib/target/bpmlib-2.1.jar index 8b9f354..212b4f0 100644 Binary files a/base/bpm/bpmlib/target/bpmlib-2.1.jar and b/base/bpm/bpmlib/target/bpmlib-2.1.jar differ diff --git a/base/bpm/bpmlib/target/classes/com/fp/bpmlib/flow/FlowUtil.class b/base/bpm/bpmlib/target/classes/com/fp/bpmlib/flow/FlowUtil.class index 06ccca5..0c8a5a8 100644 Binary files a/base/bpm/bpmlib/target/classes/com/fp/bpmlib/flow/FlowUtil.class and b/base/bpm/bpmlib/target/classes/com/fp/bpmlib/flow/FlowUtil.class differ diff --git a/base/bpm/bpmlib/target/classes/com/fp/bpmlib/query/inbox/TransactionListGroup.class b/base/bpm/bpmlib/target/classes/com/fp/bpmlib/query/inbox/TransactionListGroup.class index 91947d6..0275e81 100644 Binary files a/base/bpm/bpmlib/target/classes/com/fp/bpmlib/query/inbox/TransactionListGroup.class and b/base/bpm/bpmlib/target/classes/com/fp/bpmlib/query/inbox/TransactionListGroup.class differ diff --git a/base/bpm/bpmlib/target/classes/com/fp/bpmlib/task/client/HumanTaskClient.class b/base/bpm/bpmlib/target/classes/com/fp/bpmlib/task/client/HumanTaskClient.class index 05175e2..94fedb7 100644 Binary files a/base/bpm/bpmlib/target/classes/com/fp/bpmlib/task/client/HumanTaskClient.class and b/base/bpm/bpmlib/target/classes/com/fp/bpmlib/task/client/HumanTaskClient.class differ diff --git a/base/bpm/bpmlib/target/maven-archiver/pom.properties b/base/bpm/bpmlib/target/maven-archiver/pom.properties index 93b8b49..c96f974 100644 --- a/base/bpm/bpmlib/target/maven-archiver/pom.properties +++ b/base/bpm/bpmlib/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:40 ECT 2023 +#Mon Jan 30 15:40:56 ECT 2023 version=2.1 groupId=com.fp.base.bpm artifactId=bpmlib diff --git a/base/bpm/simple/target/maven-archiver/pom.properties b/base/bpm/simple/target/maven-archiver/pom.properties index 13d0abf..8870198 100644 --- a/base/bpm/simple/target/maven-archiver/pom.properties +++ b/base/bpm/simple/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:35 ECT 2023 +#Mon Jan 30 15:40:51 ECT 2023 version=2.1 groupId=com.fp.base.bpm artifactId=simple diff --git a/base/bpm/simple/target/simple-2.1.jar b/base/bpm/simple/target/simple-2.1.jar index c55f45e..f8561ad 100644 Binary files a/base/bpm/simple/target/simple-2.1.jar and b/base/bpm/simple/target/simple-2.1.jar differ diff --git a/base/business/armas/src/main/java/com/fp/armas/mail/ScheduleNotificacionCliente.java b/base/business/armas/src/main/java/com/fp/armas/mail/ScheduleNotificacionCliente.java index 53d5d3d..5d038df 100644 --- a/base/business/armas/src/main/java/com/fp/armas/mail/ScheduleNotificacionCliente.java +++ b/base/business/armas/src/main/java/com/fp/armas/mail/ScheduleNotificacionCliente.java @@ -212,7 +212,7 @@ public class ScheduleNotificacionCliente { } } - /* + /** private void envioMail(String[] correos,String asunto,String cuerpo,String correoCC[],String correodesde) throws Exception{ try { LOG.info("INGREA A ENVIAR MAIL"); @@ -237,8 +237,8 @@ public class ScheduleNotificacionCliente { e.printStackTrace(); } } - */ - + +*/ public EntityManagerFactory getEmf() { return emf; } diff --git a/base/business/armas/target/armas-2.1.jar b/base/business/armas/target/armas-2.1.jar index 853daf6..aa0c643 100644 Binary files a/base/business/armas/target/armas-2.1.jar and b/base/business/armas/target/armas-2.1.jar differ diff --git a/base/business/armas/target/maven-archiver/pom.properties b/base/business/armas/target/maven-archiver/pom.properties index 5d1e272..5211fc0 100644 --- a/base/business/armas/target/maven-archiver/pom.properties +++ b/base/business/armas/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:26:00 ECT 2023 +#Mon Jan 30 15:41:17 ECT 2023 version=2.1 groupId=com.fp.base.business artifactId=armas diff --git a/base/business/general/target/general-2.1.jar b/base/business/general/target/general-2.1.jar index 227b8fe..51d6b44 100644 Binary files a/base/business/general/target/general-2.1.jar and b/base/business/general/target/general-2.1.jar differ diff --git a/base/business/general/target/maven-archiver/pom.properties b/base/business/general/target/maven-archiver/pom.properties index 4ce6b52..0afc0ff 100644 --- a/base/business/general/target/maven-archiver/pom.properties +++ b/base/business/general/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:54 ECT 2023 +#Mon Jan 30 15:41:10 ECT 2023 version=2.1 groupId=com.fp.base.business artifactId=general diff --git a/base/business/log/target/log-2.1.jar b/base/business/log/target/log-2.1.jar index deb0d30..e25f20c 100644 Binary files a/base/business/log/target/log-2.1.jar and b/base/business/log/target/log-2.1.jar differ diff --git a/base/business/log/target/maven-archiver/pom.properties b/base/business/log/target/maven-archiver/pom.properties index 73dc19a..14a182b 100644 --- a/base/business/log/target/maven-archiver/pom.properties +++ b/base/business/log/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:56 ECT 2023 +#Mon Jan 30 15:41:12 ECT 2023 version=2.1 groupId=com.fp.base.business artifactId=log diff --git a/base/business/person/target/maven-archiver/pom.properties b/base/business/person/target/maven-archiver/pom.properties index 14a81fb..5340798 100644 --- a/base/business/person/target/maven-archiver/pom.properties +++ b/base/business/person/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:51 ECT 2023 +#Mon Jan 30 15:41:07 ECT 2023 version=2.1 groupId=com.fp.base.business artifactId=person diff --git a/base/business/person/target/person-2.1.jar b/base/business/person/target/person-2.1.jar index b62833c..000870e 100644 Binary files a/base/business/person/target/person-2.1.jar and b/base/business/person/target/person-2.1.jar differ diff --git a/base/business/report/target/maven-archiver/pom.properties b/base/business/report/target/maven-archiver/pom.properties index 6b04268..070bd7f 100644 --- a/base/business/report/target/maven-archiver/pom.properties +++ b/base/business/report/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:55 ECT 2023 +#Mon Jan 30 15:41:11 ECT 2023 version=2.1 groupId=com.fp.base.business artifactId=report diff --git a/base/business/report/target/report-2.1.jar b/base/business/report/target/report-2.1.jar index 705dcc0..798c96d 100644 Binary files a/base/business/report/target/report-2.1.jar and b/base/business/report/target/report-2.1.jar differ diff --git a/base/business/viaticos/target/maven-archiver/pom.properties b/base/business/viaticos/target/maven-archiver/pom.properties index 3cbb6f4..e59b5a2 100644 --- a/base/business/viaticos/target/maven-archiver/pom.properties +++ b/base/business/viaticos/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:57 ECT 2023 +#Mon Jan 30 15:41:14 ECT 2023 version=2.1 groupId=com.fp.base.business artifactId=viaticos diff --git a/base/business/viaticos/target/viaticos-2.1.jar b/base/business/viaticos/target/viaticos-2.1.jar index 5a4dc33..52ee510 100644 Binary files a/base/business/viaticos/target/viaticos-2.1.jar and b/base/business/viaticos/target/viaticos-2.1.jar differ diff --git a/base/core/alfresco-client/src/main/resources/alfresco-api.properties b/base/core/alfresco-client/src/main/resources/alfresco-api.properties index 8033507..2a10101 100644 --- a/base/core/alfresco-client/src/main/resources/alfresco-api.properties +++ b/base/core/alfresco-client/src/main/resources/alfresco-api.properties @@ -1,8 +1,8 @@ #Configuracion APP api.user=admin api.password=admin -#api.uri.base=http://172.17.26.184:8080/alfresco/service -api.uri.base=http://172.17.26.91:8082/alfresco/service +api.uri.base=http://172.17.26.184:8080/alfresco/service +#api.uri.base=http://172.17.26.91:8082/alfresco/service api.uri.delete.general=/slingshot/doclib/action/file/node/ #Directorio base para las consultas api.doclocation.base=/app:company_home/st:sites/cm:{0}/cm:documentLibrary diff --git a/base/core/alfresco-client/target/alfresco-client-2.1.jar b/base/core/alfresco-client/target/alfresco-client-2.1.jar index d4dc362..ecbbe6b 100644 Binary files a/base/core/alfresco-client/target/alfresco-client-2.1.jar and b/base/core/alfresco-client/target/alfresco-client-2.1.jar differ diff --git a/base/core/alfresco-client/target/classes/alfresco-api.properties b/base/core/alfresco-client/target/classes/alfresco-api.properties index 8033507..2a10101 100644 --- a/base/core/alfresco-client/target/classes/alfresco-api.properties +++ b/base/core/alfresco-client/target/classes/alfresco-api.properties @@ -1,8 +1,8 @@ #Configuracion APP api.user=admin api.password=admin -#api.uri.base=http://172.17.26.184:8080/alfresco/service -api.uri.base=http://172.17.26.91:8082/alfresco/service +api.uri.base=http://172.17.26.184:8080/alfresco/service +#api.uri.base=http://172.17.26.91:8082/alfresco/service api.uri.delete.general=/slingshot/doclib/action/file/node/ #Directorio base para las consultas api.doclocation.base=/app:company_home/st:sites/cm:{0}/cm:documentLibrary diff --git a/base/core/alfresco-client/target/maven-archiver/pom.properties b/base/core/alfresco-client/target/maven-archiver/pom.properties index f4f824a..c2996e4 100644 --- a/base/core/alfresco-client/target/maven-archiver/pom.properties +++ b/base/core/alfresco-client/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:49 ECT 2023 +#Mon Jan 30 15:41:04 ECT 2023 version=2.1 groupId=com.fp.base.core artifactId=alfresco-client diff --git a/base/core/bpm/target/bpm-2.1.jar b/base/core/bpm/target/bpm-2.1.jar index 686cf42..1b341c3 100644 Binary files a/base/core/bpm/target/bpm-2.1.jar and b/base/core/bpm/target/bpm-2.1.jar differ diff --git a/base/core/bpm/target/maven-archiver/pom.properties b/base/core/bpm/target/maven-archiver/pom.properties index 4f1e897..045e237 100644 --- a/base/core/bpm/target/maven-archiver/pom.properties +++ b/base/core/bpm/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:36 ECT 2023 +#Mon Jan 30 15:40:52 ECT 2023 version=2.1 groupId=com.fp.base.core artifactId=bpm diff --git a/base/core/firmas/target/firmas-2.1.jar b/base/core/firmas/target/firmas-2.1.jar index d507d52..6897474 100644 Binary files a/base/core/firmas/target/firmas-2.1.jar and b/base/core/firmas/target/firmas-2.1.jar differ diff --git a/base/core/firmas/target/maven-archiver/pom.properties b/base/core/firmas/target/maven-archiver/pom.properties index 97f0a52..c486771 100644 --- a/base/core/firmas/target/maven-archiver/pom.properties +++ b/base/core/firmas/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:47 ECT 2023 +#Mon Jan 30 15:41:03 ECT 2023 version=2.1 groupId=com.fp.base.core artifactId=firmas diff --git a/base/dto/common/target/common-2.1.jar b/base/dto/common/target/common-2.1.jar index 94991c2..9346364 100644 Binary files a/base/dto/common/target/common-2.1.jar and b/base/dto/common/target/common-2.1.jar differ diff --git a/base/dto/common/target/maven-archiver/pom.properties b/base/dto/common/target/maven-archiver/pom.properties index 956a997..4d49138 100644 --- a/base/dto/common/target/maven-archiver/pom.properties +++ b/base/dto/common/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:22 ECT 2023 +#Mon Jan 30 15:40:38 ECT 2023 version=2.1 groupId=com.fp.base.dto artifactId=common diff --git a/base/dto/dto/target/dto-2.1.jar b/base/dto/dto/target/dto-2.1.jar index 073db6d..6986b17 100644 Binary files a/base/dto/dto/target/dto-2.1.jar and b/base/dto/dto/target/dto-2.1.jar differ diff --git a/base/dto/dto/target/maven-archiver/pom.properties b/base/dto/dto/target/maven-archiver/pom.properties index dbfae3f..ca63430 100644 --- a/base/dto/dto/target/maven-archiver/pom.properties +++ b/base/dto/dto/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:20 ECT 2023 +#Mon Jan 30 15:40:36 ECT 2023 version=2.1 groupId=com.fp.base.dto artifactId=dto diff --git a/base/facade/target/facade-2.1.jar b/base/facade/target/facade-2.1.jar index 707cf72..f3223c6 100644 Binary files a/base/facade/target/facade-2.1.jar and b/base/facade/target/facade-2.1.jar differ diff --git a/base/facade/target/maven-archiver/pom.properties b/base/facade/target/maven-archiver/pom.properties index d18fa28..5e26900 100644 --- a/base/facade/target/maven-archiver/pom.properties +++ b/base/facade/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:26:02 ECT 2023 +#Mon Jan 30 15:41:20 ECT 2023 version=2.1 groupId=com.fp.base artifactId=facade diff --git a/base/facadeclient/target/facadeclient-2.1.jar b/base/facadeclient/target/facadeclient-2.1.jar index 7f499e6..5d07271 100644 Binary files a/base/facadeclient/target/facadeclient-2.1.jar and b/base/facadeclient/target/facadeclient-2.1.jar differ diff --git a/base/facadeclient/target/maven-archiver/pom.properties b/base/facadeclient/target/maven-archiver/pom.properties index 463dac1..772c7b5 100644 --- a/base/facadeclient/target/maven-archiver/pom.properties +++ b/base/facadeclient/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:26:01 ECT 2023 +#Mon Jan 30 15:41:18 ECT 2023 version=2.1 groupId=com.fp.base artifactId=facadeclient diff --git a/base/persistence/commondb/target/commondb-2.1.jar b/base/persistence/commondb/target/commondb-2.1.jar index 252bc76..155125d 100644 Binary files a/base/persistence/commondb/target/commondb-2.1.jar and b/base/persistence/commondb/target/commondb-2.1.jar differ diff --git a/base/persistence/commondb/target/maven-archiver/pom.properties b/base/persistence/commondb/target/maven-archiver/pom.properties index 00cab9c..2b48bfd 100644 --- a/base/persistence/commondb/target/maven-archiver/pom.properties +++ b/base/persistence/commondb/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:30 ECT 2023 +#Mon Jan 30 15:40:46 ECT 2023 version=2.1 groupId=com.fp.base.persistence artifactId=commondb diff --git a/base/persistence/parmas/target/maven-archiver/pom.properties b/base/persistence/parmas/target/maven-archiver/pom.properties index ad531fe..9fa72bc 100644 --- a/base/persistence/parmas/target/maven-archiver/pom.properties +++ b/base/persistence/parmas/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:46 ECT 2023 +#Mon Jan 30 15:41:02 ECT 2023 version=2.1 groupId=com.fp.base.persistence artifactId=parmas diff --git a/base/persistence/parmas/target/parmas-2.1.jar b/base/persistence/parmas/target/parmas-2.1.jar index 0ddcab0..120fd4b 100644 Binary files a/base/persistence/parmas/target/parmas-2.1.jar and b/base/persistence/parmas/target/parmas-2.1.jar differ diff --git a/base/persistence/pbpm/target/maven-archiver/pom.properties b/base/persistence/pbpm/target/maven-archiver/pom.properties index d53c98d..8b10679 100644 --- a/base/persistence/pbpm/target/maven-archiver/pom.properties +++ b/base/persistence/pbpm/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:23 ECT 2023 +#Mon Jan 30 15:40:40 ECT 2023 version=2.1 groupId=com.fp.base.persistence artifactId=pbpm diff --git a/base/persistence/pbpm/target/pbpm-2.1.jar b/base/persistence/pbpm/target/pbpm-2.1.jar index f40ef35..4b08412 100644 Binary files a/base/persistence/pbpm/target/pbpm-2.1.jar and b/base/persistence/pbpm/target/pbpm-2.1.jar differ diff --git a/base/persistence/pcustomer/target/maven-archiver/pom.properties b/base/persistence/pcustomer/target/maven-archiver/pom.properties index 241ba23..d88d532 100644 --- a/base/persistence/pcustomer/target/maven-archiver/pom.properties +++ b/base/persistence/pcustomer/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:33 ECT 2023 +#Mon Jan 30 15:40:49 ECT 2023 version=2.1 groupId=com.fp.base.persistence artifactId=pcustomer diff --git a/base/persistence/pcustomer/target/pcustomer-2.1.jar b/base/persistence/pcustomer/target/pcustomer-2.1.jar index f0726e4..06bcd5f 100644 Binary files a/base/persistence/pcustomer/target/pcustomer-2.1.jar and b/base/persistence/pcustomer/target/pcustomer-2.1.jar differ diff --git a/base/persistence/pfirmas/target/maven-archiver/pom.properties b/base/persistence/pfirmas/target/maven-archiver/pom.properties index 6ab3e90..170b541 100644 --- a/base/persistence/pfirmas/target/maven-archiver/pom.properties +++ b/base/persistence/pfirmas/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:43 ECT 2023 +#Mon Jan 30 15:40:59 ECT 2023 version=2.1 groupId=com.fp.base.persistence artifactId=pfirmas diff --git a/base/persistence/pfirmas/target/pfirmas-2.1.jar b/base/persistence/pfirmas/target/pfirmas-2.1.jar index 2565a12..c56844e 100644 Binary files a/base/persistence/pfirmas/target/pfirmas-2.1.jar and b/base/persistence/pfirmas/target/pfirmas-2.1.jar differ diff --git a/base/persistence/pgeneral/target/maven-archiver/pom.properties b/base/persistence/pgeneral/target/maven-archiver/pom.properties index 6ec2280..0433ca1 100644 --- a/base/persistence/pgeneral/target/maven-archiver/pom.properties +++ b/base/persistence/pgeneral/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:28 ECT 2023 +#Mon Jan 30 15:40:45 ECT 2023 version=2.1 groupId=com.fp.base.persistence artifactId=pgeneral diff --git a/base/persistence/pgeneral/target/pgeneral-2.1.jar b/base/persistence/pgeneral/target/pgeneral-2.1.jar index 016eefc..057220e 100644 Binary files a/base/persistence/pgeneral/target/pgeneral-2.1.jar and b/base/persistence/pgeneral/target/pgeneral-2.1.jar differ diff --git a/base/persistence/plog/target/maven-archiver/pom.properties b/base/persistence/plog/target/maven-archiver/pom.properties index 1f02fd8..eeb7b33 100644 --- a/base/persistence/plog/target/maven-archiver/pom.properties +++ b/base/persistence/plog/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:41 ECT 2023 +#Mon Jan 30 15:40:57 ECT 2023 version=2.1 groupId=com.fp.base.persistence artifactId=plog diff --git a/base/persistence/plog/target/plog-2.1.jar b/base/persistence/plog/target/plog-2.1.jar index 93e98bc..83aeff5 100644 Binary files a/base/persistence/plog/target/plog-2.1.jar and b/base/persistence/plog/target/plog-2.1.jar differ diff --git a/base/persistence/pviaticos/target/maven-archiver/pom.properties b/base/persistence/pviaticos/target/maven-archiver/pom.properties index 8fcdaf5..3f43509 100644 --- a/base/persistence/pviaticos/target/maven-archiver/pom.properties +++ b/base/persistence/pviaticos/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:43 ECT 2023 +#Mon Jan 30 15:40:58 ECT 2023 version=2.1 groupId=com.fp.base.persistence artifactId=pviaticos diff --git a/base/persistence/pviaticos/target/pviaticos-2.1.jar b/base/persistence/pviaticos/target/pviaticos-2.1.jar index 28cd908..1c11b89 100644 Binary files a/base/persistence/pviaticos/target/pviaticos-2.1.jar and b/base/persistence/pviaticos/target/pviaticos-2.1.jar differ diff --git a/base/persistence/util/target/maven-archiver/pom.properties b/base/persistence/util/target/maven-archiver/pom.properties index a96b584..3c5873b 100644 --- a/base/persistence/util/target/maven-archiver/pom.properties +++ b/base/persistence/util/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:34 ECT 2023 +#Mon Jan 30 15:40:50 ECT 2023 version=2.1 groupId=com.fp.base.persistence artifactId=util diff --git a/base/persistence/util/target/util-2.1.jar b/base/persistence/util/target/util-2.1.jar index 104e704..5ca8764 100644 Binary files a/base/persistence/util/target/util-2.1.jar and b/base/persistence/util/target/util-2.1.jar differ diff --git a/base/sessionbeans/target/maven-archiver/pom.properties b/base/sessionbeans/target/maven-archiver/pom.properties index c45f81d..0f9088c 100644 --- a/base/sessionbeans/target/maven-archiver/pom.properties +++ b/base/sessionbeans/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:25:50 ECT 2023 +#Mon Jan 30 15:41:05 ECT 2023 version=2.1 groupId=com.fp.base artifactId=sessionbeans diff --git a/base/sessionbeans/target/sessionbeans-2.1.jar b/base/sessionbeans/target/sessionbeans-2.1.jar index 44177f0..5be3849 100644 Binary files a/base/sessionbeans/target/sessionbeans-2.1.jar and b/base/sessionbeans/target/sessionbeans-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1.ear b/clients/comaco/ear/target/maiaear-2.1.ear index c42d801..b3660d8 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1.ear and b/clients/comaco/ear/target/maiaear-2.1.ear differ diff --git a/clients/comaco/ear/target/maiaear-2.1/armas-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/armas-2.1.jar index 853daf6..aa0c643 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/armas-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/armas-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/bpm-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/bpm-2.1.jar index 686cf42..1b341c3 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/bpm-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/bpm-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/bpmlib.jar b/clients/comaco/ear/target/maiaear-2.1/bpmlib.jar index 8b9f354..212b4f0 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/bpmlib.jar and b/clients/comaco/ear/target/maiaear-2.1/bpmlib.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/common-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/common-2.1.jar index 94991c2..9346364 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/common-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/common-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/commondb-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/commondb-2.1.jar index 252bc76..155125d 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/commondb-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/commondb-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/dto-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/dto-2.1.jar index 073db6d..6986b17 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/dto-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/dto-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/environment-eap6-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/environment-eap6-2.1.jar index ed5ff70..be796a7 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/environment-eap6-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/environment-eap6-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/facade.jar b/clients/comaco/ear/target/maiaear-2.1/facade.jar index 707cf72..f3223c6 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/facade.jar and b/clients/comaco/ear/target/maiaear-2.1/facade.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/facadeclient.jar b/clients/comaco/ear/target/maiaear-2.1/facadeclient.jar index 7f499e6..5d07271 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/facadeclient.jar and b/clients/comaco/ear/target/maiaear-2.1/facadeclient.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/firmas-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/firmas-2.1.jar index d507d52..6897474 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/firmas-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/firmas-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/general-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/general-2.1.jar index 227b8fe..51d6b44 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/general-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/general-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/log-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/log-2.1.jar index deb0d30..e25f20c 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/log-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/log-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/parmas-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/parmas-2.1.jar index 0ddcab0..120fd4b 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/parmas-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/parmas-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/pbpm-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/pbpm-2.1.jar index f40ef35..4b08412 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/pbpm-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/pbpm-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/pcustomer-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/pcustomer-2.1.jar index f0726e4..06bcd5f 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/pcustomer-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/pcustomer-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/person-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/person-2.1.jar index b62833c..000870e 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/person-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/person-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/pfirmas-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/pfirmas-2.1.jar index 2565a12..c56844e 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/pfirmas-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/pfirmas-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/pgeneral-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/pgeneral-2.1.jar index 016eefc..057220e 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/pgeneral-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/pgeneral-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/plog-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/plog-2.1.jar index 93e98bc..83aeff5 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/plog-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/plog-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/report-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/report-2.1.jar index 705dcc0..798c96d 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/report-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/report-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/sessionbeans.jar b/clients/comaco/ear/target/maiaear-2.1/sessionbeans.jar index 44177f0..5be3849 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/sessionbeans.jar and b/clients/comaco/ear/target/maiaear-2.1/sessionbeans.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/simple-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/simple-2.1.jar index c55f45e..f8561ad 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/simple-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/simple-2.1.jar differ diff --git a/clients/comaco/ear/target/maiaear-2.1/util-2.1.jar b/clients/comaco/ear/target/maiaear-2.1/util-2.1.jar index 104e704..5ca8764 100644 Binary files a/clients/comaco/ear/target/maiaear-2.1/util-2.1.jar and b/clients/comaco/ear/target/maiaear-2.1/util-2.1.jar differ diff --git a/clients/comaco/ear/target/maven-archiver/pom.properties b/clients/comaco/ear/target/maven-archiver/pom.properties index b3a9214..8eea7e1 100644 --- a/clients/comaco/ear/target/maven-archiver/pom.properties +++ b/clients/comaco/ear/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:26:03 ECT 2023 +#Mon Jan 30 15:41:20 ECT 2023 version=2.1 groupId=com.fp.clients.maia artifactId=maiaear diff --git a/clients/comaco/environment-eap6/target/environment-eap6-2.1.jar b/clients/comaco/environment-eap6/target/environment-eap6-2.1.jar index ed5ff70..be796a7 100644 Binary files a/clients/comaco/environment-eap6/target/environment-eap6-2.1.jar and b/clients/comaco/environment-eap6/target/environment-eap6-2.1.jar differ diff --git a/clients/comaco/environment-eap6/target/maven-archiver/pom.properties b/clients/comaco/environment-eap6/target/maven-archiver/pom.properties index ccfd957..754756c 100644 --- a/clients/comaco/environment-eap6/target/maven-archiver/pom.properties +++ b/clients/comaco/environment-eap6/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Wed Jan 18 15:26:02 ECT 2023 +#Mon Jan 30 15:41:20 ECT 2023 version=2.1 groupId=com.fp.clients.maia artifactId=environment-eap6 diff --git a/frontend/src/main/java/com/fp/frontend/controller/armas/parametros/TarmCentroControlJurController.java b/frontend/src/main/java/com/fp/frontend/controller/armas/parametros/TarmCentroControlJurController.java index 23e154c..5d71e9b 100644 --- a/frontend/src/main/java/com/fp/frontend/controller/armas/parametros/TarmCentroControlJurController.java +++ b/frontend/src/main/java/com/fp/frontend/controller/armas/parametros/TarmCentroControlJurController.java @@ -318,6 +318,26 @@ public class TarmCentroControlJurController extends AbstractController lSolicitud = SolicitudController.findSolicitudxPersona(nuevoPropietarioArma.getPk().getPersoncode().toString()); + TarmTramite tramite = null; + Integer numMaxArmas = null; + List lstSolicitudArmas = null; + for (TarmSolicitud tarmSolicitud : lSolicitud) { + tramite = TarmTramiteController.findSimple(tarmSolicitud.getCtramite().toString()); + if(tramite.getNumeromaxarmas() != null){ + numMaxArmas = tramite.getNumeromaxarmas().intValue(); + lstSolicitudArmas = TarmSolicitudArmasController.findPorCSolicitud(longitud); + if(lstSolicitudArmas!= null && !lstSolicitudArmas.isEmpty()){ + for (TarmSolicitudArmas lstSolicitudArma : lstSolicitudArmas) { + + } + + } + + } + } + } /** * de consultaArmasController */ diff --git a/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/ConsultaArmasController.java b/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/ConsultaArmasController.java index 4b297e4..c0e7855 100644 --- a/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/ConsultaArmasController.java +++ b/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/ConsultaArmasController.java @@ -304,7 +304,7 @@ public class ConsultaArmasController extends AbstractController { // t.cregistro) and i.carma = t.pk and "+ " i.pk=(select max(doc.pk) " + " from TarmDocumentoHabilitante doc " - + " where doc.fechaexpiracion >= now() and " + + " where doc.fechaexpiracion >= current_date and " + " doc.personcode=(select r.personcode from TarmRegistroArmas r where r.pk = t.cregistro)" + " and doc.carma in (select arm1.pk from TarmArmas arm1 where arm1.codigoarma in (select arm.codigoarma from TarmArmas arm where arm.pk=t.pk)))"); dto.addSubQuery(subqueryFechaemiperm); @@ -379,7 +379,8 @@ public class ConsultaArmasController extends AbstractController { return dto; } - + + /** * Declarar arma perdida diff --git a/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/DocumentoHabilitanteController.java b/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/DocumentoHabilitanteController.java index bbf2f76..2a5589c 100644 --- a/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/DocumentoHabilitanteController.java +++ b/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/DocumentoHabilitanteController.java @@ -1233,6 +1233,29 @@ public class DocumentoHabilitanteController extends return null; } } + /** + * Permisos cerca de caducarse por jurisdiccion + */ + public static List findByCcontrolCercaCaducarse(String centroControlId, String numeroDias){ + try { + DocumentoHabilitanteController cc = new DocumentoHabilitanteController(); + cc.init(); + cc.recperpage = 5000; + cc.addFilter("centrocontrol", centroControlId); + cc.addFilter("estado", "APR"); + // FILTROS: tipoautorizacion='1' --> 1 AUTORIZACION + // FILTROS: tra.categoria='8' --> 8 IMPORTADOR + 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(); + if (cc.lrecord != null) { + return cc.lrecord; + } + return null; + } catch (Throwable e) { + MessageHelper.setMessageError(e); + return null; + } + } /** * Metodo que busca los documentos habilitantes por persona para registro de * importaciones diff --git a/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/ReporteLiquidacionEconomicaController.java b/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/ReporteLiquidacionEconomicaController.java index cddd024..9681ff1 100644 --- a/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/ReporteLiquidacionEconomicaController.java +++ b/frontend/src/main/java/com/fp/frontend/controller/armas/solicitud/ReporteLiquidacionEconomicaController.java @@ -195,7 +195,12 @@ public class ReporteLiquidacionEconomicaController extends AbstractController { + private static final long serialVersionUID = 1L; + + + private Integer numeroDiasCaducarseSumar = 5; + private Date fechavencimiento; + + private String jurisdiccion; + + private List ljurisdicciones; + private boolean administrador = Boolean.FALSE; + @ManagedProperty(value = "#{reportController}") + private ReportController reportController; + + + + @PostConstruct + public void postConstruct(){ + + init(); + super.startQuery(); + + } + + private void init() { + this.beanalias = "PERMISOSVENCERSE"; + this.recperpage = 15; + this.lrecord = new ArrayList<>(); + this.ljurisdicciones =ProvinceController.find("EC"); + TsafeUserDetail tsafeUserDetail = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL"); + PersonAddressController direccionController = null; + fechavencimiento = sumarDiasFecha(new Date(), numeroDiasCaducarseSumar); + try { + direccionController = new PersonAddressController(); + TcustPersonAddress tcustPersonAddres = direccionController.findPrincipal(tsafeUserDetail.getPk().getPersoncode().toString()); + + if(!super.getLoginController().getProfilecode().equals("26")){ + jurisdiccion = tcustPersonAddres.getProvincecode(); + administrador = Boolean.FALSE; + }else{ + administrador = Boolean.TRUE; + } + } catch (Exception ex) { + Exceptions.printStackTrace(ex); + } + + + + + } + /** + * SUMAR DIAS A UNA FECHA + */ + public Date sumarDiasFecha(Date fecha, int dias){ + Calendar calendar = Calendar.getInstance(); + + calendar.setTime(fecha); // Configuramos la fecha que se recibe + calendar.add(Calendar.DAY_OF_YEAR, dias); // numero de días a añadir, o restar en caso de días<0 + + return calendar.getTime(); // Devuelve el objeto Date con los nuevos días añadidos + + } + + public ReportePermisosVencerceController() throws Exception{ + super(TarmDocumentoHabilitante.class); + } + + private DtoQuery getDtoQuery () throws Exception{ + + DtoQuery dto = super.getDtoQuery(true); + SubQuery subqueryCategoriaCodigo = new SubQuery("TgeneCatalogDetail", "description", "description", "i.pk.catalog = (select a.tipotramite from TarmTramite a where a.pk=t.ctramite)" + + "and i.pk.catalogcode=(select a.tipotramitecodigo from TarmTramite a where a.pk=t.ctramite)"); + dto.addSubQuery(subqueryCategoriaCodigo); + SubQuery subquerytipoAutorizacion = new SubQuery("TgeneCatalogDetail", "pk.catalog", "autorizacion", "i.pk.catalog = (select a.tipoautorizacion from TarmTramite a where a.pk=t.ctramite)" + + "and i.pk.catalogcode=(select a.tipoautorizacioncodigo from TarmTramite a where a.pk=t.ctramite)"); + dto.addSubQuery(subquerytipoAutorizacion); + SubQuery subqueryipoAutorizacion = new SubQuery("TgeneCatalogDetail", "description", "descriptionTipoAut", "i.pk.catalog = (select a.tipoautorizacion from TarmTramite a where a.pk=t.ctramite)" + + "and i.pk.catalogcode=(select a.tipoautorizacioncodigo from TarmTramite a where a.pk=t.ctramite)"); + dto.addSubQuery(subqueryipoAutorizacion); + + SubQuery subqueryTipocodigo = new SubQuery("TgeneCatalogDetail", "description", "descriptiontram", "i.pk.catalog = (select a.categoria from TarmTramite a where a.pk=t.ctramite)" + + "and i.pk.catalogcode=(select a.categoriacodigo from TarmTramite a where a.pk=t.ctramite)"); + dto.addSubQuery(subqueryTipocodigo); + SubQuery subqueryUsocodigo = new SubQuery("TgeneCatalogDetail", "description", "descriptionact", "i.pk.catalog = (select a.usoactividad from TarmTramite a where a.pk=t.ctramite)" + + "and i.pk.catalogcode=(select a.usoactividadcodigo from TarmTramite a where a.pk=t.ctramite)"); + + dto.addSubQuery(subqueryUsocodigo); + + SubQuery subQueryIdentificacionPersona = new SubQuery("TcustPersonDetail", "identification", "identificacion", "i.pk.personcode = t.personcode and i.pk.dateto=(select max(dt.pk.dateto) from TcustPersonDetail dt where dt.pk.personcode=t.personcode)"); + + dto.addSubQuery(subQueryIdentificacionPersona); + SubQuery subQueryNombrePersona = new SubQuery("TcustPersonDetail", "name", "nombre", "i.pk.personcode = t.personcode and i.pk.dateto=(select max(dt.pk.dateto) from TcustPersonDetail dt where dt.pk.personcode=t.personcode)"); + dto.addSubQuery(subQueryNombrePersona); + SubQuery subQueryCentroControl = new SubQuery("TgeneCatalogDetail", "description", "nombrecentro", "i.pk.catalog = (select nombreinstitucion from TarmCentroControl tac where tac.pk = t.centrocontrol) and i.pk.catalogcode = (select nombreinstitucioncodigo from TarmCentroControl tac where tac.pk = t.centrocontrol)"); + dto.addSubQuery(subQueryCentroControl); + /** + SubQuery subQueryTipoArma = new SubQuery("TarmArmas", "lote", "lote", "i.pk = t.carma"); + + dto.addSubQuery(subQueryTipoArma);*/ + /** + SubQuery subqueryEstadoDoc = new SubQuery("TgeneCatalogDetail", "description", "estadodocumento", "i.pk.catalog = t.estado" + + " and i.pk.catalogcode= t.estadocode"); + dto.addSubQuery(subqueryEstadoDoc);*/ + return dto; + } + + + @Override + protected void querydatabase() { + try { + SimpleDateFormat vDate = new SimpleDateFormat("yyyy-MM-dd"); + + HashMap mtables = new HashMap(); + Date fechaActual = new Date(); + DtoQuery dto = getDtoQuery(); + if (this.fechavencimiento.before(fechaActual)) { + MessageHelper.setMessageError("El valor hace referencia al número de dias que queda para que el permiso caduque y debe ser mayor o igual a 0"); + } + Filter filter = new Filter(); + String filtro = String.format("t.estado = 'APR' and t.fechaexpiracion is not null AND (t.fechaexpiracion between '%s' and '%s') and t.pathSuspencion is null",vDate.format(fechaActual), vDate.format(fechavencimiento)); + + if(jurisdiccion != null && !jurisdiccion.equals("TODOS")){ + TarmCentroControlJur centroControlJurisdiccion = TarmCentroControlJurController.findxProvincia(jurisdiccion); + if(centroControlJurisdiccion != null){ + filtro = String.format("%s and t.centrocontrol='%s'", filtro, centroControlJurisdiccion.getCcentrocontrol()); + } + } + filter.setSql(filtro); + dto.addFiltro(filter); + + dto.setOrderby("t.fechaexpiracion"); + mtables.put(beanalias, dto); // permite adicionar mas de una tabla. + Request request = callerhelper.getRequest(); + request.setQueryTables(mtables); + + Response resp = callerhelper.executeQuery(request); + + if (resp.getResponseCode().compareTo(Response.RESPONSE_OK) != 0) { + lrecord = new ArrayList<>(); + MessageHelper.setMessageError(resp); + } else { + lrecord = (List) resp.get(beanalias); + super.postQuery(lrecord); + } + } catch (Throwable e) { + MessageHelper.setMessageError(e); + } + } + + /** + * Generar Reporte + */ + public void generarReportePermisosVencerse() { + try { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + + String path = "armas/reports/reportePermisosVencidos"; + String filename = String.format("Permisos-caducarse-%s", sdf.format(fechavencimiento)); + TsafeUserDetail tsafeUserDetailUsuario = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL"); + + //Fija parametros del report. + HashMap parameters = new HashMap<>(); + parameters.put("pathLogoIzquierda", "repo:/maia/1/image/comandoconjunto"); + parameters.put("pathLogoDerecha", "repo:/maia/1/image/selloarmas"); + parameters.put("centroControl", obtenerCentroControl()); + + + //Fecha actual + Date fechaActual = new Date(); + parameters.put("fechaInicio", String.format("%s", sdf.format(fechaActual))); + parameters.put("fechaFin", String.format("%s", sdf.format(fechavencimiento))); + String filtro = ""; + TarmCentroControlJur jurCentroControl = TarmCentroControlJurController.findxProvincia(jurisdiccion); + if(!jurisdiccion.trim().endsWith("TODOS") && jurCentroControl !=null){ + filtro = String.format("and t.ccentrocontrol='%s'", jurCentroControl.getCcentrocontrol()); + } + parameters.put("filtro", filtro); + parameters.put("idCentroControl", jurisdiccion.trim().equals("TODOS") ? null : TarmCentroControlJurController.findxProvincia(jurisdiccion).getCcentrocontrol()); + parameters.put("usuario", tsafeUserDetailUsuario.getPk().getUsercode()); + + String format = "xlsx"; + + try { + + this.reportController.executeXls(path, parameters, format, filename, this.getLoginController()); + } catch (Exception ex) { + MessageHelper.setMessageError(ex); + } + + } catch (Exception ex) { + MessageHelper.setMessageError(ex); + } + } + /** + * Obtiene el centro de control segun usurio logeado. + * + * @throws Exception + * + */ + private String obtenerCentroControl() throws Exception { + + TsafeUserDetail tsafeUserDetailUsuario = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL"); + PersonAddressController personAddressController = new PersonAddressController(); + TcustPersonAddress tcustPersonAddres = personAddressController.findPrincipal(tsafeUserDetailUsuario.getPk().getPersoncode().toString()); + if (tcustPersonAddres != null && tcustPersonAddres.getProvincecode() != null) { + TarmCentroControlJur centroControlJur = TarmCentroControlJurController.findxProvincia(tcustPersonAddres.getProvincecode()); + TarmCentroControl centroControl = CentroControlArmasController.findPorCodigo(centroControlJur.getCcentrocontrol()); + return CatalogDetailController.findxCodigoCodcatalogo(centroControl.getNombreinstitucion(), centroControl.getNombreinstitucioncodigo()).getDescription(); + } else { + return ""; + } + } + + /** + * Numero de dias que se sumara a fecha por defecto + */ + public Integer getNumeroDiasCaducarseSumar() { + return numeroDiasCaducarseSumar; + } + + public void setNumeroDiasCaducarseSumar(Integer numeroDiasCaducarseSumar) { + this.numeroDiasCaducarseSumar = numeroDiasCaducarseSumar; + } + /** + * FECHA VENCIMIENTO + */ + public Date getFechavencimiento() { + return fechavencimiento; + } + + public void setFechavencimiento(Date fechavencimiento) { + this.fechavencimiento = fechavencimiento; + } + + + /** + * Jurisdiccion seleccionada como filtro + */ + public String getJurisdiccion() { + return jurisdiccion; + } + + public void setJurisdiccion(String jurisdiccion) { + this.jurisdiccion = jurisdiccion; + } + + /** + * Lista de provincias (Jurisdicciones) + */ + public List getLjurisdicciones() { + return ljurisdicciones; + } + + public void setLjurisdicciones(List ljurisdicciones) { + this.ljurisdicciones = ljurisdicciones; + } + + public boolean isAdministrador() { + return administrador; + } + + public void setAdministrador(boolean administrador) { + this.administrador = administrador; + } + + public ReportController getReportController() { + return reportController; + } + + public void setReportController(ReportController reportController) { + this.reportController = reportController; + } + +} diff --git a/frontend/src/main/java/com/fp/frontend/controller/bpm/InboxController.java b/frontend/src/main/java/com/fp/frontend/controller/bpm/InboxController.java index 11b849f..7746f99 100644 --- a/frontend/src/main/java/com/fp/frontend/controller/bpm/InboxController.java +++ b/frontend/src/main/java/com/fp/frontend/controller/bpm/InboxController.java @@ -19,19 +19,23 @@ import com.fp.dto.Response; import com.fp.dto.query.DtoQuery; import com.fp.dto.query.SubQuery; import com.fp.frontend.controller.AbstractController; +import com.fp.frontend.controller.armas.parametros.TarmCentroControlJurController; import com.fp.frontend.controller.armas.solicitud.DocumentoHabilitanteController; import com.fp.frontend.controller.armas.solicitud.SolicitudController; import com.fp.frontend.controller.armas.solicitud.TarmTramiteController; import com.fp.frontend.controller.pcustomer.PersonDetailController; import com.fp.frontend.controller.pgeneral.gene.CatalogDetailController; import com.fp.frontend.controller.pgeneral.gene.ParametersController; +import com.fp.frontend.controller.pgeneral.gene.ProvinceController; import com.fp.frontend.helper.MessageHelper; +import com.fp.persistence.parmas.param.TarmCentroControlJur; import com.fp.persistence.parmas.param.TarmTramite; import com.fp.persistence.parmas.soli.TarmDocumentoHabilitante; import com.fp.persistence.parmas.soli.TarmSolicitud; 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.gene.TgeneProvince; import com.fp.persistence.pgeneral.log.TgeneTransactionLog; import com.fp.persistence.pgeneral.safe.TsafeUserDetail; import org.primefaces.context.RequestContext; @@ -53,7 +57,6 @@ public class InboxController extends AbstractController { private List> lTransactionsByGroup; private List> lTransactions; - private String beanGroupsName; private String codBpmGroupSelected; @@ -91,7 +94,6 @@ public class InboxController extends AbstractController { try { beanGroupsName = "BPMGROUPS"; this.listGroups(); - alertarPermisosCaducarse(); //alerta para permisos prontos a caducarse } catch (Exception e) { MessageHelper.setMessageError(e); @@ -506,6 +508,8 @@ public class InboxController extends AbstractController { public void setlTransactions(List> lTransactions) { this.lTransactions = lTransactions; } + + /** * Entrega el valor de: bpmDataStatus @@ -648,33 +652,7 @@ public class InboxController extends AbstractController { ================== 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; - ListlstDocs = 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()); - - MessageHelper.setMessageInfo(mensaje); - RequestContext.getCurrentInstance().execute("PF('advicesDialog').show()"); - - } - - } - } - - - } + /** * OBTENER PERSONA DE USUARIO LOGEADO diff --git a/frontend/src/main/java/com/fp/frontend/controller/pcustomer/PeopleFastController.java b/frontend/src/main/java/com/fp/frontend/controller/pcustomer/PeopleFastController.java index 7a299a2..3ee65ed 100644 --- a/frontend/src/main/java/com/fp/frontend/controller/pcustomer/PeopleFastController.java +++ b/frontend/src/main/java/com/fp/frontend/controller/pcustomer/PeopleFastController.java @@ -330,12 +330,12 @@ public class PeopleFastController extends AbstractController ldocumentoscaducarse; + @PostConstruct private void postconstruct() { this.request = new Request(); @@ -232,7 +239,6 @@ public class LoginController { this.changepassword = userdetail.getChangepassword(); this.lprofile = ((List) userdetail.get("lprofile")); this.request.setProfile(((TsafeUserProfile) this.lprofile.get(0)).getPk().getProfilecode()); - } private void obtenerCentroControl(TsafeUserDetail userdetail) { @@ -276,12 +282,13 @@ public class LoginController { public void changeprofile() throws Exception { try { + this.ldocumentoscaducarse = new ArrayList<>(); if (this.profilecode != null) { this.request.setProfile(this.profilecode); //generarAlertaArmas(); } - + CallerHelper ch = new CallerHelper(); Response resp = ch.menu(this.request); if (resp.getResponseCode().compareTo("0") == 0) { @@ -291,12 +298,53 @@ public class LoginController { } else { MessageHelper.setMessageError(resp); } + alertarPermisosCaducarse(); //alerta para permisos prontos a caducarse } catch (Throwable e) { + e.printStackTrace(); MessageHelper.setMessageError(e); } } + + + /** + * PERMISOS PROXIMOS A CADUCARSE + */ + private void alertarPermisosCaducarse() throws Exception{ + ldocumentoscaducarse = new ArrayList<>(); + TsafeUserDetail tsafeUserDetail = (TsafeUserDetail) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("TSAFEUSERDETAIL"); + TcustPersonDetail personaSesion = buscarPersonaSesion(); + PersonAddressController direccionController = new PersonAddressController(); + TcustPersonAddress tcustPersonAddres = direccionController.findPrincipal(tsafeUserDetail.getPk().getPersoncode().toString()); + TcustPersonDetail personaPermiso = null; + if(personaSesion != null && tcustPersonAddres.getProvincecode() != null + && profilecode != null && !profilecode.equals("24")&& !profilecode.equals("25")){ + TgeneParameters param = ParametersController.find("DIASPREVIOSCADUCAR", "1"); + TarmCentroControlJur jurisdiccionCentro = TarmCentroControlJurController.findxProvincia(tcustPersonAddres.getProvincecode()); + int numeroDias = param != null ? param.getNumbervalue().intValue() : 5; + ListlstDocs = DocumentoHabilitanteController. + findByCcontrolCercaCaducarse(jurisdiccionCentro.getCcentrocontrol(),numeroDias+""); + + TgeneProvince provinciaJurisdicion = ProvinceController.findPorCodigo(jurisdiccionCentro.getCountrycode(), jurisdiccionCentro.getProvincecode()).get(0); + + if(lstDocs != null && !lstDocs.isEmpty()){ + MessageHelper.setMessageInfo(String.format("Permisos prontos a caducarse en la jurisdiccion %s.",provinciaJurisdicion.getDescription())); + + for (TarmDocumentoHabilitante doc : lstDocs) { + + personaPermiso = PersonDetailController.find(doc.getPersoncode().toString()); + doc.getModifiedData().put("identificacion", personaPermiso!= null ? personaPermiso.getIdentification() : ""); + doc.getModifiedData().put("nombre", personaPermiso != null ? personaPermiso.getName() : "" ); + doc.getModifiedData().put("jurisdiccion", provinciaJurisdicion.getDescription()!= null ? provinciaJurisdicion.getDescription() : ""); + ldocumentoscaducarse.add(doc); + MessageHelper.setMessageInfo(String.format("Documento %s, perteneciente a %s expira el %s.",doc.getNumerodocumento(), personaPermiso.getName(), doc.getFechaexpiracion())); + + } + //RequestContext.getCurrentInstance().execute("PF('advicesDialog').show()"); + } + } + } /** @@ -594,6 +642,26 @@ public class LoginController { this.alertaInicio = alertaInicio; } + /** + * Permisos a punto de caducarse + * @return + */ + public List getLdocumentoscaducarse() { + return ldocumentoscaducarse; + } + + public void setLdocumentoscaducarse(List ldocumentoscaducarse) { + this.ldocumentoscaducarse = ldocumentoscaducarse; + } + + + /** + * ACCION AL CERRARSE EL MODAL DE PERMISOS A CADUCARSE + */ + public void onHidePermisosCaducarse() { + System.out.println("Hide dialog advices"); + //ldocumentoscaducarse = new ArrayList<>(); + } } diff --git a/frontend/src/main/resources/controlarmas_es.properties b/frontend/src/main/resources/controlarmas_es.properties index 3c6e41a..8bd5bd2 100644 --- a/frontend/src/main/resources/controlarmas_es.properties +++ b/frontend/src/main/resources/controlarmas_es.properties @@ -1029,3 +1029,5 @@ btn_declararperdida='ARMA PERDIDA/ROBADA' # * PAGO CON TARJETA lbl_total_pagar=Total a Pagar lbl_interes_tarjeta=Interes por pago con tarjeta + + diff --git a/frontend/src/main/resources/general_es.properties b/frontend/src/main/resources/general_es.properties index e8dd2e5..01e7b98 100644 --- a/frontend/src/main/resources/general_es.properties +++ b/frontend/src/main/resources/general_es.properties @@ -438,4 +438,7 @@ lbl_mensaje_soporte=\u00a1Queremos mejorar y estamos trabajando para ello!, Esta estado_display=display: block # * PAGO TARJETA -lbl_save_pay=Pagar y Guardar \ No newline at end of file +lbl_save_pay=Pagar y Guardar + +# REPORTE PERMISOS CERCANOS A CADUCARSE +lbl_diascaducarse=En cuantos dias debe expirar diff --git a/frontend/src/main/resources/jasper.properties b/frontend/src/main/resources/jasper.properties index 36a5479..7ebc0cf 100644 --- a/frontend/src/main/resources/jasper.properties +++ b/frontend/src/main/resources/jasper.properties @@ -1,8 +1,11 @@ #http://172.17.26.185:8084/jasperserver/flow.html?_flowId=searchFlow&lastMode=true #http\://172.17.26.185\:8084/jasperserver/services/repository #produccion -jasperserver.repository=http\://172.17.26.75\:8081/jasperserver/services/repository -jasperserver.reportScheduler=http\://172.17.26.75\:8081/jasperserver/services/ReportScheduler +#jasperserver.repository=http\://172.17.26.75\:8081/jasperserver/services/repository +#jasperserver.reportScheduler=http\://172.17.26.75\:8081/jasperserver/services/ReportScheduler +jasperserver.repository=http\://172.17.26.182\:8081/jasperserver/services/repository +jasperserver.reportScheduler=http\://172.17.26.182\:8081/jasperserver/services/ReportScheduler + #desarrollo #jasperserver.repository=http\://172.17.26.185\:8084/jasperserver/services/repository #jasperserver.reportScheduler=http\://172.17.26.185\:8084/jasperserver/services/ReportScheduler diff --git a/frontend/src/main/webapp/pages/armas/reportePermisosVencerce.xhtml b/frontend/src/main/webapp/pages/armas/reportePermisosVencerce.xhtml new file mode 100644 index 0000000..5a6c47f --- /dev/null +++ b/frontend/src/main/webapp/pages/armas/reportePermisosVencerce.xhtml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/frontend/src/main/webapp/pages/workspace.xhtml b/frontend/src/main/webapp/pages/workspace.xhtml index 0494efb..3ed73d8 100644 --- a/frontend/src/main/webapp/pages/workspace.xhtml +++ b/frontend/src/main/webapp/pages/workspace.xhtml @@ -152,6 +152,7 @@ widgetVar="tabSide" onTabChange="Maiaworkspace.handleTabSideChange(index)"> + @@ -321,10 +322,13 @@ - - + resizable="true" header="Notificacion" onHide="#{loginController.onHidePermisosCaducarse()}"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/frontend/target/maia/pages/workspace.xhtml b/frontend/target/maia/pages/workspace.xhtml index 0494efb..3ed73d8 100644 --- a/frontend/target/maia/pages/workspace.xhtml +++ b/frontend/target/maia/pages/workspace.xhtml @@ -152,6 +152,7 @@ widgetVar="tabSide" onTabChange="Maiaworkspace.handleTabSideChange(index)"> + @@ -321,10 +322,13 @@ - - + resizable="true" header="Notificacion" onHide="#{loginController.onHidePermisosCaducarse()}"> + + +