diff --git a/jasper/cambio_istruttore.jrxml b/jasper/cambio_istruttore.jrxml index 0830550f..6666ca00 100644 --- a/jasper/cambio_istruttore.jrxml +++ b/jasper/cambio_istruttore.jrxml @@ -11,6 +11,7 @@ + @@ -72,7 +73,7 @@ e dell'identità siciliana]]> - + @@ -101,40 +102,6 @@ e dell'identità siciliana]]> - - - - - - - - - - - - - - @@ -142,13 +109,6 @@ e dell'identità siciliana]]> - - - - - - Si comunica inoltre che i termini del procedimento non subiscono variazioni."]]> - @@ -158,15 +118,6 @@ e dell'identità siciliana]]> - - - - - - - - - @@ -176,24 +127,6 @@ e dell'identità siciliana]]> - - - - - - - - - - - - - - - - - - @@ -212,8 +145,8 @@ e dell'identità siciliana]]> - - + + @@ -248,15 +181,6 @@ e dell'identità siciliana]]> - - - - - - - - - @@ -276,7 +200,7 @@ e dell'identità siciliana]]> - + @@ -286,7 +210,7 @@ e dell'identità siciliana]]> - + @@ -295,46 +219,121 @@ e dell'identità siciliana]]> + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + - + + + - + - + + + + - + + + + + + + + + + + Si comunica inoltre che i termini del procedimento non subiscono variazioni."]]> + + + + + + + + + + + + - + - + @@ -360,8 +359,8 @@ Responsabili del trattamento, definito all’articolo 4, n.8 del GDPR - Regolame - + 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 2acf1ee6..24e5fc53 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 @@ -380,7 +380,7 @@ public interface IntPraticaLocalService extends BaseLocalService, com.liferay.portal.kernel.exception.SystemException; public it.tref.liferay.portos.bo.model.IntPratica updateStatoPratica( - long intPraticaId, long dettPraticaId, java.lang.String statoPratica) + long intPraticaId, java.lang.String statoPratica) 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/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 ceeacbae..d95af152 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 @@ -199,9 +199,7 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { _methodName35 = "updateStatoPratica"; - _methodParameterTypes35 = new String[] { - "long", "long", "java.lang.String" - }; + _methodParameterTypes35 = new String[] { "long", "java.lang.String" }; _methodName36 = "updateIntPraticaSorteggio"; @@ -1613,7 +1611,7 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { @Override public it.tref.liferay.portos.bo.model.IntPratica updateStatoPratica( - long intPraticaId, long dettPraticaId, java.lang.String statoPratica) + long intPraticaId, java.lang.String statoPratica) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { Object returnObj = null; @@ -1624,8 +1622,6 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { new Object[] { intPraticaId, - dettPraticaId, - ClpSerializer.translateInput(statoPratica) }); } 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 2a004ff5..d1565210 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 @@ -437,11 +437,10 @@ public class IntPraticaLocalServiceUtil { } public static it.tref.liferay.portos.bo.model.IntPratica updateStatoPratica( - long intPraticaId, long dettPraticaId, java.lang.String statoPratica) + long intPraticaId, java.lang.String statoPratica) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { - return getService() - .updateStatoPratica(intPraticaId, dettPraticaId, statoPratica); + return getService().updateStatoPratica(intPraticaId, statoPratica); } public static it.tref.liferay.portos.bo.model.IntPratica updateIntPraticaSorteggio( 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 4ae77c73..f6177fdc 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 @@ -470,11 +470,11 @@ public class IntPraticaLocalServiceWrapper implements IntPraticaLocalService, @Override public it.tref.liferay.portos.bo.model.IntPratica updateStatoPratica( - long intPraticaId, long dettPraticaId, java.lang.String statoPratica) + long intPraticaId, java.lang.String statoPratica) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { return _intPraticaLocalService.updateStatoPratica(intPraticaId, - dettPraticaId, statoPratica); + statoPratica); } @Override diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java index 0226cd47..2b33509a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java @@ -28,6 +28,8 @@ import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.language.LanguageUtil; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.LocaleUtil; import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.Validator; @@ -45,6 +47,8 @@ public class AsseverazioniUtil { public final static String ASSEVERAZIONE_DA_APPLICATIVO = "AP"; public final static String ASSEVERAZIONE_DA_ALLEGATO = "AL"; + private static final Log _log = LogFactoryUtil.getLog(AsseverazioniUtil.class); + public static boolean hasAsseverazioniAttive(long dettPraticaId) throws SystemException { return AsseverazioneLocalServiceUtil.countByDettPratica_InEsito(dettPraticaId, new String[] { @@ -256,13 +260,6 @@ public class AsseverazioniUtil { return false; } - public static List getRequiredSubjectsByCodiceDoc(String codiceDoc) { - if (required.containsKey(codiceDoc)) { - return required.get(codiceDoc); - } - return Collections.emptyList(); - } - public static boolean allAsseverazioniCompleted(long dettPraticaId) throws SystemException, PortalException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java index 5528bfef..e0afb57e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java @@ -10,6 +10,7 @@ import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -63,38 +64,71 @@ public class AzioniPraticheUtil { }; @SuppressWarnings("serial") - public static Map> STATE_ACTIONS_MAP = new HashMap>() { + private static Map> STATE_ACTIONS_MAP = new HashMap>() { { put(STATE_VIDIMATO, ALL_ACTIONS); - put(STATE_SOTTOPOSTO_A_PARERE_AUTORIZZAZIONE, - ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, - ACTION_VARIAZIONE_SOGGETTI, ACTION_ANNULLA })); + put(STATE_SOTTOPOSTO_A_PARERE_AUTORIZZAZIONE, new ArrayList() { + { + add(ACTION_AGGIUNGI_SOGGETTO); + add(ACTION_RIMUOVI_SOGGETTO); + add(ACTION_VARIAZIONE_SOGGETTI); + add(ACTION_ANNULLA); + } + }); put(STATE_SOTTOPOSTO_A_PARERE_DEPOSITO, ALL_ACTIONS); - put(STATE_ANNULLATO, new ArrayList()); - put(STATE_NON_CONFORME, new ArrayList()); - put(NON_AUTORIZZATA, new ArrayList()); - put(STATE_INTEGRAZIONE_AUTORIZZAZIONE, - ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, - ACTION_INTEGRAZIONE, ACTION_ANNULLA })); - put(STATE_INTEGRAZIONE_DEPOSITO, - ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, - ACTION_INTEGRAZIONE, - // ACTION_ANNULLA, ACTION_FL_PARZIALE, - // ACTION_FL_TOTALE, ACTION_CO_PARZIALE, - // ACTION_CO_TOTALE})); - ACTION_ANNULLA })); - put(STATE_COMPILAZIONE, - ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, - ACTION_ANNULLA })); - put(STATE_FINE_LAVORI_PARZIALE, - ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, - ACTION_VARIANTE, ACTION_FL_PARZIALE, ACTION_FL_TOTALE, ACTION_CO_PARZIALE })); - put(STATE_FINE_LAVORI_TOTALE, - ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, - ACTION_CO_TOTALE, ACTION_CO_PARZIALE })); - put(STATE_COLLAUDO_PARZIALE, - ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, - ACTION_VARIANTE, ACTION_CO_PARZIALE, ACTION_CO_TOTALE })); + put(STATE_ANNULLATO, Collections. emptyList()); + put(STATE_NON_CONFORME, Collections. emptyList()); + put(NON_AUTORIZZATA, Collections. emptyList()); + put(STATE_INTEGRAZIONE_AUTORIZZAZIONE, new ArrayList() { + { + add(ACTION_AGGIUNGI_SOGGETTO); + add(ACTION_RIMUOVI_SOGGETTO); + add(ACTION_INTEGRAZIONE); + add(ACTION_ANNULLA); + } + }); + put(STATE_INTEGRAZIONE_DEPOSITO, new ArrayList() { + { + add(ACTION_AGGIUNGI_SOGGETTO); + add(ACTION_RIMUOVI_SOGGETTO); + add(ACTION_INTEGRAZIONE); + add(ACTION_ANNULLA); + } + }); + put(STATE_COMPILAZIONE, new ArrayList() { + { + add(ACTION_AGGIUNGI_SOGGETTO); + add(ACTION_RIMUOVI_SOGGETTO); + add(ACTION_ANNULLA); + } + }); + put(STATE_FINE_LAVORI_PARZIALE, new ArrayList() { + { + add(ACTION_AGGIUNGI_SOGGETTO); + add(ACTION_RIMUOVI_SOGGETTO); + add(ACTION_VARIANTE); + add(ACTION_FL_PARZIALE); + add(ACTION_FL_TOTALE); + add(ACTION_CO_PARZIALE); + } + }); + put(STATE_FINE_LAVORI_TOTALE, new ArrayList() { + { + add(ACTION_AGGIUNGI_SOGGETTO); + add(ACTION_RIMUOVI_SOGGETTO); + add(ACTION_CO_TOTALE); + add(ACTION_CO_PARZIALE); + } + }); + put(STATE_COLLAUDO_PARZIALE, new ArrayList() { + { + add(ACTION_AGGIUNGI_SOGGETTO); + add(ACTION_RIMUOVI_SOGGETTO); + add(ACTION_VARIANTE); + add(ACTION_CO_PARZIALE); + add(ACTION_CO_TOTALE); + } + }); } }; @@ -154,11 +188,7 @@ public class AzioniPraticheUtil { } List actionList = STATE_ACTIONS_MAP.get(status); - if (actionList == null) { - actionList = new ArrayList<>(); - - } - if (!actionList.contains(action)) { + if ((actionList == null) || !actionList.contains(action)) { return false; } @@ -281,6 +311,5 @@ public class AzioniPraticheUtil { } else { return false; } - } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java index 937631ae..a1405ea2 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java @@ -12,11 +12,15 @@ import org.apache.commons.lang.StringUtils; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.Validator; public class PraticaUtil { + private static final Log _log = LogFactoryUtil.getLog(PraticaUtil.class); + public static String getFolderName(long dettPraticaId) { return StringUtils.leftPad(String.valueOf(dettPraticaId), 10, '0') + StringPool.UNDERLINE @@ -132,23 +136,23 @@ public class PraticaUtil { return hiddens; } - public static String getStatoPraticaLabel(String statoPratica, IntPratica intPratica) + public static String getStatoPraticaLabel(String statoPratica, long intPraticaId) throws PortalException, SystemException { String statoPraticaLabel = StringPool.BLANK; switch (statoPratica) { case StatoPraticaConstants.CONFORME: - if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { + if (AzioniPraticheUtil.isDeposito(intPraticaId)) { statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.CONFORME); - } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { + } else if (AzioniPraticheUtil.isAutorizzazione(intPraticaId)) { statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.AUTORIZZATA); } break; case StatoPraticaConstants.NON_CONFORME: - if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { + if (AzioniPraticheUtil.isDeposito(intPraticaId)) { statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.NON_CONFORME); - } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { + } else if (AzioniPraticheUtil.isAutorizzazione(intPraticaId)) { statoPraticaLabel = StatoPraticaConstants .getStatusLabel(StatoPraticaConstants.NON_AUTORIZZATA); } 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 831ec755..00ac19ba 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 @@ -29,9 +29,11 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Set; import javax.servlet.http.HttpServletResponse; @@ -55,7 +57,6 @@ import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.LocaleUtil; import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.UniqueList; import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.workflow.WorkflowConstants; import com.liferay.portal.model.Company; @@ -865,19 +866,18 @@ public class ValidazionePraticaUtil { List tipologie) throws SystemException, PortalException { List notCompleted = new ArrayList<>(); - List soggetti = SoggettoLocalServiceUtil.getValidTmpByDettPratica(dettPratica - .getDettPraticaId()); + List soggetti = SoggettoLocalServiceUtil.getValidTmpByIntPratica(intPratica + .getIntPraticaId()); String cfTitolare = intPratica.getUserName(); long intPraticaId = intPratica.getIntPraticaId(); for (String tipologia : tipologie) { List docs = DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia( intPraticaId, tipologia, QueryUtil.ALL_POS, QueryUtil.ALL_POS); - List firmeMancanti = new UniqueList<>(); + Set firmeMancanti = new HashSet<>(); for (DocPratica doc : docs) { List firmeObbligatorie = getFirmeObbligatorie(tipologia, dettPratica); FirmeBean firmeBean = FirmeUtil.deserialize(doc.getJsonFirmatari()); List firmePresenti = firmeBean.allSignatures(); - for (Soggetto soggetto : soggetti) { if (firmePresenti.contains(soggetto.getCodiceFiscale().toLowerCase())) { firmeObbligatorie.remove(soggetto.getTipologiaSoggetto()); @@ -1235,7 +1235,7 @@ public class ValidazionePraticaUtil { return signatures; } - private static List extractSigns(long companyId, String fileName, byte[] fileBytes) + private static Set extractSigns(long companyId, String fileName, byte[] fileBytes) throws IOException, PortalException, SystemException { Company company = CompanyLocalServiceUtil.getCompany(companyId); @@ -1254,7 +1254,7 @@ public class ValidazionePraticaUtil { if (statusCode == HttpServletResponse.SC_OK || statusCode == HttpServletResponse.SC_CREATED) { JSONArray arrayFirme = JSONFactoryUtil.createJSONObject(responseBody).getJSONArray("cf"); - List cf = new UniqueList(); + Set cf = new HashSet<>(); for (int i = 0; i < arrayFirme.length(); i++) { cf.add(arrayFirme.getString(i)); } @@ -1264,7 +1264,7 @@ public class ValidazionePraticaUtil { _log.warn("P7M REST extractor error. Response: " + new String(responseBody)); } - return Collections.emptyList(); + return Collections.emptySet(); } private static List getFirmeObbligatorie(String tipologiaAllegato, DettPratica dettPratica) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java index 88c8749b..f061ae32 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java @@ -23,6 +23,9 @@ import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.json.JSONDeserializer; import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.workflow.WorkflowException; import com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil; @@ -38,6 +41,8 @@ import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil; public class WorkflowUtil { + private static final Log _log = LogFactoryUtil.getLog(WorkflowUtil.class); + public static WorkflowTask getLastTask(long companyId, long groupId, Long userId, ControlloPratica bean) throws PortalException, SystemException { @@ -250,6 +255,7 @@ public class WorkflowUtil { put(StatoPraticaConstants.NON_AUTORIZZATA, WorkflowConstants.WORKFLOW_SIGNAL_INVIO); put(StatoPraticaConstants.INTEGRAZIONE, WorkflowConstants.WORKFLOW_SIGNAL_INVIO); put(StatoPraticaConstants.PREAVVISO_CONTRARIO, WorkflowConstants.WORKFLOW_SIGNAL_INVIO); + put(StatoPraticaConstants.NO_PARERE, WorkflowConstants.WORKFLOW_SIGNAL_INVIO); put(StatoPraticaConstants.ANNULLATA, WorkflowConstants.WORKFLOW_SIGNAL_INVIO); } }; @@ -288,35 +294,19 @@ public class WorkflowUtil { User istruttore = UserLocalServiceUtil.getUser(Long.valueOf(value)); value = istruttore.getFullName(); } else { - return "nessuno"; + value = "nessuno"; } break; case "esito": if (Validator.isNotNull(value) && !"0".equals(value)) { - - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); - - if (value.equalsIgnoreCase(StatoPraticaConstants.CONFORME)) { - value = PraticaUtil.getStatoPraticaLabel(StatoPraticaConstants.CONFORME, intPratica); - } else if (value.equalsIgnoreCase(StatoPraticaConstants.NON_CONFORME)) { - value = PraticaUtil.getStatoPraticaLabel(StatoPraticaConstants.NON_CONFORME, intPratica); - } else if (value.equalsIgnoreCase(StatoPraticaConstants.AUTORIZZATA)) { - value = "Autorizzata"; - } else if (value.equalsIgnoreCase(StatoPraticaConstants.NON_AUTORIZZATA)) { - value = "Non Autorizzata"; - } else if (value.equalsIgnoreCase(StatoPraticaConstants.INTEGRAZIONE) - || value.equalsIgnoreCase(StatoPraticaConstants.PREAVVISO_CONTRARIO)) { - value = "Richiedi Integrazione"; - } else if (value.equalsIgnoreCase(StatoPraticaConstants.ANNULLATA)) { - value = "Annulla"; - } + value = "stato-pratica-" + value; } else { - return "nessuno"; + value = "nessuno"; } break; default: if (Validator.isNull(value)) { - return "-"; + value = StringPool.DASH; } break; } 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 4505220f..e8cd795b 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 @@ -1063,6 +1063,8 @@ label.admingeniocivile.statopratica.nonconforme = Non Conforme label.admingeniocivile.statopratica.autorizzazione = Autorizzata label.admingeniocivile.statopratica.autorizzazionenegata = Non Autorizzata label.admingeniocivile.statopratica.integrazione = Richiesta Integrazione +label.admingeniocivile.statopratica.preavvisocontrario = Preavviso di Parere Contrario +label.admingeniocivile.statopratica.noparere = Non si rilascia parere label.admingeniocivile.statopratica.rifiutata = Rifiutata label.admingeniocivile.statopratica.finelavori = Fine Lavori label.admingeniocivile.statopratica.collaudo = Collaudo 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 3a6c33b9..335e9936 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 @@ -49,6 +49,12 @@ public class IntPraticaImpl extends IntPraticaBaseImpl { } + @Override + public void setStatoPratica(String statoPratica) { + _log.info("Progetto " + getNumeroProgetto() + " - setStatoPratica(\"" + statoPratica + "\")"); + super.setStatoPratica(statoPratica); + } + public String getTitle(Locale locale, boolean completed) { DettPratica dettPratica = null; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java index 6f76b5ac..50e3e1a9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java @@ -154,10 +154,10 @@ public class FascicoloPortlet extends MVCPortlet { if (!attivare) { intPratica.setStatoPratica(stato_pratica); - IntPraticaLocalServiceUtil.updateStatoPratica(intPraticaId, 0, stato_pratica); + IntPraticaLocalServiceUtil.updateStatoPratica(intPraticaId, stato_pratica); } else { intPratica.setStatoPratica(StatoPraticaConstants.SOTTOPOSTA_A_PARERE); - IntPraticaLocalServiceUtil.updateStatoPratica(intPraticaId, 0, + IntPraticaLocalServiceUtil.updateStatoPratica(intPraticaId, StatoPraticaConstants.SOTTOPOSTA_A_PARERE); } @@ -540,8 +540,6 @@ public class FascicoloPortlet extends MVCPortlet { List lista = new ArrayList(); - // try { - Hits hits = IntPraticaAdvancedSearch.searchProgettiBO(httpRequest, user, -1, -1); for (Document doc : hits.toList()) { @@ -579,7 +577,6 @@ public class FascicoloPortlet extends MVCPortlet { "label.scadenzegeniocivile.statoPratica"))); sb.append(StringPool.SEMICOLON); - // ADT BUG-ID=15 Sezione Ricerca / Export csv sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.provincia"))); sb.append(StringPool.SEMICOLON); @@ -596,8 +593,9 @@ public class FascicoloPortlet extends MVCPortlet { for (IntPratica intPratica : lista) { try { + long intPraticaId = intPratica.getIntPraticaId(); DettPratica lastDettPratica = DettPraticaLocalServiceUtil - .getLastCompletedByIntPratica(intPratica.getIntPraticaId()); + .getLastCompletedByIntPratica(intPraticaId); Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica .getTerritorioId()); @@ -607,7 +605,7 @@ public class FascicoloPortlet extends MVCPortlet { territorio.getCodiceProvincia()); boolean sorteggiata = SorteggioLocalServiceUtil - .findByIntPratica(intPratica.getIntPraticaId()) != null; + .findByIntPratica(intPraticaId) != null; sb.append(CSVUtil.encode((sorteggiata) ? "Si" : "No")); sb.append(StringPool.SEMICOLON); @@ -651,21 +649,17 @@ public class FascicoloPortlet extends MVCPortlet { } sb.append(StringPool.SEMICOLON); - sb.append(LanguageUtil.get(locale, - PraticaUtil.getStatoPraticaLabel(intPratica.getStatoPratica(), intPratica))); + sb.append(LanguageUtil.get( + locale, + PraticaUtil.getStatoPraticaLabel(intPratica.getStatoPratica(), + intPratica.getIntPraticaId()))); sb.append(StringPool.SEMICOLON); - // ADT BUG-ID=15 Sezione Ricerca / Export csv sb.append(provincia != null ? provincia.getProvincia() : ""); sb.append(StringPool.SEMICOLON); sb.append(comune != null ? comune.getDenominazione() : ""); sb.append(StringPool.SEMICOLON); - // sb.append("Territorio: " - // ).append(comune.getDenominazione()).append(!lastDettPratica.getLocalita().isEmpty() - // ? "(Loc. "+lastDettPratica.getLocalita()+" ) " : - // "").append(" - ").append(provincia.getProvincia()); - // ADT BUG-ID=15 Sezione Ricerca / Export csv - Max 30 chars int MAX_LENGHT_DESCR_INTERVENTO = 30; sb.append(lastDettPratica.getDescLongIntervento() == null ? "" : lastDettPratica .getDescLongIntervento().length() > MAX_LENGHT_DESCR_INTERVENTO ? lastDettPratica @@ -673,13 +667,6 @@ public class FascicoloPortlet extends MVCPortlet { .getDescLongIntervento()); sb.append(StringPool.SEMICOLON); - // Territorio: <%= comune.getDenominazione() %> <%= - // !lastDettPratica.getLocalita().isEmpty() ? - // "(Loc. "+lastDettPratica.getLocalita()+" ) " : "" %>- <%= - // provincia.getProvincia() %>
- // Localizzazione: <%= lastDettPratica.getVia() - // %>

- // <%= lastDettPratica.getDescLongIntervento() %> } catch (Throwable e) { _log.error(method + " IntPraticaId: " + intPratica != null ? intPratica.getIntPraticaId() : "", e); @@ -688,12 +675,6 @@ public class FascicoloPortlet extends MVCPortlet { } } - // } catch (PortalException e) { - // _log.error(e, e); - // } catch (SystemException e) { - // _log.error(e, e); - // } - return sb.toString(); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java index a5eb2eee..20f0a5e5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java @@ -331,7 +331,8 @@ public class ReportAvvisoBeanBuilder { // ADT:bug id 14: correzione testo del documento di non autorizzazione if (avviso.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NON_AUTORIZZATA) - || avviso.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NON_CONFORME)) { + || avviso.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NON_CONFORME) + || avviso.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.NO_PARERE)) { if (Validator.isNull(parameters.get("motivazioni"))) parameters.put("motivazioni", parameters.get("testo_del_documento")); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerInvioDocumento.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerInvioDocumento.java index 752e2422..7194549a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerInvioDocumento.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerInvioDocumento.java @@ -616,7 +616,8 @@ public class SchedulerInvioDocumento implements MessageListener { } else if (tipoDocumento.equals(StatoPraticaConstants.AUTORIZZATA) || tipoDocumento.equals(StatoPraticaConstants.NON_AUTORIZZATA) || tipoDocumento.equals(StatoPraticaConstants.CONFORME) - || tipoDocumento.equals(StatoPraticaConstants.NON_CONFORME)) { + || tipoDocumento.equals(StatoPraticaConstants.NON_CONFORME) + || tipoDocumento.equals(StatoPraticaConstants.NO_PARERE)) { long intPraticaId = controlloPratica.getIntPraticaId(); ServiceContext serviceContext = getServiceContext(controlloPratica); Tempistica tempistica = TempisticaLocalServiceUtil.getTempistica(serviceContext.getCompanyId(), 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 ed133eb5..b1510e2c 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 @@ -208,9 +208,7 @@ public class IntPraticaLocalServiceClpInvoker { _methodName216 = "updateStatoPratica"; - _methodParameterTypes216 = new String[] { - "long", "long", "java.lang.String" - }; + _methodParameterTypes216 = new String[] { "long", "java.lang.String" }; _methodName217 = "updateIntPraticaSorteggio"; @@ -690,7 +688,7 @@ public class IntPraticaLocalServiceClpInvoker { if (_methodName216.equals(name) && Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) { return IntPraticaLocalServiceUtil.updateStatoPratica(((Long)arguments[0]).longValue(), - ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); + (java.lang.String)arguments[1]); } if (_methodName217.equals(name) && diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java index 13dac3b4..c1244afa 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java @@ -108,12 +108,12 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl { String statoPratica = intPratica.getStatoPratica(); if (AvvisoUtil.isStatoPraticaValidoNuovoAvviso(statoPratica)) { - if (StatoPraticaConstants.CONFORME.equalsIgnoreCase(statoPratica) - && AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { - statoPratica = StatoPraticaConstants.AUTORIZZATA; - } else if (StatoPraticaConstants.NON_CONFORME.equals(statoPratica) - && AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { - statoPratica = StatoPraticaConstants.NON_AUTORIZZATA; + if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { + if (StatoPraticaConstants.CONFORME.equalsIgnoreCase(statoPratica)) { + statoPratica = StatoPraticaConstants.AUTORIZZATA; + } else if (StatoPraticaConstants.NON_CONFORME.equalsIgnoreCase(statoPratica)) { + statoPratica = StatoPraticaConstants.NON_AUTORIZZATA; + } } String propertiesTemplate = null; @@ -948,7 +948,8 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl { || tipoDocumento.equals(StatoPraticaConstants.AUTORIZZATA) || tipoDocumento.equals(StatoPraticaConstants.NON_AUTORIZZATA) || tipoDocumento.equals(StatoPraticaConstants.CONFORME) - || tipoDocumento.equals(StatoPraticaConstants.NON_CONFORME); + || tipoDocumento.equals(StatoPraticaConstants.NON_CONFORME) + || tipoDocumento.equals(StatoPraticaConstants.NO_PARERE); avviso.setSignal(signal); avviso.setTempistica(tempistica); } @@ -960,10 +961,12 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl { Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.CONFORME)); disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.NON_CONFORME)); + disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.NO_PARERE)); disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.AUTORIZZATA)); disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.NON_AUTORIZZATA)); disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.INTEGRAZIONE)); - disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.PREAVVISO_CONTRARIO)); + disjunction.add(RestrictionsFactoryUtil + .eq("tipoDocumento", StatoPraticaConstants.PREAVVISO_CONTRARIO)); disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.ANNULLATA)); dynamicQuery.add(disjunction); dynamicQuery.addOrder(OrderFactoryUtil.desc("avvisoId")); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java index 75bec93c..9e30608c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java @@ -142,7 +142,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi resourceLocalService.addModelResources(entry, serviceContext); // aggiorno int e dett pratica per avvio workflow - IntPratica intPratica = intPraticaLocalService.updateStatoPratica(intPraticaId, dettPraticaId, + IntPratica intPratica = intPraticaLocalService.updateStatoPratica(intPraticaId, StatoPraticaConstants.SOTTOPOSTA_A_PARERE); if (updateFlagControlloObbligatorio && Constants.TIPO_PRATICA_DEPOSITO.equals(intPratica.getTipoPratica())) { @@ -436,6 +436,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi break; case StatoPraticaConstants.NON_CONFORME: case StatoPraticaConstants.NON_AUTORIZZATA: + case StatoPraticaConstants.NO_PARERE: ramoWorkflow = "non_approvato"; break; case StatoPraticaConstants.INTEGRAZIONE: @@ -451,14 +452,11 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi } if (updateIntPratica) { - intPraticaLocalService.updateStatoPratica(controlloPratica.getIntPraticaId(), - controlloPratica.getDettPraticaId(), esito); + intPraticaLocalService.updateStatoPratica(controlloPratica.getIntPraticaId(), esito); } } - Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); - indexer.reindex(controlloPratica); - + IndexerRegistryUtil.getIndexer(ControlloPratica.class).reindex(controlloPratica); return ramoWorkflow; } @@ -472,12 +470,12 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi Map parametri = WorkflowUtil.getFormParameters(controlloPratica); String esitoScelta = (String) parametri.get("esito"); - if (StatoPraticaConstants.CONFORME.equalsIgnoreCase(esitoScelta) - && AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) { - esitoScelta = StatoPraticaConstants.AUTORIZZATA; - } else if (StatoPraticaConstants.NON_CONFORME.equals(esitoScelta) - && AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) { - esitoScelta = StatoPraticaConstants.NON_AUTORIZZATA; + if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) { + if (StatoPraticaConstants.CONFORME.equalsIgnoreCase(esitoScelta)) { + esitoScelta = StatoPraticaConstants.AUTORIZZATA; + } else if (StatoPraticaConstants.NON_CONFORME.equals(esitoScelta)) { + esitoScelta = StatoPraticaConstants.NON_AUTORIZZATA; + } } return esitoScelta; @@ -486,11 +484,14 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi public void aggiornaStatoPerRichiestaIntegrazione(long controlloPraticaId, Map workflowContext) throws PortalException, SystemException { - ControlloPratica controlloPratica = controlloPraticaLocalService - .getControlloPratica(controlloPraticaId); - IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId()); - intPratica.setStatoPratica(StatoPraticaConstants.INTEGRAZIONE); - intPraticaLocalService.updateIntPratica(intPratica); + ControlloPratica controllo = controlloPraticaLocalService.getControlloPratica(controlloPraticaId); + IntPratica pratica = intPraticaLocalService.getIntPratica(controllo.getIntPraticaId()); + String stato = pratica.getStatoPratica(); + if (!stato.equalsIgnoreCase(StatoPraticaConstants.PREAVVISO_CONTRARIO)) { + stato = StatoPraticaConstants.INTEGRAZIONE; + } + pratica.setStatoPratica(stato); + intPraticaLocalService.updateIntPratica(pratica); } public String getJsonListaIstruttori(long controlloPraticaId, Map workflowContext) 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 887f908e..dd15a4a7 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 @@ -748,7 +748,8 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl Boolean tcManutOrdStraord, Boolean tcAltriInterventi, String tcAltriInterventiDesc, boolean noCollaudo, boolean tcNuovaCostruzionePertinenza, boolean tcInterventoOpereEscavazione, boolean tcViarch, boolean tcOperaA25, boolean sanatoriaEdilizia47, boolean sanatoriaEdilizia724, - boolean sanatoriaEdilizia326, boolean normLavoriNoDirettore) throws PortalException, SystemException { + boolean sanatoriaEdilizia326, boolean normLavoriNoDirettore) throws PortalException, + SystemException { Date now = new Date(); @@ -900,7 +901,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl dettPratica.setGeoEvidenzeGeologiche(geoEvidenzeGeologiche); dettPratica.setGeoDtRelazione(geoDtRelazione); dettPratica.setImportoSpeseIstruttoria(importoSpeseIstruttoria); - dettPratica.setImportoBolli(importoBolli); + dettPratica.setImportoBolli(importoBolli); dettPratica.setPagInterventiRestauroManufatti(pagInterventiRestauroManufatti); dettPratica.setPagAltriCasiCulturali(pagAltriCasiCulturali); dettPratica.setPagLottizzazioni(pagLottizzazioni); @@ -977,13 +978,13 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl dettPratica.setTcManutOrdStraord(tcManutOrdStraord); dettPratica.setTcAltriInterventi(tcAltriInterventi); dettPratica.setTcAltriInterventiDesc(tcAltriInterventiDesc); - + dettPratica.setSanatoriaEdilizia47(sanatoriaEdilizia47); dettPratica.setSanatoriaEdilizia724(sanatoriaEdilizia724); dettPratica.setSanatoriaEdilizia326(sanatoriaEdilizia326); - + dettPratica.setNormLavoriNoDirettore(normLavoriNoDirettore); - + dettPratica = dettPraticaPersistence.update(dettPratica); resourceLocalService.updateModelResources(dettPratica, serviceContext); @@ -1046,7 +1047,8 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl Boolean tcAltriInterventi, String tcAltriInterventiDesc, boolean noCollaudo, boolean tcNuovaCostruzionePertinenza, boolean tcInterventoOpereEscavazione, boolean tcViarch, boolean tcOperaA25, boolean sanatoriaEdilizia47, boolean sanatoriaEdilizia724, - boolean sanatoriaEdilizia326, boolean normLavoriNoDirettore) throws PortalException, SystemException { + boolean sanatoriaEdilizia326, boolean normLavoriNoDirettore) throws PortalException, + SystemException { Date now = new Date(); @@ -1248,13 +1250,13 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl dettPratica.setTcManutOrdStraord(tcManutOrdStraord); dettPratica.setTcAltriInterventi(tcAltriInterventi); dettPratica.setTcAltriInterventiDesc(tcAltriInterventiDesc); - + dettPratica.setSanatoriaEdilizia326(sanatoriaEdilizia326); dettPratica.setSanatoriaEdilizia47(sanatoriaEdilizia47); dettPratica.setSanatoriaEdilizia724(sanatoriaEdilizia724); - + dettPratica.setNormLavoriNoDirettore(normLavoriNoDirettore); - + dettPratica = dettPraticaPersistence.update(dettPratica); resourceLocalService.updateModelResources(dettPratica, serviceContext); @@ -1299,9 +1301,9 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl boolean normEsenteSpese, boolean normDpr01Dep, boolean normDpr02Dep, boolean normDpr01Aut, boolean normDpr02Aut, boolean normArt3com3, boolean normArt3com4, ServiceContext serviceContext, boolean bozza, boolean noCollaudo, boolean tcNuovaCostruzionePertinenza, - boolean tcInterventoOpereEscavazione, boolean tcViarch, boolean tcOperaA25, boolean sanatoriaEdilizia47, - boolean sanatoriaEdilizia724, boolean sanatoriaEdilizia326, boolean normLavoriNoDirettore) - throws PortalException, SystemException { + boolean tcInterventoOpereEscavazione, boolean tcViarch, boolean tcOperaA25, + boolean sanatoriaEdilizia47, boolean sanatoriaEdilizia724, boolean sanatoriaEdilizia326, + boolean normLavoriNoDirettore) throws PortalException, SystemException { Date now = new Date(); @@ -1469,11 +1471,11 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl dettPratica.setCodiceFiscaleDelegatoCommittente(codiceFiscaleDelegatoCommittente); dettPratica.setCodiceFiscaleDelegatoFineLavori(codiceFiscaleDelegatoFineLavori); dettPratica.setCodiceFiscaleDelegatoCollaudo(codiceFiscaleDelegatoCollaudo); - + dettPratica.setSanatoriaEdilizia47(sanatoriaEdilizia47); dettPratica.setSanatoriaEdilizia326(sanatoriaEdilizia326); dettPratica.setSanatoriaEdilizia724(sanatoriaEdilizia724); - + dettPratica.setNormLavoriNoDirettore(normLavoriNoDirettore); dettPratica = dettPraticaPersistence.update(dettPratica); @@ -1527,9 +1529,8 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl boolean normDprg02, boolean normAnr, boolean normArt3com3, boolean normArt3com4, boolean normOrd01, boolean normDm04, boolean normDm05, boolean normCI01, boolean normLTC01, boolean suap, boolean normSismaBonus, String clRischioPreInt, String clRischioPostInt, - boolean intervFinPub, String intervFinPubDesc, - boolean sanatoriaEdilizia47, boolean sanatoriaEdilizia724, boolean sanatoriaEdilizia326, - boolean normLavoriNoDirettore, + boolean intervFinPub, String intervFinPubDesc, boolean sanatoriaEdilizia47, + boolean sanatoriaEdilizia724, boolean sanatoriaEdilizia326, boolean normLavoriNoDirettore, ServiceContext serviceContext, boolean bozza) { } @@ -1593,12 +1594,12 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl } public DettPratica updateDettPraticaPagamento(long dettPraticaId, String importoSpeseIstruttoria, - String importoBolli, Double pagInterventiRestauroManufatti, - Double pagAltriCasiCulturali, Double pagLottizzazioni, Double pagGrandiStrutture, - Double pagCondotte, Double pagPalificazioni, Double pagImpiantiEolici, Double pagNuoveRealizzazioni, - Double pagImmobiliPreesistenti, Double pagManifestiPubblicitari, Double pagPareriDiMassima, - Double pagAltriCasiPaesaggistici, Double pagVariantiPareriResi, Double pagRilascioAttestazioni, - Double pagConsultazioniArchivio, ServiceContext serviceContext) throws SystemException, PortalException { + String importoBolli, Double pagInterventiRestauroManufatti, Double pagAltriCasiCulturali, + Double pagLottizzazioni, Double pagGrandiStrutture, Double pagCondotte, Double pagPalificazioni, + Double pagImpiantiEolici, Double pagNuoveRealizzazioni, Double pagImmobiliPreesistenti, + Double pagManifestiPubblicitari, Double pagPareriDiMassima, Double pagAltriCasiPaesaggistici, + Double pagVariantiPareriResi, Double pagRilascioAttestazioni, Double pagConsultazioniArchivio, + ServiceContext serviceContext) throws SystemException, PortalException { Date now = new Date(); @@ -1607,7 +1608,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl dettPratica.setModifiedDate(serviceContext.getModifiedDate(now)); dettPratica.setImportoSpeseIstruttoria(importoSpeseIstruttoria); - dettPratica.setImportoBolli(importoBolli); + dettPratica.setImportoBolli(importoBolli); dettPratica.setPagInterventiRestauroManufatti(pagInterventiRestauroManufatti); dettPratica.setPagAltriCasiCulturali(pagAltriCasiCulturali); dettPratica.setPagLottizzazioni(pagLottizzazioni); @@ -1623,7 +1624,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl dettPratica.setPagVariantiPareriResi(pagVariantiPareriResi); dettPratica.setPagRilascioAttestazioni(pagRilascioAttestazioni); dettPratica.setPagConsultazioniArchivio(pagConsultazioniArchivio); - + dettPratica = dettPraticaPersistence.update(dettPratica); resourceLocalService.updateModelResources(dettPratica, serviceContext); @@ -1841,8 +1842,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl DettPratica dettPratica = updateEsito(dettPraticaId, stato); long intPraticaId = dettPratica.getIntPraticaId(); - intPraticaLocalService.updateStatoPratica(intPraticaId, dettPraticaId, - StatoPraticaConstants.SOTTOPOSTA_A_PARERE); + intPraticaLocalService.updateStatoPratica(intPraticaId, StatoPraticaConstants.SOTTOPOSTA_A_PARERE); ControlloPratica controlloPratica = controlloPraticaLocalService.findByIntPraticaId_Status( intPraticaId, WorkflowConstants.STATUS_PENDING).get(0); controlloPraticaLocalService.addPraticheAlControllo(controlloPratica.getControlloPraticaId(), @@ -1852,12 +1852,13 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl } public DettPratica pagaInvia(long dettPraticaId, Double pagInterventiRestauroManufatti, - Double pagAltriCasiCulturali, Double pagLottizzazioni, Double pagGrandiStrutture, Double pagCondotte, - Double pagPalificazioni, Double pagImpiantiEolici, Double pagNuoveRealizzazioni, - Double pagImmobiliPreesistenti, Double pagManifestiPubblicitari, Double pagPareriDiMassima, - Double pagAltriCasiPaesaggistici, Double pagVariantiPareriResi, Double pagRilascioAttestazioni, - Double pagConsultazioniArchivio, String importoSpeseIstruttoria, String codiceFiscaleCommittente, - String currentURL, ServiceContext serviceContext) throws SystemException, PortalException { + Double pagAltriCasiCulturali, Double pagLottizzazioni, Double pagGrandiStrutture, + Double pagCondotte, Double pagPalificazioni, Double pagImpiantiEolici, + Double pagNuoveRealizzazioni, Double pagImmobiliPreesistenti, Double pagManifestiPubblicitari, + Double pagPareriDiMassima, Double pagAltriCasiPaesaggistici, Double pagVariantiPareriResi, + Double pagRilascioAttestazioni, Double pagConsultazioniArchivio, String importoSpeseIstruttoria, + String codiceFiscaleCommittente, String currentURL, ServiceContext serviceContext) + throws SystemException, PortalException { DettPratica dettPratica = dettPraticaPersistence.findByPrimaryKey(dettPraticaId); @@ -1870,12 +1871,12 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl PagamentoConstants.PAGAMENTO_ONERI, importoSpeseIstruttoria, codiceFiscaleCommittente, serviceContext); - dettPratica = updateDettPraticaPagamento(dettPratica.getDettPraticaId(), importoSpeseIstruttoria, - importoBolli.toString(), pagInterventiRestauroManufatti, - pagAltriCasiCulturali, pagLottizzazioni, pagGrandiStrutture, pagCondotte, - pagPalificazioni, pagImpiantiEolici, pagNuoveRealizzazioni, pagImmobiliPreesistenti, - pagManifestiPubblicitari, pagPareriDiMassima, pagAltriCasiPaesaggistici, - pagVariantiPareriResi, pagRilascioAttestazioni, pagConsultazioniArchivio, serviceContext); + dettPratica = updateDettPraticaPagamento(dettPratica.getDettPraticaId(), importoSpeseIstruttoria, + importoBolli.toString(), pagInterventiRestauroManufatti, pagAltriCasiCulturali, + pagLottizzazioni, pagGrandiStrutture, pagCondotte, pagPalificazioni, pagImpiantiEolici, + pagNuoveRealizzazioni, pagImmobiliPreesistenti, pagManifestiPubblicitari, pagPareriDiMassima, + pagAltriCasiPaesaggistici, pagVariantiPareriResi, pagRilascioAttestazioni, + pagConsultazioniArchivio, serviceContext); long intPraticaid = dettPratica.getIntPraticaId(); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaid); @@ -1976,7 +1977,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl IntPratica intPratica = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId()); if (intPratica.getStatus() == WorkflowConstants.STATUS_ANY || intPratica.getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { - intPraticaLocalService.updateStatoPratica(dettPratica.getIntPraticaId(), dettPraticaId, + intPraticaLocalService.updateStatoPratica(dettPratica.getIntPraticaId(), StatoPraticaConstants.VIDIMATA); } return dettPratica; @@ -2350,7 +2351,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl return jsonFields.toString(); } - private String callToVersion(String versioningURL) throws Exception { + private String callToVersion(String versioningURL) throws Exception { return HttpServiceUtil.getUrl(versioningURL); } 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 f37cba12..1ab9e9cf 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 @@ -181,7 +181,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { User user = userLocalService.getUser(serviceContext.getUserId()); Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); Date now = new Date(); - + IntPratica intPratica = intPraticaLocalService.createIntPratica(counterLocalService .increment(IntPratica.class.getName())); intPratica.setCompanyId(serviceContext.getCompanyId()); @@ -944,16 +944,12 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { } - // TODO rimuovere dettPraticaId - public IntPratica updateStatoPratica(long intPraticaId, long dettPraticaId, String statoPratica) - throws PortalException, SystemException { - + public IntPratica updateStatoPratica(long intPraticaId, String statoPratica) throws PortalException, + SystemException { + _log.info("updateStatoPratica(" + intPraticaId + ", \"" + statoPratica + "\")"); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); - intPratica.setModifiedDate(new Date()); - intPratica.setStatoPratica(statoPratica); - return intPraticaLocalService.updateIntPratica(intPratica); } @@ -1011,8 +1007,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { intPratica.setStatus(status); if (AzioniPraticheUtil.isAutorizzazione(intPraticaId)) { intPratica.setStatoPratica(StatoPraticaConstants.NON_AUTORIZZATA); - } else if (AzioniPraticheUtil.isAutorizzazione(intPraticaId)) { - intPratica.setStatoPratica(StatoPraticaConstants.NON_CONFORME); } else { // SANATORIA (da capire) intPratica.setStatoPratica(StatoPraticaConstants.NON_CONFORME); @@ -1064,7 +1058,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { List ids = soggettoLocalService.findIntPraticaBySoggettoId(soggettoId); if (ids.isEmpty()) { - return Collections.emptyList(); + return Collections. emptyList(); } DynamicQuery dynamicQuery = createQueryArchivio(companyId, soggettoId, ids); @@ -1150,21 +1144,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { public List findByCanAddFineLavori(long companyId, String codiceFiscale, int start, int end) throws SystemException, PortalException { - // List ids = - // new - // ArrayList<>(dettPraticaLocalService.findIntPraticaByCodiceFiscaleDelegatoFineLavori(codiceFiscale)); - // if (ids.isEmpty()) { - // return Collections.emptyList(); - // } - // ids.removeAll(fineLavoriLocalService.findIntPraticaByFineLavoriParziale(false, - // ids)); - // - // if (ids.isEmpty()) { - // return Collections.emptyList(); - // } - DynamicQuery dynamicQuery = createQueryFineLavori(companyId, codiceFiscale); - return intPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end); } @@ -1209,20 +1189,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { public List findByCanAddCollaudo(long companyId, String codiceFiscale, int start, int end) throws SystemException, PortalException { - // List ids = fineLavoriLocalService.findIntPraticaByFineLavori(); - // if (ids.isEmpty()) { - // return Collections.emptyList(); - // } - // - // System.out.println(ids.size()); - // - // - // DynamicQuery dynamicQuery = createQueryCollaudi(companyId, - // codiceFiscale, ids); - - // return intPraticaPersistence.findWithDynamicQuery(dynamicQuery, - // start, end); - return intPraticaFinder.canAddCollaudo(codiceFiscale, start, end); } @@ -2067,11 +2033,12 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { public int countIngressiCO(Date dtMin, Date dtMax, long groupId) throws SystemException { return IntPraticaFinderUtil.countIngressiCO(dtMin, dtMax, groupId); } - - public Organization getOrganizationByIntPraticaId(long intPraticaId) throws PortalException, SystemException{ + + public Organization getOrganizationByIntPraticaId(long intPraticaId) throws PortalException, + SystemException { IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); Group group = GroupLocalServiceUtil.getGroup(intPratica.getGroupId()); - Organization organization = OrganizationLocalServiceUtil.getOrganization(group.getOrganizationId()); + Organization organization = OrganizationLocalServiceUtil.getOrganization(group.getOrganizationId()); return organization; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java index 0a94d529..352ff84e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java @@ -37,13 +37,14 @@ import com.liferay.portal.service.ServiceContext; * The implementation of the int pratica remote service. * *

- * All custom service methods should be put in this class. Whenever methods are added, rerun - * ServiceBuilder to copy their definitions into the + * All custom service methods should be put in this class. Whenever methods are + * added, rerun ServiceBuilder to copy their definitions into the * {@link it.tref.liferay.portos.bo.service.IntPraticaService} interface. * *

- * This is a remote service. Methods of this service are expected to have security checks based on - * the propagated JAAS credentials because this service can be accessed remotely. + * This is a remote service. Methods of this service are expected to have + * security checks based on the propagated JAAS credentials because this service + * can be accessed remotely. *

* * @author Davide Barbagallo, 3F Consulting @@ -51,179 +52,192 @@ import com.liferay.portal.service.ServiceContext; * @see it.tref.liferay.portos.bo.service.IntPraticaServiceUtil */ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl { - /* - * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link - * it.tref.liferay.portos.bo.service.IntPraticaServiceUtil} to access the int pratica remote - * service. - */ + /* + * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use + * {@link it.tref.liferay.portos.bo.service.IntPraticaServiceUtil} to access + * the int pratica remote service. + */ - public IntPratica getIntPratica(long intPraticaId) throws PortalException, SystemException { + public IntPratica getIntPratica(long intPraticaId) throws PortalException, SystemException { - // TODO: Permessi - return intPraticaLocalService.getIntPratica(intPraticaId); - } + // TODO: Permessi + return intPraticaLocalService.getIntPratica(intPraticaId); + } - public void deleteIntPratica(long intPraticaId, long userId) throws PortalException, SystemException { + public void deleteIntPratica(long intPraticaId, long userId) throws PortalException, SystemException { - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); - if (ValidazionePraticaUtil.canDeletePratica(intPraticaId, userId)) { - intPraticaLocalService.deleteIntPratica(intPratica); - } else { - throw new SystemException("impossibile cancellare la int pratica"); - } - } + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); + if (ValidazionePraticaUtil.canDeletePratica(intPraticaId, userId)) { + intPraticaLocalService.deleteIntPratica(intPratica); + } else { + throw new SystemException("impossibile cancellare la int pratica"); + } + } - // public void pagaInvia(long intPraticaId, int pagAdeguamentoSismico, int pagAltro, int - // pagMiglioramentoSismico, - // int pagNuovaCostruzione, boolean pagNuoveCostruzioni, boolean pagRiparazioneInterventoLocale, - // boolean pagVarianti, String importoSpeseIstruttoria, String codiceFiscaleCommittente, String - // currentUrl, - // ServiceContext serviceContext) throws PortalException, SystemException { - // - // - // intPraticaLocalService.pagaInvia(intPraticaId, pagAdeguamentoSismico, pagAltro, - // pagMiglioramentoSismico, - // pagNuovaCostruzione, pagNuoveCostruzioni, pagRiparazioneInterventoLocale, pagVarianti, - // importoSpeseIstruttoria, - // codiceFiscaleCommittente, currentUrl, serviceContext); - // - // } + // public void pagaInvia(long intPraticaId, int pagAdeguamentoSismico, int + // pagAltro, int + // pagMiglioramentoSismico, + // int pagNuovaCostruzione, boolean pagNuoveCostruzioni, boolean + // pagRiparazioneInterventoLocale, + // boolean pagVarianti, String importoSpeseIstruttoria, String + // codiceFiscaleCommittente, String + // currentUrl, + // ServiceContext serviceContext) throws PortalException, SystemException { + // + // + // intPraticaLocalService.pagaInvia(intPraticaId, pagAdeguamentoSismico, + // pagAltro, + // pagMiglioramentoSismico, + // pagNuovaCostruzione, pagNuoveCostruzioni, pagRiparazioneInterventoLocale, + // pagVarianti, + // importoSpeseIstruttoria, + // codiceFiscaleCommittente, currentUrl, serviceContext); + // + // } + public void sospendiPratica(long intPraticaId, boolean sospesa) throws PortalException, SystemException { - public void sospendiPratica(long intPraticaId, boolean sospesa) throws PortalException, SystemException { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); + Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); - Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); + IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), + ActionKeys.SOSPENDI_FASCICOLO); + intPraticaLocalService.sospendiPratica(intPraticaId, sospesa); - IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.SOSPENDI_FASCICOLO); - intPraticaLocalService.sospendiPratica(intPraticaId, sospesa); + } - } + public void cambiaTitolare(long intPraticaId, long soggettoId, ServiceContext serviceContext) + throws PortalException, SystemException { - public void cambiaTitolare(long intPraticaId, long soggettoId, ServiceContext serviceContext) throws PortalException, - SystemException { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); + Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); - Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); + IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), + ActionKeys.CAMBIO_TITOLARE); + intPraticaLocalService.cambiaTitolare(intPraticaId, soggettoId, serviceContext); + } - IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_TITOLARE); - intPraticaLocalService.cambiaTitolare(intPraticaId, soggettoId, serviceContext); - } + public void updateStatoPratica(long intPraticaId, String statoPratica) throws PortalException, + SystemException { - public void updateStatoPratica(long intPraticaId, String statoPratica) throws PortalException, SystemException { + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); + Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); - Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); + IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_STATO); + intPraticaLocalService.updateStatoPratica(intPraticaId, statoPratica); + } - IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_STATO); - intPraticaLocalService.updateStatoPratica(intPraticaId, 0l, statoPratica); - } + public List search(List groupIds, int start, int end) throws SystemException { - public List search(List groupIds, int start, int end) throws SystemException { + // TODO Modificare tramite Indexer + // TODO Aggiungere controllo permessi - // TODO Modificare tramite Indexer - // TODO Aggiungere controllo permessi + return intPraticaLocalService.search(groupIds, start, end); - return intPraticaLocalService.search(groupIds, start, end); + } - } + public int countSearch(List groupIds) throws SystemException { - public int countSearch(List groupIds) throws SystemException { + // TODO Modificare tramite Indexer + // TODO Aggiungere controllo permessi - // TODO Modificare tramite Indexer - // TODO Aggiungere controllo permessi + return intPraticaLocalService.countSearch(groupIds); - return intPraticaLocalService.countSearch(groupIds); + } - } + public List findByCompanyIdSoggettoProgetti(long companyId, long soggettoId) + throws SystemException, PortalException { - public List findByCompanyIdSoggettoProgetti(long companyId, long soggettoId) throws SystemException, - PortalException { + return intPraticaLocalService.findByCompanyIdSoggettoProgetti(companyId, soggettoId); + } - return intPraticaLocalService.findByCompanyIdSoggettoProgetti(companyId, soggettoId); - } + public int countByCompanyIdSoggettoProgetti(long companyId, long soggettoId) throws SystemException, + PortalException { - public int countByCompanyIdSoggettoProgetti(long companyId, long soggettoId) throws SystemException, PortalException { + return intPraticaLocalService.countByCompanyIdSoggettoProgetti(companyId, soggettoId); + } - return intPraticaLocalService.countByCompanyIdSoggettoProgetti(companyId, soggettoId); - } + public List findByCompanyIdSoggettoArchivio(long companyId, long soggettoId) + throws SystemException, PortalException { - public List findByCompanyIdSoggettoArchivio(long companyId, long soggettoId) throws SystemException, - PortalException { + return intPraticaLocalService.findByCompanyIdSoggettoArchivio(companyId, soggettoId); + } - return intPraticaLocalService.findByCompanyIdSoggettoArchivio(companyId, soggettoId); - } + public int countByCompanyIdSoggettoArchivio(long companyId, long soggettoId) throws SystemException, + PortalException { - public int countByCompanyIdSoggettoArchivio(long companyId, long soggettoId) throws SystemException, PortalException { + return intPraticaLocalService.countByCompanyIdSoggettoArchivio(companyId, soggettoId); + } - return intPraticaLocalService.countByCompanyIdSoggettoArchivio(companyId, soggettoId); - } + public List findByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId, int start, + int end) throws SystemException, PortalException { - public List findByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId, int start, int end) - throws SystemException, PortalException { + return intPraticaLocalService.findByCompanyIdSoggettoAltriProgetti(companyId, soggettoId, start, end); + } - return intPraticaLocalService.findByCompanyIdSoggettoAltriProgetti(companyId, soggettoId, start, end); - } + public int countByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId) throws SystemException, + PortalException { - public int countByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId) throws SystemException, - PortalException { + return intPraticaLocalService.countByCompanyIdSoggettoAltriProgetti(companyId, soggettoId); + } - return intPraticaLocalService.countByCompanyIdSoggettoAltriProgetti(companyId, soggettoId); - } + public List findByCanAddFineLavori(long companyId, String codiceFiscale, int start, int end) + throws SystemException, PortalException { - public List findByCanAddFineLavori(long companyId, String codiceFiscale, int start, int end) - throws SystemException, PortalException { + return intPraticaLocalService.findByCanAddFineLavori(companyId, codiceFiscale, start, end); + } - return intPraticaLocalService.findByCanAddFineLavori(companyId, codiceFiscale, start, end); - } + public int countByCanAddFineLavori(long companyId, String codiceFiscale) throws SystemException, + PortalException { - public int countByCanAddFineLavori(long companyId, String codiceFiscale) throws SystemException, PortalException { + return intPraticaLocalService.countByCanAddFineLavori(companyId, codiceFiscale); + } - return intPraticaLocalService.countByCanAddFineLavori(companyId, codiceFiscale); - } + public List findByCanAddCollaudo(long companyId, String codiceFiscale, int start, int end) + throws SystemException, PortalException { - public List findByCanAddCollaudo(long companyId, String codiceFiscale, int start, int end) - throws SystemException, PortalException { + return intPraticaLocalService.findByCanAddCollaudo(companyId, codiceFiscale, start, end); + } - return intPraticaLocalService.findByCanAddCollaudo(companyId, codiceFiscale, start, end); - } + public int countByCanAddCollaudo(long companyId, String codiceFiscale) throws SystemException, + PortalException { - public int countByCanAddCollaudo(long companyId, String codiceFiscale) throws SystemException, PortalException { + return intPraticaLocalService.countByCanAddCollaudo(companyId, codiceFiscale); + } - return intPraticaLocalService.countByCanAddCollaudo(companyId, codiceFiscale); - } + public FileEntry allegaFileAnnullamento(long intPraticaId, byte[] content, String sourceFileName, + String jsonFirmatari, ServiceContext serviceContext) throws SystemException, PortalException, + IOException { - public FileEntry allegaFileAnnullamento(long intPraticaId, byte[] content, String sourceFileName, - String jsonFirmatari, ServiceContext serviceContext) throws SystemException, PortalException, IOException { + return intPraticaLocalService.allegaFileAnnullamento(intPraticaId, content, sourceFileName, + jsonFirmatari, serviceContext); + } - return intPraticaLocalService.allegaFileAnnullamento(intPraticaId, content, sourceFileName,jsonFirmatari, serviceContext); - } + public void completeAnnullamento(long intPraticaId, long userId) throws PortalException, SystemException { - public void completeAnnullamento(long intPraticaId, long userId) throws PortalException, SystemException { + if (!AzioniPraticheUtil.isAllowedAction(intPraticaId, AzioniPraticheUtil.ACTION_ANNULLA) + || !ValidazionePraticaUtil.praticaCanAbort(intPraticaId, userId)) { + throw new SystemException("error.annullamento.add.file.not.allowed"); + } + intPraticaLocalService.completeAnnullamento(intPraticaId); + } - if (!AzioniPraticheUtil.isAllowedAction(intPraticaId, AzioniPraticheUtil.ACTION_ANNULLA) - || !ValidazionePraticaUtil.praticaCanAbort(intPraticaId, userId)) { - throw new SystemException("error.annullamento.add.file.not.allowed"); - } - intPraticaLocalService.completeAnnullamento(intPraticaId); - } + public void cambiaIstruttore(long intPraticaId, long controlloPraticaId, long istruttoreId) + throws PortalException, SystemException { - public void cambiaIstruttore(long intPraticaId, long controlloPraticaId, long istruttoreId) throws PortalException, - SystemException { + intPraticaLocalService.cambiaIstruttore(intPraticaId, controlloPraticaId, istruttoreId); + } - intPraticaLocalService.cambiaIstruttore(intPraticaId, controlloPraticaId, istruttoreId); - } + public String geosisma(long intPraticaId) throws PortalException, SystemException { - public String geosisma(long intPraticaId) throws PortalException, SystemException { + JSONObject json = JSONFactoryUtil.createJSONObject(); - JSONObject json = JSONFactoryUtil.createJSONObject(); + IntPratica intPratica = intPraticaLocalService.fetchIntPratica(intPraticaId); + if (Validator.isNotNull(intPratica)) { + json.put("intPraticaId", intPratica.getIntPraticaId()); + } - IntPratica intPratica = intPraticaLocalService.fetchIntPratica(intPraticaId); - if (Validator.isNotNull(intPratica)) { - json.put("intPraticaId", intPratica.getIntPraticaId()); - } - - return json.toString(); - } + return json.toString(); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ProtocollazioneUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ProtocollazioneUtil.java index fa89a2a6..cca45d77 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ProtocollazioneUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ProtocollazioneUtil.java @@ -235,7 +235,7 @@ public class ProtocollazioneUtil { public static List searchProtocolli(HttpServletRequest request, long companyId, long userId) { - List result = Collections.emptyList(); + List result = Collections.emptyList(); String ufficioIds = ""; 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 9cb5a666..b66c3a6b 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=2775 - build.date=1607527945037 + build.number=2800 + build.date=1607692123061 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp index f054be1b..51eea24b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp @@ -96,19 +96,22 @@ List pareriGeologo = ParereGeologoLocalServiceUtil.findByIntPrati

Dettagli dati inseriti nel Workflow

    <% - if( parametri.isEmpty()){ + if (parametri.isEmpty()) { out.print("
  • Nessun dato inserito
  • "); - }else { - for(Entry entry: parametri.entrySet()){ - String key = entry.getKey(); - if (key.equals("ingloba_variante")){ - String value = entry.getValue().toString(); - out.print("
  • "+value+"
  • "); - }else{ - String value = entry.getValue().toString(); - out.print("
  • "+LanguageUtil.get(pageContext, key)+": "+LanguageUtil.get(pageContext, WorkflowUtil.adjustWorkflowContextValue(key, value, intPratica.getIntPraticaId()))+"
  • "); - } - } + } else { + for (Entry entry : parametri.entrySet()) { + String key = entry.getKey(); + if (key.equals("ingloba_variante")) { + String value = entry.getValue().toString(); + out.print("
  • "+value+"
  • "); + } else { + String value = entry.getValue().toString(); + out.print("
  • " + LanguageUtil.get(pageContext, key) + ": " + + LanguageUtil.get(pageContext, + WorkflowUtil.adjustWorkflowContextValue(key, value, intPratica.getIntPraticaId())) + + "
  • "); + } + } } %>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp index 0177c372..a0b894d6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp @@ -79,7 +79,7 @@
Stato:
<%=LanguageUtil.get(pageContext, - PraticaUtil.getStatoPraticaLabel(intPratica.getStatoPratica(), intPratica))%> + PraticaUtil.getStatoPraticaLabel(intPratica.getStatoPratica(), intPratica.getIntPraticaId()))%>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp index a1e848d1..832dfe64 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp @@ -95,8 +95,6 @@ String orderByType = ParamUtil.getString(request, "orderByType", "asc"); String orderByCol = ParamUtil.getString(request, "orderByCol", "nome"); String keywords = StringPool.BLANK; -String dtSorteggioNullo = "2020-03-05 11:12:18.006"; - %> @@ -194,15 +192,17 @@ String dtSorteggioNullo = "2020-03-05 11:12:18.006"; className="it.tref.liferay.portos.bo.model.IntPratica" modelVar="intPratica" > - <% - DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); + <% + long intPraticaId = intPratica.getIntPraticaId(); + DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId); Log _log = LogFactoryUtil.getLog("fascicolo/view.jsp"); - if (lastDettPratica == null) - _log.info("intPraticaId=" + intPratica.getIntPraticaId() + ", lastDettPratica null"); + if (lastDettPratica == null) { + _log.info("intPraticaId=" + intPraticaId + ", lastDettPratica null"); + } %> - + @@ -219,9 +219,9 @@ String dtSorteggioNullo = "2020-03-05 11:12:18.006"; Le pratiche sottoposte a parere sono quelle che hanno statoPratica == 'SP', non quelle in status di workflow = pending --> - "> + - SP + <%= StatoPraticaConstants.SOTTOPOSTA_A_PARERE %> @@ -232,20 +232,11 @@ String dtSorteggioNullo = "2020-03-05 11:12:18.006"; - <% Sorteggio sorteggio = SorteggioLocalServiceUtil.findByIntPratica(intPratica.getIntPraticaId()); %> + <% Sorteggio sorteggio = SorteggioLocalServiceUtil.findByIntPratica(intPraticaId); %> - - "> - - - - - - - - - - + + + @@ -302,11 +293,11 @@ String dtSorteggioNullo = "2020-03-05 11:12:18.006"; - <%= LanguageUtil.get(pageContext, PraticaUtil.getStatoPraticaLabel(intPratica.getStatoPratica(), intPratica)) %> + <%= LanguageUtil.get(pageContext, PraticaUtil.getStatoPraticaLabel(intPratica.getStatoPratica(), intPraticaId)) %> <% - List avvisi = AvvisoLocalServiceUtil.findByIntPratica(intPratica.getIntPraticaId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS, OrderByComparatorFactoryUtil.create("portos_bo_Avviso", "createDate", false)); + List avvisi = AvvisoLocalServiceUtil.findByIntPratica(intPraticaId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, OrderByComparatorFactoryUtil.create("portos_bo_Avviso", "createDate", false)); StringBuilder sb = new StringBuilder(); if(!avvisi.isEmpty()){ sb.append("