From 4fcb5a90ec083674f211d28b565ca02c41b3a171 Mon Sep 17 00:00:00 2001 From: Mattia Gosetto Date: Thu, 3 Dec 2020 14:04:52 +0100 Subject: [PATCH] sismica --- .../it/mwg/sismica/bo/util/SismicaUtil.java | 41 ++++++++++++++++++- .../docroot/WEB-INF/src/service.properties | 4 +- .../html/sismica_administration/view.jsp | 10 ++++- 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java index 43f44d18..24bf28ac 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java @@ -307,7 +307,7 @@ public class SismicaUtil { controlloPraticaId = 0; break; - case StatoPraticaConstants.VIDIMATA: + case "vidimazione_variante": List varianti = DettPraticaLocalServiceUtil .findByIntPraticaId_TipoIntegrazione_Completa(intPraticaId, TipoIntegrazioneUtil.VARIANTE, true); @@ -326,6 +326,45 @@ public class SismicaUtil { classPk = variante.getPrimaryKey(); controlloPraticaId = 0; break; + + case "avviso_avvio_proced": + List praticheSp = DettPraticaLocalServiceUtil + .findByIntPraticaId(intPraticaId); + DettPratica praticaSp = null; + for (DettPratica el : praticheSp) { + if (Validator.isNotNull(el.getDtProtocollo())) { + praticaSp = el; + } + } + if (Validator.isNull(praticaSp)) { + SessionErrors.add(actionRequest, "invia-avviso-avvio-procedimento-non-trovato"); + return; + } + tipoDocumento = StatoPraticaConstants.SOTTOPOSTA_A_PARERE; + className = DettPratica.class.getName(); + classPk = praticaSp.getPrimaryKey(); + controlloPraticaId = 0; + break; + + case "avviso_vidimazione": + List pratichePresentate = DettPraticaLocalServiceUtil + .findByIntPraticaId(intPraticaId); + DettPratica praticaPresentata = null; + for (DettPratica el : pratichePresentate) { + if (Validator.isNotNull(el.getDtProtocollo())) { + praticaPresentata = el; + } + } + if (Validator.isNull(praticaPresentata)) { + SessionErrors.add(actionRequest, "invia-avviso-vidimazione-non-trovato"); + return; + } + tipoDocumento = StatoPraticaConstants.VIDIMATA; + className = DettPratica.class.getName(); + classPk = praticaPresentata.getPrimaryKey(); + controlloPraticaId = 0; + break; + default: SessionErrors.add(actionRequest, "operazione-non-supportata"); return; 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 63a7501e..e10b134e 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=2517 - build.date=1604324969830 + build.number=2519 + build.date=1606917366187 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp index c3b83248..bfa27a9b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp @@ -149,8 +149,14 @@ String dataProssimoSorteggio = selected="<%=tipoAvviso.equals(StatoPraticaConstants.FINE_LAVORI)%>" value="<%=StatoPraticaConstants.FINE_LAVORI%>"> + selected="vidimazione_variante" + value="vidimazione_variante"> + +