diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java index 08af1485..b338728f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java @@ -11,6 +11,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.Map.Entry; import java.util.Properties; import javax.servlet.http.HttpServletRequest; @@ -59,8 +60,6 @@ public class ControlloPraticaAdvancedSearch { public static Hits searchMieiTask(HttpServletRequest request, User user, int start, int end) { - // List lista = new ArrayList(); - // Parametro proveniente dalla ricerca int ufficioSearch = ParamUtil.getInteger(request, "ufficio"); @@ -90,8 +89,7 @@ public class ControlloPraticaAdvancedSearch { Hits hits = null; try { // Condizioni necessarie per questa ricerca : - // entryClassName=ControlloPratica & - // userId=taskAssigneeUserId + // entryClassName=ControlloPratica & userId=taskAssigneeUserId TermQuery entryClassNameTermQuery = TermQueryFactoryUtil.create(searchContext, "entryClassName", ControlloPratica.class.getName()); TermQuery userIdTermQuery = TermQueryFactoryUtil.create(searchContext, "taskAssigneeUserId", @@ -138,39 +136,19 @@ public class ControlloPraticaAdvancedSearch { } // Condizioni aggiuntive - booleanQuery = retrieveQuery(request, user, booleanQuery, searchContext); + retrieveQuery(request, user, booleanQuery, searchContext); if (_log.isDebugEnabled()) { _log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); } hits = SearchEngineUtil.search(searchContext, booleanQuery); - - _log.info("booleanQuery = " + booleanQuery); if (_log.isDebugEnabled()) { _log.debug("Number of hint find : " + hits.getLength()); } - // for (Document doc : hits.toList()) { - // - // String controlloPraticaId = doc.get("controlloPraticaId"); - // if (Validator.isNotNull(controlloPraticaId)) { - // - // ControlloPratica controlloPratica = - // ControlloPraticaLocalServiceUtil.fetchControlloPratica(GetterUtil.getLong(controlloPraticaId)); - // if (Validator.isNotNull(controlloPratica)) { - // lista.add(controlloPratica); - // } - // } - // - // } - - } catch (ParseException e) { - _log.error(e, e); - } catch (SearchException e) { - _log.error(e, e); - } catch (SystemException e) { + } catch (ParseException | SearchException | SystemException e) { _log.error(e, e); } @@ -179,8 +157,6 @@ public class ControlloPraticaAdvancedSearch { public static Hits searchTaskMieiRuoli(HttpServletRequest request, User user, int start, int end) { - // List lista = new ArrayList(); - // Parametro proveniente dalla ricerca int ufficioSearch = ParamUtil.getInteger(request, "ufficio"); @@ -210,8 +186,7 @@ public class ControlloPraticaAdvancedSearch { try { // Condizioni necessarie per questa ricerca : - // entryClassName=ControlloPratica & - // roleIds tra i taskAssigneeIds + // entryClassName=ControlloPratica & roleIds tra i taskAssigneeIds TermQuery entryClassNameTermQuery = TermQueryFactoryUtil.create(searchContext, "entryClassName", ControlloPratica.class.getName()); TermQuery statusTermQuery = TermQueryFactoryUtil.create(searchContext, "status", @@ -282,7 +257,7 @@ public class ControlloPraticaAdvancedSearch { } // Condizioni aggiuntive - booleanQuery = retrieveQuery(request, user, booleanQuery, searchContext); + retrieveQuery(request, user, booleanQuery, searchContext); if (_log.isDebugEnabled()) { _log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); @@ -405,7 +380,7 @@ public class ControlloPraticaAdvancedSearch { } // Condizioni aggiuntive - booleanQuery = retrieveQuery(request, user, booleanQuery, searchContext); + retrieveQuery(request, user, booleanQuery, searchContext); if (_log.isDebugEnabled()) { _log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); @@ -788,7 +763,7 @@ public class ControlloPraticaAdvancedSearch { } // Condizioni aggiuntive - booleanQuery = retrieveQuery(request, user, booleanQuery, searchContext); + retrieveQuery(request, user, booleanQuery, searchContext); if (_log.isDebugEnabled()) { _log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); @@ -811,8 +786,8 @@ public class ControlloPraticaAdvancedSearch { return hits; } - private static BooleanQuery retrieveQuery(HttpServletRequest request, User user, - BooleanQuery booleanQuery, SearchContext searchContext) { + private static void retrieveQuery(HttpServletRequest request, User user, BooleanQuery booleanQuery, + SearchContext searchContext) { // Search Param String numeroProgettoSearch = ParamUtil.getString(request, "numeroProgetto"); @@ -827,6 +802,7 @@ public class ControlloPraticaAdvancedSearch { String dataDaSearch = ParamUtil.getString(request, "dataRichiestaInizio"); String dataAlSearch = ParamUtil.getString(request, "dataRichiestaFine"); String comune = ParamUtil.getString(request, "comune"); + String tipoProcedura = ParamUtil.getString(request, "tipoProcedura"); String tipoAttivita = ParamUtil.getString(request, "tipoAttivita"); // ADT - BUG-11 Aggiunta filtro ricerca @@ -975,6 +951,12 @@ public class ControlloPraticaAdvancedSearch { } + if (Validator.isNotNull(tipoProcedura)) { + TermQuery termQuery = TermQueryFactoryUtil.create(searchContext, "tipoProcedura", + tipoProcedura); + booleanQuery.add(termQuery, BooleanClauseOccur.MUST); + } + // ADT - BUG-11 Aggiunta filtro ricerca if (Validator.isNotNull(controlloObbligatorioSearch)) { TermQuery controlloObbligatorioTermQuery = TermQueryFactoryUtil.create(searchContext, @@ -995,8 +977,6 @@ public class ControlloPraticaAdvancedSearch { _log.error(e, e); } - return booleanQuery; - } private static Sort[] getOrderedQuery(HttpServletRequest request) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalService.java index 83dcd6e0..52ed856e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalService.java @@ -319,21 +319,22 @@ public interface AsseverazioneLocalService extends BaseLocalService, java.io.IOException; public java.lang.String testoAsseverazione(java.lang.String tipo, - long userId, long dettPraticaId, java.lang.String relazioni) + com.liferay.portal.model.User user, long dettPraticaId, + java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, java.io.IOException; public java.lang.String testoAsseverazione(java.lang.String tipo, - com.liferay.portal.model.User user, - it.tref.liferay.portos.bo.model.DettPratica dettPratica, + java.lang.String codiceFiscale, long dettPraticaId, java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, java.io.IOException; public java.lang.String testoAsseverazione(java.lang.String tipo, - com.liferay.portal.model.User user, long dettPraticaId, + java.lang.String codiceFiscale, + it.tref.liferay.portos.bo.model.DettPratica dettPratica, java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceClp.java index b17bc1fa..10116eb8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceClp.java @@ -142,21 +142,22 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService { _methodName24 = "testoAsseverazione"; _methodParameterTypes24 = new String[] { - "java.lang.String", "long", "long", "java.lang.String" + "java.lang.String", "com.liferay.portal.model.User", "long", + "java.lang.String" }; _methodName25 = "testoAsseverazione"; _methodParameterTypes25 = new String[] { - "java.lang.String", "com.liferay.portal.model.User", - "it.tref.liferay.portos.bo.model.DettPratica", + "java.lang.String", "java.lang.String", "long", "java.lang.String" }; _methodName26 = "testoAsseverazione"; _methodParameterTypes26 = new String[] { - "java.lang.String", "com.liferay.portal.model.User", "long", + "java.lang.String", "java.lang.String", + "it.tref.liferay.portos.bo.model.DettPratica", "java.lang.String" }; @@ -1093,7 +1094,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService { @Override public java.lang.String testoAsseverazione(java.lang.String tipo, - long userId, long dettPraticaId, java.lang.String relazioni) + com.liferay.portal.model.User user, long dettPraticaId, + java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, java.io.IOException { @@ -1105,7 +1107,7 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService { new Object[] { ClpSerializer.translateInput(tipo), - userId, + ClpSerializer.translateInput(user), dettPraticaId, @@ -1141,8 +1143,7 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService { @Override public java.lang.String testoAsseverazione(java.lang.String tipo, - com.liferay.portal.model.User user, - it.tref.liferay.portos.bo.model.DettPratica dettPratica, + java.lang.String codiceFiscale, long dettPraticaId, java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, @@ -1155,9 +1156,9 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService { new Object[] { ClpSerializer.translateInput(tipo), - ClpSerializer.translateInput(user), + ClpSerializer.translateInput(codiceFiscale), - ClpSerializer.translateInput(dettPratica), + dettPraticaId, ClpSerializer.translateInput(relazioni) }); @@ -1191,7 +1192,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService { @Override public java.lang.String testoAsseverazione(java.lang.String tipo, - com.liferay.portal.model.User user, long dettPraticaId, + java.lang.String codiceFiscale, + it.tref.liferay.portos.bo.model.DettPratica dettPratica, java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, @@ -1204,9 +1206,9 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService { new Object[] { ClpSerializer.translateInput(tipo), - ClpSerializer.translateInput(user), + ClpSerializer.translateInput(codiceFiscale), - dettPraticaId, + ClpSerializer.translateInput(dettPratica), ClpSerializer.translateInput(relazioni) }); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceUtil.java index 0f258f9d..91725a2f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceUtil.java @@ -347,33 +347,36 @@ public class AsseverazioneLocalServiceUtil { } public static java.lang.String testoAsseverazione(java.lang.String tipo, - long userId, long dettPraticaId, java.lang.String relazioni) + com.liferay.portal.model.User user, long dettPraticaId, + java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, java.io.IOException { return getService() - .testoAsseverazione(tipo, userId, dettPraticaId, relazioni); + .testoAsseverazione(tipo, user, dettPraticaId, relazioni); } public static java.lang.String testoAsseverazione(java.lang.String tipo, - com.liferay.portal.model.User user, - it.tref.liferay.portos.bo.model.DettPratica dettPratica, + java.lang.String codiceFiscale, long dettPraticaId, java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, java.io.IOException { return getService() - .testoAsseverazione(tipo, user, dettPratica, relazioni); + .testoAsseverazione(tipo, codiceFiscale, dettPraticaId, + relazioni); } public static java.lang.String testoAsseverazione(java.lang.String tipo, - com.liferay.portal.model.User user, long dettPraticaId, + java.lang.String codiceFiscale, + it.tref.liferay.portos.bo.model.DettPratica dettPratica, java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, java.io.IOException { return getService() - .testoAsseverazione(tipo, user, dettPraticaId, relazioni); + .testoAsseverazione(tipo, codiceFiscale, dettPratica, + relazioni); } public static it.tref.liferay.portos.bo.model.Asseverazione addAsseverazione( diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceWrapper.java index 73b673c3..4f4f29e3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceWrapper.java @@ -370,35 +370,36 @@ public class AsseverazioneLocalServiceWrapper @Override public java.lang.String testoAsseverazione(java.lang.String tipo, - long userId, long dettPraticaId, java.lang.String relazioni) + com.liferay.portal.model.User user, long dettPraticaId, + java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, java.io.IOException { - return _asseverazioneLocalService.testoAsseverazione(tipo, userId, + return _asseverazioneLocalService.testoAsseverazione(tipo, user, dettPraticaId, relazioni); } @Override public java.lang.String testoAsseverazione(java.lang.String tipo, - com.liferay.portal.model.User user, - it.tref.liferay.portos.bo.model.DettPratica dettPratica, + java.lang.String codiceFiscale, long dettPraticaId, java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, java.io.IOException { - return _asseverazioneLocalService.testoAsseverazione(tipo, user, - dettPratica, relazioni); + return _asseverazioneLocalService.testoAsseverazione(tipo, + codiceFiscale, dettPraticaId, relazioni); } @Override public java.lang.String testoAsseverazione(java.lang.String tipo, - com.liferay.portal.model.User user, long dettPraticaId, + java.lang.String codiceFiscale, + it.tref.liferay.portos.bo.model.DettPratica dettPratica, java.lang.String relazioni) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException, java.io.IOException { - return _asseverazioneLocalService.testoAsseverazione(tipo, user, - dettPraticaId, relazioni); + return _asseverazioneLocalService.testoAsseverazione(tipo, + codiceFiscale, dettPratica, relazioni); } @Override diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java index 51757751..238b7330 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java @@ -576,6 +576,9 @@ public interface IntPraticaLocalService extends BaseLocalService, public java.util.List riparaWorkflow() throws com.liferay.portal.kernel.exception.SystemException; + public void reIndexFascicolo( + it.tref.liferay.portos.bo.model.IntPratica intPratica, long companyId); + public void reIndexFasciolo(java.lang.String numeroProgetto, long companyId) throws com.liferay.portal.kernel.exception.SystemException; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java index a4603f2a..2b5a9a99 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java @@ -391,67 +391,73 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { _methodParameterTypes74 = new String[] { }; - _methodName75 = "reIndexFasciolo"; + _methodName75 = "reIndexFascicolo"; - _methodParameterTypes75 = new String[] { "java.lang.String", "long" }; + _methodParameterTypes75 = new String[] { + "it.tref.liferay.portos.bo.model.IntPratica", "long" + }; _methodName76 = "reIndexFasciolo"; - _methodParameterTypes76 = new String[] { "long", "long" }; + _methodParameterTypes76 = new String[] { "java.lang.String", "long" }; - _methodName77 = "trovaDoppioni"; + _methodName77 = "reIndexFasciolo"; - _methodParameterTypes77 = new String[] { }; + _methodParameterTypes77 = new String[] { "long", "long" }; - _methodName78 = "findByNumeroProgetto"; + _methodName78 = "trovaDoppioni"; - _methodParameterTypes78 = new String[] { "java.lang.String" }; + _methodParameterTypes78 = new String[] { }; - _methodName79 = "findByTerritorioId"; + _methodName79 = "findByNumeroProgetto"; - _methodParameterTypes79 = new String[] { "long" }; + _methodParameterTypes79 = new String[] { "java.lang.String" }; - _methodName80 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; + _methodName80 = "findByTerritorioId"; - _methodParameterTypes80 = new String[] { - "java.util.Date", "java.util.Date", "long", "java.lang.String" - }; + _methodParameterTypes80 = new String[] { "long" }; - _methodName81 = "reportTempisticheIstruttorieCalcolaDataSorteggio"; + _methodName81 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; _methodParameterTypes81 = new String[] { - "java.util.Date", "java.util.Date", "long" + "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName82 = "reportPraticheVidimate"; + _methodName82 = "reportTempisticheIstruttorieCalcolaDataSorteggio"; _methodParameterTypes82 = new String[] { - "java.util.Date", "java.util.Date", "long", "java.lang.String" + "java.util.Date", "java.util.Date", "long" }; - _methodName83 = "reportPraticheVidimateCalcolaDataSorteggio"; + _methodName83 = "reportPraticheVidimate"; _methodParameterTypes83 = new String[] { - "java.util.Date", "java.util.Date", "long" + "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName84 = "countIngressiAutorizzazioni"; + _methodName84 = "reportPraticheVidimateCalcolaDataSorteggio"; _methodParameterTypes84 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName85 = "countIngressiDepositi"; + _methodName85 = "countIngressiAutorizzazioni"; _methodParameterTypes85 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName86 = "countIngressiCO"; + _methodName86 = "countIngressiDepositi"; _methodParameterTypes86 = new String[] { "java.util.Date", "java.util.Date", "long" }; + + _methodName87 = "countIngressiCO"; + + _methodParameterTypes87 = new String[] { + "java.util.Date", "java.util.Date", "long" + }; } @Override @@ -3052,11 +3058,32 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { } @Override - public void reIndexFasciolo(java.lang.String numeroProgetto, long companyId) - throws com.liferay.portal.kernel.exception.SystemException { + public void reIndexFascicolo( + it.tref.liferay.portos.bo.model.IntPratica intPratica, long companyId) { try { _invokableLocalService.invokeMethod(_methodName75, _methodParameterTypes75, + new Object[] { ClpSerializer.translateInput(intPratica), companyId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public void reIndexFasciolo(java.lang.String numeroProgetto, long companyId) + throws com.liferay.portal.kernel.exception.SystemException { + try { + _invokableLocalService.invokeMethod(_methodName76, + _methodParameterTypes76, new Object[] { ClpSerializer.translateInput(numeroProgetto), @@ -3085,8 +3112,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName76, - _methodParameterTypes76, + _invokableLocalService.invokeMethod(_methodName77, + _methodParameterTypes77, new Object[] { intPraticaId, companyId }); } catch (Throwable t) { @@ -3116,8 +3143,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName77, - _methodParameterTypes77, new Object[] { }); + returnObj = _invokableLocalService.invokeMethod(_methodName78, + _methodParameterTypes78, new Object[] { }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -3145,8 +3172,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName78, - _methodParameterTypes78, + returnObj = _invokableLocalService.invokeMethod(_methodName79, + _methodParameterTypes79, new Object[] { ClpSerializer.translateInput(numeroProgetto) }); } catch (Throwable t) { @@ -3175,8 +3202,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName79, - _methodParameterTypes79, new Object[] { territorioId }); + returnObj = _invokableLocalService.invokeMethod(_methodName80, + _methodParameterTypes80, new Object[] { territorioId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -3205,8 +3232,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName80, - _methodParameterTypes80, + returnObj = _invokableLocalService.invokeMethod(_methodName81, + _methodParameterTypes81, new Object[] { ClpSerializer.translateInput(dtMin), @@ -3243,8 +3270,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName81, - _methodParameterTypes81, + returnObj = _invokableLocalService.invokeMethod(_methodName82, + _methodParameterTypes82, new Object[] { ClpSerializer.translateInput(dtMin), @@ -3280,8 +3307,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName82, - _methodParameterTypes82, + returnObj = _invokableLocalService.invokeMethod(_methodName83, + _methodParameterTypes83, new Object[] { ClpSerializer.translateInput(dtMin), @@ -3318,8 +3345,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName83, - _methodParameterTypes83, + returnObj = _invokableLocalService.invokeMethod(_methodName84, + _methodParameterTypes84, new Object[] { ClpSerializer.translateInput(dtMin), @@ -3354,8 +3381,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName84, - _methodParameterTypes84, + returnObj = _invokableLocalService.invokeMethod(_methodName85, + _methodParameterTypes85, new Object[] { ClpSerializer.translateInput(dtMin), @@ -3390,8 +3417,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName85, - _methodParameterTypes85, + returnObj = _invokableLocalService.invokeMethod(_methodName86, + _methodParameterTypes86, new Object[] { ClpSerializer.translateInput(dtMin), @@ -3426,8 +3453,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName86, - _methodParameterTypes86, + returnObj = _invokableLocalService.invokeMethod(_methodName87, + _methodParameterTypes87, new Object[] { ClpSerializer.translateInput(dtMin), @@ -3628,4 +3655,6 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { private String[] _methodParameterTypes85; private String _methodName86; private String[] _methodParameterTypes86; + private String _methodName87; + private String[] _methodParameterTypes87; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java index 9061367f..88d5a474 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java @@ -738,6 +738,11 @@ public class IntPraticaLocalServiceUtil { return getService().riparaWorkflow(); } + public static void reIndexFascicolo( + it.tref.liferay.portos.bo.model.IntPratica intPratica, long companyId) { + getService().reIndexFascicolo(intPratica, companyId); + } + public static void reIndexFasciolo(java.lang.String numeroProgetto, long companyId) throws com.liferay.portal.kernel.exception.SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java index 160378d3..eb571d25 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java @@ -810,6 +810,12 @@ public class IntPraticaLocalServiceWrapper implements IntPraticaLocalService, return _intPraticaLocalService.riparaWorkflow(); } + @Override + public void reIndexFascicolo( + it.tref.liferay.portos.bo.model.IntPratica intPratica, long companyId) { + _intPraticaLocalService.reIndexFascicolo(intPratica, companyId); + } + @Override public void reIndexFasciolo(java.lang.String numeroProgetto, long companyId) throws com.liferay.portal.kernel.exception.SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java index 1e9427e5..13738f31 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java @@ -126,5 +126,7 @@ public class PortosIndexField implements Serializable { public static final String PROVINCIA = "provincia"; public static final String COMUNE = "comune"; + + public static final String TIPO_PROCEDURA = "tipoProcedura"; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java index 50ecadb1..36093890 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java @@ -380,9 +380,11 @@ public class ValidazionePraticaUtil { DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); - return praticaIsCompleta(dettPraticaId) && !DelegheUtil.hasDelegheCompilazioneAttive(dettPraticaId) + return praticaIsCompleta(dettPraticaId) + && !DelegheUtil.hasDelegheCompilazioneAttive(dettPraticaId) && AsseverazioniUtil.allAsseverazioniCompleted(dettPraticaId) - && intPratica.getStatoPratica().equals(StatoPraticaConstants.INTEGRAZIONE) + && (intPratica.getStatoPratica().equals(StatoPraticaConstants.INTEGRAZIONE) || dettPratica + .getTipoIntegrazione().equals(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)) && dettPratica.getStatus() != WorkflowConstants.STATUS_APPROVED; } 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 96d68fdb..10e79e5d 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 @@ -1205,4 +1205,11 @@ le-seguenti-pratiche-non-sono-nel-controllo = Le seguenti pratiche non sono anco vuoi-aggiungere-al-controllo = Vuoi aggiungere gli ultimi aggiornamenti al controllo? stampa-fascicolo-variante=Stampa Fascicolo Variante stampa-fine-lavori=Stampa Fine Lavori -stampa-collaudo=Stampa Collaudo \ No newline at end of file +stampa-collaudo=Stampa Collaudo + +tipo-procedura = Tipo di procedura +tipo-procedura-a = A - Interventi “rilevanti” da realizzare previo rilascio di autorizzazione ai sensi dell'art. 94 D.P.R. 380/01 D.D.G. 344/20 all. A - lettera A
A - varianti da realizzare su autorizzazione, per pratiche cartacee già acquisite dagli Uffici del Genio Civile +tipo-procedura-b = B - Interventi di “minore rilevanza” D.D.G. 344/20 all. A - lettera B +tipo-procedura-b1 = B1 - Interventi di “minore rilevanza” zone 1-2 ed interventi in abitati da consolidare, art.61 (zone 3-4) +tipo-procedura-c = C - Interventi “privi di rilevanza“ D.D.G. 344/20 all. A - lett. C + 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 525cb0df..a508f5f5 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 @@ -6,8 +6,10 @@ package it.mwg.sismica.bo.util; import it.tref.liferay.portos.bo.model.Avviso; +import it.tref.liferay.portos.bo.model.Collaudo; import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.DettPratica; +import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil; import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil; @@ -17,8 +19,10 @@ import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; +import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.util.AvvisoUtil; import it.tref.liferay.portos.bo.util.Constants; + import java.io.Serializable; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -55,6 +59,7 @@ import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken; import com.liferay.portal.workflow.kaleo.service.KaleoTaskInstanceTokenLocalServiceUtil; import com.liferay.portlet.documentlibrary.model.DLFileEntry; +import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; import com.liferay.portlet.documentlibrary.service.DLAppServiceUtil; import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil; @@ -64,7 +69,7 @@ public class SismicaUtil { private static final SimpleDateFormat dfmt = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss"); private static final SimpleDateFormat dfmtGiorno = new SimpleDateFormat("dd/MM/yyyy"); private static final SimpleDateFormat sdfGiornoDB = new SimpleDateFormat("yyyy-MM-dd"); - private final static int SLICE = 1000; + private final static int SLICE = 200; public static Date[] getWeekInterval(int dow) { return getWeekInterval(dow, Calendar.getInstance().getTime()); @@ -161,18 +166,13 @@ public class SismicaUtil { pratiche = new ArrayList<>(); } for (IntPratica pratica : pratiche) { - try { - IntPraticaLocalServiceUtil.reIndexFasciolo(pratica.getIntPraticaId(), companyId); - } catch (PortalException | SystemException e) { - esito.add("Errore durante la reindicizzazione della pratica " - + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "): " - + e.getMessage()); - } + IntPraticaLocalServiceUtil.reIndexFascicolo(pratica, companyId); } totale += pratiche.size(); start += SLICE; + _log.info("Reindicizzate " + start + " pratiche"); } while (pratiche.size() > 0); - esito.add("" + totale + " pratiche reindicizzate."); + esito.add("" + totale + " pratiche reindicizzate."); return esito; } @@ -843,73 +843,101 @@ public class SismicaUtil { return esito; } - public static List inviaComunicazione(long companyId) throws SystemException, PortalException, - ParseException { + public static List inviaComunicazione(long companyId) throws SystemException, PortalException { List esito = new ArrayList<>(); + + long templateId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, AvvisoUtil + .getAllTipoDocumentoFileTemplateProps().get("DPVNS")); + FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(templateId); + String templateTitle = fileEntry.getTitle(); + int inizio = 0; - List avvisi = null; - Map> fermi = new HashMap<>(); - Date avvio = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").parse("2020-04-01 00:00:00"); + List pratiche = null; do { - avvisi = AvvisoLocalServiceUtil.getAvvisos(inizio, inizio + SLICE); - for (Avviso avviso : avvisi) { - if (Validator.isNotNull(avviso.getDtProtocollo()) - && Validator.isNull(avviso.getFileEntryIdProtocollo()) && !avviso.getAnnullato()) { - if (!fermi.containsKey(avviso.getIntPraticaId())) { - fermi.put(avviso.getIntPraticaId(), new ArrayList()); - } - fermi.get(avviso.getIntPraticaId()).add(avviso); - } - } - inizio += SLICE; - } while (avvisi.size() > 0); - for (Entry> entry : fermi.entrySet()) { - avvisi = entry.getValue(); - if (avvisi.size() > 1) { - Map> tipi = new HashMap<>(); - for (Avviso avviso : avvisi) { - if (!tipi.containsKey(avviso.getTipoDocumento())) { - tipi.put(avviso.getTipoDocumento(), new ArrayList()); - } - tipi.get(avviso.getTipoDocumento()).add(avviso); - } - long intPraticaId = 0; - for (Entry> entryTipo : tipi.entrySet()) { - if (entryTipo.getValue().size() > 1) { - if (0 == intPraticaId) { - intPraticaId = entry.getKey(); - IntPratica pratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId); - esito.add("Pratica " + pratica.getNumeroProgetto()); - } - Map date = new HashMap<>(); - Map id = new HashMap<>(); - for (Avviso avviso : entryTipo.getValue()) { - String oggetto = avviso.getOggettoProtocollo(); - if (!date.containsKey(oggetto) - || date.get(oggetto).after(avviso.getDtProtocollo())) { - date.put(oggetto, avviso.getDtProtocollo()); - id.put(oggetto, avviso.getAvvisoId()); - } - } - List salvati = new ArrayList<>(); - for (Entry e : id.entrySet()) { - if ((!e.getKey().equals("Oggetto: Vidimazione")) || (id.keySet().size() == 1)) { - salvati.add(e.getValue()); + pratiche = IntPraticaLocalServiceUtil.getIntPraticas(inizio, inizio + SLICE); + for (IntPratica pratica : pratiche) { + if (!pratica.getStatoPratica().equalsIgnoreCase(StatoPraticaConstants.SOTTOPOSTA_A_PARERE)) { + List avvisi = AvvisoLocalServiceUtil.findByIntPratica_Inviato( + pratica.getIntPraticaId(), AvvisoUtil.DOCUMENTO_INVIATO, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, + OrderByComparatorFactoryUtil.create("portos_bo_avviso", "createDate", false)); + List varianti = new ArrayList<>(); + int inviate = 0; + boolean autorizzata = false; + boolean annullata = false; + boolean conforme = false; + boolean collaudo = false; + boolean fineLavori = false; + for (Avviso avviso : avvisi) { + if (!avviso.getAnnullato()) { + if (avviso.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.VIDIMATA) + && avviso.getClassName().equals(DettPratica.class.getName())) { + DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(avviso + .getClassPk()); + if (dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE) + && !dettPratica.getVarianteSostanziale()) { + if (!autorizzata && !conforme) { + fileEntry = DLAppLocalServiceUtil.getFileEntry(avviso + .getFileEntryIdTemplate()); + if (!fileEntry.getTitle().equals(templateTitle)) { + varianti.add(avviso); + } else { + inviate++; + } + } + } + } else if (avviso.getTipoDocumento().equalsIgnoreCase( + StatoPraticaConstants.ANNULLA_ISTANZA)) { + annullata = true; + } else if (avviso.getTipoDocumento().equalsIgnoreCase( + StatoPraticaConstants.CONFORME)) { + conforme = true; + } else if (avviso.getTipoDocumento().equalsIgnoreCase( + StatoPraticaConstants.AUTORIZZATA)) { + autorizzata = true; + } else if (avviso.getClassName().equals(Collaudo.class.getName())) { + collaudo = true; + } else if (avviso.getClassName().equals(FineLavori.class.getName())) { + fineLavori = true; } } - for (Avviso avviso : entryTipo.getValue()) { - boolean elimina = !salvati.contains(avviso.getAvvisoId()); - esito.add(" > " + avviso.getTipoAvviso() + " [" - + avviso.getOggettoProtocollo() + "] " + avviso.getTipoDocumento() + " " - + dfmt.format(avviso.getDtAvviso()) + (elimina ? " ELIMINO" : "")); - if (elimina) { - AvvisoLocalServiceUtil.deleteAvviso(avviso); + } + if ((varianti.size() > 0) + && (varianti.size() != inviate) + && !annullata + && !collaudo + && !fineLavori + && (pratica.getTipoPratica().equalsIgnoreCase(Constants.TIPO_PRATICA_DEPOSITO) || autorizzata)) { + String tipoPratica = LanguageUtil.get(LocaleUtil.ITALIAN, + "tipo-pratica-" + pratica.getTipoPratica()); + List controlli = ControlloPraticaLocalServiceUtil + .findByIntPratica(pratica.getIntPraticaId()); + if (controlli.size() > 0) { + esito.add("Pratica " + tipoPratica + " " + pratica.getNumeroProgetto() + " (" + + pratica.getIntPraticaId() + ") invio vidimazione per " + + varianti.size() + " varianti non sostanziali, già inviate " + inviate); + for (Avviso avviso : varianti) { + DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(avviso + .getClassPk()); + + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setCompanyId(companyId); + serviceContext.setScopeGroupId(dettPratica.getGroupId()); + serviceContext.setUserId(dettPratica.getUserId()); + + AvvisoLocalServiceUtil.addAvviso(pratica.getIntPraticaId(), + "Attestazione di deposito variante", new Date(), + AvvisoUtil.TIPO_AVVISO_DIRETTO, StatoPraticaConstants.VIDIMATA, + templateId, avviso.getClassPk(), avviso.getClassName(), controlli + .get(controlli.size() - 1).getControlloPraticaId(), + serviceContext); } } } } } - } + inizio += SLICE; + } while (pratiche.size() > 0); return esito; } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/ControlloPraticaIndexer.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/ControlloPraticaIndexer.java index 22d76ef6..8d3d52b0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/ControlloPraticaIndexer.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/ControlloPraticaIndexer.java @@ -17,6 +17,7 @@ import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil; import it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil; import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; import it.tref.liferay.portos.bo.service.persistence.ControlloPraticaActionableDynamicQuery; +import it.tref.liferay.portos.bo.shared.util.Constants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil; import it.tref.liferay.portos.bo.util.PortosIndexField; @@ -64,521 +65,560 @@ import com.liferay.portal.util.PortalUtil; public class ControlloPraticaIndexer extends BaseIndexer { - public static final String[] CLASS_NAMES = {ControlloPratica.class.getName()}; + public static final String[] CLASS_NAMES = { ControlloPratica.class.getName() }; - public static final String PORTLET_ID = "1_WAR_portosfeportlet"; + public static final String PORTLET_ID = "1_WAR_portosfeportlet"; - public static final Format DATE_FORMAT = FastDateFormatFactoryUtil.getSimpleDateFormat("yyyyMMdd"); + public static final Format DATE_FORMAT = FastDateFormatFactoryUtil.getSimpleDateFormat("yyyyMMdd"); - private static final Log _log = LogFactoryUtil.getLog(ControlloPraticaIndexer.class); + private static final Log _log = LogFactoryUtil.getLog(ControlloPraticaIndexer.class); + public ControlloPraticaIndexer() { - public ControlloPraticaIndexer() { + setPermissionAware(true); + } - setPermissionAware(true); - } + @Override + public String[] getClassNames() { - @Override - public String[] getClassNames() { + return CLASS_NAMES; + } - return CLASS_NAMES; - } + @Override + public String getPortletId() { - @Override - public String getPortletId() { + return PORTLET_ID; + } - return PORTLET_ID; - } + @Override + protected void doDelete(Object obj) throws Exception { + if (Validator.isNotNull(obj)) { - @Override - protected void doDelete(Object obj) throws Exception { + ControlloPratica controlloPratica = (ControlloPratica) obj; + deleteDocument(controlloPratica.getCompanyId(), controlloPratica.getControlloPraticaId()); - if (Validator.isNotNull(obj)) { + } else { + _log.warn("Received a null ControlloPratica to delete in input."); + } - ControlloPratica controlloPratica = (ControlloPratica) obj; - deleteDocument(controlloPratica.getCompanyId(), controlloPratica.getControlloPraticaId()); + } - } else { - _log.warn("Received a null ControlloPratica to delete in input."); - } + @Override + protected Document doGetDocument(Object obj) throws Exception { - } + Document document = null; - @Override - protected Document doGetDocument(Object obj) throws Exception { + if (Validator.isNotNull(obj)) { - Document document = null; + ControlloPratica controlloPratica = (ControlloPratica) obj; + ControlloPratica controlloPraticaFromDB = ControlloPraticaLocalServiceUtil + .getControlloPratica(controlloPratica.getControlloPraticaId()); - if (Validator.isNotNull(obj)) { - - ControlloPratica controlloPratica = (ControlloPratica) obj; - ControlloPratica controlloPraticaFromDB = - ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPratica.getControlloPraticaId()); - - if (_log.isDebugEnabled()) { - _log.debug("Indexing ControlloPratica: " + controlloPratica.getControlloPraticaId()); - } - - document = getBaseModelDocument(PORTLET_ID, controlloPratica); - - document.addKeyword("entryClassName", ControlloPratica.class.getName()); - - document.addKeyword(PortosIndexField.CONTROLLO_PRATICA_ID, controlloPraticaFromDB.getControlloPraticaId()); - - document.addKeyword(PortosIndexField.DETT_PRATICA_ID, controlloPraticaFromDB.getDettPraticaId()); - document.addKeyword(PortosIndexField.PARERE_GEOLOGO, controlloPraticaFromDB.getParereGeologo()); - document.addKeyword(PortosIndexField.STATUS, controlloPraticaFromDB.getStatus()); - document.addKeyword(PortosIndexField.STATUS_BY_USERID, controlloPraticaFromDB.getStatusByUserId()); - document.addKeyword(PortosIndexField.STATUS_BY_USERNAME, controlloPraticaFromDB.getStatusByUserName()); - if (controlloPraticaFromDB.getStatusDate() != null) { - document.addKeyword(PortosIndexField.STATUS_DATE, DATE_FORMAT.format(controlloPraticaFromDB.getStatusDate())); - } else { - document.addKeyword(PortosIndexField.STATUS_DATE, 0); - } - - document.addKeyword(PortosIndexField.DATA_INIZIO_PROCEDIMENTO, - DATE_FORMAT.format(controlloPraticaFromDB.getCreateDate())); - - document.addKeywordSortable(PortosIndexField.DATA_INIZIO_PROCEDIMENTO, - DATE_FORMAT.format(controlloPraticaFromDB.getCreateDate())); - - document.addDate(PortosIndexField.DATA_INIZIO_PROCEDIMENTO, - controlloPraticaFromDB.getCreateDate()); - - // Indicizzo i campi relarivi a IntPratica - document.addKeyword(PortosIndexField.INT_PRATICA_ID, controlloPraticaFromDB.getIntPraticaId()); - - IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPraticaFromDB.getIntPraticaId()); - if (Validator.isNotNull(intPratica)) { - - if (intPratica.getStatusByUserId() != 0L) { - document.addKeyword(PortosIndexField.ISTRUTTORE_USER_ID, intPratica.getStatusByUserId()); - User userIstruttore = UserLocalServiceUtil.fetchUser(intPratica.getStatusByUserId()); - if (userIstruttore != null) { - document.addKeyword(PortosIndexField.ISTRUTTORE_FULL_NAME, userIstruttore.getFullName().toUpperCase()); - } - } - - if (intPratica.getUserId() != 0L) { - User proprietarioDigitale = UserLocalServiceUtil.fetchUser(intPratica.getUserId()); - if (proprietarioDigitale != null) { - document.addKeyword(PortosIndexField.PROPRIETARIO_DIGITALE_FULL_NAME, - proprietarioDigitale.getFullName().toUpperCase()); - } - } - - // Informazioni sullo stato della pratica - - boolean variata = false; - int countVariantiForIntPratica = - DettPraticaLocalServiceUtil.countVariateByIntPratica(intPratica.getIntPraticaId()); - if (countVariantiForIntPratica > 0) { - variata = true; - } - document.addKeyword(PortosIndexField.VARIATA, variata); - - document.addKeyword(PortosIndexField.COLLAUDO_COMPLETATO, intPratica.getCollaudoTotale()); - document.addKeyword(PortosIndexField.COLLAUDO_PARZIALE, intPratica.getCollaudoParziale()); - document.addKeyword(PortosIndexField.FINE_LAVORI_COMPLETATI, intPratica.getFineLavoriTotale()); - document.addKeyword(PortosIndexField.FINE_LAVORI_PARZIALI, intPratica.getFineLavoriParziale()); - document.addKeyword(PortosIndexField.SOTTOPOSTO_A_PARERE, checkSottopostaAParere(intPratica.getIntPraticaId())); - document.addKeyword(PortosIndexField.LAVORAZIONE_SORTEGGIATA, - checkLavorazioneSorteggiata(intPratica.getIntPraticaId())); - - - document.addKeyword(PortosIndexField.TIPO_PRATICA, intPratica.getTipoPratica()); - document.addKeywordSortable(PortosIndexField.TIPO_PRATICA, intPratica.getTipoPratica()); - document.addKeyword(PortosIndexField.NUMERO_PROGETTO, Integer.valueOf(intPratica.getNumeroProgetto())); - document.addNumber(PortosIndexField.NUMERO_PROGETTO, Integer.valueOf(intPratica.getNumeroProgetto())); - document.addNumberSortable(PortosIndexField.NUMERO_PROGETTO, Integer.valueOf(intPratica.getNumeroProgetto())); - document.addKeyword(PortosIndexField.STATO_PRATICA, intPratica.getStatoPratica()); - - boolean sorteggiata = SorteggioLocalServiceUtil.findByIntPratica(intPratica.getIntPraticaId()) != null; - document.addKeyword("sorteggiata", sorteggiata); - document.addKeyword("controlloObbligatorio", intPratica.isControlloObbligatorio()); - - - // Prendo l ultimo DettPratica legato a IntPratica - DettPratica lastDettPratica = - DettPraticaLocalServiceUtil.getLastCompletedByIntPraticaAndProtocolloNotEmpty(intPratica.getIntPraticaId()); - - if (Validator.isNull(lastDettPratica)) { - lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); - } - - if (Validator.isNotNull(lastDettPratica)) { - - document.addKeyword("nuovaCostruzione", lastDettPratica.getTcNuovaCostruzione()); - document.addKeyword("adeguamentoSismico", lastDettPratica.getTcAdeguamentoSismico()); - document.addKeyword("miglioramentoSismico", lastDettPratica.getTcMiglioramentoSismico()); - document.addKeyword("interventoLocale", lastDettPratica.getTcRiparazioneInterventoLocale()); - - if (lastDettPratica.getProtocollo() != null && !lastDettPratica.getProtocollo().equals("")) { - document.addKeyword(PortosIndexField.PROTOCOLLO, Long.parseLong(lastDettPratica.getProtocollo())); - document.addNumber(PortosIndexField.PROTOCOLLO, Long.parseLong(lastDettPratica.getProtocollo())); - document.addNumberSortable(PortosIndexField.PROTOCOLLO, Long.parseLong(lastDettPratica.getProtocollo())); - } - - if(lastDettPratica.getVia() != null && !lastDettPratica.getVia().equals("")){ - document.addKeyword(PortosIndexField.INDIRIZZO, lastDettPratica.getVia()); - } - - if(lastDettPratica.getLocalita() != null && !lastDettPratica.getLocalita().equals("")){ - document.addKeyword(PortosIndexField.LOCALITA, lastDettPratica.getLocalita()); - } - - if (Validator.isNotNull(lastDettPratica.getDescLongIntervento())) { - document.addText(PortosIndexField.DESC_INTERVENTO, lastDettPratica.getDescLongIntervento()); - document.addKeyword(PortosIndexField.DESC_INTERVENTO, lastDettPratica.getDescLongIntervento()); - - document.addKeyword(PortosIndexField.NUOVA_COSTRUZIONE, lastDettPratica.getTcNuovaCostruzione()); - document.addKeyword(PortosIndexField.ADEGUAMENTO_SISMICO, lastDettPratica.getTcAdeguamentoSismico()); - document.addKeyword(PortosIndexField.MIGLIORAMENTO_SISMICO, lastDettPratica.getTcMiglioramentoSismico()); - document.addKeyword(PortosIndexField.RIPARAZIONE_INTERVENTO_LOCALE, - lastDettPratica.getTcRiparazioneInterventoLocale());} - } - - // Gestione pratica aperta/chiusa fine lavori - if (intPratica.getCollaudoTotale()) { - document.addKeyword(PortosIndexField.PRATICA_APERTA, false); - } else if (lastDettPratica != null && lastDettPratica.getCollaudoStatico() - && intPratica.getFineLavoriTotale()) { - document.addKeyword(PortosIndexField.PRATICA_APERTA, false); - } else if (intPratica.isAnnullata() || intPratica.getStatoPratica().equals(StatoPraticaConstants.ANNULLATA)) { - document.addKeyword(PortosIndexField.PRATICA_APERTA, false); - } else { - document.addKeyword(PortosIndexField.PRATICA_APERTA, true); - } - - if(intPratica.getStatoPratica().equals(StatoPraticaConstants.INTEGRAZIONE)){ - document.addKeyword(PortosIndexField.PRATICA_APERTA, true); - } - - // Prendo la lista dei soggetti committenti legati a IntPratica - List committenti = - SoggettoLocalServiceUtil.findByIntPratica_TipologiaSoggetto(intPratica.getIntPraticaId(), - TipoSoggettoUtil.COMMITTENTE); - - if (Validator.isNotNull(committenti) && committenti.size() > 0) { - - // Creao una stringa contenente tutti i codFisc legati alla IntPratica separati da , - List listaSoggetti = new ArrayList(); - for (Soggetto soggetto : committenti) { - - // listaSoggetti.add(soggetto.getCodiceFiscale().toUpperCase()); - listaSoggetti.add(soggetto.getNome().toUpperCase() + " " + soggetto.getCognome().toUpperCase()); - } - - document.addKeyword(PortosIndexField.SOGGETTI_INTERESSATI, listaSoggetti.toArray(new String[0])); - document.addKeyword(PortosIndexField.COMMITTENTI, listaSoggetti.toArray(new String[0])); - } - - // Soggetti Interconnessi - List listSoggettiInterconnessi = - SoggettoLocalServiceUtil.getSoggettiByIntPraticaId_DtRimozioneNull(intPratica.getIntPraticaId()); - - if (listSoggettiInterconnessi != null && !listSoggettiInterconnessi.isEmpty()) { - - List listaStringata = new ArrayList(); - - for (Soggetto sog : listSoggettiInterconnessi) { - listaStringata.add(sog.getNome().toUpperCase() + " " + sog.getCognome().toUpperCase()); - } - - document.addKeyword(PortosIndexField.SOGGETTI_INTERCONNESSI, listaStringata.toArray(new String[0])); - } - - // Prendo dati relativi al Territorio - if (Validator.isNotNull(intPratica.getTerritorioId())) { - - Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica.getTerritorioId()); - - if (Validator.isNotNull(territorio)) { - - if (Validator.isNotNull(territorio.getComuneId())) { - - Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId()); - if (Validator.isNotNull(comune)) { + if (_log.isDebugEnabled()) { + _log.debug("Indexing ControlloPratica: " + controlloPratica.getControlloPraticaId()); + } - document.addKeyword(PortosIndexField.COMUNE_ID, comune.getComuneId()); - document.addKeyword(PortosIndexField.COMUNE_DENOMINAZIONE, comune.getDenominazione()); + document = getBaseModelDocument(PORTLET_ID, controlloPratica); - } + document.addKeyword("entryClassName", ControlloPratica.class.getName()); - if (Validator.isNotNull(territorio.getCodiceProvincia())) { + document.addKeyword(PortosIndexField.CONTROLLO_PRATICA_ID, + controlloPraticaFromDB.getControlloPraticaId()); - Provincia provincia = - ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia()); + document.addKeyword(PortosIndexField.DETT_PRATICA_ID, controlloPraticaFromDB.getDettPraticaId()); + document.addKeyword(PortosIndexField.PARERE_GEOLOGO, controlloPraticaFromDB.getParereGeologo()); + document.addKeyword(PortosIndexField.STATUS, controlloPraticaFromDB.getStatus()); + document.addKeyword(PortosIndexField.STATUS_BY_USERID, controlloPraticaFromDB.getStatusByUserId()); + document.addKeyword(PortosIndexField.STATUS_BY_USERNAME, + controlloPraticaFromDB.getStatusByUserName()); + if (controlloPraticaFromDB.getStatusDate() != null) { + document.addKeyword(PortosIndexField.STATUS_DATE, + DATE_FORMAT.format(controlloPraticaFromDB.getStatusDate())); + } else { + document.addKeyword(PortosIndexField.STATUS_DATE, 0); + } + + document.addKeyword(PortosIndexField.DATA_INIZIO_PROCEDIMENTO, + DATE_FORMAT.format(controlloPraticaFromDB.getCreateDate())); + + document.addKeywordSortable(PortosIndexField.DATA_INIZIO_PROCEDIMENTO, + DATE_FORMAT.format(controlloPraticaFromDB.getCreateDate())); + + document.addDate(PortosIndexField.DATA_INIZIO_PROCEDIMENTO, + controlloPraticaFromDB.getCreateDate()); + + // Indicizzo i campi relarivi a IntPratica + document.addKeyword(PortosIndexField.INT_PRATICA_ID, controlloPraticaFromDB.getIntPraticaId()); + + IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPraticaFromDB + .getIntPraticaId()); + if (Validator.isNotNull(intPratica)) { + + if (intPratica.getStatusByUserId() != 0L) { + document.addKeyword(PortosIndexField.ISTRUTTORE_USER_ID, intPratica.getStatusByUserId()); + User userIstruttore = UserLocalServiceUtil.fetchUser(intPratica.getStatusByUserId()); + if (userIstruttore != null) { + document.addKeyword(PortosIndexField.ISTRUTTORE_FULL_NAME, userIstruttore + .getFullName().toUpperCase()); + } + } + + if (intPratica.getUserId() != 0L) { + User proprietarioDigitale = UserLocalServiceUtil.fetchUser(intPratica.getUserId()); + if (proprietarioDigitale != null) { + document.addKeyword(PortosIndexField.PROPRIETARIO_DIGITALE_FULL_NAME, + proprietarioDigitale.getFullName().toUpperCase()); + } + } + + // Informazioni sullo stato della pratica + + boolean variata = false; + int countVariantiForIntPratica = DettPraticaLocalServiceUtil + .countVariateByIntPratica(intPratica.getIntPraticaId()); + if (countVariantiForIntPratica > 0) { + variata = true; + } + document.addKeyword(PortosIndexField.VARIATA, variata); + + document.addKeyword(PortosIndexField.COLLAUDO_COMPLETATO, intPratica.getCollaudoTotale()); + document.addKeyword(PortosIndexField.COLLAUDO_PARZIALE, intPratica.getCollaudoParziale()); + document.addKeyword(PortosIndexField.FINE_LAVORI_COMPLETATI, intPratica.getFineLavoriTotale()); + document.addKeyword(PortosIndexField.FINE_LAVORI_PARZIALI, intPratica.getFineLavoriParziale()); + document.addKeyword(PortosIndexField.SOTTOPOSTO_A_PARERE, + checkSottopostaAParere(intPratica.getIntPraticaId())); + document.addKeyword(PortosIndexField.LAVORAZIONE_SORTEGGIATA, + checkLavorazioneSorteggiata(intPratica.getIntPraticaId())); + + document.addKeyword(PortosIndexField.TIPO_PRATICA, intPratica.getTipoPratica()); + document.addKeywordSortable(PortosIndexField.TIPO_PRATICA, intPratica.getTipoPratica()); + document.addKeyword(PortosIndexField.NUMERO_PROGETTO, + Integer.valueOf(intPratica.getNumeroProgetto())); + document.addNumber(PortosIndexField.NUMERO_PROGETTO, + Integer.valueOf(intPratica.getNumeroProgetto())); + document.addNumberSortable(PortosIndexField.NUMERO_PROGETTO, + Integer.valueOf(intPratica.getNumeroProgetto())); + document.addKeyword(PortosIndexField.STATO_PRATICA, intPratica.getStatoPratica()); + + boolean sorteggiata = SorteggioLocalServiceUtil + .findByIntPratica(intPratica.getIntPraticaId()) != null; + document.addKeyword("sorteggiata", sorteggiata); + document.addKeyword("controlloObbligatorio", intPratica.isControlloObbligatorio()); + + String tipoProcedura = intPratica.getTipoProcedura(); + if (Validator.isNotNull(tipoProcedura)) { + if (tipoProcedura.equalsIgnoreCase(Constants.PROCEDURA_B1)) + tipoProcedura = Constants.PROCEDURA_B; + document.addKeyword(PortosIndexField.TIPO_PROCEDURA, tipoProcedura); + } + + // Prendo l ultimo DettPratica legato a IntPratica + DettPratica lastDettPratica = DettPraticaLocalServiceUtil + .getLastCompletedByIntPraticaAndProtocolloNotEmpty(intPratica.getIntPraticaId()); + + if (Validator.isNull(lastDettPratica)) { + lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica + .getIntPraticaId()); + } + + if (Validator.isNotNull(lastDettPratica)) { + + document.addKeyword("nuovaCostruzione", lastDettPratica.getTcNuovaCostruzione()); + document.addKeyword("adeguamentoSismico", lastDettPratica.getTcAdeguamentoSismico()); + document.addKeyword("miglioramentoSismico", lastDettPratica.getTcMiglioramentoSismico()); + document.addKeyword("interventoLocale", + lastDettPratica.getTcRiparazioneInterventoLocale()); + + if (lastDettPratica.getProtocollo() != null + && !lastDettPratica.getProtocollo().equals("")) { + document.addKeyword(PortosIndexField.PROTOCOLLO, + Long.parseLong(lastDettPratica.getProtocollo())); + document.addNumber(PortosIndexField.PROTOCOLLO, + Long.parseLong(lastDettPratica.getProtocollo())); + document.addNumberSortable(PortosIndexField.PROTOCOLLO, + Long.parseLong(lastDettPratica.getProtocollo())); + } + + if (lastDettPratica.getVia() != null && !lastDettPratica.getVia().equals("")) { + document.addKeyword(PortosIndexField.INDIRIZZO, lastDettPratica.getVia()); + } + + if (lastDettPratica.getLocalita() != null && !lastDettPratica.getLocalita().equals("")) { + document.addKeyword(PortosIndexField.LOCALITA, lastDettPratica.getLocalita()); + } + + if (Validator.isNotNull(lastDettPratica.getDescLongIntervento())) { + document.addText(PortosIndexField.DESC_INTERVENTO, + lastDettPratica.getDescLongIntervento()); + document.addKeyword(PortosIndexField.DESC_INTERVENTO, + lastDettPratica.getDescLongIntervento()); + + document.addKeyword(PortosIndexField.NUOVA_COSTRUZIONE, + lastDettPratica.getTcNuovaCostruzione()); + document.addKeyword(PortosIndexField.ADEGUAMENTO_SISMICO, + lastDettPratica.getTcAdeguamentoSismico()); + document.addKeyword(PortosIndexField.MIGLIORAMENTO_SISMICO, + lastDettPratica.getTcMiglioramentoSismico()); + document.addKeyword(PortosIndexField.RIPARAZIONE_INTERVENTO_LOCALE, + lastDettPratica.getTcRiparazioneInterventoLocale()); + } + } + + // Gestione pratica aperta/chiusa fine lavori + if (intPratica.getCollaudoTotale()) { + document.addKeyword(PortosIndexField.PRATICA_APERTA, false); + } else if (lastDettPratica != null && lastDettPratica.getCollaudoStatico() + && intPratica.getFineLavoriTotale()) { + document.addKeyword(PortosIndexField.PRATICA_APERTA, false); + } else if (intPratica.isAnnullata() + || intPratica.getStatoPratica().equals(StatoPraticaConstants.ANNULLATA)) { + document.addKeyword(PortosIndexField.PRATICA_APERTA, false); + } else { + document.addKeyword(PortosIndexField.PRATICA_APERTA, true); + } + + if (intPratica.getStatoPratica().equals(StatoPraticaConstants.INTEGRAZIONE)) { + document.addKeyword(PortosIndexField.PRATICA_APERTA, true); + } + + // Prendo la lista dei soggetti committenti legati a IntPratica + List committenti = SoggettoLocalServiceUtil.findByIntPratica_TipologiaSoggetto( + intPratica.getIntPraticaId(), TipoSoggettoUtil.COMMITTENTE); + + if (Validator.isNotNull(committenti) && committenti.size() > 0) { + + // Creao una stringa contenente tutti i codFisc legati alla + // IntPratica separati da , + List listaSoggetti = new ArrayList(); + for (Soggetto soggetto : committenti) { + + // listaSoggetti.add(soggetto.getCodiceFiscale().toUpperCase()); + listaSoggetti.add(soggetto.getNome().toUpperCase() + " " + + soggetto.getCognome().toUpperCase()); + } + + document.addKeyword(PortosIndexField.SOGGETTI_INTERESSATI, + listaSoggetti.toArray(new String[0])); + document.addKeyword(PortosIndexField.COMMITTENTI, listaSoggetti.toArray(new String[0])); + } + + // Soggetti Interconnessi + List listSoggettiInterconnessi = SoggettoLocalServiceUtil + .getSoggettiByIntPraticaId_DtRimozioneNull(intPratica.getIntPraticaId()); + + if (listSoggettiInterconnessi != null && !listSoggettiInterconnessi.isEmpty()) { + + List listaStringata = new ArrayList(); + + for (Soggetto sog : listSoggettiInterconnessi) { + listaStringata + .add(sog.getNome().toUpperCase() + " " + sog.getCognome().toUpperCase()); + } + + document.addKeyword(PortosIndexField.SOGGETTI_INTERCONNESSI, + listaStringata.toArray(new String[0])); + } + + // Prendo dati relativi al Territorio + if (Validator.isNotNull(intPratica.getTerritorioId())) { + + Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica + .getTerritorioId()); + + if (Validator.isNotNull(territorio)) { - if (Validator.isNotNull(provincia)) { + if (Validator.isNotNull(territorio.getComuneId())) { - document.addKeyword(PortosIndexField.PROVINCIA_ID, provincia.getProvinciaId()); - document.addKeyword(PortosIndexField.PROVINCIA_CODICE, provincia.getCodiceProvincia()); - document.addKeyword(PortosIndexField.PROVINCIA_NAME, provincia.getProvincia()); + Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId()); + if (Validator.isNotNull(comune)) { - } + document.addKeyword(PortosIndexField.COMUNE_ID, comune.getComuneId()); + document.addKeyword(PortosIndexField.COMUNE_DENOMINAZIONE, + comune.getDenominazione()); - } + } - } + if (Validator.isNotNull(territorio.getCodiceProvincia())) { + Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C( + territorio.getCompanyId(), territorio.getCodiceProvincia()); - } + if (Validator.isNotNull(provincia)) { - } + document.addKeyword(PortosIndexField.PROVINCIA_ID, + provincia.getProvinciaId()); + document.addKeyword(PortosIndexField.PROVINCIA_CODICE, + provincia.getCodiceProvincia()); + document.addKeyword(PortosIndexField.PROVINCIA_NAME, + provincia.getProvincia()); - } + } - // Indicizzazione campi da Kaleo - WorkflowInstanceLink workflowInstanceLink = - WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(controlloPraticaFromDB.getCompanyId(), - controlloPraticaFromDB.getGroupId(), ControlloPratica.class.getName(), - controlloPraticaFromDB.getPrimaryKey()); + } - if (Validator.isNotNull(workflowInstanceLink)) { - long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId(); - WorkflowInstance workflowInstance = - WorkflowInstanceManagerUtil.getWorkflowInstance(controlloPraticaFromDB.getCompanyId(), workflowInstanceId); + } - if (Validator.isNotNull(workflowInstance)) { + } - document.addKeyword(PortosIndexField.WORKFLOW_STATE, workflowInstance.getState()); + } - List listaTask = - WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPraticaFromDB.getCompanyId(), null, - workflowInstance.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + // Indicizzazione campi da Kaleo + WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil + .fetchWorkflowInstanceLink(controlloPraticaFromDB.getCompanyId(), + controlloPraticaFromDB.getGroupId(), ControlloPratica.class.getName(), + controlloPraticaFromDB.getPrimaryKey()); - if (Validator.isNotNull(listaTask) && !listaTask.isEmpty()) { - WorkflowTask task = listaTask.get(0); + if (Validator.isNotNull(workflowInstanceLink)) { + long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId(); + WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance( + controlloPraticaFromDB.getCompanyId(), workflowInstanceId); - if(task.getAssigneeUserId() != 0L && task.getAssigneeUserId() != -1){ - document.addKeyword(PortosIndexField.TASK_ASSIGNEE_USER_ID, task.getAssigneeUserId()); - } else if(workflowInstance.getState().equals("Esito")){ - _log.warn("Fascicolo Disallineato su Kaleo : assenza assegnazione istruttore | kaleoInstanceId=" +workflowInstance.getWorkflowInstanceId() ); - } - - if (Validator.isNotNull(task.getWorkflowTaskAssignees()) && !task.getWorkflowTaskAssignees().isEmpty()) { - List roleIdsAssignee = new ArrayList(); + if (Validator.isNotNull(workflowInstance)) { - for (WorkflowTaskAssignee taskAssignee : task.getWorkflowTaskAssignees()) { - if (taskAssignee.getAssigneeClassName().equals(Role.class.getName())) { - roleIdsAssignee.add("R" + taskAssignee.getAssigneeClassPK() + "G" - + controlloPraticaFromDB.getGroupId()); - } - } + document.addKeyword(PortosIndexField.WORKFLOW_STATE, workflowInstance.getState()); - document.addKeyword(PortosIndexField.TASK_ASSIGNEE_ROLE_IDS, roleIdsAssignee.toArray(new String[0])); - } + List listaTask = WorkflowTaskManagerUtil + .getWorkflowTasksByWorkflowInstance(controlloPraticaFromDB.getCompanyId(), null, + workflowInstance.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); - document.addKeyword(PortosIndexField.WORKFLOW_DEFINITION_NAME, workflowInstance.getWorkflowDefinitionName()); - document.addKeyword(PortosIndexField.WORKFLOW_DEFINITION_VERSION, - workflowInstance.getWorkflowDefinitionVersion()); - document.addKeyword(PortosIndexField.TASK_NAME, task.getName()); - - document.addKeywordSortable(PortosIndexField.TASK_NAME, task.getName()); + if (Validator.isNotNull(listaTask) && !listaTask.isEmpty()) { + WorkflowTask task = listaTask.get(0); - } - } - } + if (task.getAssigneeUserId() != 0L && task.getAssigneeUserId() != -1) { + document.addKeyword(PortosIndexField.TASK_ASSIGNEE_USER_ID, + task.getAssigneeUserId()); + } else if (workflowInstance.getState().equals("Esito")) { + _log.warn("Fascicolo Disallineato su Kaleo : assenza assegnazione istruttore | kaleoInstanceId=" + + workflowInstance.getWorkflowInstanceId()); + } + if (Validator.isNotNull(task.getWorkflowTaskAssignees()) + && !task.getWorkflowTaskAssignees().isEmpty()) { + List roleIdsAssignee = new ArrayList(); - } else { + for (WorkflowTaskAssignee taskAssignee : task.getWorkflowTaskAssignees()) { + if (taskAssignee.getAssigneeClassName().equals(Role.class.getName())) { + roleIdsAssignee.add("R" + taskAssignee.getAssigneeClassPK() + "G" + + controlloPraticaFromDB.getGroupId()); + } + } - _log.warn("Received a null ControlloPratica in input."); - } + document.addKeyword(PortosIndexField.TASK_ASSIGNEE_ROLE_IDS, + roleIdsAssignee.toArray(new String[0])); + } - return document; + document.addKeyword(PortosIndexField.WORKFLOW_DEFINITION_NAME, + workflowInstance.getWorkflowDefinitionName()); + document.addKeyword(PortosIndexField.WORKFLOW_DEFINITION_VERSION, + workflowInstance.getWorkflowDefinitionVersion()); + document.addKeyword(PortosIndexField.TASK_NAME, task.getName()); - } + document.addKeywordSortable(PortosIndexField.TASK_NAME, task.getName()); - @Override - protected Document getBaseModelDocument(String portletId, BaseModel baseModel) throws SystemException { + } + } + } - Document document = newDocument(); + } else { - String className = baseModel.getModelClassName(); + _log.warn("Received a null ControlloPratica in input."); + } - long classPK = 0; - long resourcePrimKey = 0; + return document; - if (baseModel instanceof ResourcedModel) { - ResourcedModel resourcedModel = (ResourcedModel) baseModel; - classPK = resourcedModel.getResourcePrimKey(); - resourcePrimKey = resourcedModel.getResourcePrimKey(); - } else { - classPK = GetterUtil.getLong(baseModel.getPrimaryKeyObj()); - } + } - document.addUID(portletId, classPK, className); + @Override + protected Document getBaseModelDocument(String portletId, BaseModel baseModel) throws SystemException { - document.addKeyword(Field.ENTRY_CLASS_NAME, className); - document.addKeyword(Field.ENTRY_CLASS_PK, classPK); - document.addKeyword(Field.PORTLET_ID, portletId); + Document document = newDocument(); - if (resourcePrimKey > 0) { - document.addKeyword(Field.ROOT_ENTRY_CLASS_PK, resourcePrimKey); - } + String className = baseModel.getModelClassName(); - if (baseModel instanceof AuditedModel) { - AuditedModel auditedModel = (AuditedModel) baseModel; + long classPK = 0; + long resourcePrimKey = 0; - document.addKeyword(Field.COMPANY_ID, auditedModel.getCompanyId()); - document.addDate(Field.CREATE_DATE, auditedModel.getCreateDate()); - document.addDate(Field.MODIFIED_DATE, auditedModel.getModifiedDate()); + if (baseModel instanceof ResourcedModel) { + ResourcedModel resourcedModel = (ResourcedModel) baseModel; + classPK = resourcedModel.getResourcePrimKey(); + resourcePrimKey = resourcedModel.getResourcePrimKey(); + } else { + classPK = GetterUtil.getLong(baseModel.getPrimaryKeyObj()); + } - document.addKeyword(Field.USER_ID, auditedModel.getUserId()); + document.addUID(portletId, classPK, className); - String userName = PortalUtil.getUserName(auditedModel.getUserId(), auditedModel.getUserName()); + document.addKeyword(Field.ENTRY_CLASS_NAME, className); + document.addKeyword(Field.ENTRY_CLASS_PK, classPK); + document.addKeyword(Field.PORTLET_ID, portletId); - document.addKeyword(Field.USER_NAME, userName, true); + if (resourcePrimKey > 0) { + document.addKeyword(Field.ROOT_ENTRY_CLASS_PK, resourcePrimKey); + } - } + if (baseModel instanceof AuditedModel) { + AuditedModel auditedModel = (AuditedModel) baseModel; - GroupedModel groupedModel = null; + document.addKeyword(Field.COMPANY_ID, auditedModel.getCompanyId()); + document.addDate(Field.CREATE_DATE, auditedModel.getCreateDate()); + document.addDate(Field.MODIFIED_DATE, auditedModel.getModifiedDate()); - if (baseModel instanceof GroupedModel) { - groupedModel = (GroupedModel) baseModel; + document.addKeyword(Field.USER_ID, auditedModel.getUserId()); - document.addKeyword(Field.GROUP_ID, getSiteGroupId(groupedModel.getGroupId())); - document.addKeyword(Field.SCOPE_GROUP_ID, groupedModel.getGroupId()); - } + String userName = PortalUtil.getUserName(auditedModel.getUserId(), auditedModel.getUserName()); - if ((groupedModel != null) && (baseModel instanceof TrashedModel)) { - TrashedModel trashedModel = (TrashedModel) baseModel; + document.addKeyword(Field.USER_NAME, userName, true); - if (trashedModel.isInTrash()) { - addTrashFields(document, trashedModel); - } - } + } - addAssetFields(document, className, classPK); + GroupedModel groupedModel = null; - return document; + if (baseModel instanceof GroupedModel) { + groupedModel = (GroupedModel) baseModel; - } + document.addKeyword(Field.GROUP_ID, getSiteGroupId(groupedModel.getGroupId())); + document.addKeyword(Field.SCOPE_GROUP_ID, groupedModel.getGroupId()); + } - @Override - protected Summary doGetSummary(Document document, Locale locale, String snippet, PortletURL portletURL) - throws Exception { + if ((groupedModel != null) && (baseModel instanceof TrashedModel)) { + TrashedModel trashedModel = (TrashedModel) baseModel; - if (Validator.isNotNull(document)) { + if (trashedModel.isInTrash()) { + addTrashFields(document, trashedModel); + } + } - String title = document.get(""); - String content = document.get(""); - String controlloPraticaId = document.get(PortosIndexField.CONTROLLO_PRATICA_ID); + addAssetFields(document, className, classPK); - portletURL.setParameter("struts_action", "/web/TODO"); - portletURL.setParameter("intPraticaId", controlloPraticaId); + return document; - return new Summary(title, content, portletURL); - } else { - _log.warn("Received a null document in input."); - return new Summary("---", "---", portletURL); - } - } + } - @Override - protected void doReindex(Object obj) throws Exception { + @Override + protected Summary doGetSummary(Document document, Locale locale, String snippet, PortletURL portletURL) + throws Exception { - if (Validator.isNotNull(obj)) { + if (Validator.isNotNull(document)) { - ControlloPratica controlloPratica = (ControlloPratica) obj; - Document document = getDocument(controlloPratica); - SearchEngineUtil.updateDocument(getSearchEngineId(), controlloPratica.getCompanyId(), document, false); + String title = document.get(""); + String content = document.get(""); + String controlloPraticaId = document.get(PortosIndexField.CONTROLLO_PRATICA_ID); - } else { - _log.warn("Received a null ControlloPratica in input."); - } - } + portletURL.setParameter("struts_action", "/web/TODO"); + portletURL.setParameter("intPraticaId", controlloPraticaId); - @Override - protected void doReindex(String[] ids) throws Exception { + return new Summary(title, content, portletURL); + } else { + _log.warn("Received a null document in input."); + return new Summary("---", "---", portletURL); + } + } - _log.debug("doReindex ControlloPratica"); - if (ids != null && ids.length > 0) { - long companyId = GetterUtil.getLong(ids[0]); - reindexControlloPratica(companyId); + @Override + protected void doReindex(Object obj) throws Exception { - } else { - _log.warn("Received a null or empty set of ids."); - } + if (Validator.isNotNull(obj)) { - } + ControlloPratica controlloPratica = (ControlloPratica) obj; + Document document = getDocument(controlloPratica); + SearchEngineUtil.updateDocument(getSearchEngineId(), controlloPratica.getCompanyId(), document, + false); - protected void reindexControlloPratica(long companyId) throws PortalException, SystemException { + } else { + _log.warn("Received a null ControlloPratica in input."); + } + } - ActionableDynamicQuery actionableDynamicQuery = new ControlloPraticaActionableDynamicQuery() { - @Override - protected void performAction(Object object) throws PortalException { + @Override + protected void doReindex(String[] ids) throws Exception { - if (object != null) { - ControlloPratica controlloPratica = (ControlloPratica) object; - if (controlloPratica != null) { - try { - Document document = null; - try { - document = getDocument(controlloPratica); - } catch (SearchException se) { - _log.warn("Received a SearchException while getting a document for ControlloPratica.getControlloPraticaId()=" - + controlloPratica.getControlloPraticaId()); - se.printStackTrace(); - } - if (document != null) { - addDocument(document); - } - } catch (Exception e) { - _log.error(e); - } - } - } - } + _log.debug("doReindex ControlloPratica"); + if (ids != null && ids.length > 0) { + long companyId = GetterUtil.getLong(ids[0]); + reindexControlloPratica(companyId); - }; - - actionableDynamicQuery.setCompanyId(companyId); - actionableDynamicQuery.setSearchEngineId(getSearchEngineId()); - actionableDynamicQuery.performActions(); - } - - @Override - protected void doReindex(String className, long id) throws Exception { - - ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(id); - doReindex(controlloPratica); - - } - - private boolean checkSottopostaAParere(long intPraticaId) throws SystemException, PortalException { - - return WorkflowUtil.isWorkflowDisattivabile(intPraticaId); - // List lista = - // ControlloPraticaLocalServiceUtil.findByIntPraticaId_Status(intPraticaId, - // WorkflowConstants.STATUS_APPROVED); - // - // if (Validator.isNotNull(lista) && !lista.isEmpty()) { - // return true; - // } else { - // return false; - // } - - } - - private boolean checkLavorazioneSorteggiata(long intPraticaId) throws SystemException { - - Sorteggio sorteggio = SorteggioLocalServiceUtil.findByIntPratica(intPraticaId); - if (Validator.isNotNull(sorteggio)) { - return true; - } else { - return false; - } - } - - @Override - protected String getPortletId(SearchContext searchContext) { - - return PORTLET_ID; - } + } else { + _log.warn("Received a null or empty set of ids."); + } + + } + + protected void reindexControlloPratica(long companyId) throws PortalException, SystemException { + + ActionableDynamicQuery actionableDynamicQuery = new ControlloPraticaActionableDynamicQuery() { + @Override + protected void performAction(Object object) throws PortalException { + + if (object != null) { + ControlloPratica controlloPratica = (ControlloPratica) object; + if (controlloPratica != null) { + try { + Document document = null; + try { + document = getDocument(controlloPratica); + } catch (SearchException se) { + _log.warn("Received a SearchException while getting a document for ControlloPratica.getControlloPraticaId()=" + + controlloPratica.getControlloPraticaId()); + se.printStackTrace(); + } + if (document != null) { + addDocument(document); + } + } catch (Exception e) { + _log.error(e); + } + } + } + } + + }; + + actionableDynamicQuery.setCompanyId(companyId); + actionableDynamicQuery.setSearchEngineId(getSearchEngineId()); + actionableDynamicQuery.performActions(); + } + + @Override + protected void doReindex(String className, long id) throws Exception { + + ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(id); + doReindex(controlloPratica); + + } + + private boolean checkSottopostaAParere(long intPraticaId) throws SystemException, PortalException { + + return WorkflowUtil.isWorkflowDisattivabile(intPraticaId); + // List lista = + // ControlloPraticaLocalServiceUtil.findByIntPraticaId_Status(intPraticaId, + // WorkflowConstants.STATUS_APPROVED); + // + // if (Validator.isNotNull(lista) && !lista.isEmpty()) { + // return true; + // } else { + // return false; + // } + + } + + private boolean checkLavorazioneSorteggiata(long intPraticaId) throws SystemException { + + Sorteggio sorteggio = SorteggioLocalServiceUtil.findByIntPratica(intPraticaId); + if (Validator.isNotNull(sorteggio)) { + return true; + } else { + return false; + } + } + + @Override + protected String getPortletId(SearchContext searchContext) { + + return PORTLET_ID; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AvvisoImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AvvisoImpl.java index 2f004ec8..aeee0166 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AvvisoImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AvvisoImpl.java @@ -35,175 +35,177 @@ import com.liferay.portal.theme.ThemeDisplay; import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; import com.liferay.portlet.documentlibrary.util.DLUtil; - /** - * The extended model implementation for the Avviso service. Represents a row in the - * "portos_bo_Avviso" database table, with each column mapped to a property of this class. + * The extended model implementation for the Avviso service. Represents a row in + * the "portos_bo_Avviso" database table, with each column mapped to a + * property of this class. * *

- * Helper methods and all application logic should be put in this class. Whenever methods are added, - * rerun ServiceBuilder to copy their definitions into the - * {@link it.tref.liferay.portos.bo.model.Avviso} interface. + * Helper methods and all application logic should be put in this class. + * Whenever methods are added, rerun ServiceBuilder to copy their definitions + * into the {@link it.tref.liferay.portos.bo.model.Avviso} interface. *

* * @author Davide Barbagallo, 3F Consulting */ public class AvvisoImpl extends AvvisoBaseImpl { - /** + /** * */ private static final long serialVersionUID = -2350602144741897095L; -/* - * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a avviso - * model instance should use the {@link it.tref.liferay.portos.bo.model.Avviso} interface instead. - */ - public AvvisoImpl() { - - } - - public String getFullDescription() throws PortalException, SystemException { - - String tipoDocumento = - AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil.getAllTipoDocumento().get( - this.getTipoDocumento()) : "label.admingeniocivile.avviso.tipoDocumento.avvisomanuale"; - - String fullDescription = LanguageUtil.get(LocaleUtil.ITALIAN, tipoDocumento); - - if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.VIDIMATA)) { - - if (this.getClassName().equals(DettPratica.class.getName())) { - DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(this.getClassPk()); - if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { - fullDescription += - " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-12") + ""; - } else if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { - fullDescription += - " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-05") + " n°" - + dettPratica.getIntegrazione() + ""; - } else if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { - fullDescription += - " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-13") + " n°" - + dettPratica.getVarianteNumero() + ""; - } - } else if (this.getClassName().equals(FineLavori.class.getName())) { - FineLavori fineLavori = FineLavoriLocalServiceUtil.getFineLavori(this.getClassPk()); - fullDescription += - " di " - + LanguageUtil - .get(LocaleUtil.ITALIAN, "label-integrazione-" + (fineLavori.getParziale() ? "09" : "07")) - + " n°" + fineLavori.getNumero() + ""; - } else if (this.getClassName().equals(Collaudo.class.getName())) { - Collaudo collaudo = CollaudoLocalServiceUtil.getCollaudo(this.getClassPk()); - fullDescription += - " di " - + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-" + (collaudo.getParziale() ? "10" : "08")) - + " n°" + collaudo.getNumero() + ""; - } - - } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) { - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); - - return LanguageUtil.get( - LocaleUtil.ITALIAN, - AvvisoUtil.getAllTipoDocumento().get( - PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.CONFORME, intPratica))); - - } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NON_CONFORME)) { - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); - return LanguageUtil.get( - LocaleUtil.ITALIAN, - AvvisoUtil.getAllTipoDocumento().get( - PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.NON_CONFORME, intPratica))); - } - - return fullDescription; - } - - - public String getDescriptionOggettoProtocollo() throws PortalException, SystemException { - - String tipoDocumento = - AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil.getAllTipoDocumento().get( - this.getTipoDocumento()) : "label.admingeniocivile.avviso.tipoDocumento.avvisomanuale"; - - String fullDescription = LanguageUtil.get(LocaleUtil.ITALIAN, tipoDocumento); - - if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.VIDIMATA)) { - - if (this.getClassName().equals(DettPratica.class.getName())) { - DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(this.getClassPk()); - if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { - fullDescription += " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-12") + ""; - } else if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { - fullDescription += " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-05"); - } else if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { - fullDescription += " di" + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-13"); - } - } else if (this.getClassName().equals(FineLavori.class.getName())) { - FineLavori fineLavori = FineLavoriLocalServiceUtil.getFineLavori(this.getClassPk()); - fullDescription += - " di " - + LanguageUtil - .get(LocaleUtil.ITALIAN, "label-integrazione-" + (fineLavori.getParziale() ? "09" : "07")); - - } else if (this.getClassName().equals(Collaudo.class.getName())) { - Collaudo collaudo = CollaudoLocalServiceUtil.getCollaudo(this.getClassPk()); - fullDescription += - " di " - + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-" + (collaudo.getParziale() ? "10" : "08")); - } - - } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) { - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); - - return LanguageUtil.get( - LocaleUtil.ITALIAN, - AvvisoUtil.getAllTipoDocumento().get( - PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.CONFORME, intPratica))); - - } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NON_CONFORME)) { - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); - return LanguageUtil.get( - LocaleUtil.ITALIAN, - AvvisoUtil.getAllTipoDocumento().get( - PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.NON_CONFORME, intPratica))); - } - - return fullDescription.replace("Avviso di ", ""); - } - - public String getDownloadUrl(ThemeDisplay themeDisplay) throws PortalException, SystemException { - - if (Validator.isNotNull(getFileEntryIdInvio())) { - - FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(getFileEntryIdInvio()); - - return DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, "&download=true"); - } - return null; - } - - public String translateTipoDocumento() throws PortalException, SystemException { - - String tipoDocumento = - AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil.getAllTipoDocumento().get( - this.getTipoDocumento()) : "label.admingeniocivile.avviso.tipoDocumento.avvisomanuale"; - - if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) { - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); - tipoDocumento = - AvvisoUtil.getAllTipoDocumento().get( - PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.CONFORME, intPratica)); - - } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NON_CONFORME)) { - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); - tipoDocumento = - AvvisoUtil.getAllTipoDocumento().get( - PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.NON_CONFORME, intPratica)); - } - - return tipoDocumento; - - } + /* + * NOTE FOR DEVELOPERS: Never reference this class directly. All methods + * that expect a avviso model instance should use the {@link + * it.tref.liferay.portos.bo.model.Avviso} interface instead. + */ + public AvvisoImpl() { + + } + + public String getFullDescription() throws PortalException, SystemException { + + String tipoDocumento = AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil + .getAllTipoDocumento().get(this.getTipoDocumento()) + : "label.admingeniocivile.avviso.tipoDocumento.avvisomanuale"; + + String fullDescription = LanguageUtil.get(LocaleUtil.ITALIAN, tipoDocumento); + + if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.VIDIMATA)) { + + if (this.getClassName().equals(DettPratica.class.getName())) { + DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(this.getClassPk()); + if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica + .getTipoIntegrazione())) { + fullDescription += " di " + + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-12") + ""; + } else if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica + .getTipoIntegrazione())) { + fullDescription += " di " + + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-05") + " n° " + + dettPratica.getIntegrazione() + ""; + } else if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { + fullDescription += " di " + + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-13") + " n° " + + dettPratica.getVarianteNumero() + ""; + } + } else if (this.getClassName().equals(FineLavori.class.getName())) { + FineLavori fineLavori = FineLavoriLocalServiceUtil.getFineLavori(this.getClassPk()); + fullDescription += " di " + + LanguageUtil.get(LocaleUtil.ITALIAN, + "label-integrazione-" + (fineLavori.getParziale() ? "09" : "07")) + " n° " + + fineLavori.getNumero() + ""; + } else if (this.getClassName().equals(Collaudo.class.getName())) { + Collaudo collaudo = CollaudoLocalServiceUtil.getCollaudo(this.getClassPk()); + fullDescription += " di " + + LanguageUtil.get(LocaleUtil.ITALIAN, + "label-integrazione-" + (collaudo.getParziale() ? "10" : "08")) + " n° " + + collaudo.getNumero() + ""; + } + + } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); + + return LanguageUtil.get( + LocaleUtil.ITALIAN, + AvvisoUtil.getAllTipoDocumento().get( + PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.CONFORME, intPratica))); + + } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NON_CONFORME)) { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); + return LanguageUtil.get( + LocaleUtil.ITALIAN, + AvvisoUtil.getAllTipoDocumento().get( + PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.NON_CONFORME, intPratica))); + } + + return fullDescription; + } + + public String getDescriptionOggettoProtocollo() throws PortalException, SystemException { + + String tipoDocumento = AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil + .getAllTipoDocumento().get(this.getTipoDocumento()) + : "label.admingeniocivile.avviso.tipoDocumento.avvisomanuale"; + + String fullDescription = LanguageUtil.get(LocaleUtil.ITALIAN, tipoDocumento); + + if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.VIDIMATA)) { + + if (this.getClassName().equals(DettPratica.class.getName())) { + DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(this.getClassPk()); + if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica + .getTipoIntegrazione())) { + fullDescription += " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-12") + + ""; + } else if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica + .getTipoIntegrazione())) { + fullDescription += " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-05"); + } else if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { + fullDescription += " di" + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-13"); + } + } else if (this.getClassName().equals(FineLavori.class.getName())) { + FineLavori fineLavori = FineLavoriLocalServiceUtil.getFineLavori(this.getClassPk()); + fullDescription += " di " + + LanguageUtil.get(LocaleUtil.ITALIAN, + "label-integrazione-" + (fineLavori.getParziale() ? "09" : "07")); + + } else if (this.getClassName().equals(Collaudo.class.getName())) { + Collaudo collaudo = CollaudoLocalServiceUtil.getCollaudo(this.getClassPk()); + fullDescription += " di " + + LanguageUtil.get(LocaleUtil.ITALIAN, + "label-integrazione-" + (collaudo.getParziale() ? "10" : "08")); + } + + } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); + + return LanguageUtil.get( + LocaleUtil.ITALIAN, + AvvisoUtil.getAllTipoDocumento().get( + PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.CONFORME, intPratica))); + + } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NON_CONFORME)) { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); + return LanguageUtil.get( + LocaleUtil.ITALIAN, + AvvisoUtil.getAllTipoDocumento().get( + PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.NON_CONFORME, intPratica))); + } + + return fullDescription.replace("Avviso di ", ""); + } + + public String getDownloadUrl(ThemeDisplay themeDisplay) throws PortalException, SystemException { + + if (Validator.isNotNull(getFileEntryIdInvio())) { + + FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(getFileEntryIdInvio()); + + return DLUtil + .getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, "&download=true"); + } + return null; + } + + public String translateTipoDocumento() throws PortalException, SystemException { + + String tipoDocumento = AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil + .getAllTipoDocumento().get(this.getTipoDocumento()) + : "label.admingeniocivile.avviso.tipoDocumento.avvisomanuale"; + + if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); + tipoDocumento = AvvisoUtil.getAllTipoDocumento().get( + PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.CONFORME, intPratica)); + + } else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NON_CONFORME)) { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(this.getIntPraticaId()); + tipoDocumento = AvvisoUtil.getAllTipoDocumento().get( + PraticaUtil.getStatoPraticaCode(StatoPraticaConstants.NON_CONFORME, intPratica)); + } + + return tipoDocumento; + + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java index 62a4a923..5be767e3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java @@ -40,693 +40,926 @@ import com.liferay.portal.kernel.util.TimeZoneUtil; import com.liferay.portal.kernel.util.Validator; /** - * The extended model implementation for the DettPratica service. Represents a row in the - * "portos_bo_DettPratica" database table, with each column mapped to a property of this - * class. + * The extended model implementation for the DettPratica service. Represents a + * row in the "portos_bo_DettPratica" database table, with each column + * mapped to a property of this class. * *

- * Helper methods and all application logic should be put in this class. Whenever methods are added, - * rerun ServiceBuilder to copy their definitions into the - * {@link it.tref.liferay.portos.bo.model.DettPratica} interface. + * Helper methods and all application logic should be put in this class. + * Whenever methods are added, rerun ServiceBuilder to copy their definitions + * into the {@link it.tref.liferay.portos.bo.model.DettPratica} interface. *

* * @author Davide Barbagallo, 3F Consulting */ public class DettPraticaImpl extends DettPraticaBaseImpl { - /* - * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a dett - * pratica model instance should use the {@link it.tref.liferay.portos.bo.model.DettPratica} - * interface instead. - */ - - private static final Log _log = LogFactoryUtil.getLog(DettPraticaImpl.class); - - public DettPraticaImpl() { - - } - - public String getTitle(Locale locale) { - - StringBuilder sb = new StringBuilder(); - IntPratica intPratica = null; - - try { - - intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(getIntPraticaId()); - // sb.append("Progetto "); - if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { - sb.append("Deposito "); - } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { - sb.append("Autorizzazione "); - } - sb.append("n. "); - - if (Validator.isNotNull(getProtocollo())) { - sb.append(intPratica.getNumeroProgetto()); - - SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); - // TODO da decidere che data, per adesso si mette quella di creazione il numero protocollo - // sbagliato dovrebbe essere il primo - sb.append(" del "); - sb.append(sdf.format(intPratica.getDtPratica())); - sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); - sb.append(" id "); - sb.append(intPratica.getIntPraticaId()); - - } else { - if (Validator.isNotNull(intPratica.getNumeroProgetto())) { - sb.append(intPratica.getNumeroProgetto()); - sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); - } - sb.append(getDettPraticaId()); - sb.append(" (Temporaneo) "); - sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); - sb.append(" id "); - sb.append(intPratica.getIntPraticaId()); - } - - } catch (PortalException e) { - _log.error("Error on IntPratidaId=" + intPratica.getIntPraticaId(), e); - } catch (SystemException e) { - _log.error("Error on IntPratidaId=" + intPratica.getIntPraticaId(), e); - } - - return sb.toString(); - - } - - public String getTitle() { - - return getTitle(LocaleUtil.getSiteDefault()); - } - - public String getFullDescription() { - - StringBuilder sb = new StringBuilder(); - if (Validator.isNotNull(getTipoIntegrazione())) { - sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), "label-integrazione-" + getTipoIntegrazione())); - } else { - sb.append("Pratica"); - } - if (Validator.isNotNull(getVarianteNumero())) { - sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), " #" + getVarianteNumero())); - } else if (Validator.isNotNull(getIntegrazione())) { - sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), " #" + getIntegrazione())); - } - if (Validator.isNotNull(getProtocollo())) { - sb.append(" protocollo "); - sb.append(getProtocollo()); - sb.append(" del "); - sb.append(FastDateFormatFactoryUtil.getDate(LocaleUtil.getSiteDefault()).format(getDataEffettuazione())); - - } - sb.append(" ("); - sb.append(getTitle()); - sb.append(")"); - return sb.toString(); - } - //ADT BUG BO ID = 18 - public String getMiddleDescription() { - - StringBuilder sb = new StringBuilder(); - if (Validator.isNotNull(getTipoIntegrazione())) { - sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), "label-integrazione-" + getTipoIntegrazione())); - } else { - sb.append("Pratica"); - } - if (Validator.isNotNull(getVarianteNumero())) { - sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), " #" + getVarianteNumero())); - } else if (Validator.isNotNull(getIntegrazione())) { - sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), " #" + getIntegrazione())); - } - sb.append(" ("); - sb.append(getTitle()); - sb.append(")"); - return sb.toString(); - } - - public String serializeToVersioning() throws NoSuchFieldException, SecurityException { - - StringBuilder sb = new StringBuilder(); - - sb.append(StringPool.OPEN_CURLY_BRACE); - sb.append(StringPool.QUOTE + "version" + StringPool.QUOTE + StringPool.COLON).append( - StringPool.QUOTE + Constants.DETTPRATICA_VERSION_IMPL + StringPool.QUOTE + StringPool.COMMA).append( - StringPool.QUOTE + "fields" + StringPool.QUOTE + StringPool.COLON).append(StringPool.OPEN_BRACKET); - - // sb.append(StringPool.OPEN_CURLY_BRACE); - // sb.append(StringPool.QUOTE + "name" + StringPool.QUOTE + StringPool.COLON) - // .append(StringPool.QUOTE + "id" + StringPool.QUOTE).append(StringPool.COMMA) - // .append(StringPool.QUOTE + "class" + StringPool.QUOTE + StringPool.COLON) - // .append(StringPool.QUOTE + "java.lang.Long" + StringPool.QUOTE).append(StringPool.COMMA) - // .append(StringPool.QUOTE + "value" + StringPool.QUOTE + StringPool.COLON) - // .append(StringPool.QUOTE + getDettPraticaId() + StringPool.QUOTE); - // sb.append(StringPool.CLOSE_CURLY_BRACE); - // sb.append(StringPool.COMMA); - - Map modelAttributes = getModelValues(); - String privateUuid = "uuid_"; - Object[][] columns = DettPraticaModelImpl.TABLE_COLUMNS; - for (Object[] column_x : columns) { - String property = (String) column_x[0]; - if (privateUuid.equals(property)) { - property = "uuid"; - } - - int type = (int) column_x[1]; - String className = StringPool.BLANK; - - switch (type) { - case Types.VARCHAR: - className = String.class.getCanonicalName(); - break; - case Types.BOOLEAN: - // className = Boolean.class.getCanonicalName(); - className = String.class.getCanonicalName(); - break; - case Types.INTEGER: - className = Integer.class.getCanonicalName(); - break; - case Types.BIGINT: - className = Long.class.getCanonicalName(); - break; - case Types.TIMESTAMP: - // className = Date.class.getCanonicalName(); - className = String.class.getCanonicalName(); - break; - - default: - break; - } - - Object value = modelAttributes.get(property); - // if (Date.class.getName().equals(className)) { - // if (Validator.isNotNull(value)) { - // value = ((Date) value).getTime(); - // } - // } - - - sb.append(StringPool.OPEN_CURLY_BRACE); - sb.append(StringPool.QUOTE + "name" + StringPool.QUOTE + StringPool.COLON).append( - StringPool.QUOTE + property + StringPool.QUOTE).append(StringPool.COMMA).append( - StringPool.QUOTE + "class" + StringPool.QUOTE + StringPool.COLON).append( - StringPool.QUOTE + className + StringPool.QUOTE).append(StringPool.COMMA).append( - StringPool.QUOTE + "value" + StringPool.QUOTE + StringPool.COLON).append( - JSONObject.quote(String.valueOf(value)).replaceAll("(\n|\r|\r\n|\n\r)", StringPool.SPACE)); - -// Vecchio Utilizzo -// HtmlUtil.escapeXPathAttribute(String.valueOf(value)).replaceAll("(\n|\r|\r\n|\n\r)", StringPool.SPACE)); - - sb.append(StringPool.CLOSE_CURLY_BRACE); - sb.append(StringPool.COMMA); - - } - - sb.setLength(sb.length() - 1); - - sb.append(StringPool.CLOSE_BRACKET); - sb.append(StringPool.CLOSE_CURLY_BRACE); - - return sb.toString(); - } - - public String serializeToVersioningPage() throws NoSuchFieldException, SecurityException { - - StringBuilder sb = new StringBuilder(); - - sb.append(StringPool.OPEN_CURLY_BRACE).append(StringPool.QUOTE + "fields" + StringPool.QUOTE + StringPool.COLON).append( - StringPool.OPEN_BRACKET); - - Object[][] columns = DettPraticaModelImpl.TABLE_COLUMNS; - for (Object[] column_x : columns) { - - String property = (String) column_x[0]; - if (!PraticaUtil.getDettPraticaHiddenFields().contains(property)) { - sb.append(StringPool.QUOTE + property + StringPool.QUOTE).append(StringPool.COMMA); - } - } - - sb.setLength(sb.length() - 1); - - sb.append(StringPool.CLOSE_BRACKET); - sb.append(StringPool.CLOSE_CURLY_BRACE); - - return sb.toString(); - } - - private Map getModelValues() { - - Map attributes = new HashMap(); - Format dateFormatDateTime = - FastDateFormatFactoryUtil.getDateTime(LocaleUtil.getSiteDefault(), TimeZoneUtil.getDefault()); - - attributes.put("uuid", getUuid()); - attributes.put("dettPraticaId", getDettPraticaId()); - attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); - attributes.put("createDate", getCreateDate()); - attributes.put("modifiedDate", getModifiedDate()); - attributes.put("groupId", getGroupId()); - attributes.put("intPraticaId", getIntPraticaId()); - attributes.put("integrazione", getIntegrazione()); - attributes.put("protocollo", getProtocollo()); - attributes.put("tipoIntegrazione", getTipoIntegrazione()); - attributes.put("completa", getCompleta() ? "true" : "false"); - attributes.put("gestita", getGestita() ? "true" : "false"); - attributes.put("importoSpeseIstruttoria", - Validator.isNotNull(getImportoSpeseIstruttoria()) ? getImportoSpeseIstruttoria() + "€" : StringPool.BLANK); - attributes.put("codicePagamentoOneri", getCodicePagamentoOneri()); - attributes.put("causalePagamentoOneri", getCausalePagamentoOneri()); - attributes.put("mezzoPagamentoOneri", Validator.isNotNull(getMezzoPagamentoOneri()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "mezzo-pagamento-" + getMezzoPagamentoOneri()) : StringPool.BLANK); - attributes.put("importoBolli", Validator.isNotNull(getImportoBolli()) ? getImportoBolli() + "€" : StringPool.BLANK); - attributes.put("codicePagamentoBolli", getCodicePagamentoBolli()); - attributes.put("causalePagamentoBolli", getCausalePagamentoBolli()); - attributes.put("mezzoPagamentoBolli", Validator.isNotNull(getMezzoPagamentoBolli()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "mezzo-pagamento-" + getMezzoPagamentoBolli()) : StringPool.BLANK); - - attributes.put("dataEffettuazione", - Validator.isNotNull(getDataEffettuazione()) ? dateFormatDateTime.format(getDataEffettuazione()) - : StringPool.BLANK); - attributes.put("version", getVersion()); - attributes.put("versionata", getVersionata() ? "true" : "false"); - attributes.put("status", getStatus()); - attributes.put("statusByUserId", getStatusByUserId()); - attributes.put("statusByUserName", getStatusByUserName()); - attributes.put("statusDate", Validator.isNotNull(getStatusDate()) ? dateFormatDateTime.format(getStatusDate()) - : StringPool.BLANK); - attributes.put("statusTask", getStatusTask()); - attributes.put("workflowForzato", getWorkflowForzato() ? "true" : "false"); - attributes.put("soggettoSostituitoId", getSoggettoSostituitoId()); - attributes.put("dtInvioSignal", - Validator.isNotNull(getDtInvioSignal()) ? dateFormatDateTime.format(getDtInvioSignal()) : StringPool.BLANK); - attributes.put("oldDettPraticaId", getOldDettPraticaId()); - attributes.put("destinazione", Validator.isNotNull(getDestinazione()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "destinazione-" + getDestinazione()) : StringPool.BLANK); - attributes.put("ag", getAg()); - attributes.put("descLongIntervento", getDescLongIntervento()); - attributes.put("via", getVia()); - attributes.put("localita", getLocalita()); - attributes.put("estremiCatastali", getEstremiCatastali()); - attributes.put("estremiPratCom", getEstremiPratCom()); - attributes.put("variataDa", getVariataDa()); - attributes.put("varianteNumero", getVarianteNumero()); - attributes.put("varianteSostanziale", getVarianteSostanziale() ? "true" : "false"); - attributes.put("operaConforme", - getOperaConforme() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("collaudoStatico", - getCollaudoStatico() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("codiceFiscaleDelegato", getCodiceFiscaleDelegato()); - attributes.put("codiceRuoloDelegato", getCodiceRuoloDelegato()); - attributes.put("codiceFiscaleDelegatoCommittente", getCodiceFiscaleDelegatoCommittente()); - attributes.put("codiceFiscaleDelegatoFineLavori", getCodiceFiscaleDelegatoFineLavori()); - attributes.put("codiceFiscaleDelegatoCollaudo", getCodiceFiscaleDelegatoCollaudo()); - attributes.put("codiceFiscalePrincipaleCommittente", getCodiceFiscalePrincipaleCommittente()); - attributes.put("codiceFiscalePrincipaleCollaudatore", getCodiceFiscalePrincipaleCollaudatore()); - attributes.put("codiceFiscalePrincipaleProgettista", getCodiceFiscalePrincipaleProgettista()); - attributes.put("codiceFiscalePrincipaleDirettoreLavori", getCodiceFiscalePrincipaleDirettoreLavori()); - attributes.put("codiceFiscalePrincipaleDitta", getCodiceFiscalePrincipaleDitta()); - attributes.put("codiceFiscalePrincipaleGeologo", getCodiceFiscalePrincipaleGeologo()); - attributes.put("lavoriInEconomiaCommittente", getLavoriInEconomiaCommittente() ? "true" : "false"); - attributes.put("inizioLavoriContestualeOpera", getInizioLavoriContestualeOpera() ? "true" : "false"); - attributes.put("dataInizioLavoriOpera", - Validator.isNotNull(getDataInizioLavoriOpera()) ? dateFormatDateTime.format(getDataInizioLavoriOpera()) - : StringPool.BLANK); - attributes.put("dataInizioEsecuzioneOpera", - Validator.isNotNull(getDataInizioEsecuzioneOpera()) ? dateFormatDateTime.format(getDataInizioEsecuzioneOpera()) - : StringPool.BLANK); - attributes.put("dataFineEsecuzioneOpera", - Validator.isNotNull(getDataFineEsecuzioneOpera()) ? dateFormatDateTime.format(getDataFineEsecuzioneOpera()) - : StringPool.BLANK); - attributes.put("metratura", getMetratura()); - attributes.put("lavoriPubblici", getLavoriPubblici() ? "true" : "false"); - attributes.put("pagamentoIdOneri", getPagamentoIdOneri()); - attributes.put("pagamentoIdBolli", getPagamentoIdBolli()); - attributes.put("lavoriPubbliciPercentuale", getLavoriPubbliciPercentuale()); - attributes.put("numeroCivico", getNumeroCivico()); - attributes.put("dcParticelle", !getDcParticelle().equalsIgnoreCase("|||") ? getDcParticelle() : StringPool.BLANK); - attributes.put("dcFoglio", getDcFoglio()); - attributes.put("dcAllegato", getDcAllegato()); - attributes.put("dePiani", Validator.isNotNull(getDePiani()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), - "de-piani-" + getDePiani()) : StringPool.BLANK); - attributes.put("deAltezza", Validator.isNotNull(getDeAltezza()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), - "de-altezza-" + getDeAltezza()) : StringPool.BLANK); - attributes.put("deInterrati", Validator.isNotNull(getDeInterrati()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), - "de-interrati-" + getDeInterrati()) : StringPool.BLANK); - attributes.put("deSuperficie", Validator.isNotNull(getDeSuperficie()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "de-superficie-" + getDeSuperficie()) : StringPool.BLANK); - attributes.put("deCostruzione", Validator.isNotNull(getDeCostruzione()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "de-costruzione-" + getDeCostruzione()) : StringPool.BLANK); - attributes.put("deRistrutturazione", Validator.isNotNull(getDeRistrutturazione()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "de-ristrutturazione-" + getDeRistrutturazione()) : StringPool.BLANK); - attributes.put("deUso", Validator.isNotNull(getDeUso()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), "de-uso-" - + getDeUso()) : StringPool.BLANK); - attributes.put("dePubblica", getDePubblica()); - attributes.put("dePrivata", getDePrivata()); - attributes.put("deUtilizzazione", Validator.isNotNull(getDeUtilizzazione()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "de-utilizzazione-" + getDeUtilizzazione()) : StringPool.BLANK); - attributes.put("dePosizioneEdificio", Validator.isNotNull(getDePosizioneEdificio()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "de-posizione-edificio-" + getDePosizioneEdificio()) : StringPool.BLANK); - attributes.put("deInfStradalePonte", - getDeInfStradalePonte() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfStradaleStrada", - getDeInfStradaleStrada() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfStradaleAltro", - getDeInfStradaleAltro() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfIdraulicaLong", - getDeInfIdraulicaLong() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfIdraulicaTrasv", - getDeInfIdraulicaTrasv() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfIdraulicaAltro", - getDeInfIdraulicaAltro() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfOperaAccStradale", - getDeInfOperaAccStradale() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfOperaAccIdraulica", - getDeInfOperaAccIdraulica() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfOperaAccAltro", - getDeInfOperaAccAltro() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfAltraInfrastruttura", - getDeInfAltraInfrastruttura() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("deInfAltro", getDeInfAltro() ? "true" : "false"); - attributes.put("deInfAltroDesc", Validator.isNotNull(getDeInfAltroDesc()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "de-inf-altro-desc-" + getDeInfAltroDesc()) : StringPool.BLANK); - attributes.put("dccFondazioni", Validator.isNotNull(getDccFondazioni()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "dcc-fondazioni-" + getDccFondazioni()) : StringPool.BLANK); - attributes.put("dccStruttureEleMuraturePietrame", - getDccStruttureEleMuraturePietrame() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureEleMuratureLaterizio", - getDccStruttureEleMuratureLaterizio() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureEleMuratureMisto", - getDccStruttureEleMuratureMisto() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureEleMuratureStoriche", - getDccStruttureEleMuratureStoriche() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureEleAcciaio", Validator.isNotNull(getDccStruttureEleAcciaio()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "dcc-strutture-ele-acciaio-" + getDccStruttureEleAcciaio()) : StringPool.BLANK); - attributes.put("dccStruttureEleCA", Validator.isNotNull(getDccStruttureEleCA()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "dcc-strutture-ele-c-a-" + getDccStruttureEleCA()) : StringPool.BLANK); - attributes.put("dccStruttureEleLegno", Validator.isNotNull(getDccStruttureEleLegno()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "dcc-strutture-ele-legno-" + getDccStruttureEleLegno()) : StringPool.BLANK); - attributes.put("dccStruttureEleMistoCA", - getDccStruttureEleMistoCA() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureEleMistoAcciaio", - getDccStruttureEleMistoAcciaio() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureEleMistoMuratura", - getDccStruttureEleMistoMuratura() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureEleMistoLegno", - getDccStruttureEleMistoLegno() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureElePrefabbricato", - getDccStruttureElePrefabbricato() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureEleAltro", - getDccStruttureEleAltro() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccStruttureEleAltroDescrizione", getDccStruttureEleAltroDescrizione()); - attributes.put("dccOrizzontamentiCAAcciaio", - getDccOrizzontamentiCAAcciaio() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOrizzontamentiLegno", - getDccOrizzontamentiLegno() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOrizzontamentiLegnoCA", - getDccOrizzontamentiLegnoCA() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOrizzontamentiLamieraGrecata", - getDccOrizzontamentiLamieraGrecata() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOrizzontamentiVolte", - getDccOrizzontamentiVolte() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOrizzontamentiAltro", - getDccOrizzontamentiAltro() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOrizzontamenti", - Validator.isNotNull(getDccOrizzontamentiAltroDescrizione()) ? getDccOrizzontamentiAltroDescrizione() - : StringPool.BLANK); - attributes.put("dccCopertura", Validator.isNotNull(getDccCopertura()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "dcc-copertura-" + getDccCopertura()) : StringPool.BLANK); - attributes.put("dccCoperturaCAAcciaio", - getDccCoperturaCAAcciaio() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccCoperturaLegno", - getDccCoperturaLegno() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccCoperturaLegnoCA", - getDccCoperturaLegnoCA() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccCoperturaLamieraGrecata", - getDccCoperturaLamieraGrecata() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccCoperturaPannelli", - getDccCoperturaPannelli() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccCoperturaPVCTelonati", - getDccCoperturaPVCTelonati() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccCoperturaLeggere", - getDccCoperturaLeggere() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccCoperturaAltro", - getDccCoperturaAltro() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccCoperturaAltroDesrizione", getDccCoperturaAltroDesrizione()); - attributes.put("dccElemNonStrutLaterizio", - getDccElemNonStrutLaterizio() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccElemNonStrutCartongesso", - getDccElemNonStrutCartongesso() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccElemNonStrutCalcestruzzo", - getDccElemNonStrutCalcestruzzo() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccElemNonStrutLegno", - getDccElemNonStrutLegno() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccElemNonStrutAltro", - getDccElemNonStrutAltro() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccElemNonStrutAltroDescrizione", getDccElemNonStrutAltroDescrizione()); - attributes.put("dccOpereDiRinforzoInsCatene", - getDccOpereDiRinforzoInsCatene() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOpereDiRinforzoInsCordoli", - getDccOpereDiRinforzoInsCordoli() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOpereDiRinforzoIniArmate", - getDccOpereDiRinforzoIniArmate() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOpereDiRinforzoPlaccaggi", - getDccOpereDiRinforzoPlaccaggi() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOpereDiRinforzoIrrSolai", - getDccOpereDiRinforzoIrrSolai() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOpereDiRinforzoRinforziFRP", - getDccOpereDiRinforzoRinforziFRP() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOpereDiRinforzoTelaiECerchiature", - getDccOpereDiRinforzoTelaiECerchiature() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOpereDiRinforzoInsRompitratta", - getDccOpereDiRinforzoInsRompitratta() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOpereDiRinforzoAltro", - getDccOpereDiRinforzoAltro() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("dccOpereDiRinforzoAltroDescrizione", getDccOpereDiRinforzoAltroDescrizione()); - attributes.put("geoClasseIndagine", Validator.isNotNull(getGeoClasseIndagine()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-classe-indagine-" + getGeoClasseIndagine()) : StringPool.BLANK); - attributes.put("geoCategoriaSottosuolo", Validator.isNotNull(getGeoCategoriaSottosuolo()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-categoria-sottosuolo-" + getGeoCategoriaSottosuolo()) : StringPool.BLANK); - attributes.put("geoCategoriaTopografica", Validator.isNotNull(getGeoCategoriaTopografica()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-categoria-topografica-" + getGeoCategoriaTopografica()) : StringPool.BLANK); - attributes.put("geoConsolidamento", Validator.isNotNull(getGeoConsolidamento()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-consolidamento-" + getGeoConsolidamento()) : StringPool.BLANK); - attributes.put("geoPericolositaGeologica", Validator.isNotNull(getGeoPericolositaGeologica()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-pericolosita-geologica-" + getGeoPericolositaGeologica()) : StringPool.BLANK); - attributes.put("geoRischioGeomorfologicoPai", Validator.isNotNull(getGeoRischioGeomorfologicoPai()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-rischio-geomorfologico-" + getGeoRischioGeomorfologicoPai()) : StringPool.BLANK); - attributes.put("geoPericolositaIdraulicaPai", Validator.isNotNull(getGeoPericolositaIdraulicaPai()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-pericolosita-idraulica-pai-" + getGeoPericolositaIdraulicaPai()) : StringPool.BLANK); - attributes.put("geoRischioIdraulicoPai", Validator.isNotNull(getGeoRischioIdraulicoPai()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-rischio-idraulico-pai-" + getGeoRischioIdraulicoPai()) : StringPool.BLANK); - attributes.put("geoPericolositaSismica", Validator.isNotNull(getGeoPericolositaSismica()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-pericolosita-sismica-" + getGeoPericolositaSismica()) : StringPool.BLANK); - attributes.put("geoPericolositaIdraulica", Validator.isNotNull(getGeoPericolositaIdraulica()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-pericolosita-idraulica-" + getGeoPericolositaIdraulica()) : StringPool.BLANK); - attributes.put("geoPericolositaGeomorfica", Validator.isNotNull(getGeoPericolositaGeomorfica()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-pericolosita-geomorfica-" + getGeoPericolositaGeomorfica()) - : StringPool.BLANK); - attributes.put("geoFattibilitaGeologica", Validator.isNotNull(getGeoFattibilitaGeologica()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-fattibilita-geologica-" + getGeoFattibilitaGeologica()) : StringPool.BLANK); - attributes.put("geoFattibilitaSismica", Validator.isNotNull(getGeoFattibilitaSismica()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-fattibilita-sismica-" + getGeoFattibilitaSismica()) : StringPool.BLANK); - attributes.put("geoFattibilitaIdraulica", Validator.isNotNull(getGeoFattibilitaIdraulica()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-fattibilita-idraulica-" + getGeoFattibilitaIdraulica()) : StringPool.BLANK); - attributes.put("geoOperaRilevante", Validator.isNotNull(getGeoOperaRilevante()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-opera-rilevante-" + getGeoOperaRilevante()) : StringPool.BLANK); - attributes.put("geoOpereDiSostegno", Validator.isNotNull(getGeoOpereDiSostegno()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-opere-di-sostegno-" + getGeoOpereDiSostegno()) : StringPool.BLANK); - attributes.put("geoOpereInSotterranea", Validator.isNotNull(getGeoOpereInSotterranea()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-opere-in-sotterranea-" + getGeoOpereInSotterranea()) : StringPool.BLANK); - attributes.put("geoPresenzaPrescrizioni", Validator.isNotNull(getGeoPresenzaPrescrizioni()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-presenza-prescrizioni-" + getGeoPresenzaPrescrizioni()) : StringPool.BLANK); - attributes.put("geoNotePrescrizioni", getGeoNotePrescrizioni()); - attributes.put("geoNoteIndagini", getGeoNoteIndagini()); - attributes.put("geoEvidenzeGeomorfiche", Validator.isNotNull(getGeoEvidenzeGeomorfiche()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-evidenze-geomorfiche-" + getGeoEvidenzeGeomorfiche()) : StringPool.BLANK); - attributes.put("geoEvidenzeGeologiche", Validator.isNotNull(getGeoEvidenzeGeologiche()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "geo-evidenze-geologiche-" + getGeoEvidenzeGeologiche()) : StringPool.BLANK); - attributes.put("geoDtRelazione", - Validator.isNotNull(getGeoDtRelazione()) ? dateFormatDateTime.format(getGeoDtRelazione()) : StringPool.BLANK); - attributes.put("pagNuoveCostruzioni", - getPagNuoveCostruzioni() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("pagAdeguamentoSismico", getPagAdeguamentoSismico()); - attributes.put("pagMiglioramentoSismico", getPagMiglioramentoSismico()); - attributes.put("pagRiparazioneInterventoLocale", - getPagRiparazioneInterventoLocale() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("pagNuovaCostruzione", getPagNuovaCostruzione()); - attributes.put("pagVarianti", getPagVarianti() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("pagAltro", getPagAltro()); - attributes.put("note", getNote()); - attributes.put("noteUfficio", getNoteUfficio()); - attributes.put("localizzazioneGeografica", getLocalizzazioneGeografica()); - attributes.put("tcNuovaCostruzione", - getTcNuovaCostruzione() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcAdeguamentoSismico", - getTcAdeguamentoSismico() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcMiglioramentoSismico", - getTcMiglioramentoSismico() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcRiparazioneInterventoLocale", - getTcRiparazioneInterventoLocale() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcInCA", getTcInCA() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcInOpera", getTcInOpera() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcPrefabbricato", - getTcPrefabbricato() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcInAcciaio", getTcInAcciaio() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcMista", getTcMista() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcInMuratura", - getTcInMuratura() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcInMuraturaOrdinaria", - getTcInMuraturaOrdinaria() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcInMuraturaArmata", - getTcInMuraturaArmata() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcInMuraturaMista", - getTcInMuraturaMista() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcInLegno", getTcInLegno() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcAltro", getTcAltro() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("tcAltroDescrizione", getTcAltroDescrizione()); - attributes.put("tcConDispositivi", - getTcConDispositivi() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normLavoriInProprio", - getNormLavoriInProprio() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normEsenteBollo", - getNormEsenteBollo() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normEsenteSpese", - getNormEsenteSpese() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDpr01Dep", - getNormDpr01Dep() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDpr02Dep", - getNormDpr02Dep() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDpr01Aut", - getNormDpr01Aut() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDpr02Aut", - getNormDpr02Aut() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDpr03", getNormDpr03() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDpr04", getNormDpr04() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDpr05", getNormDpr05() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDm01", getNormDm01() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDm02", getNormDm02() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDm03", getNormDm03() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDm04", getNormDm04() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDm05", getNormDm05() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDprg01", getNormDprg01() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normDprg02", getNormDprg02() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normAnr", getNormAnr() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normOrd01", getNormOrd01() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normCI01", getNormCI01() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normLTC01", getNormLTC01() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normArt3com3", - getNormArt3com3() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normArt3com4", - getNormArt3com4() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("normSismaBonus", - getNormSismaBonus() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("clRischioPreInt", Validator.isNotNull(getClRischioPreInt()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "cl-rischio-pre-int-" + getClRischioPreInt()) : StringPool.BLANK); - attributes.put("clRischioPosInt", Validator.isNotNull(getClRischioPostInt()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "cl-rischio-post-int-" + getClRischioPostInt()) : StringPool.BLANK); - attributes.put("intervFinPub", - getIntervFinPub() ? HtmlUtil.escape("") - : HtmlUtil.escape("")); - attributes.put("intervFinPubDesc", Validator.isNotNull(getIntervFinPubDesc()) ? LanguageUtil.get( - LocaleUtil.getSiteDefault(), "interv-fin-pub-desc") : StringPool.BLANK); - attributes.put("dpdc", getDpdc() ? "true" : "false"); - - return attributes; - } + /** + * + */ + private static final long serialVersionUID = 7101706124058496133L; + /* + * NOTE FOR DEVELOPERS: Never reference this class directly. All methods + * that expect a dett pratica model instance should use the {@link + * it.tref.liferay.portos.bo.model.DettPratica} interface instead. + */ + + private static final Log _log = LogFactoryUtil.getLog(DettPraticaImpl.class); + + public DettPraticaImpl() { + + } + + public String getTitle(Locale locale) { + + StringBuilder sb = new StringBuilder(); + IntPratica intPratica = null; + + try { + + intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(getIntPraticaId()); + // sb.append("Progetto "); + if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { + sb.append("Deposito "); + } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { + sb.append("Autorizzazione "); + } + sb.append("n. "); + + if (Validator.isNotNull(getProtocollo())) { + sb.append(intPratica.getNumeroProgetto()); + + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + // TODO da decidere che data, per adesso si mette quella di + // creazione il numero protocollo + // sbagliato dovrebbe essere il primo + sb.append(" del "); + sb.append(sdf.format(intPratica.getDtPratica())); + } else { + if (Validator.isNotNull(intPratica.getNumeroProgetto())) { + sb.append(intPratica.getNumeroProgetto()); + sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); + } + sb.append(getDettPraticaId()); + sb.append(" (Temporaneo) "); + } + sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); + sb.append(" id "); + sb.append(intPratica.getIntPraticaId()); + } catch (PortalException | SystemException e) { + _log.error("Error on IntPratidaId=" + intPratica.getIntPraticaId(), e); + } + return sb.toString(); + } + + public String getTitle() { + + return getTitle(LocaleUtil.getSiteDefault()); + } + + public String getFullDescription() { + + StringBuilder sb = new StringBuilder(); + if (Validator.isNotNull(getTipoIntegrazione())) { + sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), "label-integrazione-" + + getTipoIntegrazione())); + } else { + sb.append("Pratica"); + } + if (Validator.isNotNull(getVarianteNumero())) { + sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), " #" + getVarianteNumero())); + } else if (Validator.isNotNull(getIntegrazione())) { + sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), " #" + getIntegrazione())); + } + if (Validator.isNotNull(getProtocollo())) { + sb.append(" protocollo "); + sb.append(getProtocollo()); + sb.append(" del "); + sb.append(FastDateFormatFactoryUtil.getDate(LocaleUtil.getSiteDefault()).format( + getDataEffettuazione())); + + } + sb.append(" ("); + sb.append(getTitle()); + sb.append(")"); + return sb.toString(); + } + + // ADT BUG BO ID = 18 + public String getMiddleDescription() { + + StringBuilder sb = new StringBuilder(); + if (Validator.isNotNull(getTipoIntegrazione())) { + sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), "label-integrazione-" + + getTipoIntegrazione())); + } else { + sb.append("Pratica"); + } + if (Validator.isNotNull(getVarianteNumero())) { + sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), " #" + getVarianteNumero())); + } else if (Validator.isNotNull(getIntegrazione())) { + sb.append(LanguageUtil.get(LocaleUtil.getSiteDefault(), " #" + getIntegrazione())); + } + sb.append(" ("); + sb.append(getTitle()); + sb.append(")"); + return sb.toString(); + } + + public String serializeToVersioning() throws NoSuchFieldException, SecurityException { + + StringBuilder sb = new StringBuilder(); + + sb.append(StringPool.OPEN_CURLY_BRACE); + sb.append(StringPool.QUOTE + "version" + StringPool.QUOTE + StringPool.COLON) + .append(StringPool.QUOTE + Constants.DETTPRATICA_VERSION_IMPL + StringPool.QUOTE + + StringPool.COMMA) + .append(StringPool.QUOTE + "fields" + StringPool.QUOTE + StringPool.COLON) + .append(StringPool.OPEN_BRACKET); + + // sb.append(StringPool.OPEN_CURLY_BRACE); + // sb.append(StringPool.QUOTE + "name" + StringPool.QUOTE + + // StringPool.COLON) + // .append(StringPool.QUOTE + "id" + + // StringPool.QUOTE).append(StringPool.COMMA) + // .append(StringPool.QUOTE + "class" + StringPool.QUOTE + + // StringPool.COLON) + // .append(StringPool.QUOTE + "java.lang.Long" + + // StringPool.QUOTE).append(StringPool.COMMA) + // .append(StringPool.QUOTE + "value" + StringPool.QUOTE + + // StringPool.COLON) + // .append(StringPool.QUOTE + getDettPraticaId() + StringPool.QUOTE); + // sb.append(StringPool.CLOSE_CURLY_BRACE); + // sb.append(StringPool.COMMA); + + Map modelAttributes = getModelValues(); + String privateUuid = "uuid_"; + Object[][] columns = DettPraticaModelImpl.TABLE_COLUMNS; + for (Object[] column_x : columns) { + String property = (String) column_x[0]; + if (privateUuid.equals(property)) { + property = "uuid"; + } + + int type = (int) column_x[1]; + String className = StringPool.BLANK; + + switch (type) { + case Types.VARCHAR: + className = String.class.getCanonicalName(); + break; + case Types.BOOLEAN: + // className = Boolean.class.getCanonicalName(); + className = String.class.getCanonicalName(); + break; + case Types.INTEGER: + className = Integer.class.getCanonicalName(); + break; + case Types.BIGINT: + className = Long.class.getCanonicalName(); + break; + case Types.TIMESTAMP: + // className = Date.class.getCanonicalName(); + className = String.class.getCanonicalName(); + break; + + default: + break; + } + + Object value = modelAttributes.get(property); + // if (Date.class.getName().equals(className)) { + // if (Validator.isNotNull(value)) { + // value = ((Date) value).getTime(); + // } + // } + + sb.append(StringPool.OPEN_CURLY_BRACE); + sb.append(StringPool.QUOTE + "name" + StringPool.QUOTE + StringPool.COLON) + .append(StringPool.QUOTE + property + StringPool.QUOTE) + .append(StringPool.COMMA) + .append(StringPool.QUOTE + "class" + StringPool.QUOTE + StringPool.COLON) + .append(StringPool.QUOTE + className + StringPool.QUOTE) + .append(StringPool.COMMA) + .append(StringPool.QUOTE + "value" + StringPool.QUOTE + StringPool.COLON) + .append(JSONObject.quote(String.valueOf(value)).replaceAll("(\n|\r|\r\n|\n\r)", + StringPool.SPACE)); + + // Vecchio Utilizzo + // HtmlUtil.escapeXPathAttribute(String.valueOf(value)).replaceAll("(\n|\r|\r\n|\n\r)", + // StringPool.SPACE)); + + sb.append(StringPool.CLOSE_CURLY_BRACE); + sb.append(StringPool.COMMA); + + } + + sb.setLength(sb.length() - 1); + + sb.append(StringPool.CLOSE_BRACKET); + sb.append(StringPool.CLOSE_CURLY_BRACE); + + return sb.toString(); + } + + public String serializeToVersioningPage() throws NoSuchFieldException, SecurityException { + + StringBuilder sb = new StringBuilder(); + + sb.append(StringPool.OPEN_CURLY_BRACE) + .append(StringPool.QUOTE + "fields" + StringPool.QUOTE + StringPool.COLON) + .append(StringPool.OPEN_BRACKET); + + Object[][] columns = DettPraticaModelImpl.TABLE_COLUMNS; + for (Object[] column_x : columns) { + + String property = (String) column_x[0]; + if (!PraticaUtil.getDettPraticaHiddenFields().contains(property)) { + sb.append(StringPool.QUOTE + property + StringPool.QUOTE).append(StringPool.COMMA); + } + } + + sb.setLength(sb.length() - 1); + + sb.append(StringPool.CLOSE_BRACKET); + sb.append(StringPool.CLOSE_CURLY_BRACE); + + return sb.toString(); + } + + private Map getModelValues() { + + Map attributes = new HashMap(); + Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(LocaleUtil.getSiteDefault(), + TimeZoneUtil.getDefault()); + + attributes.put("uuid", getUuid()); + attributes.put("dettPraticaId", getDettPraticaId()); + attributes.put("companyId", getCompanyId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("groupId", getGroupId()); + attributes.put("intPraticaId", getIntPraticaId()); + attributes.put("integrazione", getIntegrazione()); + attributes.put("protocollo", getProtocollo()); + attributes.put("tipoIntegrazione", getTipoIntegrazione()); + attributes.put("completa", getCompleta() ? "true" : "false"); + attributes.put("gestita", getGestita() ? "true" : "false"); + attributes.put("importoSpeseIstruttoria", + Validator.isNotNull(getImportoSpeseIstruttoria()) ? getImportoSpeseIstruttoria() + "€" + : StringPool.BLANK); + attributes.put("codicePagamentoOneri", getCodicePagamentoOneri()); + attributes.put("causalePagamentoOneri", getCausalePagamentoOneri()); + attributes.put( + "mezzoPagamentoOneri", + Validator.isNotNull(getMezzoPagamentoOneri()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "mezzo-pagamento-" + getMezzoPagamentoOneri()) : StringPool.BLANK); + attributes.put("importoBolli", Validator.isNotNull(getImportoBolli()) ? getImportoBolli() + "€" + : StringPool.BLANK); + attributes.put("codicePagamentoBolli", getCodicePagamentoBolli()); + attributes.put("causalePagamentoBolli", getCausalePagamentoBolli()); + attributes.put( + "mezzoPagamentoBolli", + Validator.isNotNull(getMezzoPagamentoBolli()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "mezzo-pagamento-" + getMezzoPagamentoBolli()) : StringPool.BLANK); + + attributes.put( + "dataEffettuazione", + Validator.isNotNull(getDataEffettuazione()) ? dateFormatDateTime + .format(getDataEffettuazione()) : StringPool.BLANK); + attributes.put("version", getVersion()); + attributes.put("versionata", getVersionata() ? "true" : "false"); + attributes.put("status", getStatus()); + attributes.put("statusByUserId", getStatusByUserId()); + attributes.put("statusByUserName", getStatusByUserName()); + attributes.put("statusDate", + Validator.isNotNull(getStatusDate()) ? dateFormatDateTime.format(getStatusDate()) + : StringPool.BLANK); + attributes.put("statusTask", getStatusTask()); + attributes.put("workflowForzato", getWorkflowForzato() ? "true" : "false"); + attributes.put("soggettoSostituitoId", getSoggettoSostituitoId()); + attributes.put("dtInvioSignal", + Validator.isNotNull(getDtInvioSignal()) ? dateFormatDateTime.format(getDtInvioSignal()) + : StringPool.BLANK); + attributes.put("oldDettPraticaId", getOldDettPraticaId()); + attributes.put( + "destinazione", + Validator.isNotNull(getDestinazione()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "destinazione-" + getDestinazione()) : StringPool.BLANK); + attributes.put("ag", getAg()); + attributes.put("descLongIntervento", getDescLongIntervento()); + attributes.put("via", getVia()); + attributes.put("localita", getLocalita()); + attributes.put("estremiCatastali", getEstremiCatastali()); + attributes.put("estremiPratCom", getEstremiPratCom()); + attributes.put("variataDa", getVariataDa()); + attributes.put("varianteNumero", getVarianteNumero()); + attributes.put("varianteSostanziale", getVarianteSostanziale() ? "true" : "false"); + attributes.put("operaConforme", + getOperaConforme() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("collaudoStatico", + getCollaudoStatico() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("codiceFiscaleDelegato", getCodiceFiscaleDelegato()); + attributes.put("codiceRuoloDelegato", getCodiceRuoloDelegato()); + attributes.put("codiceFiscaleDelegatoCommittente", getCodiceFiscaleDelegatoCommittente()); + attributes.put("codiceFiscaleDelegatoFineLavori", getCodiceFiscaleDelegatoFineLavori()); + attributes.put("codiceFiscaleDelegatoCollaudo", getCodiceFiscaleDelegatoCollaudo()); + attributes.put("codiceFiscalePrincipaleCommittente", getCodiceFiscalePrincipaleCommittente()); + attributes.put("codiceFiscalePrincipaleCollaudatore", getCodiceFiscalePrincipaleCollaudatore()); + attributes.put("codiceFiscalePrincipaleProgettista", getCodiceFiscalePrincipaleProgettista()); + attributes.put("codiceFiscalePrincipaleDirettoreLavori", getCodiceFiscalePrincipaleDirettoreLavori()); + attributes.put("codiceFiscalePrincipaleDitta", getCodiceFiscalePrincipaleDitta()); + attributes.put("codiceFiscalePrincipaleGeologo", getCodiceFiscalePrincipaleGeologo()); + attributes.put("lavoriInEconomiaCommittente", getLavoriInEconomiaCommittente() ? "true" : "false"); + attributes.put("inizioLavoriContestualeOpera", getInizioLavoriContestualeOpera() ? "true" : "false"); + attributes.put( + "dataInizioLavoriOpera", + Validator.isNotNull(getDataInizioLavoriOpera()) ? dateFormatDateTime + .format(getDataInizioLavoriOpera()) : StringPool.BLANK); + attributes.put( + "dataInizioEsecuzioneOpera", + Validator.isNotNull(getDataInizioEsecuzioneOpera()) ? dateFormatDateTime + .format(getDataInizioEsecuzioneOpera()) : StringPool.BLANK); + attributes.put( + "dataFineEsecuzioneOpera", + Validator.isNotNull(getDataFineEsecuzioneOpera()) ? dateFormatDateTime + .format(getDataFineEsecuzioneOpera()) : StringPool.BLANK); + attributes.put("metratura", getMetratura()); + attributes.put("lavoriPubblici", getLavoriPubblici() ? "true" : "false"); + attributes.put("pagamentoIdOneri", getPagamentoIdOneri()); + attributes.put("pagamentoIdBolli", getPagamentoIdBolli()); + attributes.put("lavoriPubbliciPercentuale", getLavoriPubbliciPercentuale()); + attributes.put("numeroCivico", getNumeroCivico()); + attributes.put("dcParticelle", !getDcParticelle().equalsIgnoreCase("|||") ? getDcParticelle() + : StringPool.BLANK); + attributes.put("dcFoglio", getDcFoglio()); + attributes.put("dcAllegato", getDcAllegato()); + attributes.put( + "dePiani", + Validator.isNotNull(getDePiani()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), "de-piani-" + + getDePiani()) : StringPool.BLANK); + attributes.put( + "deAltezza", + Validator.isNotNull(getDeAltezza()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "de-altezza-" + getDeAltezza()) : StringPool.BLANK); + attributes.put( + "deInterrati", + Validator.isNotNull(getDeInterrati()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "de-interrati-" + getDeInterrati()) : StringPool.BLANK); + attributes.put( + "deSuperficie", + Validator.isNotNull(getDeSuperficie()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "de-superficie-" + getDeSuperficie()) : StringPool.BLANK); + attributes.put( + "deCostruzione", + Validator.isNotNull(getDeCostruzione()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "de-costruzione-" + getDeCostruzione()) : StringPool.BLANK); + attributes.put( + "deRistrutturazione", + Validator.isNotNull(getDeRistrutturazione()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "de-ristrutturazione-" + getDeRistrutturazione()) : StringPool.BLANK); + attributes.put( + "deUso", + Validator.isNotNull(getDeUso()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), "de-uso-" + + getDeUso()) : StringPool.BLANK); + attributes.put("dePubblica", getDePubblica()); + attributes.put("dePrivata", getDePrivata()); + attributes.put( + "deUtilizzazione", + Validator.isNotNull(getDeUtilizzazione()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "de-utilizzazione-" + getDeUtilizzazione()) : StringPool.BLANK); + attributes.put( + "dePosizioneEdificio", + Validator.isNotNull(getDePosizioneEdificio()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "de-posizione-edificio-" + getDePosizioneEdificio()) : StringPool.BLANK); + attributes.put("deInfStradalePonte", + getDeInfStradalePonte() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("deInfStradaleStrada", + getDeInfStradaleStrada() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("deInfStradaleAltro", + getDeInfStradaleAltro() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("deInfIdraulicaLong", + getDeInfIdraulicaLong() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("deInfIdraulicaTrasv", + getDeInfIdraulicaTrasv() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("deInfIdraulicaAltro", + getDeInfIdraulicaAltro() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "deInfOperaAccStradale", + getDeInfOperaAccStradale() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "deInfOperaAccIdraulica", + getDeInfOperaAccIdraulica() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("deInfOperaAccAltro", + getDeInfOperaAccAltro() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "deInfAltraInfrastruttura", + getDeInfAltraInfrastruttura() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("deInfAltro", getDeInfAltro() ? "true" : "false"); + attributes.put( + "deInfAltroDesc", + Validator.isNotNull(getDeInfAltroDesc()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "de-inf-altro-desc-" + getDeInfAltroDesc()) : StringPool.BLANK); + attributes.put( + "dccFondazioni", + Validator.isNotNull(getDccFondazioni()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "dcc-fondazioni-" + getDccFondazioni()) : StringPool.BLANK); + attributes.put( + "dccStruttureEleMuraturePietrame", + getDccStruttureEleMuraturePietrame() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccStruttureEleMuratureLaterizio", + getDccStruttureEleMuratureLaterizio() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccStruttureEleMuratureMisto", + getDccStruttureEleMuratureMisto() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccStruttureEleMuratureStoriche", + getDccStruttureEleMuratureStoriche() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccStruttureEleAcciaio", + Validator.isNotNull(getDccStruttureEleAcciaio()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "dcc-strutture-ele-acciaio-" + + getDccStruttureEleAcciaio()) : StringPool.BLANK); + attributes.put( + "dccStruttureEleCA", + Validator.isNotNull(getDccStruttureEleCA()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "dcc-strutture-ele-c-a-" + getDccStruttureEleCA()) : StringPool.BLANK); + attributes.put( + "dccStruttureEleLegno", + Validator.isNotNull(getDccStruttureEleLegno()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "dcc-strutture-ele-legno-" + getDccStruttureEleLegno()) + : StringPool.BLANK); + attributes.put( + "dccStruttureEleMistoCA", + getDccStruttureEleMistoCA() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccStruttureEleMistoAcciaio", + getDccStruttureEleMistoAcciaio() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccStruttureEleMistoMuratura", + getDccStruttureEleMistoMuratura() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccStruttureEleMistoLegno", + getDccStruttureEleMistoLegno() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccStruttureElePrefabbricato", + getDccStruttureElePrefabbricato() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("dccStruttureEleAltro", + getDccStruttureEleAltro() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("dccStruttureEleAltroDescrizione", getDccStruttureEleAltroDescrizione()); + attributes.put( + "dccOrizzontamentiCAAcciaio", + getDccOrizzontamentiCAAcciaio() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOrizzontamentiLegno", + getDccOrizzontamentiLegno() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOrizzontamentiLegnoCA", + getDccOrizzontamentiLegnoCA() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOrizzontamentiLamieraGrecata", + getDccOrizzontamentiLamieraGrecata() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOrizzontamentiVolte", + getDccOrizzontamentiVolte() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOrizzontamentiAltro", + getDccOrizzontamentiAltro() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes + .put("dccOrizzontamenti", + Validator.isNotNull(getDccOrizzontamentiAltroDescrizione()) ? getDccOrizzontamentiAltroDescrizione() + : StringPool.BLANK); + attributes.put( + "dccCopertura", + Validator.isNotNull(getDccCopertura()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "dcc-copertura-" + getDccCopertura()) : StringPool.BLANK); + attributes.put( + "dccCoperturaCAAcciaio", + getDccCoperturaCAAcciaio() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("dccCoperturaLegno", + getDccCoperturaLegno() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("dccCoperturaLegnoCA", + getDccCoperturaLegnoCA() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "dccCoperturaLamieraGrecata", + getDccCoperturaLamieraGrecata() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("dccCoperturaPannelli", + getDccCoperturaPannelli() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "dccCoperturaPVCTelonati", + getDccCoperturaPVCTelonati() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("dccCoperturaLeggere", + getDccCoperturaLeggere() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("dccCoperturaAltro", + getDccCoperturaAltro() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("dccCoperturaAltroDesrizione", getDccCoperturaAltroDesrizione()); + attributes.put( + "dccElemNonStrutLaterizio", + getDccElemNonStrutLaterizio() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccElemNonStrutCartongesso", + getDccElemNonStrutCartongesso() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccElemNonStrutCalcestruzzo", + getDccElemNonStrutCalcestruzzo() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("dccElemNonStrutLegno", + getDccElemNonStrutLegno() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("dccElemNonStrutAltro", + getDccElemNonStrutAltro() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("dccElemNonStrutAltroDescrizione", getDccElemNonStrutAltroDescrizione()); + attributes.put( + "dccOpereDiRinforzoInsCatene", + getDccOpereDiRinforzoInsCatene() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOpereDiRinforzoInsCordoli", + getDccOpereDiRinforzoInsCordoli() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOpereDiRinforzoIniArmate", + getDccOpereDiRinforzoIniArmate() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOpereDiRinforzoPlaccaggi", + getDccOpereDiRinforzoPlaccaggi() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOpereDiRinforzoIrrSolai", + getDccOpereDiRinforzoIrrSolai() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOpereDiRinforzoRinforziFRP", + getDccOpereDiRinforzoRinforziFRP() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOpereDiRinforzoTelaiECerchiature", + getDccOpereDiRinforzoTelaiECerchiature() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOpereDiRinforzoInsRompitratta", + getDccOpereDiRinforzoInsRompitratta() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "dccOpereDiRinforzoAltro", + getDccOpereDiRinforzoAltro() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("dccOpereDiRinforzoAltroDescrizione", getDccOpereDiRinforzoAltroDescrizione()); + attributes.put( + "geoClasseIndagine", + Validator.isNotNull(getGeoClasseIndagine()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "geo-classe-indagine-" + getGeoClasseIndagine()) : StringPool.BLANK); + attributes.put( + "geoCategoriaSottosuolo", + Validator.isNotNull(getGeoCategoriaSottosuolo()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-categoria-sottosuolo-" + + getGeoCategoriaSottosuolo()) : StringPool.BLANK); + attributes.put( + "geoCategoriaTopografica", + Validator.isNotNull(getGeoCategoriaTopografica()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-categoria-topografica-" + + getGeoCategoriaTopografica()) : StringPool.BLANK); + attributes.put( + "geoConsolidamento", + Validator.isNotNull(getGeoConsolidamento()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "geo-consolidamento-" + getGeoConsolidamento()) : StringPool.BLANK); + attributes.put( + "geoPericolositaGeologica", + Validator.isNotNull(getGeoPericolositaGeologica()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-pericolosita-geologica-" + + getGeoPericolositaGeologica()) : StringPool.BLANK); + attributes.put( + "geoRischioGeomorfologicoPai", + Validator.isNotNull(getGeoRischioGeomorfologicoPai()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-rischio-geomorfologico-" + + getGeoRischioGeomorfologicoPai()) : StringPool.BLANK); + attributes.put( + "geoPericolositaIdraulicaPai", + Validator.isNotNull(getGeoPericolositaIdraulicaPai()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-pericolosita-idraulica-pai-" + + getGeoPericolositaIdraulicaPai()) : StringPool.BLANK); + attributes.put( + "geoRischioIdraulicoPai", + Validator.isNotNull(getGeoRischioIdraulicoPai()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-rischio-idraulico-pai-" + + getGeoRischioIdraulicoPai()) : StringPool.BLANK); + attributes.put( + "geoPericolositaSismica", + Validator.isNotNull(getGeoPericolositaSismica()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-pericolosita-sismica-" + + getGeoPericolositaSismica()) : StringPool.BLANK); + attributes.put( + "geoPericolositaIdraulica", + Validator.isNotNull(getGeoPericolositaIdraulica()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-pericolosita-idraulica-" + + getGeoPericolositaIdraulica()) : StringPool.BLANK); + attributes.put( + "geoPericolositaGeomorfica", + Validator.isNotNull(getGeoPericolositaGeomorfica()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-pericolosita-geomorfica-" + + getGeoPericolositaGeomorfica()) : StringPool.BLANK); + attributes.put( + "geoFattibilitaGeologica", + Validator.isNotNull(getGeoFattibilitaGeologica()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-fattibilita-geologica-" + + getGeoFattibilitaGeologica()) : StringPool.BLANK); + attributes.put( + "geoFattibilitaSismica", + Validator.isNotNull(getGeoFattibilitaSismica()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-fattibilita-sismica-" + getGeoFattibilitaSismica()) + : StringPool.BLANK); + attributes.put( + "geoFattibilitaIdraulica", + Validator.isNotNull(getGeoFattibilitaIdraulica()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-fattibilita-idraulica-" + + getGeoFattibilitaIdraulica()) : StringPool.BLANK); + attributes.put( + "geoOperaRilevante", + Validator.isNotNull(getGeoOperaRilevante()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "geo-opera-rilevante-" + getGeoOperaRilevante()) : StringPool.BLANK); + attributes.put( + "geoOpereDiSostegno", + Validator.isNotNull(getGeoOpereDiSostegno()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "geo-opere-di-sostegno-" + getGeoOpereDiSostegno()) : StringPool.BLANK); + attributes + .put("geoOpereInSotterranea", + Validator.isNotNull(getGeoOpereInSotterranea()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-opere-in-sotterranea-" + + getGeoOpereInSotterranea()) : StringPool.BLANK); + attributes.put( + "geoPresenzaPrescrizioni", + Validator.isNotNull(getGeoPresenzaPrescrizioni()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-presenza-prescrizioni-" + + getGeoPresenzaPrescrizioni()) : StringPool.BLANK); + attributes.put("geoNotePrescrizioni", getGeoNotePrescrizioni()); + attributes.put("geoNoteIndagini", getGeoNoteIndagini()); + attributes.put( + "geoEvidenzeGeomorfiche", + Validator.isNotNull(getGeoEvidenzeGeomorfiche()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-evidenze-geomorfiche-" + + getGeoEvidenzeGeomorfiche()) : StringPool.BLANK); + attributes.put( + "geoEvidenzeGeologiche", + Validator.isNotNull(getGeoEvidenzeGeologiche()) ? LanguageUtil.get( + LocaleUtil.getSiteDefault(), "geo-evidenze-geologiche-" + getGeoEvidenzeGeologiche()) + : StringPool.BLANK); + attributes.put("geoDtRelazione", + Validator.isNotNull(getGeoDtRelazione()) ? dateFormatDateTime.format(getGeoDtRelazione()) + : StringPool.BLANK); + attributes.put("pagNuoveCostruzioni", + getPagNuoveCostruzioni() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("pagAdeguamentoSismico", getPagAdeguamentoSismico()); + attributes.put("pagMiglioramentoSismico", getPagMiglioramentoSismico()); + attributes.put( + "pagRiparazioneInterventoLocale", + getPagRiparazioneInterventoLocale() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("pagNuovaCostruzione", getPagNuovaCostruzione()); + attributes.put("pagVarianti", + getPagVarianti() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("pagAltro", getPagAltro()); + attributes.put("note", getNote()); + attributes.put("noteUfficio", getNoteUfficio()); + attributes.put("localizzazioneGeografica", getLocalizzazioneGeografica()); + attributes.put("tcNuovaCostruzione", + getTcNuovaCostruzione() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("tcAdeguamentoSismico", + getTcAdeguamentoSismico() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "tcMiglioramentoSismico", + getTcMiglioramentoSismico() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "tcRiparazioneInterventoLocale", + getTcRiparazioneInterventoLocale() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put( + "tcInCA", + getTcInCA() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "tcInOpera", + getTcInOpera() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put("tcPrefabbricato", + getTcPrefabbricato() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("tcInAcciaio", + getTcInAcciaio() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "tcMista", + getTcMista() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put("tcInMuratura", + getTcInMuratura() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "tcInMuraturaOrdinaria", + getTcInMuraturaOrdinaria() ? HtmlUtil + .escape("") : HtmlUtil + .escape("")); + attributes.put("tcInMuraturaArmata", + getTcInMuraturaArmata() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("tcInMuraturaMista", + getTcInMuraturaMista() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "tcInLegno", + getTcInLegno() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "tcAltro", + getTcAltro() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put("tcAltroDescrizione", getTcAltroDescrizione()); + attributes.put("tcConDispositivi", + getTcConDispositivi() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normLavoriInProprio", + getNormLavoriInProprio() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normEsenteBollo", + getNormEsenteBollo() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normEsenteSpese", + getNormEsenteSpese() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normDpr01Dep", + getNormDpr01Dep() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normDpr02Dep", + getNormDpr02Dep() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normDpr01Aut", + getNormDpr01Aut() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normDpr02Aut", + getNormDpr02Aut() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "normDpr03", + getNormDpr03() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normDpr04", + getNormDpr04() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normDpr05", + getNormDpr05() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normDm01", + getNormDm01() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normDm02", + getNormDm02() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normDm03", + getNormDm03() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normDm04", + getNormDm04() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normDm05", + getNormDm05() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put("normDprg01", + getNormDprg01() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normDprg02", + getNormDprg02() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "normAnr", + getNormAnr() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normOrd01", + getNormOrd01() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normCI01", + getNormCI01() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put( + "normLTC01", + getNormLTC01() ? HtmlUtil.escape("") : HtmlUtil + .escape("")); + attributes.put("normArt3com3", + getNormArt3com3() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normArt3com4", + getNormArt3com4() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put("normSismaBonus", + getNormSismaBonus() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "clRischioPreInt", + Validator.isNotNull(getClRischioPreInt()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "cl-rischio-pre-int-" + getClRischioPreInt()) : StringPool.BLANK); + attributes.put( + "clRischioPosInt", + Validator.isNotNull(getClRischioPostInt()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "cl-rischio-post-int-" + getClRischioPostInt()) : StringPool.BLANK); + attributes.put("intervFinPub", + getIntervFinPub() ? HtmlUtil.escape("") + : HtmlUtil.escape("")); + attributes.put( + "intervFinPubDesc", + Validator.isNotNull(getIntervFinPubDesc()) ? LanguageUtil.get(LocaleUtil.getSiteDefault(), + "interv-fin-pub-desc") : StringPool.BLANK); + attributes.put("dpdc", getDpdc() ? "true" : "false"); + + return attributes; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java index db621c57..3a6c33b9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java @@ -24,75 +24,76 @@ import com.liferay.portal.kernel.util.LocaleUtil; import com.liferay.portal.kernel.util.Validator; /** - * The extended model implementation for the IntPratica service. Represents a row in the - * "portos_bo_IntPratica" database table, with each column mapped to a property of this - * class. + * The extended model implementation for the IntPratica service. Represents a + * row in the "portos_bo_IntPratica" database table, with each column + * mapped to a property of this class. * *

- * Helper methods and all application logic should be put in this class. Whenever methods are added, - * rerun ServiceBuilder to copy their definitions into the - * {@link it.tref.liferay.portos.bo.model.IntPratica} interface. + * Helper methods and all application logic should be put in this class. + * Whenever methods are added, rerun ServiceBuilder to copy their definitions + * into the {@link it.tref.liferay.portos.bo.model.IntPratica} interface. *

* * @author Davide Barbagallo, 3F Consulting */ public class IntPraticaImpl extends IntPraticaBaseImpl { - /* - * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a int pratica - * model instance should use the {@link it.tref.liferay.portos.bo.model.IntPratica} interface - * instead. - */ + /* + * NOTE FOR DEVELOPERS: Never reference this class directly. All methods + * that expect a int pratica model instance should use the {@link + * it.tref.liferay.portos.bo.model.IntPratica} interface instead. + */ - private static final Log _log = LogFactoryUtil.getLog(IntPraticaImpl.class); + private static final Log _log = LogFactoryUtil.getLog(IntPraticaImpl.class); - public IntPraticaImpl() { + public IntPraticaImpl() { - } + } + public String getTitle(Locale locale, boolean completed) { - public String getTitle(Locale locale, boolean completed) { + DettPratica dettPratica = null; + try { + if (completed) { + dettPratica = DettPraticaLocalServiceUtil + .getLastCompletedByIntPraticaAndProtocolloNotEmpty(getIntPraticaId()); - DettPratica dettPratica = null; - try { - if (completed) { - dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPraticaAndProtocolloNotEmpty(getIntPraticaId()); + } else { + dettPratica = DettPraticaLocalServiceUtil.getLastEditableByIntPratica(getIntPraticaId()); + if (dettPratica == null) { + dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId()); + } + } + } catch (SystemException e) { + _log.error("Error on intPraticaId=" + getIntPraticaId(), e); + } - } else { - dettPratica = DettPraticaLocalServiceUtil.getLastEditableByIntPratica(getIntPraticaId()); - if (dettPratica == null) { - dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId()); - } - } - } catch (SystemException e) { - _log.error("Error on DettPratidaId=" + dettPratica.getDettPraticaId(), e); - } - - return Validator.isNotNull(dettPratica) ? dettPratica.getTitle() : "-"; - } + return Validator.isNotNull(dettPratica) ? dettPratica.getTitle(locale) : "-"; + } - public String getTitle(boolean completed) { + public String getTitle(boolean completed) { - return getTitle(LocaleUtil.getSiteDefault(), completed); - } + return getTitle(LocaleUtil.getSiteDefault(), completed); + } - public boolean isAnnullata() { + public boolean isAnnullata() { - return Validator.isNotNull(this.getDtAnnullamento()); - } + return Validator.isNotNull(this.getDtAnnullamento()); + } - public boolean isChiusa() throws SystemException { + public boolean isChiusa() throws SystemException { - boolean completata = false; - DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId()); + boolean completata = false; + DettPratica lastDettPratica = DettPraticaLocalServiceUtil + .getLastCompletedByIntPratica(getIntPraticaId()); - if (getCollaudoTotale()) { - completata = true; - } else if (lastDettPratica != null && lastDettPratica.getCollaudoStatico() && getFineLavoriTotale()) { - completata = true; - } else { - completata = false; - } + if (getCollaudoTotale()) { + completata = true; + } else if (lastDettPratica != null && lastDettPratica.getCollaudoStatico() && getFineLavoriTotale()) { + completata = true; + } else { + completata = false; + } - return completata; - } + return completata; + } } 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 a8f47657..d7189cf6 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 @@ -97,6 +97,7 @@ public class GestioneAttivitaPortlet extends MVCPortlet { String ordinaTipo = ParamUtil.getString(actionRequest, "ordinaTipo"); String comune = ParamUtil.getString(actionRequest, "comune"); String tipoAttivita = ParamUtil.getString(actionRequest, "tipoAttivita"); + String tipoProcedura = ParamUtil.getString(actionRequest, "tipoProcedura"); actionResponse.setRenderParameter("tabs1", tabs1); actionResponse.setRenderParameter("numeroProgetto", numeroProgetto); @@ -147,7 +148,7 @@ public class GestioneAttivitaPortlet extends MVCPortlet { actionResponse.setRenderParameter("ordinaTipo", ordinaTipo); actionResponse.setRenderParameter("comune", comune); actionResponse.setRenderParameter("tipoAttivita", tipoAttivita); - + actionResponse.setRenderParameter("tipoProcedura", tipoProcedura); } public void cambioIstruttore(ActionRequest actionRequest, ActionResponse actionResponse) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PortosAdministrationPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PortosAdministrationPortlet.java index ce88b456..103a931a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PortosAdministrationPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PortosAdministrationPortlet.java @@ -66,21 +66,12 @@ public class PortosAdministrationPortlet extends MVCPortlet { actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()])); } - public void riparaWorkflow(ActionRequest actionRequest, ActionResponse actionResponse) { - // ThemeDisplay td = (ThemeDisplay) - // actionRequest.getAttribute(WebKeys.THEME_DISPLAY); - // List esito = SismicaUtil.riparaWorkflow(td.getCompanyId(), - // td.getUserId()); - // actionResponse.setRenderParameter("esito", esito.toArray(new - // String[esito.size()])); - } - public void inviaComunicazione(ActionRequest actionRequest, ActionResponse actionResponse) { ThemeDisplay td = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); List esito = new ArrayList<>(); try { esito = SismicaUtil.inviaComunicazione(td.getCompanyId()); - } catch (ParseException | SystemException | PortalException e) { + } catch (PortalException | SystemException e) { esito.add("Errore durante l'invio " + e.getMessage()); } actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()])); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/AsseverazioneLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/AsseverazioneLocalServiceClpInvoker.java index ef8fe3cc..66b21d13 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/AsseverazioneLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/AsseverazioneLocalServiceClpInvoker.java @@ -141,231 +141,232 @@ public class AsseverazioneLocalServiceClpInvoker { _methodName205 = "testoAsseverazione"; _methodParameterTypes205 = new String[] { - "java.lang.String", "long", "long", "java.lang.String" + "java.lang.String", "com.liferay.portal.model.User", "long", + "java.lang.String" }; _methodName206 = "testoAsseverazione"; _methodParameterTypes206 = new String[] { - "java.lang.String", "com.liferay.portal.model.User", - "it.tref.liferay.portos.bo.model.DettPratica", + "java.lang.String", "java.lang.String", "long", "java.lang.String" }; _methodName207 = "testoAsseverazione"; _methodParameterTypes207 = new String[] { - "java.lang.String", "com.liferay.portal.model.User", "long", + "java.lang.String", "java.lang.String", + "it.tref.liferay.portos.bo.model.DettPratica", "java.lang.String" }; - _methodName209 = "addAsseverazione"; + _methodName210 = "addAsseverazione"; - _methodParameterTypes209 = new String[] { + _methodParameterTypes210 = new String[] { "long", "long", "long", "java.lang.String", "java.lang.String", "com.liferay.portal.service.ServiceContext" }; - _methodName210 = "richiediAsseverazioni"; + _methodName211 = "richiediAsseverazioni"; - _methodParameterTypes210 = new String[] { + _methodParameterTypes211 = new String[] { "long", "com.liferay.portal.service.ServiceContext" }; - _methodName211 = "resetAsseverazione"; + _methodName212 = "resetAsseverazione"; - _methodParameterTypes211 = new String[] { "long" }; + _methodParameterTypes212 = new String[] { "long" }; - _methodName212 = "annullaAsseverazioni"; + _methodName213 = "annullaAsseverazioni"; - _methodParameterTypes212 = new String[] { "long" }; + _methodParameterTypes213 = new String[] { "long" }; - _methodName213 = "cambioStatoAsseverazione"; + _methodName214 = "cambioStatoAsseverazione"; - _methodParameterTypes213 = new String[] { + _methodParameterTypes214 = new String[] { "long", "long", "java.lang.String" }; - _methodName214 = "generateReportAsseverazione"; + _methodName215 = "generateReportAsseverazione"; - _methodParameterTypes214 = new String[] { + _methodParameterTypes215 = new String[] { "it.tref.liferay.portos.bo.model.Asseverazione", "long" }; - _methodName215 = "cambioStatoAsseverazioni"; + _methodName216 = "cambioStatoAsseverazioni"; - _methodParameterTypes215 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes216 = new String[] { "long", "java.lang.String" }; - _methodName216 = "concludiAsseverazioniExpired"; + _methodName217 = "concludiAsseverazioniExpired"; - _methodParameterTypes216 = new String[] { "long" }; + _methodParameterTypes217 = new String[] { "long" }; - _methodName217 = "rimuoviFileAsseverazione"; + _methodName218 = "rimuoviFileAsseverazione"; - _methodParameterTypes217 = new String[] { "long" }; + _methodParameterTypes218 = new String[] { "long" }; - _methodName218 = "deleteAsseverazione"; + _methodName219 = "deleteAsseverazione"; - _methodParameterTypes218 = new String[] { + _methodParameterTypes219 = new String[] { "it.tref.liferay.portos.bo.model.Asseverazione" }; - _methodName219 = "deleteAsseverazione"; + _methodName220 = "deleteAsseverazione"; - _methodParameterTypes219 = new String[] { "long" }; + _methodParameterTypes220 = new String[] { "long" }; - _methodName220 = "allegaFileAsseverazione"; + _methodName221 = "allegaFileAsseverazione"; - _methodParameterTypes220 = new String[] { + _methodParameterTypes221 = new String[] { "long", "byte[][]", "java.lang.String", "com.liferay.portal.service.ServiceContext" }; - _methodName221 = "findByIntPratica"; + _methodName222 = "findByIntPratica"; - _methodParameterTypes221 = new String[] { + _methodParameterTypes222 = new String[] { "long", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName222 = "findByDettPratica"; + _methodName223 = "findByDettPratica"; - _methodParameterTypes222 = new String[] { + _methodParameterTypes223 = new String[] { "long", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName223 = "countByIntPratica"; + _methodName224 = "countByIntPratica"; - _methodParameterTypes223 = new String[] { "long" }; + _methodParameterTypes224 = new String[] { "long" }; - _methodName224 = "countByDettPratica"; + _methodName225 = "countByDettPratica"; - _methodParameterTypes224 = new String[] { "long" }; + _methodParameterTypes225 = new String[] { "long" }; - _methodName225 = "findByIntPratica_CodiceFiscale"; + _methodName226 = "findByIntPratica_CodiceFiscale"; - _methodParameterTypes225 = new String[] { + _methodParameterTypes226 = new String[] { "long", "java.lang.String", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName226 = "countByIntPratica_CodiceFiscale"; + _methodName227 = "countByIntPratica_CodiceFiscale"; - _methodParameterTypes226 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes227 = new String[] { "long", "java.lang.String" }; - _methodName227 = "findByCodiceFiscale_InEsito"; + _methodName228 = "findByCodiceFiscale_InEsito"; - _methodParameterTypes227 = new String[] { + _methodParameterTypes228 = new String[] { "java.lang.String", "java.lang.String[][]", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName228 = "countByCodiceFiscale_InEsito"; + _methodName229 = "countByCodiceFiscale_InEsito"; - _methodParameterTypes228 = new String[] { + _methodParameterTypes229 = new String[] { "java.lang.String", "java.lang.String[][]" }; - _methodName229 = "findByIntPratica_CodiceFiscale_InEsito"; + _methodName230 = "findByIntPratica_CodiceFiscale_InEsito"; - _methodParameterTypes229 = new String[] { + _methodParameterTypes230 = new String[] { "long", "java.lang.String", "java.lang.String[][]", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName230 = "findByDettPratica_CodiceFiscale_InEsito"; + _methodName231 = "findByDettPratica_CodiceFiscale_InEsito"; - _methodParameterTypes230 = new String[] { + _methodParameterTypes231 = new String[] { "long", "java.lang.String", "java.lang.String[][]", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName231 = "countByIntPratica_CodiceFiscale_InEsito"; + _methodName232 = "countByIntPratica_CodiceFiscale_InEsito"; - _methodParameterTypes231 = new String[] { + _methodParameterTypes232 = new String[] { "long", "java.lang.String", "java.lang.String[][]" }; - _methodName232 = "countByDettPratica_CodiceFiscale_InEsito"; + _methodName233 = "countByDettPratica_CodiceFiscale_InEsito"; - _methodParameterTypes232 = new String[] { + _methodParameterTypes233 = new String[] { "long", "java.lang.String", "java.lang.String[][]" }; - _methodName233 = "findByIntPratica_InEsito"; + _methodName234 = "findByIntPratica_InEsito"; - _methodParameterTypes233 = new String[] { + _methodParameterTypes234 = new String[] { "long", "java.lang.String[][]", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName234 = "countByIntPratica_InEsito"; + _methodName235 = "countByIntPratica_InEsito"; - _methodParameterTypes234 = new String[] { "long", "java.lang.String[][]" }; + _methodParameterTypes235 = new String[] { "long", "java.lang.String[][]" }; - _methodName235 = "findByDettPratica_InEsito"; + _methodName236 = "findByDettPratica_InEsito"; - _methodParameterTypes235 = new String[] { + _methodParameterTypes236 = new String[] { "long", "java.lang.String[][]", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName236 = "countByDettPratica_InEsito"; + _methodName237 = "countByDettPratica_InEsito"; - _methodParameterTypes236 = new String[] { "long", "java.lang.String[][]" }; + _methodParameterTypes237 = new String[] { "long", "java.lang.String[][]" }; - _methodName237 = "findByCodiceFiscale_Tipologia_InEsito"; + _methodName238 = "findByCodiceFiscale_Tipologia_InEsito"; - _methodParameterTypes237 = new String[] { + _methodParameterTypes238 = new String[] { "java.lang.String", "java.lang.String", "java.lang.String[][]", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName238 = "countByCodiceFiscale_Tipologia_InEsito"; + _methodName239 = "countByCodiceFiscale_Tipologia_InEsito"; - _methodParameterTypes238 = new String[] { + _methodParameterTypes239 = new String[] { "java.lang.String", "java.lang.String", "java.lang.String[][]" }; - _methodName239 = "findByIntPratica_CodiceFiscale_Tipologia_InEsito"; + _methodName240 = "findByIntPratica_CodiceFiscale_Tipologia_InEsito"; - _methodParameterTypes239 = new String[] { + _methodParameterTypes240 = new String[] { "long", "java.lang.String", "java.lang.String", "java.lang.String[][]", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName240 = "countByIntPratica_CodiceFiscale_Tipologia_InEsito"; + _methodName241 = "countByIntPratica_CodiceFiscale_Tipologia_InEsito"; - _methodParameterTypes240 = new String[] { + _methodParameterTypes241 = new String[] { "long", "java.lang.String", "java.lang.String", "java.lang.String[][]" }; - _methodName241 = "findByIntPratica_Tipologia_InEsito"; + _methodName242 = "findByIntPratica_Tipologia_InEsito"; - _methodParameterTypes241 = new String[] { + _methodParameterTypes242 = new String[] { "long", "java.lang.String", "java.lang.String[][]", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName242 = "findByDettPratica_Tipologia_InEsito"; + _methodName243 = "findByDettPratica_Tipologia_InEsito"; - _methodParameterTypes242 = new String[] { + _methodParameterTypes243 = new String[] { "long", "java.lang.String", "java.lang.String[][]", "int", "int", "com.liferay.portal.kernel.util.OrderByComparator" }; - _methodName243 = "countByIntPratica_Tipologia_InEsito"; + _methodName244 = "countByIntPratica_Tipologia_InEsito"; - _methodParameterTypes243 = new String[] { + _methodParameterTypes244 = new String[] { "long", "java.lang.String", "java.lang.String[][]" }; - _methodName244 = "countByDettPratica_Tipologia_InEsito"; + _methodName245 = "countByDettPratica_Tipologia_InEsito"; - _methodParameterTypes244 = new String[] { + _methodParameterTypes245 = new String[] { "long", "java.lang.String", "java.lang.String[][]" }; } @@ -506,27 +507,27 @@ public class AsseverazioneLocalServiceClpInvoker { if (_methodName205.equals(name) && Arrays.deepEquals(_methodParameterTypes205, parameterTypes)) { return AsseverazioneLocalServiceUtil.testoAsseverazione((java.lang.String)arguments[0], - ((Long)arguments[1]).longValue(), + (com.liferay.portal.model.User)arguments[1], ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]); } if (_methodName206.equals(name) && Arrays.deepEquals(_methodParameterTypes206, parameterTypes)) { return AsseverazioneLocalServiceUtil.testoAsseverazione((java.lang.String)arguments[0], - (com.liferay.portal.model.User)arguments[1], - (it.tref.liferay.portos.bo.model.DettPratica)arguments[2], - (java.lang.String)arguments[3]); + (java.lang.String)arguments[1], + ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]); } if (_methodName207.equals(name) && Arrays.deepEquals(_methodParameterTypes207, parameterTypes)) { return AsseverazioneLocalServiceUtil.testoAsseverazione((java.lang.String)arguments[0], - (com.liferay.portal.model.User)arguments[1], - ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]); + (java.lang.String)arguments[1], + (it.tref.liferay.portos.bo.model.DettPratica)arguments[2], + (java.lang.String)arguments[3]); } - if (_methodName209.equals(name) && - Arrays.deepEquals(_methodParameterTypes209, parameterTypes)) { + if (_methodName210.equals(name) && + Arrays.deepEquals(_methodParameterTypes210, parameterTypes)) { return AsseverazioneLocalServiceUtil.addAsseverazione(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue(), ((Long)arguments[2]).longValue(), @@ -534,92 +535,84 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.service.ServiceContext)arguments[5]); } - if (_methodName210.equals(name) && - Arrays.deepEquals(_methodParameterTypes210, parameterTypes)) { - AsseverazioneLocalServiceUtil.richiediAsseverazioni(((Long)arguments[0]).longValue(), - (com.liferay.portal.service.ServiceContext)arguments[1]); - - return null; - } - if (_methodName211.equals(name) && Arrays.deepEquals(_methodParameterTypes211, parameterTypes)) { - AsseverazioneLocalServiceUtil.resetAsseverazione(((Long)arguments[0]).longValue()); + AsseverazioneLocalServiceUtil.richiediAsseverazioni(((Long)arguments[0]).longValue(), + (com.liferay.portal.service.ServiceContext)arguments[1]); return null; } if (_methodName212.equals(name) && Arrays.deepEquals(_methodParameterTypes212, parameterTypes)) { - AsseverazioneLocalServiceUtil.annullaAsseverazioni(((Long)arguments[0]).longValue()); + AsseverazioneLocalServiceUtil.resetAsseverazione(((Long)arguments[0]).longValue()); return null; } if (_methodName213.equals(name) && Arrays.deepEquals(_methodParameterTypes213, parameterTypes)) { - AsseverazioneLocalServiceUtil.cambioStatoAsseverazione(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); + AsseverazioneLocalServiceUtil.annullaAsseverazioni(((Long)arguments[0]).longValue()); return null; } if (_methodName214.equals(name) && Arrays.deepEquals(_methodParameterTypes214, parameterTypes)) { - return AsseverazioneLocalServiceUtil.generateReportAsseverazione((it.tref.liferay.portos.bo.model.Asseverazione)arguments[0], - ((Long)arguments[1]).longValue()); + AsseverazioneLocalServiceUtil.cambioStatoAsseverazione(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); + + return null; } if (_methodName215.equals(name) && Arrays.deepEquals(_methodParameterTypes215, parameterTypes)) { - AsseverazioneLocalServiceUtil.cambioStatoAsseverazioni(((Long)arguments[0]).longValue(), - (java.lang.String)arguments[1]); - - return null; + return AsseverazioneLocalServiceUtil.generateReportAsseverazione((it.tref.liferay.portos.bo.model.Asseverazione)arguments[0], + ((Long)arguments[1]).longValue()); } if (_methodName216.equals(name) && Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) { - AsseverazioneLocalServiceUtil.concludiAsseverazioniExpired(((Long)arguments[0]).longValue()); + AsseverazioneLocalServiceUtil.cambioStatoAsseverazioni(((Long)arguments[0]).longValue(), + (java.lang.String)arguments[1]); return null; } if (_methodName217.equals(name) && Arrays.deepEquals(_methodParameterTypes217, parameterTypes)) { - AsseverazioneLocalServiceUtil.rimuoviFileAsseverazione(((Long)arguments[0]).longValue()); + AsseverazioneLocalServiceUtil.concludiAsseverazioniExpired(((Long)arguments[0]).longValue()); return null; } if (_methodName218.equals(name) && Arrays.deepEquals(_methodParameterTypes218, parameterTypes)) { - return AsseverazioneLocalServiceUtil.deleteAsseverazione((it.tref.liferay.portos.bo.model.Asseverazione)arguments[0]); + AsseverazioneLocalServiceUtil.rimuoviFileAsseverazione(((Long)arguments[0]).longValue()); + + return null; } if (_methodName219.equals(name) && Arrays.deepEquals(_methodParameterTypes219, parameterTypes)) { - return AsseverazioneLocalServiceUtil.deleteAsseverazione(((Long)arguments[0]).longValue()); + return AsseverazioneLocalServiceUtil.deleteAsseverazione((it.tref.liferay.portos.bo.model.Asseverazione)arguments[0]); } if (_methodName220.equals(name) && Arrays.deepEquals(_methodParameterTypes220, parameterTypes)) { - return AsseverazioneLocalServiceUtil.allegaFileAsseverazione(((Long)arguments[0]).longValue(), - (byte[])arguments[1], (java.lang.String)arguments[2], - (com.liferay.portal.service.ServiceContext)arguments[3]); + return AsseverazioneLocalServiceUtil.deleteAsseverazione(((Long)arguments[0]).longValue()); } if (_methodName221.equals(name) && Arrays.deepEquals(_methodParameterTypes221, parameterTypes)) { - return AsseverazioneLocalServiceUtil.findByIntPratica(((Long)arguments[0]).longValue(), - ((Integer)arguments[1]).intValue(), - ((Integer)arguments[2]).intValue(), - (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); + return AsseverazioneLocalServiceUtil.allegaFileAsseverazione(((Long)arguments[0]).longValue(), + (byte[])arguments[1], (java.lang.String)arguments[2], + (com.liferay.portal.service.ServiceContext)arguments[3]); } if (_methodName222.equals(name) && Arrays.deepEquals(_methodParameterTypes222, parameterTypes)) { - return AsseverazioneLocalServiceUtil.findByDettPratica(((Long)arguments[0]).longValue(), + return AsseverazioneLocalServiceUtil.findByIntPratica(((Long)arguments[0]).longValue(), ((Integer)arguments[1]).intValue(), ((Integer)arguments[2]).intValue(), (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); @@ -627,16 +620,24 @@ public class AsseverazioneLocalServiceClpInvoker { if (_methodName223.equals(name) && Arrays.deepEquals(_methodParameterTypes223, parameterTypes)) { - return AsseverazioneLocalServiceUtil.countByIntPratica(((Long)arguments[0]).longValue()); + return AsseverazioneLocalServiceUtil.findByDettPratica(((Long)arguments[0]).longValue(), + ((Integer)arguments[1]).intValue(), + ((Integer)arguments[2]).intValue(), + (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); } if (_methodName224.equals(name) && Arrays.deepEquals(_methodParameterTypes224, parameterTypes)) { - return AsseverazioneLocalServiceUtil.countByDettPratica(((Long)arguments[0]).longValue()); + return AsseverazioneLocalServiceUtil.countByIntPratica(((Long)arguments[0]).longValue()); } if (_methodName225.equals(name) && Arrays.deepEquals(_methodParameterTypes225, parameterTypes)) { + return AsseverazioneLocalServiceUtil.countByDettPratica(((Long)arguments[0]).longValue()); + } + + if (_methodName226.equals(name) && + Arrays.deepEquals(_methodParameterTypes226, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByIntPratica_CodiceFiscale(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], ((Integer)arguments[2]).intValue(), @@ -644,14 +645,14 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[4]); } - if (_methodName226.equals(name) && - Arrays.deepEquals(_methodParameterTypes226, parameterTypes)) { + if (_methodName227.equals(name) && + Arrays.deepEquals(_methodParameterTypes227, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByIntPratica_CodiceFiscale(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1]); } - if (_methodName227.equals(name) && - Arrays.deepEquals(_methodParameterTypes227, parameterTypes)) { + if (_methodName228.equals(name) && + Arrays.deepEquals(_methodParameterTypes228, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByCodiceFiscale_InEsito((java.lang.String)arguments[0], (java.lang.String[])arguments[1], ((Integer)arguments[2]).intValue(), @@ -659,14 +660,14 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[4]); } - if (_methodName228.equals(name) && - Arrays.deepEquals(_methodParameterTypes228, parameterTypes)) { + if (_methodName229.equals(name) && + Arrays.deepEquals(_methodParameterTypes229, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByCodiceFiscale_InEsito((java.lang.String)arguments[0], (java.lang.String[])arguments[1]); } - if (_methodName229.equals(name) && - Arrays.deepEquals(_methodParameterTypes229, parameterTypes)) { + if (_methodName230.equals(name) && + Arrays.deepEquals(_methodParameterTypes230, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByIntPratica_CodiceFiscale_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String[])arguments[2], @@ -675,8 +676,8 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); } - if (_methodName230.equals(name) && - Arrays.deepEquals(_methodParameterTypes230, parameterTypes)) { + if (_methodName231.equals(name) && + Arrays.deepEquals(_methodParameterTypes231, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByDettPratica_CodiceFiscale_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String[])arguments[2], @@ -685,20 +686,20 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); } - if (_methodName231.equals(name) && - Arrays.deepEquals(_methodParameterTypes231, parameterTypes)) { + if (_methodName232.equals(name) && + Arrays.deepEquals(_methodParameterTypes232, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByIntPratica_CodiceFiscale_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String[])arguments[2]); } - if (_methodName232.equals(name) && - Arrays.deepEquals(_methodParameterTypes232, parameterTypes)) { + if (_methodName233.equals(name) && + Arrays.deepEquals(_methodParameterTypes233, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByDettPratica_CodiceFiscale_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String[])arguments[2]); } - if (_methodName233.equals(name) && - Arrays.deepEquals(_methodParameterTypes233, parameterTypes)) { + if (_methodName234.equals(name) && + Arrays.deepEquals(_methodParameterTypes234, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByIntPratica_InEsito(((Long)arguments[0]).longValue(), (java.lang.String[])arguments[1], ((Integer)arguments[2]).intValue(), @@ -706,14 +707,14 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[4]); } - if (_methodName234.equals(name) && - Arrays.deepEquals(_methodParameterTypes234, parameterTypes)) { + if (_methodName235.equals(name) && + Arrays.deepEquals(_methodParameterTypes235, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByIntPratica_InEsito(((Long)arguments[0]).longValue(), (java.lang.String[])arguments[1]); } - if (_methodName235.equals(name) && - Arrays.deepEquals(_methodParameterTypes235, parameterTypes)) { + if (_methodName236.equals(name) && + Arrays.deepEquals(_methodParameterTypes236, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByDettPratica_InEsito(((Long)arguments[0]).longValue(), (java.lang.String[])arguments[1], ((Integer)arguments[2]).intValue(), @@ -721,14 +722,14 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[4]); } - if (_methodName236.equals(name) && - Arrays.deepEquals(_methodParameterTypes236, parameterTypes)) { + if (_methodName237.equals(name) && + Arrays.deepEquals(_methodParameterTypes237, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByDettPratica_InEsito(((Long)arguments[0]).longValue(), (java.lang.String[])arguments[1]); } - if (_methodName237.equals(name) && - Arrays.deepEquals(_methodParameterTypes237, parameterTypes)) { + if (_methodName238.equals(name) && + Arrays.deepEquals(_methodParameterTypes238, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByCodiceFiscale_Tipologia_InEsito((java.lang.String)arguments[0], (java.lang.String)arguments[1], (java.lang.String[])arguments[2], @@ -737,14 +738,14 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); } - if (_methodName238.equals(name) && - Arrays.deepEquals(_methodParameterTypes238, parameterTypes)) { + if (_methodName239.equals(name) && + Arrays.deepEquals(_methodParameterTypes239, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByCodiceFiscale_Tipologia_InEsito((java.lang.String)arguments[0], (java.lang.String)arguments[1], (java.lang.String[])arguments[2]); } - if (_methodName239.equals(name) && - Arrays.deepEquals(_methodParameterTypes239, parameterTypes)) { + if (_methodName240.equals(name) && + Arrays.deepEquals(_methodParameterTypes240, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByIntPratica_CodiceFiscale_Tipologia_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String)arguments[2], (java.lang.String[])arguments[3], @@ -753,15 +754,15 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[6]); } - if (_methodName240.equals(name) && - Arrays.deepEquals(_methodParameterTypes240, parameterTypes)) { + if (_methodName241.equals(name) && + Arrays.deepEquals(_methodParameterTypes241, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByIntPratica_CodiceFiscale_Tipologia_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String)arguments[2], (java.lang.String[])arguments[3]); } - if (_methodName241.equals(name) && - Arrays.deepEquals(_methodParameterTypes241, parameterTypes)) { + if (_methodName242.equals(name) && + Arrays.deepEquals(_methodParameterTypes242, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByIntPratica_Tipologia_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String[])arguments[2], @@ -770,8 +771,8 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); } - if (_methodName242.equals(name) && - Arrays.deepEquals(_methodParameterTypes242, parameterTypes)) { + if (_methodName243.equals(name) && + Arrays.deepEquals(_methodParameterTypes243, parameterTypes)) { return AsseverazioneLocalServiceUtil.findByDettPratica_Tipologia_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String[])arguments[2], @@ -780,14 +781,14 @@ public class AsseverazioneLocalServiceClpInvoker { (com.liferay.portal.kernel.util.OrderByComparator)arguments[5]); } - if (_methodName243.equals(name) && - Arrays.deepEquals(_methodParameterTypes243, parameterTypes)) { + if (_methodName244.equals(name) && + Arrays.deepEquals(_methodParameterTypes244, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByIntPratica_Tipologia_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String[])arguments[2]); } - if (_methodName244.equals(name) && - Arrays.deepEquals(_methodParameterTypes244, parameterTypes)) { + if (_methodName245.equals(name) && + Arrays.deepEquals(_methodParameterTypes245, parameterTypes)) { return AsseverazioneLocalServiceUtil.countByDettPratica_Tipologia_InEsito(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String[])arguments[2]); } @@ -847,8 +848,6 @@ public class AsseverazioneLocalServiceClpInvoker { private String[] _methodParameterTypes206; private String _methodName207; private String[] _methodParameterTypes207; - private String _methodName209; - private String[] _methodParameterTypes209; private String _methodName210; private String[] _methodParameterTypes210; private String _methodName211; @@ -919,4 +918,6 @@ public class AsseverazioneLocalServiceClpInvoker { private String[] _methodParameterTypes243; private String _methodName244; private String[] _methodParameterTypes244; + private String _methodName245; + private String[] _methodParameterTypes245; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java index 18aa73c4..8c7dfedb 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java @@ -400,13 +400,19 @@ public class IntPraticaLocalServiceClpInvoker { _methodParameterTypes266 = new String[] { }; - _methodName267 = "reIndexFasciolo"; + _methodName267 = "reIndexFascicolo"; - _methodParameterTypes267 = new String[] { "java.lang.String", "long" }; + _methodParameterTypes267 = new String[] { + "it.tref.liferay.portos.bo.model.IntPratica", "long" + }; _methodName268 = "reIndexFasciolo"; - _methodParameterTypes268 = new String[] { "long", "long" }; + _methodParameterTypes268 = new String[] { "java.lang.String", "long" }; + + _methodName269 = "reIndexFasciolo"; + + _methodParameterTypes269 = new String[] { "long", "long" }; _methodName270 = "trovaDoppioni"; @@ -945,7 +951,7 @@ public class IntPraticaLocalServiceClpInvoker { if (_methodName267.equals(name) && Arrays.deepEquals(_methodParameterTypes267, parameterTypes)) { - IntPraticaLocalServiceUtil.reIndexFasciolo((java.lang.String)arguments[0], + IntPraticaLocalServiceUtil.reIndexFascicolo((it.tref.liferay.portos.bo.model.IntPratica)arguments[0], ((Long)arguments[1]).longValue()); return null; @@ -953,6 +959,14 @@ public class IntPraticaLocalServiceClpInvoker { if (_methodName268.equals(name) && Arrays.deepEquals(_methodParameterTypes268, parameterTypes)) { + IntPraticaLocalServiceUtil.reIndexFasciolo((java.lang.String)arguments[0], + ((Long)arguments[1]).longValue()); + + return null; + } + + if (_methodName269.equals(name) && + Arrays.deepEquals(_methodParameterTypes269, parameterTypes)) { IntPraticaLocalServiceUtil.reIndexFasciolo(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue()); @@ -1177,6 +1191,8 @@ public class IntPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes267; private String _methodName268; private String[] _methodParameterTypes268; + private String _methodName269; + private String[] _methodParameterTypes269; private String _methodName270; private String[] _methodParameterTypes270; private String _methodName271; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java index e14d6257..7203a4f6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java @@ -99,29 +99,50 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase public String anteprimaAsseverazione(String tipo, User user, DettPratica dettPratica, String relazioni) throws IOException, SystemException, PortalException { - return testoAsseverazione(tipo, user, dettPratica, relazioni, true); - } - - public String testoAsseverazione(String tipo, long userId, long dettPraticaId, String relazioni) - throws SystemException, IOException, PortalException { - DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(dettPraticaId); - User user = UserLocalServiceUtil.fetchUser(userId); - return testoAsseverazione(tipo, user, dettPratica, relazioni); - } - - public String testoAsseverazione(String tipo, User user, DettPratica dettPratica, String relazioni) - throws IOException, SystemException, PortalException { - return testoAsseverazione(tipo, user, dettPratica, relazioni, false); + return testoAsseverazione(tipo, user.getScreenName(), dettPratica, relazioni, true); } public String testoAsseverazione(String tipo, User user, long dettPraticaId, String relazioni) - throws IOException, SystemException, PortalException { - DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(dettPraticaId); - return testoAsseverazione(tipo, user, dettPratica, relazioni, false); + throws SystemException, PortalException, IOException { + return testoAsseverazione(tipo, user.getScreenName(), dettPraticaId, relazioni); + } + + public String testoAsseverazione(String tipo, String codiceFiscale, long dettPraticaId, String relazioni) + throws PortalException, SystemException, IOException { + DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); + return testoAsseverazione(tipo, codiceFiscale, dettPratica, relazioni); + } + + public String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica, + String relazioni) throws SystemException, PortalException, IOException { + return testoAsseverazione(tipo, codiceFiscale, dettPratica, relazioni, false); + } + + private String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica, + String relazioni, boolean anteprima) throws SystemException, PortalException, IOException { + List soggetti = SoggettoLocalServiceUtil.getValidTmpByIntPratica_CodiceFiscale( + dettPratica.getIntPraticaId(), codiceFiscale, 0L); + if (soggetti.size() > 0) { + Soggetto soggetto = soggetti.get(0); + String nome = Validator.isNull(soggetto.getCognome()) ? soggetto.getLegaleRap() : soggetto + .getNome(); + String cognome = Validator.isNull(soggetto.getCognome()) ? StringPool.BLANK : soggetto + .getCognome(); + _log.info(soggetto.getNome() + "|" + soggetto.getCognome() + "|" + soggetto.getLegaleRap()); + return testoAsseverazione(tipo, nome, cognome, codiceFiscale, soggetto.getAmbitoProfessione(), + dettPratica, relazioni, false); + } + User user = UserLocalServiceUtil.fetchUserByScreenName(dettPratica.getCompanyId(), codiceFiscale); + if (Validator.isNotNull(user)) { + return testoAsseverazione(tipo, user.getFirstName(), user.getLastName(), user.getScreenName(), + StringPool.BLANK, dettPratica, relazioni, anteprima); + } + return null; } - private String testoAsseverazione(String tipo, User user, DettPratica dettPratica, String relazioni, - boolean anteprima) throws IOException, SystemException, PortalException { + private String testoAsseverazione(String tipo, String nome, String cognome, String codiceFiscale, + String ambitoProfessione, DettPratica dettPratica, String relazioni, boolean anteprima) + throws IOException, SystemException, PortalException { String file = null; switch (tipo) { @@ -141,14 +162,9 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase file = "geologo"; break; case TipoSoggettoUtil.PROGETTISTA: - Soggetto soggetto = SoggettoLocalServiceUtil - .getValidByIntPratica_CodiceFiscale_TipologiaSoggetto(dettPratica.getIntPraticaId(), - user.getScreenName(), tipo); - switch (soggetto.getAmbitoProfessione()) { - case "architettonico": + if (ambitoProfessione.equalsIgnoreCase("architettonico")) { file = "progettista_architettonico"; - break; - default: + } else { file = "calcolista"; } break; @@ -179,9 +195,6 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase .equals("5")); boolean coniugio = Validator.isNotNull(relazioni); - if (relazioni == null) { - relazioni = ""; - } IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); @@ -225,17 +238,22 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase String html = buffer.toString().replaceAll("##anteprima(.*?)##", anteprima ? "" : "$1") .replaceAll("##lavoripubblici(.*?)##", dettPratica.getLavoriPubblici() ? "" : "$1") .replace("{{agalto}}", agAlto ? "X" : " ").replace("{{agmedio}}", agMedio ? "X" : " ") - .replace("{{agricoli}}", agricoli ? "X" : " ") - .replace("{{codicefiscale}}", user.getScreenName()) - .replace("{{cognome}}", user.getLastName()).replace("{{complesse}}", complesse ? "X" : " ") - .replace("{{coniugio}}", coniugio ? "X" : " ").replace("{{!coniugio}}", coniugio ? " " : "X") - .replace("{{nome}}", user.getFirstName()).replace("{{nuove}}", nuove ? "X" : " ") - .replace("{{relazioni}}", relazioni.trim().replace("\n", ", ")) + .replace("{{agricoli}}", agricoli ? "X" : " ").replace("{{codicefiscale}}", codiceFiscale) + .replace("{{cognome}}", cognome).replace("{{complesse}}", complesse ? "X" : " ") + .replace("{{nome}}", nome).replace("{{nuove}}", nuove ? "X" : " ") .replace("{{rilevanti}}", rilevanti ? "X" : " ") .replace("{{nonrilevanti}}", nonRilevanti ? "X" : " ") .replace("{{riparazioni}}", riparazioni ? "X" : " ") .replace("{{rischio}}", rischio ? "X" : " ").replace("{{!rischio}}", rischio ? " " : "X") .replace("{{strategico}}", strategico ? "X" : " "); + if (null == relazioni) { + html = html.replace("{{coniugio}}", " ").replace("{{!coniugio}}", " ") + .replace("{{relazioni}}", ""); + } else { + html = html.replace("{{coniugio}}", coniugio ? "X" : " ") + .replace("{{!coniugio}}", coniugio ? " " : "X") + .replace("{{relazioni}}", relazioni.trim().replace("\n", ", ")); + } return html; } @@ -422,7 +440,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase String tipoDocumento = "AS"; String propertiesTemplate = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(tipoDocumento); - _log.info("debugAvviso: " + propertiesTemplate); + long fileEntryIdTemplate = configurazioneLocalService.findByC_ChiaveLong( asseverazione.getCompanyId(), propertiesTemplate); String propertiesFolder = AvvisoUtil.getAllTipoDocumentoFolderProps().get(tipoDocumento); @@ -446,15 +464,20 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase reportDto.setFooterHeight(40); Map parameters = new HashMap(); - String relazioni = ""; + String relazioni = null; Map dichiarazioniMap = asseverazione.getDichiarazioniMap(); - if (dichiarazioniMap.containsKey("coniugio") && ((Boolean) dichiarazioniMap.get("coniugio")) - && dichiarazioniMap.containsKey("relazioni")) { - relazioni = (String) dichiarazioniMap.get("relazioni"); + if (dichiarazioniMap.containsKey("coniugio")) { + if ((Boolean) dichiarazioniMap.get("coniugio")) { + if (dichiarazioniMap.containsKey("relazioni")) { + relazioni = (String) dichiarazioniMap.get("relazioni"); + } + } else { + relazioni = ""; + } } - String testoAsseverazione = testoAsseverazione(asseverazione.getTipologia(), userId, - asseverazione.getDettPraticaId(), relazioni); + String testoAsseverazione = testoAsseverazione(asseverazione.getTipologia(), + asseverazione.getCodiceFiscale(), asseverazione.getDettPraticaId(), relazioni); if (Validator.isNull(testoAsseverazione)) { testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(asseverazione, asseverazione.getCodiceFiscale()); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java index 87f8e9f7..d69d98c8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java @@ -1629,8 +1629,8 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl return dettPratica; } - public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, String stato) - throws IOException, SystemException, PortalException { + public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, String stato) throws IOException, + SystemException, PortalException { updateEsitoPagamento(pagamentoId, dettPraticaId, 0l, stato); } @@ -2489,7 +2489,6 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl /** * ADT: nuovo metodo per stampa fascicolo * - * * @param intPraticaId * @return * @throws SystemException diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java index 3b108d9a..b40cecb4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java @@ -1753,18 +1753,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { return IntPraticaFinderUtil.riparaWorkflow(); } - public void reIndexFasciolo(String numeroProgetto, long companyId) throws SystemException { - IntPratica intPratica = null; - intPratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto); - reIndexFasciolo(intPratica, companyId); - } - - public void reIndexFasciolo(long intPraticaId, long companyId) throws PortalException, SystemException { - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); - reIndexFasciolo(intPratica, companyId); - } - - void reIndexFasciolo(IntPratica intPratica, long companyId) { + public void reIndexFascicolo(IntPratica intPratica, long companyId) { try { Indexer intIndexer = IndexerRegistryUtil.getIndexer(IntPratica.class); @@ -1795,6 +1784,17 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { } + public void reIndexFasciolo(String numeroProgetto, long companyId) throws SystemException { + IntPratica intPratica = null; + intPratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto); + reIndexFascicolo(intPratica, companyId); + } + + public void reIndexFasciolo(long intPraticaId, long companyId) throws PortalException, SystemException { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); + reIndexFascicolo(intPratica, companyId); + } + public List trovaDoppioni() throws SystemException { return IntPraticaFinderUtil.trovaDoppioni(); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java index 0ef8d7f4..b0d64d8e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java @@ -1263,17 +1263,9 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl { Soggetto soggetto = soggettoPersistence.findByPrimaryKey(soggettoId); - soggetto.setDettPraticaIdRimozione(dettPraticaIdRimozione); // setto - // solo il - // dettPraticaRimozione. - // La - // rimozione - // diventa - // definitiva - // al - // completamento - // della - // variante + // setto solo il dettPraticaRimozione. La rimozione diventa definitiva + // al completamento della variante + soggetto.setDettPraticaIdRimozione(dettPraticaIdRimozione); if (SoggettiUtil.isSoggettoPrincipale(soggetto.getSoggettoId(), dettPraticaIdRimozione)) { updatePrincipale(dettPraticaIdRimozione, StringPool.BLANK, soggetto.getTipologiaSoggetto()); } 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 e63850d2..1021ae64 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=2343 - build.date=1593005074944 + build.number=2384 + build.date=1594644517341 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 d9469d8a..20a9e651 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 @@ -176,7 +176,7 @@ List organizationList = OrganizationLocalServiceUtil.getUserOrgani
+ class="col-sm-12 col-md-3 add-new-project__ufficio"> @@ -195,17 +195,25 @@ List organizationList = OrganizationLocalServiceUtil.getUserOrgani
-
+
<% String comuneSelect = ParamUtil.getString(renderRequest, "comune"); %>
+
+ + Tutte + Procedura A + Procedura B + Procedura C + +
- + Tutte Assegnazione Approvazione diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/altri_task.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/altri_task.jsp index a0e2676e..2c954f7b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/altri_task.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/altri_task.jsp @@ -23,6 +23,7 @@ String ordinaPer = ParamUtil.getString(request, "ordinaPer", StringPool.BLANK); String ordinaTipo = ParamUtil.getString(request, "ordinaTipo", StringPool.BLANK); String comuneSearch = ParamUtil.getString(request, "comune", StringPool.BLANK); String tipoAttivita = ParamUtil.getString(request, "tipoAttivita", StringPool.BLANK); +String tipoProcedura = ParamUtil.getString(request, "tipoProcedura", StringPool.BLANK); iteratorURL.setParameter("numeroProgetto", numeroProgetto); iteratorURL.setParameter("protocollo", protocollo); @@ -37,6 +38,7 @@ iteratorURL.setParameter("dataRichiestaFine", dataRichiestaFine); iteratorURL.setParameter("ufficio", ufficio); iteratorURL.setParameter("comune", comuneSearch); iteratorURL.setParameter("tipoAttivita", tipoAttivita); +iteratorURL.setParameter("tipoProcedura", tipoProcedura); iteratorURL.setParameter("ordinaPer", ordinaPer); iteratorURL.setParameter("ordinaTipo", ordinaTipo); @@ -65,6 +67,7 @@ request.setAttribute("tabs1", "Tab_AtriTask"); + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/miei_task.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/miei_task.jsp index b913f3e4..5e8d4f09 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/miei_task.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/miei_task.jsp @@ -5,9 +5,10 @@ <%@page import="com.liferay.portal.kernel.search.Hits"%> <%@page import="com.liferay.portal.kernel.search.Document"%> <%@page import="java.util.ArrayList"%> -<%@ include file="/html/gestioneattivita/init.jsp" %> +<%@ include file="/html/gestioneattivita/init.jsp"%> <% + boolean doSearch = true; PortletURL iteratorURL = liferayPortletResponse.createRenderURL(); @@ -25,6 +26,7 @@ String ordinaPer = ParamUtil.getString(request, "ordinaPer", StringPool.BLANK); String ordinaTipo = ParamUtil.getString(request, "ordinaTipo", StringPool.BLANK); String comuneSearch = ParamUtil.getString(request, "comune", StringPool.BLANK); String tipoAttivita = ParamUtil.getString(request, "tipoAttivita", StringPool.BLANK); +String tipoProcedura = ParamUtil.getString(request, "tipoProcedura", StringPool.BLANK); iteratorURL.setParameter("numeroProgetto", numeroProgetto); iteratorURL.setParameter("protocollo", protocollo); @@ -39,6 +41,7 @@ iteratorURL.setParameter("dataRichiestaFine", dataRichiestaFine); iteratorURL.setParameter("ufficio", ufficio); iteratorURL.setParameter("comune", comuneSearch); iteratorURL.setParameter("tipoAttivita", tipoAttivita); +iteratorURL.setParameter("tipoProcedura", tipoProcedura); iteratorURL.setParameter("ordinaPer", ordinaPer); iteratorURL.setParameter("ordinaTipo", ordinaTipo); @@ -52,7 +55,6 @@ String keywords = StringPool.BLANK; request.setAttribute("tabs1", "Tab_MieiTask"); %> - @@ -63,11 +65,11 @@ request.setAttribute("tabs1", "Tab_MieiTask"); - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/task_completati.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/task_completati.jsp index 91c323e3..39e0b628 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/task_completati.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/task_completati.jsp @@ -22,6 +22,7 @@ String ordinaPer = ParamUtil.getString(request, "ordinaPer", StringPool.BLANK); String ordinaTipo = ParamUtil.getString(request, "ordinaTipo", StringPool.BLANK); String comuneSearch = ParamUtil.getString(request, "comune", StringPool.BLANK); String tipoAttivita = ParamUtil.getString(request, "tipoAttivita", StringPool.BLANK); +String tipoProcedura = ParamUtil.getString(request, "tipoProcedura", StringPool.BLANK); iteratorURL.setParameter("numeroProgetto", numeroProgetto); iteratorURL.setParameter("protocollo", protocollo); @@ -36,6 +37,7 @@ iteratorURL.setParameter("dataRichiestaFine", dataRichiestaFine); iteratorURL.setParameter("ufficio", ufficio); iteratorURL.setParameter("comune", comuneSearch); iteratorURL.setParameter("tipoAttivita", tipoAttivita); +iteratorURL.setParameter("tipoProcedura", tipoProcedura); iteratorURL.setParameter("ordinaPer", ordinaPer); iteratorURL.setParameter("ordinaTipo", ordinaTipo); @@ -64,6 +66,7 @@ request.setAttribute("tabs1", "Tab_TaskCompletati"); + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/task_miei_ruoli.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/task_miei_ruoli.jsp index c16077f4..c7a3fc61 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/task_miei_ruoli.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/task_miei_ruoli.jsp @@ -25,6 +25,7 @@ String ordinaPer = ParamUtil.getString(request, "ordinaPer", StringPool.BLANK); String ordinaTipo = ParamUtil.getString(request, "ordinaTipo", StringPool.BLANK); String comuneSearch = ParamUtil.getString(request, "comune", StringPool.BLANK); String tipoAttivita = ParamUtil.getString(request, "tipoAttivita", StringPool.BLANK); +String tipoProcedura = ParamUtil.getString(request, "tipoProcedura", StringPool.BLANK); iteratorURL.setParameter("numeroProgetto", numeroProgetto); iteratorURL.setParameter("protocollo", protocollo); @@ -39,6 +40,7 @@ iteratorURL.setParameter("dataRichiestaFine", dataRichiestaFine); iteratorURL.setParameter("ufficio", ufficio); iteratorURL.setParameter("comune", comuneSearch); iteratorURL.setParameter("tipoAttivita", tipoAttivita); +iteratorURL.setParameter("tipoProcedura", tipoProcedura); iteratorURL.setParameter("ordinaPer", ordinaPer); iteratorURL.setParameter("ordinaTipo", ordinaTipo); @@ -69,6 +71,7 @@ request.setAttribute("tabs1", "Tab_TaskMieiRuoli"); + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf index f88cb7c7..59b651c0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf @@ -161,16 +161,19 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP } %> <%= intPratica.getTitle(locale, true) %> + <%= Validator.isNull(intPratica.getTipoProcedura()) ? + "" : + "
Procedura " + intPratica.getTipoProcedura() + "" %> <% User tecnico = UserLocalServiceUtil.fetchUser(intPratica.getStatusByUserId()); - if(tecnico!=null){ - out.print(tecnico.getFullName()); - }else{ - out.print( " ["+intPratica.getStatusByUserId()+"]"); + if (tecnico != null) { + out.print(tecnico.getFullName()); + } else { + out.print(" [" + intPratica.getStatusByUserId() + "]"); } %> 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 f7932440..7cf18059 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 @@ -90,7 +90,7 @@ String dataProssimoSorteggio = - +
Test interno
@@ -101,10 +101,10 @@ String dataProssimoSorteggio =
-
Ripara Workflow
- +
Invia comunicazione
+
- +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/content/Language.properties b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/content/Language.properties index 0062c721..10522753 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/content/Language.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/content/Language.properties @@ -99,11 +99,6 @@ no-deleghe-archivio = Nessuna Delega in Archivio label-documenti-tipologia-AI = Allegati obbligatori annullamento -tipo_procedura_a = A - Interventi “rilevanti” da realizzare previo rilascio di autorizzazione ai sensi dell'art. 94 D.P.R. 380/01 D.D.G. 344/20 all. A - lettera A
A - varianti da realizzare su autorizzazione, per pratiche cartacee già acquisite dagli Uffici del Genio Civile -tipo_procedura_b = B - Interventi di “minore rilevanza” D.D.G. 344/20 all. A - lettera B -tipo_procedura_b1 = B1 - Interventi di “minore rilevanza” zone 1-2 ed interventi in abitati da consolidare, art.61 (zone 3-4) -tipo_procedura_c = C - Interventi “privi di rilevanza“ D.D.G. 344/20 all. A - lett. C - persona-responsabile-compilazione-sezione=Responsabile della compilazione di questa sezione persone-responsabili-compilazione-sezione=Responsabili della compilazione di questa sezione diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp index e46ea9ce..68bfc72a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp @@ -28,13 +28,13 @@
- - + + - -<%-- --%> - + +<%-- --%> +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp index cd7b8a51..506555b6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp @@ -49,6 +49,8 @@ && TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equals(dettPratica.getTipoIntegrazione()); boolean isNewVariante = ParamUtil.getBoolean(request, "isNewVariante"); + + String displayStyle = proceduraC ? "display:none" : ""; %> @@ -102,7 +104,7 @@
@@ -149,26 +151,26 @@ label="norm-lavori-in-proprio"/> -
+
-
+
-
+
-
+
-
+
@@ -197,7 +199,7 @@
-
+
@@ -589,7 +591,7 @@
-
+