From ee60df2b5e451581576d485bf19289f857be212b Mon Sep 17 00:00:00 2001 From: Salvatore La Manna Date: Tue, 23 Mar 2021 17:05:15 +0100 Subject: [PATCH] Fix --- .../WEB-INF/src/content/Portal.properties | 1 + .../docroot/WEB-INF/src/service.properties | 4 +- .../html/gestioneattivita/advanced_search.jsp | 334 +++++++----------- .../hook/struts/EditWorkflowTaskAction.java | 8 +- 4 files changed, 134 insertions(+), 213 deletions(-) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties index 10e79e5d..3122a53a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties @@ -1030,6 +1030,7 @@ label.admingeniocivile.statopratica.attesafirma = Attesa di Firma label.admingeniocivile.statopratica.approvazione = Approvazione label.admingeniocivile.statopratica.finelavorianomalia = Anomalia Fine Lavori label.admingeniocivile.statopratica.variante = Variante +label.admingeniocivile.statopratica.sospesa = Sospesa label.firma-doc = Dichiaro di aver preso visione del documento, e di sottoscriverne il contenuto ai sensi del D.Lgs. 82/2005 label.cambio-soggetti-ok = Cambio Soggetti #{0} completato con successo diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 548ad993..62700003 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=2565 - build.date=1615988331406 + build.number=2566 + build.date=1616505773643 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp index 20a9e651..e47c3fcd 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp @@ -1,206 +1,143 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - -<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> -<%@page import="com.liferay.portal.kernel.json.JSONFactoryUtil"%> -<%@page import="com.liferay.portal.kernel.json.JSONObject"%> -<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%> +<%@page import="com.liferay.portal.model.Organization"%> +<%@page import="com.liferay.portal.model.Role"%> <%@page import="com.liferay.portal.model.UserGroupRole"%> +<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%> <%@page import="com.liferay.portal.service.RoleLocalServiceUtil"%> -<%@page import="com.liferay.portal.model.Role"%> -<%@page import="java.util.Collections"%> -<%@page import="java.util.Comparator"%> +<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%> <%@page import="java.util.ArrayList"%> -<%@page import="com.liferay.portal.model.Organization"%> -<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%> -<%@page import="org.apache.commons.lang.StringEscapeUtils"%> +<%@page import="java.util.Collections"%> <%@include file="/html/fascicolo/init.jsp"%> - <% List organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId()); %> - - -
+ id='<%= renderResponse.getNamespace() + scopeGroupId + "ricercaSaiPanel" %>' collapsible="true" extended="false" + persistState="true"> +
-
+
-
+
-
+
Seleziona il tipo di pratica - - - - - - - - - - - + + + +
-
+
Stato Pratica - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
-
+
-
- +
+
-
- <%--ADT BUG BO ID = 8 SEZIONE ATTIVITà --%> - +
+ <%--ADT BUG BO ID = 8 SEZIONE ATTIVITÀ --%> + - Tutti + Tutti <% - List tecniciIstruttori = new ArrayList(); - for(Organization org : organizationList){ - Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_istruttore"); - List istruttori = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole(org.getGroupId(), role.getRoleId()); - - for (UserGroupRole userGroupRole : istruttori) { - if(tecniciIstruttori.isEmpty()){ - tecniciIstruttori.add(userGroupRole); - - } else { - boolean isPresent = false; - for(UserGroupRole tecnico : tecniciIstruttori){ - if(tecnico.getUserId() == userGroupRole.getUserId()){ - isPresent = true; - break; - } - } - if(!isPresent){ - tecniciIstruttori.add(userGroupRole); - } - }}} - List tecniciIstruttoriSorted = new ArrayList(); - for(UserGroupRole tecnico : tecniciIstruttori){ - IstruttoreBean istruttore = new IstruttoreBean(); - istruttore.setIdIstruttore(tecnico.getUserId()); - istruttore.setDenominazione(tecnico.getUser().getFullName()); - tecniciIstruttoriSorted.add(istruttore); - } - Collections.sort(tecniciIstruttoriSorted); - for(IstruttoreBean istruttore : tecniciIstruttoriSorted){ - - - - %> - <%=istruttore.getDenominazione() %> + List tecniciIstruttori = new ArrayList(); + for (Organization org : organizationList) { + Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_istruttore"); + List istruttori = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole( + org.getGroupId(), role.getRoleId()); + for (UserGroupRole userGroupRole : istruttori) { + boolean isPresent = false; + for (UserGroupRole tecnico : tecniciIstruttori) { + if (tecnico.getUserId() == userGroupRole.getUserId()) { + isPresent = true; + break; + } + } + if (!isPresent) { + tecniciIstruttori.add(userGroupRole); + } + } + } + List tecniciIstruttoriSorted = new ArrayList(); + for (UserGroupRole tecnico : tecniciIstruttori) { + IstruttoreBean istruttore = new IstruttoreBean(); + istruttore.setIdIstruttore(tecnico.getUserId()); + istruttore.setDenominazione(tecnico.getUser().getFullName()); + tecniciIstruttoriSorted.add(istruttore); + } + Collections.sort(tecniciIstruttoriSorted); + for (IstruttoreBean istruttore : tecniciIstruttoriSorted) { + %> + + <%= istruttore.getDenominazione() %> + <% - } - - - %> + } + %>
-
-
- - +
+ + - - + +
-
- - +
+ Tutte <% - for(Organization org : organizationList){ - if(org.getParentOrganizationId()!= 0){ - - %> - <%=org.getName() %> + for (Organization org : organizationList) { + if (org.getParentOrganizationId() != 0) { + %> + <%= org.getName() %> <% - } - } - %> + } + } + %>
- <% - String comuneSelect = ParamUtil.getString(renderRequest, "comune"); - %> - - + <% + String comuneSelect = ParamUtil.getString(renderRequest, "comune"); + %> +
@@ -212,7 +149,7 @@ List organizationList = OrganizationLocalServiceUtil.getUserOrgani
-
+
Tutte Assegnazione @@ -226,80 +163,67 @@ List organizationList = OrganizationLocalServiceUtil.getUserOrgani
-
+
-
+
Nome Task Numero Progetto Protocollo Data Invio Tipo Pratica -
-
+
Dec Asc -
-
- -<%--ADT BUG BO ID = 1 SEZIONE ATTIVITà --%> +<%--ADT BUG BO ID = 1 SEZIONE ATTIVITÀ --%> - - $(".add-new-project__ufficio select").change(function(){ - var comuni = ''; - var val = $(this).val(); - $(".add-new-project__comune select").empty(); - - A.io.request( - '<%= getComuniURL %>', - { - data: { - ufficioId: val - },dataType: 'json', - on: { - success: function() { - $(".add-new-project__comune select").empty(); - $(".add-new-project__comune select").append($(' + if (checkIfExists) { + $(".add-new-project__comune select").val(cs); + } + } + } + }); +}).trigger("change"); + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java index da8162b6..e113d625 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java @@ -190,12 +190,8 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction { if (Validator.isNotNull(controllo)) { IntPratica pratica = IntPraticaLocalServiceUtil.getIntPratica(controllo.getIntPraticaId()); // Correzione stato per pratiche prelevate manualmente dalle attività completate - if ((WorkflowConstants.STATUS_APPROVED == controllo.getStatus() && StatoPraticaConstants.CONFORME - .equalsIgnoreCase(pratica.getStatoPratica()))) { - _log.info("Pratica " + pratica.getNumeroProgetto() + ", stato pratica " - + pratica.getStatoPratica() + " -> " - + StatoPraticaConstants.SOTTOPOSTA_A_PARERE + ", status controllo " - + controllo.getStatus() + " -> " + WorkflowConstants.STATUS_PENDING); + if ((WorkflowConstants.STATUS_APPROVED == controllo.getStatus()) + && StatoPraticaConstants.CONFORME.equalsIgnoreCase(pratica.getStatoPratica())) { controllo.setStatus(WorkflowConstants.STATUS_PENDING); ControlloPraticaLocalServiceUtil.updateControlloPratica(controllo); pratica.setStatoPratica(StatoPraticaConstants.SOTTOPOSTA_A_PARERE);