diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java index ef035fab..206bb296 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java @@ -295,25 +295,25 @@ public class GestioneAttivitaPortlet extends MVCPortlet { SessionErrors.add(actionRequest, "error-aggiunta-richiesta-parere"); } } - + public void aggiungiRichiestaParere(ActionRequest actionRequest, ActionResponse actionResponse) { long geologoId = ParamUtil.getLong(actionRequest, "geologoId"); long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId"); long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId"); - + try { ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); serviceContext.setCreateDate(new Date()); serviceContext.setModifiedDate(new Date()); - if (ParereGeologoLocalServiceUtil.countByIntPraticaIdParereVuoto(intPraticaId) == 0) { + //if (ParereGeologoLocalServiceUtil.countByIntPraticaIdParereVuoto(intPraticaId) == 0) { ParereGeologo parereGeologo = ParereGeologoServiceUtil.addParereGeologo(geologoId, intPraticaId, dettPraticaId, serviceContext); // ADT: aggiunta notifica geologo MailUtil.invioNotificaGeologo(parereGeologo, serviceContext); - } else { + /*} else { throw new PortalException("parere endoprocedimentale giĆ  presente"); - } + }*/ } catch (PortalException | SystemException e) { _log.error(e, e); SessionErrors.add(actionRequest, "error-aggiunta-richiesta-parere"); 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 1d211736..60cd0a68 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=2856 - build.date=1611650497371 + build.number=2858 + build.date=1611666327615 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp index add4dc99..dd05fe87 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp @@ -51,7 +51,7 @@ List pareriGeologo = ParereGeologoLocalServiceUtil.findByIntPrati Tecnico istruttore: <%= tecnicoIstruttore!=null?tecnicoIstruttore.getFullName(): "Nessun istruttore" %>

- +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/action_button.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/action_button.jsp index ba1a18e2..40c25e93 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/action_button.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/action_button.jsp @@ -67,7 +67,8 @@ long lastDettPraticaId = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()).getDettPraticaId(); String buttonIdCambioIstruttore = "buttonIdCambioIstruttore_"+randomId; - String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_"+randomId; + String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_"+randomId; + String buttonIdAnnullaRicGeologo = "buttonIdAnnullaRicGeologo_"+randomId; String buttonIdAggiungiDettPraticheAlControllo = "buttonIdAggiungiDettPraticheAlControllo_"+randomId; Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); @@ -173,35 +174,34 @@ - - - - - - - -
- -
-
+ + + + + + +
+ +
- - <% - ParereGeologo parereGeologo = ParereGeologoLocalServiceUtil.findByIntPraticaIdParereVuoto(intPratica.getIntPraticaId(), 0, 1).get(0); - %> - - - - - -
- -
- + + + + + + + + +
+ +
+
+ + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_annulla_ric_geologo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_annulla_ric_geologo.jsp new file mode 100644 index 00000000..586bb126 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_annulla_ric_geologo.jsp @@ -0,0 +1,73 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.liferay.portal.kernel.util.ListUtil"%> +<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%> +<%@page import="com.liferay.portal.model.Organization"%> +<%@page import="it.tref.liferay.portos.bo.util.Constants"%> +<%@page import="com.liferay.portal.service.RoleLocalServiceUtil"%> +<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> +<%@page import="java.util.ArrayList"%> +<%@page import="com.liferay.portal.model.User"%> +<%@page import="com.liferay.portal.model.Role"%> +<%@page import="javax.portlet.PortletURL"%> +<%@include file="/html/gestioneattivita/init.jsp"%> + +<% + long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); + long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId"); + + String buttonIdAnnullaRicGeologo = ParamUtil.getString(request, "buttonIdAnnullaRicGeologo"); + PortletURL iteratorURL = liferayPortletResponse.createRenderURL(); + String orderByType = ParamUtil.getString(request, "orderByType", "asc"); + String orderByCol = ParamUtil.getString(request, "orderByCol", "nome"); + + String randomId = StringUtil.randomId(); + String formNameAnnullaRicGeologo = "formNameAnnullaRicGeologo_"+randomId; + String divIdAnnullaRicGeologo = "divIdAnnullaRicGeologo_"+randomId; + List pareriGeologo = ParereGeologoLocalServiceUtil.findByIntPraticaId(intPraticaId, QueryUtil.ALL_POS, QueryUtil.ALL_POS); + List geologi = new ArrayList(); + +%> + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_seleziona_geologo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_seleziona_geologo.jsp index e72ccfa1..1d157a68 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_seleziona_geologo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_seleziona_geologo.jsp @@ -25,6 +25,13 @@ String divIdSelezionaGeologo = "divIdSelezionaGeologo_"+randomId; Role role = RoleLocalServiceUtil.getRole(company.getCompanyId(),Constants.ROLE_NAME_GEOLOGO); List geologi = UserLocalServiceUtil.getRoleUsers(role.getRoleId()); + List pareriGeologo = ParereGeologoLocalServiceUtil.findByIntPraticaId(intPraticaId, QueryUtil.ALL_POS, QueryUtil.ALL_POS); + for(ParereGeologo parereGeologo : pareriGeologo){ + if(Validator.isNull(parereGeologo.getDtCompilazione())){ + geologi.remove(UserLocalServiceUtil.getUser(parereGeologo.getGeologoUserId())); + } + } + %>