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 159f84a3..2c4ca9c5 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 @@ -13,11 +13,13 @@ import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DocAggiuntiva; import it.tref.liferay.portos.bo.model.DocPratica; +import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.ParereGeologo; import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.impl.CollaudoImpl; +import it.tref.liferay.portos.bo.model.impl.FineLavoriImpl; import it.tref.liferay.portos.bo.service.AllegatoManualeLocalServiceUtil; import it.tref.liferay.portos.bo.service.AsseverazioneLocalServiceUtil; import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil; @@ -27,6 +29,7 @@ import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocAggiuntivaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil; import it.tref.liferay.portos.bo.service.ParereGeologoLocalServiceUtil; @@ -274,28 +277,47 @@ public class SismicaUtil { long classPk = 0; switch (tipoAvviso) { - case StatoPraticaConstants.COLLAUDO: - List collaudi = CollaudoLocalServiceUtil.findByIntPraticaId_Completata(intPraticaId, - true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, - OrderByComparatorFactoryUtil.create(CollaudoImpl.TABLE_NAME, "dtProtocollo", true)); - Collaudo collaudo = null; - for (Collaudo el : collaudi) { - if (Validator.isNotNull(el.getDtProtocollo())) { - collaudo = el; + case StatoPraticaConstants.COLLAUDO: + List collaudi = CollaudoLocalServiceUtil.findByIntPraticaId_Completata(intPraticaId, + true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, + OrderByComparatorFactoryUtil.create(CollaudoImpl.TABLE_NAME, "dtProtocollo", true)); + Collaudo collaudo = null; + for (Collaudo el : collaudi) { + if (Validator.isNotNull(el.getDtProtocollo())) { + collaudo = el; + } } - } - if (Validator.isNull(collaudo)) { - SessionErrors.add(actionRequest, "invia-avviso-collaudo-non-trovato"); + if (Validator.isNull(collaudo)) { + SessionErrors.add(actionRequest, "invia-avviso-collaudo-non-trovato"); + return; + } + tipoDocumento = StatoPraticaConstants.VIDIMATA; + className = Collaudo.class.getName(); + classPk = collaudo.getPrimaryKey(); + controlloPraticaId = 0; + break; + case StatoPraticaConstants.FINE_LAVORI: + List fineLavori = FineLavoriLocalServiceUtil.findByIntPraticaId_Completata(intPraticaId, + true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, + OrderByComparatorFactoryUtil.create(FineLavoriImpl.TABLE_NAME, "dtProtocollo", true)); + FineLavori fineLavoro = null; + for (FineLavori el : fineLavori) { + if (Validator.isNotNull(el.getDtProtocollo())) { + fineLavoro = el; + } + } + if (Validator.isNull(fineLavoro)) { + SessionErrors.add(actionRequest, "invia-avviso-finelavori-non-trovato"); + return; + } + tipoDocumento = StatoPraticaConstants.VIDIMATA; + className = FineLavori.class.getName(); + classPk = fineLavoro.getPrimaryKey(); + controlloPraticaId = 0; + break; + default: + SessionErrors.add(actionRequest, "operazione-non-supportata"); return; - } - tipoDocumento = StatoPraticaConstants.VIDIMATA; - className = Collaudo.class.getName(); - classPk = collaudo.getPrimaryKey(); - controlloPraticaId = 0; - break; - default: - SessionErrors.add(actionRequest, "operazione-non-supportata"); - return; } String templateName = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(tipoAvviso); 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 6a1a4e62..ac49ba0d 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=2475 - build.date=1602487542318 + build.number=2477 + build.date=1602761948702 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 cf5baf36..61383eab 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 @@ -22,6 +22,8 @@ String dataProssimoSorteggio = +
@@ -143,6 +145,9 @@ String dataProssimoSorteggio = +