From 8ecc3992bccd08eb51c176af614d8fdfc578c798 Mon Sep 17 00:00:00 2001 From: Mattia Gosetto Date: Wed, 10 Nov 2021 16:44:52 +0100 Subject: [PATCH] mappe sismica ricerca posizione --- .../docroot/WEB-INF/liferay-portlet.xml | 7 + .../docroot/WEB-INF/portlet.xml | 32 ++++ .../bo/portlet/RicercaPosizionePortlet.java | 121 +++++++++++++ .../AllegatoManualePersistenceImpl.java | 1 - .../AsseverazionePersistenceImpl.java | 1 - .../persistence/AvvisoPersistenceImpl.java | 1 - .../persistence/CollaudoPersistenceImpl.java | 1 - .../persistence/ComunePersistenceImpl.java | 1 - .../ComunicazionePersistenceImpl.java | 1 - .../ConfigurazionePersistenceImpl.java | 1 - .../ControlloPraticaPersistenceImpl.java | 1 - .../persistence/DelegaPersistenceImpl.java | 1 - .../DettPraticaPersistenceImpl.java | 1 - .../DocAggiuntivaPersistenceImpl.java | 1 - .../DocPraticaPersistenceImpl.java | 1 - .../FineLavoriPersistenceImpl.java | 1 - .../HistoryWorkflowActionPersistenceImpl.java | 1 - .../IntPraticaPersistenceImpl.java | 1 - .../persistence/PagamentoPersistenceImpl.java | 1 - .../ParereGeologoPersistenceImpl.java | 1 - .../persistence/ProvinciaPersistenceImpl.java | 1 - .../persistence/SoggettoPersistenceImpl.java | 1 - .../persistence/SorteggioPersistenceImpl.java | 1 - ...StoricoSoggettoPraticaPersistenceImpl.java | 1 - .../TempisticaPersistenceImpl.java | 1 - .../TerritorioPersistenceImpl.java | 1 - .../docroot/WEB-INF/src/service.properties | 4 +- .../docroot/html/ricerca-posizione/view.jsp | 166 ++++++++++++++++++ 28 files changed, 328 insertions(+), 25 deletions(-) create mode 100644 liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java create mode 100644 liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml index d2e677ac..e8704a1f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -183,6 +183,13 @@ /js/main.js?v=2 portos-administration-portlet + + ricerca-posizione + /icon.png + /css/main.css?v=1 + /js/main.js?v=2 + ricerca-posizione-portlet + 22 /icon.png diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml index c39826fb..602342ba 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml @@ -435,6 +435,38 @@ user + + ricerca-posizione + Ricerca per posizione + it.mwg.sismica.bo.portlet.RicercaPosizionePortlet + + view-template + /html/ricerca-posizione/view.jsp + + 0 + + text/html + view + + content.Language + + Ricerca per posizione + Ricerca posizione + + + + administrator + + + guest + + + power-user + + + user + + 22 Ricerca Protocollo diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java new file mode 100644 index 00000000..21b160ed --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java @@ -0,0 +1,121 @@ +package it.mwg.sismica.bo.portlet; + +import it.tref.liferay.portos.bo.model.Comune; +import it.tref.liferay.portos.bo.model.DettPratica; +import it.tref.liferay.portos.bo.model.IntPratica; +import it.tref.liferay.portos.bo.model.Provincia; +import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil; +import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletException; +import javax.portlet.ResourceRequest; +import javax.portlet.ResourceResponse; + +import org.apache.commons.lang.StringUtils; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.ParamUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portal.service.ServiceContextFactory; +import com.liferay.util.bridges.mvc.MVCPortlet; + +public class RicercaPosizionePortlet extends MVCPortlet { + private static final Log _log = LogFactoryUtil.getLog(RicercaPosizionePortlet.class); + + @SuppressWarnings("serial") + private static final List CAMPI = Arrays. asList("tabs1", "numeroProgetto", "provincia", "comune", + "via", "lat", "long", "raggio"); + + public void ricerca(ActionRequest actionRequest, ActionResponse actionResponse) { + + for (String campo : CAMPI) { + String val = ParamUtil.getString(actionRequest, campo, StringPool.BLANK); + actionResponse.setRenderParameter(campo, val); + } + } + + public void localizzaProgetto(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, + SystemException { + + String numeroProgetto = ParamUtil.getString(actionRequest, "numeroProgetto"); + JSONObject object = JSONFactoryUtil.createJSONObject(); + if (Validator.isNotNull(numeroProgetto)) { + IntPratica pratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto); + if (Validator.isNotNull(pratica)) { + DettPratica dett = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(pratica.getIntPraticaId()); + if (Validator.isNotNull(dett)) { + String localizzazione = dett.getLocalizzazioneGeografica(); + if (Validator.isNotNull(localizzazione)) { + String[] parti = StringUtils.split(localizzazione, '|'); + if (parti.length > 1) { + object.put("lat", Double.valueOf(parti[0])); + object.put("lng", Double.valueOf(parti[1])); + } + } + + } + } + } + writeJSON(actionRequest, actionResponse, object); + } + + @Override + public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, + PortletException { + + String id = resourceRequest.getResourceID(); + ServiceContext serviceContext; + try { + serviceContext = ServiceContextFactory.getInstance(resourceRequest); + long companyId = serviceContext.getCompanyId(); + JSONArray array = JSONFactoryUtil.createJSONArray(); + switch (id) { + case "province": + for (String codice : TerritorioLocalServiceUtil.getActiveProvince()) { + JSONObject object = JSONFactoryUtil.createJSONObject(); + Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(companyId, codice); + object.put("id", provincia.getCodiceProvincia()); + object.put("nome", provincia.getProvincia()); + array.put(object); + } + writeJSON(resourceRequest, resourceResponse, array); + break; + case "comuni": + String provinciaId = ParamUtil.getString(resourceRequest, "provinciaId"); + if (Validator.isNotNull(provinciaId)) { + List comuni = TerritorioLocalServiceUtil.getActiveComuniByCodiceProvincia(provinciaId); + for (long comuneId : comuni) { + JSONObject object = JSONFactoryUtil.createJSONObject(); + Comune comune = ComuneLocalServiceUtil.getComune(comuneId); + object.put("id", comune.getComuneId()); + object.put("nome", comune.getDenominazione()); + array.put(object); + } + } + writeJSON(resourceRequest, resourceResponse, array); + break; + default: + super.serveResource(resourceRequest, resourceResponse); + } + } catch (PortalException | SystemException e) { + e.printStackTrace(); + } + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java index 68b9d749..fe5ffd69 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchAllegatoManualeException; import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.impl.AllegatoManualeImpl; import it.tref.liferay.portos.bo.model.impl.AllegatoManualeModelImpl; -import it.tref.liferay.portos.bo.service.persistence.AllegatoManualePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java index f9489e0d..d0f1112c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchAsseverazioneException; import it.tref.liferay.portos.bo.model.Asseverazione; import it.tref.liferay.portos.bo.model.impl.AsseverazioneImpl; import it.tref.liferay.portos.bo.model.impl.AsseverazioneModelImpl; -import it.tref.liferay.portos.bo.service.persistence.AsseverazionePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java index a8a28936..e35a9522 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchAvvisoException; import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.impl.AvvisoImpl; import it.tref.liferay.portos.bo.model.impl.AvvisoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.AvvisoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java index 1c9ee855..a676849e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchCollaudoException; import it.tref.liferay.portos.bo.model.Collaudo; import it.tref.liferay.portos.bo.model.impl.CollaudoImpl; import it.tref.liferay.portos.bo.model.impl.CollaudoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.CollaudoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java index b5054e85..691776e7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchComuneException; import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.impl.ComuneImpl; import it.tref.liferay.portos.bo.model.impl.ComuneModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ComunePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java index b8d76564..b88225f1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchComunicazioneException; import it.tref.liferay.portos.bo.model.Comunicazione; import it.tref.liferay.portos.bo.model.impl.ComunicazioneImpl; import it.tref.liferay.portos.bo.model.impl.ComunicazioneModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ComunicazionePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java index 4a0e9a11..66d67c23 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchConfigurazioneException; import it.tref.liferay.portos.bo.model.Configurazione; import it.tref.liferay.portos.bo.model.impl.ConfigurazioneImpl; import it.tref.liferay.portos.bo.model.impl.ConfigurazioneModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ConfigurazionePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java index 7c1fa3f1..0cc84b84 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchControlloPraticaException; import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.impl.ControlloPraticaImpl; import it.tref.liferay.portos.bo.model.impl.ControlloPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ControlloPraticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java index a2090464..bbf7e7de 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchDelegaException; import it.tref.liferay.portos.bo.model.Delega; import it.tref.liferay.portos.bo.model.impl.DelegaImpl; import it.tref.liferay.portos.bo.model.impl.DelegaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.DelegaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java index 284ef73a..96ef6b28 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchDettPraticaException; import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DettPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.DettPraticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java index cbb97b8f..851c2c34 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchDocAggiuntivaException; import it.tref.liferay.portos.bo.model.DocAggiuntiva; import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaImpl; import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.DocAggiuntivaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java index 1a35a013..4632fb51 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchDocPraticaException; import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.impl.DocPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DocPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.DocPraticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java index e2a7716d..908947c5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchFineLavoriException; import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.impl.FineLavoriImpl; import it.tref.liferay.portos.bo.model.impl.FineLavoriModelImpl; -import it.tref.liferay.portos.bo.service.persistence.FineLavoriPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java index 7b45230e..b1f93960 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java @@ -42,7 +42,6 @@ import it.tref.liferay.portos.bo.NoSuchHistoryWorkflowActionException; import it.tref.liferay.portos.bo.model.HistoryWorkflowAction; import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionImpl; import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionModelImpl; -import it.tref.liferay.portos.bo.service.persistence.HistoryWorkflowActionPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java index 605304c7..6b1a1f76 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java @@ -48,7 +48,6 @@ import it.tref.liferay.portos.bo.NoSuchIntPraticaException; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.impl.IntPraticaImpl; import it.tref.liferay.portos.bo.model.impl.IntPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.IntPraticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java index a21d5628..31233ca0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchPagamentoException; import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.impl.PagamentoImpl; import it.tref.liferay.portos.bo.model.impl.PagamentoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.PagamentoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java index d4e4eb82..22211d67 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchParereGeologoException; import it.tref.liferay.portos.bo.model.ParereGeologo; import it.tref.liferay.portos.bo.model.impl.ParereGeologoImpl; import it.tref.liferay.portos.bo.model.impl.ParereGeologoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ParereGeologoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java index 28c40f09..e20dcc6f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java @@ -43,7 +43,6 @@ import it.tref.liferay.portos.bo.NoSuchProvinciaException; import it.tref.liferay.portos.bo.model.Provincia; import it.tref.liferay.portos.bo.model.impl.ProvinciaImpl; import it.tref.liferay.portos.bo.model.impl.ProvinciaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ProvinciaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java index 9472e823..488eee17 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchSoggettoException; import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.impl.SoggettoImpl; import it.tref.liferay.portos.bo.model.impl.SoggettoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.SoggettoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java index 5bcc9a03..47f64b59 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchSorteggioException; import it.tref.liferay.portos.bo.model.Sorteggio; import it.tref.liferay.portos.bo.model.impl.SorteggioImpl; import it.tref.liferay.portos.bo.model.impl.SorteggioModelImpl; -import it.tref.liferay.portos.bo.service.persistence.SorteggioPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java index 0bff1915..04df6534 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java @@ -42,7 +42,6 @@ import it.tref.liferay.portos.bo.NoSuchStoricoSoggettoPraticaException; import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica; import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaImpl; import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.StoricoSoggettoPraticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java index 61d576eb..17b343d3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchTempisticaException; import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.impl.TempisticaImpl; import it.tref.liferay.portos.bo.model.impl.TempisticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.TempisticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java index c7f4d1dd..10006a9c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java @@ -44,7 +44,6 @@ import it.tref.liferay.portos.bo.NoSuchTerritorioException; import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.impl.TerritorioImpl; import it.tref.liferay.portos.bo.model.impl.TerritorioModelImpl; -import it.tref.liferay.portos.bo.service.persistence.TerritorioPersistence; import java.io.Serializable; 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 02fa09f7..f95ebe8d 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=2731 - build.date=1636389881548 + build.number=2733 + build.date=1636558951641 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp new file mode 100644 index 00000000..7ab9a202 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp @@ -0,0 +1,166 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/html/init.jsp" %> +<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%> +<%@page import="it.tref.liferay.portos.bo.util.PraticaUtil"%> +<%@page import="java.text.NumberFormat"%> +<%@page import="java.text.DecimalFormat"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.util.Locale"%> +<%@page import="javax.portlet.PortletURL"%> +<%@page import="it.mwg.sismica.bo.util.MappeUtil"%> +<% +String codiceProvincia = ParamUtil.getString(request, "provincia", StringPool.BLANK); +long idComune = ParamUtil.getLong(request, "comune", 0); +String urlIframeMappe = MappeUtil.getUrlRicerca(request, codiceProvincia, idComune); +%> + +
+
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + +var getProvince = function(callback) { + A.io.request( + '<%= getProvinceURL %>', + { + dataType: 'json', + on: { + success: function() { + var data = this.get('responseData'); + province = {}; + for (var i = 0; i < data.length; i++) { + province[data[i].nome.replaceAll(' ', '-').toLowerCase()] = data[i].id; + } + callback(data); + } + } + } + ); +}; + +var getComuni = function(callback, provinciaId) { + A.io.request( + '<%= getComuniURL %>', + { + dataType: 'json', + data: { + provinciaId: provinciaId + }, + on: { + success: function() { + var data = this.get('responseData'); + callback(data); + if ('' !== comuneSelezionato) { + for (var i = 0; i < data.length; i++) { + if (data[i].nome.replaceAll(' ', '-').toLowerCase() === comuneSelezionato) { + A.one('#comune').set('value', data[i].id); + } + } + comuneSelezionato = ''; + } + } + } + } + ); +}; +new Liferay.DynamicSelect([ + { + select: 'provincia', + selectData: getProvince, + selectDesc: 'nome', + selectId: 'id', + selectSort: true, + selectVal: '<%= codiceProvincia %>', + }, + { + select: 'comune', + selectData: getComuni, + selectDesc: 'nome', + selectId: 'id', + selectSort: true, + selectDisableOnEmpty: true, + selectVal: '<%= idComune %>', + }, +]); + +