Sfoglia il codice sorgente

Fix asseverazioni per soggetto censito in più ambiti professionali

master
Salvatore La Manna 3 anni fa
parent
commit
bdceac3880
  1. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml
  2. 28
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalService.java
  3. 431
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceClp.java
  4. 41
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceUtil.java
  5. 48
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceWrapper.java
  6. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java
  7. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/startup/DatabaseUpdateAction.java
  8. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java
  9. 67
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/AsseverazioneLocalServiceClpInvoker.java
  10. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java
  11. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeServiceImpl.java
  12. 173
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
  13. 17
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
  14. 17
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/CollaudoLocalServiceImpl.java
  15. 84
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java
  16. 39
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneServiceImpl.java
  17. 44
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneServiceImpl.java
  18. 51
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ConfigurazioneServiceImpl.java
  19. 52
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
  20. 7
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java
  21. 39
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
  22. 35
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
  23. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
  24. 15
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java
  25. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java
  26. 49
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
  27. 16
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java
  28. 33
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
  29. 55
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoServiceImpl.java
  30. 130
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
  31. 33
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoServiceImpl.java
  32. 33
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java
  33. 23
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TempisticaLocalServiceImpl.java
  34. 15
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TerritorioServiceImpl.java
  35. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java
  36. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java
  37. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java
  38. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java
  39. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java
  40. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java
  41. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java
  42. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java
  43. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java
  44. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java
  45. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java
  46. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java
  47. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java
  48. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java
  49. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java
  50. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java
  51. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java
  52. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java
  53. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java
  54. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java
  55. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java
  56. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java
  57. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java
  58. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/portlet.properties
  59. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  60. 489
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/common/save_actions.jspf
  61. 4
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml

@ -1627,8 +1627,7 @@
<finder-column name="tipologia" /> <finder-column name="tipologia" />
<finder-column name="esito" arrayable-operator="IN" /> <finder-column name="esito" arrayable-operator="IN" />
</finder> </finder>
<reference package-path="com.liferay.portlet.documentlibrary" <reference package-path="com.liferay.portlet.documentlibrary" entity="DLApp" />
entity="DLApp" />
</entity> </entity>
<entity name="HistoryWorkflowAction" local-service="true" <entity name="HistoryWorkflowAction" local-service="true"

28
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalService.java

@ -310,43 +310,25 @@ public interface AsseverazioneLocalService extends BaseLocalService,
java.lang.String[] parameterTypes, java.lang.Object[] arguments) java.lang.String[] parameterTypes, java.lang.Object[] arguments)
throws java.lang.Throwable; throws java.lang.Throwable;
public java.lang.String anteprimaAsseverazione(java.lang.String tipo, public java.lang.String anteprimaAsseverazione(
com.liferay.portal.model.User user, it.tref.liferay.portos.bo.model.Asseverazione asseverazione)
it.tref.liferay.portos.bo.model.DettPratica dettPratica,
java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException; java.io.IOException;
public java.lang.String testoAsseverazione(java.lang.String tipo, public java.lang.String anteprimaAsseverazioneGeologo(
com.liferay.portal.model.User user, long dettPraticaId, java.lang.String codiceFiscale, long dettPraticaId)
java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException; java.io.IOException;
public java.lang.String testoAsseverazione(java.lang.String tipo, public java.lang.String testoAsseverazioneGeologo(
java.lang.String codiceFiscale, long dettPraticaId, java.lang.String codiceFiscale, long dettPraticaId,
java.lang.String relazioni) java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException; java.io.IOException;
public java.lang.String testoAsseverazione(java.lang.String tipo,
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;
public it.tref.liferay.portos.bo.model.Asseverazione addAsseverazione(
long userId, long intPraticaId, long dettPraticaId,
java.lang.String tipologia, java.lang.String codiceFiscale,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException;
public void richiediAsseverazioni(long dettPraticaId, public void richiediAsseverazioni(long dettPraticaId,
com.liferay.portal.service.ServiceContext serviceContext) com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,

431
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceClp.java

@ -134,230 +134,209 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
_methodName23 = "anteprimaAsseverazione"; _methodName23 = "anteprimaAsseverazione";
_methodParameterTypes23 = new String[] { _methodParameterTypes23 = new String[] {
"java.lang.String", "com.liferay.portal.model.User", "it.tref.liferay.portos.bo.model.Asseverazione"
"it.tref.liferay.portos.bo.model.DettPratica",
"java.lang.String"
}; };
_methodName24 = "testoAsseverazione"; _methodName24 = "anteprimaAsseverazioneGeologo";
_methodParameterTypes24 = new String[] { _methodParameterTypes24 = new String[] { "java.lang.String", "long" };
"java.lang.String", "com.liferay.portal.model.User", "long",
"java.lang.String"
};
_methodName25 = "testoAsseverazione"; _methodName25 = "testoAsseverazioneGeologo";
_methodParameterTypes25 = new String[] { _methodParameterTypes25 = new String[] {
"java.lang.String", "java.lang.String", "long", "java.lang.String", "long", "java.lang.String"
"java.lang.String"
}; };
_methodName26 = "testoAsseverazione"; _methodName26 = "richiediAsseverazioni";
_methodParameterTypes26 = new String[] { _methodParameterTypes26 = new String[] {
"java.lang.String", "java.lang.String",
"it.tref.liferay.portos.bo.model.DettPratica",
"java.lang.String"
};
_methodName27 = "addAsseverazione";
_methodParameterTypes27 = new String[] {
"long", "long", "long", "java.lang.String", "java.lang.String",
"com.liferay.portal.service.ServiceContext"
};
_methodName28 = "richiediAsseverazioni";
_methodParameterTypes28 = new String[] {
"long", "com.liferay.portal.service.ServiceContext" "long", "com.liferay.portal.service.ServiceContext"
}; };
_methodName29 = "resetAsseverazione"; _methodName27 = "resetAsseverazione";
_methodParameterTypes29 = new String[] { "long" }; _methodParameterTypes27 = new String[] { "long" };
_methodName30 = "annullaAsseverazioni"; _methodName28 = "annullaAsseverazioni";
_methodParameterTypes30 = new String[] { "long" }; _methodParameterTypes28 = new String[] { "long" };
_methodName31 = "cambioStatoAsseverazione"; _methodName29 = "cambioStatoAsseverazione";
_methodParameterTypes31 = new String[] { _methodParameterTypes29 = new String[] {
"long", "long", "java.lang.String" "long", "long", "java.lang.String"
}; };
_methodName32 = "generateReportAsseverazione"; _methodName30 = "generateReportAsseverazione";
_methodParameterTypes32 = new String[] { _methodParameterTypes30 = new String[] {
"it.tref.liferay.portos.bo.model.Asseverazione", "long" "it.tref.liferay.portos.bo.model.Asseverazione", "long"
}; };
_methodName33 = "cambioStatoAsseverazioni"; _methodName31 = "cambioStatoAsseverazioni";
_methodParameterTypes33 = new String[] { "long", "java.lang.String" }; _methodParameterTypes31 = new String[] { "long", "java.lang.String" };
_methodName34 = "concludiAsseverazioniExpired"; _methodName32 = "concludiAsseverazioniExpired";
_methodParameterTypes34 = new String[] { "long" }; _methodParameterTypes32 = new String[] { "long" };
_methodName35 = "rimuoviFileAsseverazione"; _methodName33 = "rimuoviFileAsseverazione";
_methodParameterTypes35 = new String[] { "long" }; _methodParameterTypes33 = new String[] { "long" };
_methodName36 = "allegaFileAsseverazione"; _methodName34 = "allegaFileAsseverazione";
_methodParameterTypes36 = new String[] { _methodParameterTypes34 = new String[] {
"long", "byte[][]", "java.lang.String", "long", "byte[][]", "java.lang.String",
"com.liferay.portal.service.ServiceContext" "com.liferay.portal.service.ServiceContext"
}; };
_methodName37 = "findByIntPratica"; _methodName35 = "findByIntPratica";
_methodParameterTypes37 = new String[] { _methodParameterTypes35 = new String[] {
"long", "int", "int", "long", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName38 = "findByDettPratica"; _methodName36 = "findByDettPratica";
_methodParameterTypes38 = new String[] { _methodParameterTypes36 = new String[] {
"long", "int", "int", "long", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName39 = "countByIntPratica"; _methodName37 = "countByIntPratica";
_methodParameterTypes39 = new String[] { "long" }; _methodParameterTypes37 = new String[] { "long" };
_methodName40 = "countByDettPratica"; _methodName38 = "countByDettPratica";
_methodParameterTypes40 = new String[] { "long" }; _methodParameterTypes38 = new String[] { "long" };
_methodName41 = "findByIntPratica_CodiceFiscale"; _methodName39 = "findByIntPratica_CodiceFiscale";
_methodParameterTypes41 = new String[] { _methodParameterTypes39 = new String[] {
"long", "java.lang.String", "int", "int", "long", "java.lang.String", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName42 = "countByIntPratica_CodiceFiscale"; _methodName40 = "countByIntPratica_CodiceFiscale";
_methodParameterTypes42 = new String[] { "long", "java.lang.String" }; _methodParameterTypes40 = new String[] { "long", "java.lang.String" };
_methodName43 = "findByCodiceFiscale_InEsito"; _methodName41 = "findByCodiceFiscale_InEsito";
_methodParameterTypes43 = new String[] { _methodParameterTypes41 = new String[] {
"java.lang.String", "java.lang.String[][]", "int", "int", "java.lang.String", "java.lang.String[][]", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName44 = "countByCodiceFiscale_InEsito"; _methodName42 = "countByCodiceFiscale_InEsito";
_methodParameterTypes44 = new String[] { _methodParameterTypes42 = new String[] {
"java.lang.String", "java.lang.String[][]" "java.lang.String", "java.lang.String[][]"
}; };
_methodName45 = "findByIntPratica_CodiceFiscale_InEsito"; _methodName43 = "findByIntPratica_CodiceFiscale_InEsito";
_methodParameterTypes45 = new String[] { _methodParameterTypes43 = new String[] {
"long", "java.lang.String", "java.lang.String[][]", "int", "int", "long", "java.lang.String", "java.lang.String[][]", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName46 = "findByDettPratica_CodiceFiscale_InEsito"; _methodName44 = "findByDettPratica_CodiceFiscale_InEsito";
_methodParameterTypes46 = new String[] { _methodParameterTypes44 = new String[] {
"long", "java.lang.String", "java.lang.String[][]", "int", "int", "long", "java.lang.String", "java.lang.String[][]", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName47 = "countByIntPratica_CodiceFiscale_InEsito"; _methodName45 = "countByIntPratica_CodiceFiscale_InEsito";
_methodParameterTypes47 = new String[] { _methodParameterTypes45 = new String[] {
"long", "java.lang.String", "java.lang.String[][]" "long", "java.lang.String", "java.lang.String[][]"
}; };
_methodName48 = "countByDettPratica_CodiceFiscale_InEsito"; _methodName46 = "countByDettPratica_CodiceFiscale_InEsito";
_methodParameterTypes48 = new String[] { _methodParameterTypes46 = new String[] {
"long", "java.lang.String", "java.lang.String[][]" "long", "java.lang.String", "java.lang.String[][]"
}; };
_methodName49 = "findByIntPratica_InEsito"; _methodName47 = "findByIntPratica_InEsito";
_methodParameterTypes49 = new String[] { _methodParameterTypes47 = new String[] {
"long", "java.lang.String[][]", "int", "int", "long", "java.lang.String[][]", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName50 = "countByIntPratica_InEsito"; _methodName48 = "countByIntPratica_InEsito";
_methodParameterTypes50 = new String[] { "long", "java.lang.String[][]" }; _methodParameterTypes48 = new String[] { "long", "java.lang.String[][]" };
_methodName51 = "findByDettPratica_InEsito"; _methodName49 = "findByDettPratica_InEsito";
_methodParameterTypes51 = new String[] { _methodParameterTypes49 = new String[] {
"long", "java.lang.String[][]", "int", "int", "long", "java.lang.String[][]", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName52 = "countByDettPratica_InEsito"; _methodName50 = "countByDettPratica_InEsito";
_methodParameterTypes52 = new String[] { "long", "java.lang.String[][]" }; _methodParameterTypes50 = new String[] { "long", "java.lang.String[][]" };
_methodName53 = "findByCodiceFiscale_Tipologia_InEsito"; _methodName51 = "findByCodiceFiscale_Tipologia_InEsito";
_methodParameterTypes53 = new String[] { _methodParameterTypes51 = new String[] {
"java.lang.String", "java.lang.String", "java.lang.String[][]", "java.lang.String", "java.lang.String", "java.lang.String[][]",
"int", "int", "com.liferay.portal.kernel.util.OrderByComparator" "int", "int", "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName54 = "countByCodiceFiscale_Tipologia_InEsito"; _methodName52 = "countByCodiceFiscale_Tipologia_InEsito";
_methodParameterTypes54 = new String[] { _methodParameterTypes52 = new String[] {
"java.lang.String", "java.lang.String", "java.lang.String[][]" "java.lang.String", "java.lang.String", "java.lang.String[][]"
}; };
_methodName55 = "findByIntPratica_CodiceFiscale_Tipologia_InEsito"; _methodName53 = "findByIntPratica_CodiceFiscale_Tipologia_InEsito";
_methodParameterTypes55 = new String[] { _methodParameterTypes53 = new String[] {
"long", "java.lang.String", "java.lang.String", "long", "java.lang.String", "java.lang.String",
"java.lang.String[][]", "int", "int", "java.lang.String[][]", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName56 = "countByIntPratica_CodiceFiscale_Tipologia_InEsito"; _methodName54 = "countByIntPratica_CodiceFiscale_Tipologia_InEsito";
_methodParameterTypes56 = new String[] { _methodParameterTypes54 = new String[] {
"long", "java.lang.String", "java.lang.String", "long", "java.lang.String", "java.lang.String",
"java.lang.String[][]" "java.lang.String[][]"
}; };
_methodName57 = "findByIntPratica_Tipologia_InEsito"; _methodName55 = "findByIntPratica_Tipologia_InEsito";
_methodParameterTypes57 = new String[] { _methodParameterTypes55 = new String[] {
"long", "java.lang.String", "java.lang.String[][]", "int", "int", "long", "java.lang.String", "java.lang.String[][]", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName58 = "findByDettPratica_Tipologia_InEsito"; _methodName56 = "findByDettPratica_Tipologia_InEsito";
_methodParameterTypes58 = new String[] { _methodParameterTypes56 = new String[] {
"long", "java.lang.String", "java.lang.String[][]", "int", "int", "long", "java.lang.String", "java.lang.String[][]", "int", "int",
"com.liferay.portal.kernel.util.OrderByComparator" "com.liferay.portal.kernel.util.OrderByComparator"
}; };
_methodName59 = "countByIntPratica_Tipologia_InEsito"; _methodName57 = "countByIntPratica_Tipologia_InEsito";
_methodParameterTypes59 = new String[] { _methodParameterTypes57 = new String[] {
"long", "java.lang.String", "java.lang.String[][]" "long", "java.lang.String", "java.lang.String[][]"
}; };
_methodName60 = "countByDettPratica_Tipologia_InEsito"; _methodName58 = "countByDettPratica_Tipologia_InEsito";
_methodParameterTypes60 = new String[] { _methodParameterTypes58 = new String[] {
"long", "java.lang.String", "java.lang.String[][]" "long", "java.lang.String", "java.lang.String[][]"
}; };
} }
@ -1043,10 +1022,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
} }
@Override @Override
public java.lang.String anteprimaAsseverazione(java.lang.String tipo, public java.lang.String anteprimaAsseverazione(
com.liferay.portal.model.User user, it.tref.liferay.portos.bo.model.Asseverazione asseverazione)
it.tref.liferay.portos.bo.model.DettPratica dettPratica,
java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
@ -1055,15 +1032,7 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName23, returnObj = _invokableLocalService.invokeMethod(_methodName23,
_methodParameterTypes23, _methodParameterTypes23,
new Object[] { new Object[] { ClpSerializer.translateInput(asseverazione) });
ClpSerializer.translateInput(tipo),
ClpSerializer.translateInput(user),
ClpSerializer.translateInput(dettPratica),
ClpSerializer.translateInput(relazioni)
});
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -1093,9 +1062,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
} }
@Override @Override
public java.lang.String testoAsseverazione(java.lang.String tipo, public java.lang.String anteprimaAsseverazioneGeologo(
com.liferay.portal.model.User user, long dettPraticaId, java.lang.String codiceFiscale, long dettPraticaId)
java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
@ -1105,13 +1073,9 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
returnObj = _invokableLocalService.invokeMethod(_methodName24, returnObj = _invokableLocalService.invokeMethod(_methodName24,
_methodParameterTypes24, _methodParameterTypes24,
new Object[] { new Object[] {
ClpSerializer.translateInput(tipo), ClpSerializer.translateInput(codiceFiscale),
ClpSerializer.translateInput(user),
dettPraticaId,
ClpSerializer.translateInput(relazioni) dettPraticaId
}); });
} }
catch (Throwable t) { catch (Throwable t) {
@ -1142,7 +1106,7 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
} }
@Override @Override
public java.lang.String testoAsseverazione(java.lang.String tipo, public java.lang.String testoAsseverazioneGeologo(
java.lang.String codiceFiscale, long dettPraticaId, java.lang.String codiceFiscale, long dettPraticaId,
java.lang.String relazioni) java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
@ -1154,9 +1118,7 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
returnObj = _invokableLocalService.invokeMethod(_methodName25, returnObj = _invokableLocalService.invokeMethod(_methodName25,
_methodParameterTypes25, _methodParameterTypes25,
new Object[] { new Object[] {
ClpSerializer.translateInput(tipo), ClpSerializer.translateInput(codiceFiscale),
ClpSerializer.translateInput(codiceFiscale),
dettPraticaId, dettPraticaId,
@ -1190,113 +1152,14 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
return (java.lang.String)ClpSerializer.translateOutput(returnObj); return (java.lang.String)ClpSerializer.translateOutput(returnObj);
} }
@Override
public java.lang.String testoAsseverazione(java.lang.String tipo,
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 {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName26,
_methodParameterTypes26,
new Object[] {
ClpSerializer.translateInput(tipo),
ClpSerializer.translateInput(codiceFiscale),
ClpSerializer.translateInput(dettPratica),
ClpSerializer.translateInput(relazioni)
});
}
catch (Throwable t) {
t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)t;
}
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof RuntimeException) {
throw (RuntimeException)t;
}
else {
throw new RuntimeException(t.getClass().getName() +
" is not a valid exception");
}
}
return (java.lang.String)ClpSerializer.translateOutput(returnObj);
}
@Override
public it.tref.liferay.portos.bo.model.Asseverazione addAsseverazione(
long userId, long intPraticaId, long dettPraticaId,
java.lang.String tipologia, java.lang.String codiceFiscale,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName27,
_methodParameterTypes27,
new Object[] {
userId,
intPraticaId,
dettPraticaId,
ClpSerializer.translateInput(tipologia),
ClpSerializer.translateInput(codiceFiscale),
ClpSerializer.translateInput(serviceContext)
});
}
catch (Throwable t) {
t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)t;
}
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) {
throw (RuntimeException)t;
}
else {
throw new RuntimeException(t.getClass().getName() +
" is not a valid exception");
}
}
return (it.tref.liferay.portos.bo.model.Asseverazione)ClpSerializer.translateOutput(returnObj);
}
@Override @Override
public void richiediAsseverazioni(long dettPraticaId, public void richiediAsseverazioni(long dettPraticaId,
com.liferay.portal.service.ServiceContext serviceContext) com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException { com.liferay.portal.kernel.exception.SystemException {
try { try {
_invokableLocalService.invokeMethod(_methodName28, _invokableLocalService.invokeMethod(_methodName26,
_methodParameterTypes28, _methodParameterTypes26,
new Object[] { new Object[] {
dettPraticaId, dettPraticaId,
@ -1329,8 +1192,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException { com.liferay.portal.kernel.exception.SystemException {
try { try {
_invokableLocalService.invokeMethod(_methodName29, _invokableLocalService.invokeMethod(_methodName27,
_methodParameterTypes29, new Object[] { asseverazioneId }); _methodParameterTypes27, new Object[] { asseverazioneId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -1359,8 +1222,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
try { try {
_invokableLocalService.invokeMethod(_methodName30, _invokableLocalService.invokeMethod(_methodName28,
_methodParameterTypes30, new Object[] { dettPraticaId }); _methodParameterTypes28, new Object[] { dettPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -1394,8 +1257,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
try { try {
_invokableLocalService.invokeMethod(_methodName31, _invokableLocalService.invokeMethod(_methodName29,
_methodParameterTypes31, _methodParameterTypes29,
new Object[] { new Object[] {
userId, userId,
@ -1438,8 +1301,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName32, returnObj = _invokableLocalService.invokeMethod(_methodName30,
_methodParameterTypes32, _methodParameterTypes30,
new Object[] { new Object[] {
ClpSerializer.translateInput(asseverazione), ClpSerializer.translateInput(asseverazione),
@ -1480,8 +1343,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
try { try {
_invokableLocalService.invokeMethod(_methodName33, _invokableLocalService.invokeMethod(_methodName31,
_methodParameterTypes33, _methodParameterTypes31,
new Object[] { dettPraticaId, ClpSerializer.translateInput( new Object[] { dettPraticaId, ClpSerializer.translateInput(
stato) }); stato) });
} }
@ -1516,8 +1379,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
try { try {
_invokableLocalService.invokeMethod(_methodName34, _invokableLocalService.invokeMethod(_methodName32,
_methodParameterTypes34, new Object[] { dettPraticaId }); _methodParameterTypes32, new Object[] { dettPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -1549,8 +1412,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException { com.liferay.portal.kernel.exception.SystemException {
try { try {
_invokableLocalService.invokeMethod(_methodName35, _invokableLocalService.invokeMethod(_methodName33,
_methodParameterTypes35, new Object[] { asseverazioneId }); _methodParameterTypes33, new Object[] { asseverazioneId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -1582,8 +1445,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName36, returnObj = _invokableLocalService.invokeMethod(_methodName34,
_methodParameterTypes36, _methodParameterTypes34,
new Object[] { new Object[] {
asseverazioneId, asseverazioneId,
@ -1625,8 +1488,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName37, returnObj = _invokableLocalService.invokeMethod(_methodName35,
_methodParameterTypes37, _methodParameterTypes35,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -1664,8 +1527,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName38, returnObj = _invokableLocalService.invokeMethod(_methodName36,
_methodParameterTypes38, _methodParameterTypes36,
new Object[] { new Object[] {
dettPraticaId, dettPraticaId,
@ -1701,8 +1564,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName39, returnObj = _invokableLocalService.invokeMethod(_methodName37,
_methodParameterTypes39, new Object[] { intPraticaId }); _methodParameterTypes37, new Object[] { intPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -1729,8 +1592,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName40, returnObj = _invokableLocalService.invokeMethod(_methodName38,
_methodParameterTypes40, new Object[] { dettPraticaId }); _methodParameterTypes38, new Object[] { dettPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -1759,8 +1622,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName41, returnObj = _invokableLocalService.invokeMethod(_methodName39,
_methodParameterTypes41, _methodParameterTypes39,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -1799,8 +1662,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName42, returnObj = _invokableLocalService.invokeMethod(_methodName40,
_methodParameterTypes42, _methodParameterTypes40,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -1835,8 +1698,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName43, returnObj = _invokableLocalService.invokeMethod(_methodName41,
_methodParameterTypes43, _methodParameterTypes41,
new Object[] { new Object[] {
ClpSerializer.translateInput(codiceFiscale), ClpSerializer.translateInput(codiceFiscale),
@ -1875,8 +1738,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName44, returnObj = _invokableLocalService.invokeMethod(_methodName42,
_methodParameterTypes44, _methodParameterTypes42,
new Object[] { new Object[] {
ClpSerializer.translateInput(codiceFiscale), ClpSerializer.translateInput(codiceFiscale),
@ -1911,8 +1774,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName45, returnObj = _invokableLocalService.invokeMethod(_methodName43,
_methodParameterTypes45, _methodParameterTypes43,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -1955,8 +1818,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName46, returnObj = _invokableLocalService.invokeMethod(_methodName44,
_methodParameterTypes46, _methodParameterTypes44,
new Object[] { new Object[] {
dettPraticaId, dettPraticaId,
@ -1997,8 +1860,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName47, returnObj = _invokableLocalService.invokeMethod(_methodName45,
_methodParameterTypes47, _methodParameterTypes45,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -2033,8 +1896,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName48, returnObj = _invokableLocalService.invokeMethod(_methodName46,
_methodParameterTypes48, _methodParameterTypes46,
new Object[] { new Object[] {
dettPraticaId, dettPraticaId,
@ -2070,8 +1933,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName49, returnObj = _invokableLocalService.invokeMethod(_methodName47,
_methodParameterTypes49, _methodParameterTypes47,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -2110,8 +1973,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName50, returnObj = _invokableLocalService.invokeMethod(_methodName48,
_methodParameterTypes50, _methodParameterTypes48,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -2145,8 +2008,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName51, returnObj = _invokableLocalService.invokeMethod(_methodName49,
_methodParameterTypes51, _methodParameterTypes49,
new Object[] { new Object[] {
dettPraticaId, dettPraticaId,
@ -2185,8 +2048,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName52, returnObj = _invokableLocalService.invokeMethod(_methodName50,
_methodParameterTypes52, _methodParameterTypes50,
new Object[] { new Object[] {
dettPraticaId, dettPraticaId,
@ -2221,8 +2084,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName53, returnObj = _invokableLocalService.invokeMethod(_methodName51,
_methodParameterTypes53, _methodParameterTypes51,
new Object[] { new Object[] {
ClpSerializer.translateInput(codiceFiscale), ClpSerializer.translateInput(codiceFiscale),
@ -2264,8 +2127,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName54, returnObj = _invokableLocalService.invokeMethod(_methodName52,
_methodParameterTypes54, _methodParameterTypes52,
new Object[] { new Object[] {
ClpSerializer.translateInput(codiceFiscale), ClpSerializer.translateInput(codiceFiscale),
@ -2303,8 +2166,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName55, returnObj = _invokableLocalService.invokeMethod(_methodName53,
_methodParameterTypes55, _methodParameterTypes53,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -2348,8 +2211,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName56, returnObj = _invokableLocalService.invokeMethod(_methodName54,
_methodParameterTypes56, _methodParameterTypes54,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -2388,8 +2251,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName57, returnObj = _invokableLocalService.invokeMethod(_methodName55,
_methodParameterTypes57, _methodParameterTypes55,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -2432,8 +2295,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName58, returnObj = _invokableLocalService.invokeMethod(_methodName56,
_methodParameterTypes58, _methodParameterTypes56,
new Object[] { new Object[] {
dettPraticaId, dettPraticaId,
@ -2474,8 +2337,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName59, returnObj = _invokableLocalService.invokeMethod(_methodName57,
_methodParameterTypes59, _methodParameterTypes57,
new Object[] { new Object[] {
intPraticaId, intPraticaId,
@ -2510,8 +2373,8 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName60, returnObj = _invokableLocalService.invokeMethod(_methodName58,
_methodParameterTypes60, _methodParameterTypes58,
new Object[] { new Object[] {
dettPraticaId, dettPraticaId,
@ -2656,8 +2519,4 @@ public class AsseverazioneLocalServiceClp implements AsseverazioneLocalService {
private String[] _methodParameterTypes57; private String[] _methodParameterTypes57;
private String _methodName58; private String _methodName58;
private String[] _methodParameterTypes58; private String[] _methodParameterTypes58;
private String _methodName59;
private String[] _methodParameterTypes59;
private String _methodName60;
private String[] _methodParameterTypes60;
} }

41
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceUtil.java

@ -336,60 +336,33 @@ public class AsseverazioneLocalServiceUtil {
} }
public static java.lang.String anteprimaAsseverazione( public static java.lang.String anteprimaAsseverazione(
java.lang.String tipo, com.liferay.portal.model.User user, it.tref.liferay.portos.bo.model.Asseverazione asseverazione)
it.tref.liferay.portos.bo.model.DettPratica dettPratica,
java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
return getService() return getService().anteprimaAsseverazione(asseverazione);
.anteprimaAsseverazione(tipo, user, dettPratica, relazioni);
} }
public static java.lang.String testoAsseverazione(java.lang.String tipo, public static java.lang.String anteprimaAsseverazioneGeologo(
com.liferay.portal.model.User user, long dettPraticaId, java.lang.String codiceFiscale, long dettPraticaId)
java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
return getService() return getService()
.testoAsseverazione(tipo, user, dettPraticaId, relazioni); .anteprimaAsseverazioneGeologo(codiceFiscale, dettPraticaId);
} }
public static java.lang.String testoAsseverazione(java.lang.String tipo, public static java.lang.String testoAsseverazioneGeologo(
java.lang.String codiceFiscale, long dettPraticaId, java.lang.String codiceFiscale, long dettPraticaId,
java.lang.String relazioni) java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
return getService() return getService()
.testoAsseverazione(tipo, codiceFiscale, dettPraticaId, .testoAsseverazioneGeologo(codiceFiscale, dettPraticaId,
relazioni); relazioni);
} }
public static java.lang.String testoAsseverazione(java.lang.String tipo,
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, codiceFiscale, dettPratica,
relazioni);
}
public static it.tref.liferay.portos.bo.model.Asseverazione addAsseverazione(
long userId, long intPraticaId, long dettPraticaId,
java.lang.String tipologia, java.lang.String codiceFiscale,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException {
return getService()
.addAsseverazione(userId, intPraticaId, dettPraticaId,
tipologia, codiceFiscale, serviceContext);
}
public static void richiediAsseverazioni(long dettPraticaId, public static void richiediAsseverazioni(long dettPraticaId,
com.liferay.portal.service.ServiceContext serviceContext) com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,

48
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneLocalServiceWrapper.java

@ -357,61 +357,33 @@ public class AsseverazioneLocalServiceWrapper
} }
@Override @Override
public java.lang.String anteprimaAsseverazione(java.lang.String tipo, public java.lang.String anteprimaAsseverazione(
com.liferay.portal.model.User user, it.tref.liferay.portos.bo.model.Asseverazione asseverazione)
it.tref.liferay.portos.bo.model.DettPratica dettPratica,
java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
return _asseverazioneLocalService.anteprimaAsseverazione(tipo, user, return _asseverazioneLocalService.anteprimaAsseverazione(asseverazione);
dettPratica, relazioni);
} }
@Override @Override
public java.lang.String testoAsseverazione(java.lang.String tipo, public java.lang.String anteprimaAsseverazioneGeologo(
com.liferay.portal.model.User user, long dettPraticaId, java.lang.String codiceFiscale, long dettPraticaId)
java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
return _asseverazioneLocalService.testoAsseverazione(tipo, user, return _asseverazioneLocalService.anteprimaAsseverazioneGeologo(codiceFiscale,
dettPraticaId, relazioni); dettPraticaId);
} }
@Override @Override
public java.lang.String testoAsseverazione(java.lang.String tipo, public java.lang.String testoAsseverazioneGeologo(
java.lang.String codiceFiscale, long dettPraticaId, java.lang.String codiceFiscale, long dettPraticaId,
java.lang.String relazioni) java.lang.String relazioni)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.SystemException,
java.io.IOException { java.io.IOException {
return _asseverazioneLocalService.testoAsseverazione(tipo, return _asseverazioneLocalService.testoAsseverazioneGeologo(codiceFiscale,
codiceFiscale, dettPraticaId, relazioni); dettPraticaId, relazioni);
}
@Override
public java.lang.String testoAsseverazione(java.lang.String tipo,
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,
codiceFiscale, dettPratica, relazioni);
}
@Override
public it.tref.liferay.portos.bo.model.Asseverazione addAsseverazione(
long userId, long intPraticaId, long dettPraticaId,
java.lang.String tipologia, java.lang.String codiceFiscale,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException {
return _asseverazioneLocalService.addAsseverazione(userId,
intPraticaId, dettPraticaId, tipologia, codiceFiscale,
serviceContext);
} }
@Override @Override

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java

@ -108,7 +108,7 @@ public class AsseverazioniUtil {
public static final String ASSEVERAZIONI_DOMANDA = "asseverazioni_domanda"; public static final String ASSEVERAZIONI_DOMANDA = "asseverazioni_domanda";
public static final String ASSEVERAZIONI_VARIANTE = "asseverazioni_variante"; public static final String ASSEVERAZIONI_VARIANTE = "asseverazioni_variante";
public static final String ASSEVERAZIONI_INTEGRAZIONE = "asseverazioni_integrazione"; public static final String ASSEVERAZIONI_INTEGRAZIONE = "asseverazioni_integrazione";
@SuppressWarnings("serial") @SuppressWarnings("serial")
private static final Map<String, List<String>> required = new HashMap<String, List<String>>() { private static final Map<String, List<String>> required = new HashMap<String, List<String>>() {
{ {

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/startup/DatabaseUpdateAction.java

@ -128,12 +128,12 @@ public class DatabaseUpdateAction extends SimpleAction {
s.executeUpdate("ALTER TABLE " + DelegaImpl.TABLE_NAME s.executeUpdate("ALTER TABLE " + DelegaImpl.TABLE_NAME
+ " ADD COLUMN dichiarazioni TEXT NULL"); + " ADD COLUMN dichiarazioni TEXT NULL");
} }
if (!hasColumn(IntPraticaImpl.TABLE_NAME, "inLavorazioneSue")) { if (!hasColumn(IntPraticaImpl.TABLE_NAME, "inLavorazioneSue")) {
_log.info("Aggiornamento a v4 di " + IntPraticaImpl.TABLE_NAME); _log.info("Aggiornamento a v4 di " + IntPraticaImpl.TABLE_NAME);
s.executeUpdate("ALTER TABLE " + IntPraticaImpl.TABLE_NAME + " ADD COLUMN inLavorazioneSue BOOL"); s.executeUpdate("ALTER TABLE " + IntPraticaImpl.TABLE_NAME + " ADD COLUMN inLavorazioneSue BOOL");
} }
} catch (SQLException e) { } catch (SQLException e) {
_log.error("Errore di accesso al database: ", e); _log.error("Errore di accesso al database: ", e);
throw new ActionException(e); throw new ActionException(e);

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java

@ -204,10 +204,9 @@ public class ManutenzioneDatabase {
} }
private static List<String> svuotaDatabase(long companyId) throws SystemException, PortalException { private static List<String> svuotaDatabase(long companyId) throws SystemException, PortalException {
List<String> esito = new ArrayList<>();
List<String> esito = new ArrayList<>();
esitoLog(esito, svuotaDettPratica()); esitoLog(esito, svuotaDettPratica());
esitoLog(esito, svuotaAllegatoManuale()); esitoLog(esito, svuotaAllegatoManuale());
esitoLog(esito, svuotaAssetEntry(companyId)); esitoLog(esito, svuotaAssetEntry(companyId));
esitoLog(esito, svuotaAsseverazione()); esitoLog(esito, svuotaAsseverazione());

67
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/AsseverazioneLocalServiceClpInvoker.java

@ -133,38 +133,17 @@ public class AsseverazioneLocalServiceClpInvoker {
_methodName186 = "anteprimaAsseverazione"; _methodName186 = "anteprimaAsseverazione";
_methodParameterTypes186 = new String[] { _methodParameterTypes186 = new String[] {
"java.lang.String", "com.liferay.portal.model.User", "it.tref.liferay.portos.bo.model.Asseverazione"
"it.tref.liferay.portos.bo.model.DettPratica",
"java.lang.String"
}; };
_methodName187 = "testoAsseverazione"; _methodName187 = "anteprimaAsseverazioneGeologo";
_methodParameterTypes187 = new String[] { _methodParameterTypes187 = new String[] { "java.lang.String", "long" };
"java.lang.String", "com.liferay.portal.model.User", "long",
"java.lang.String"
};
_methodName188 = "testoAsseverazione"; _methodName188 = "testoAsseverazioneGeologo";
_methodParameterTypes188 = new String[] { _methodParameterTypes188 = new String[] {
"java.lang.String", "java.lang.String", "long", "java.lang.String", "long", "java.lang.String"
"java.lang.String"
};
_methodName189 = "testoAsseverazione";
_methodParameterTypes189 = new String[] {
"java.lang.String", "java.lang.String",
"it.tref.liferay.portos.bo.model.DettPratica",
"java.lang.String"
};
_methodName192 = "addAsseverazione";
_methodParameterTypes192 = new String[] {
"long", "long", "long", "java.lang.String", "java.lang.String",
"com.liferay.portal.service.ServiceContext"
}; };
_methodName193 = "richiediAsseverazioni"; _methodName193 = "richiediAsseverazioni";
@ -498,41 +477,19 @@ public class AsseverazioneLocalServiceClpInvoker {
if (_methodName186.equals(name) && if (_methodName186.equals(name) &&
Arrays.deepEquals(_methodParameterTypes186, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes186, parameterTypes)) {
return AsseverazioneLocalServiceUtil.anteprimaAsseverazione((java.lang.String)arguments[0], return AsseverazioneLocalServiceUtil.anteprimaAsseverazione((it.tref.liferay.portos.bo.model.Asseverazione)arguments[0]);
(com.liferay.portal.model.User)arguments[1],
(it.tref.liferay.portos.bo.model.DettPratica)arguments[2],
(java.lang.String)arguments[3]);
} }
if (_methodName187.equals(name) && if (_methodName187.equals(name) &&
Arrays.deepEquals(_methodParameterTypes187, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes187, parameterTypes)) {
return AsseverazioneLocalServiceUtil.testoAsseverazione((java.lang.String)arguments[0], return AsseverazioneLocalServiceUtil.anteprimaAsseverazioneGeologo((java.lang.String)arguments[0],
(com.liferay.portal.model.User)arguments[1], ((Long)arguments[1]).longValue());
((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]);
} }
if (_methodName188.equals(name) && if (_methodName188.equals(name) &&
Arrays.deepEquals(_methodParameterTypes188, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes188, parameterTypes)) {
return AsseverazioneLocalServiceUtil.testoAsseverazione((java.lang.String)arguments[0], return AsseverazioneLocalServiceUtil.testoAsseverazioneGeologo((java.lang.String)arguments[0],
(java.lang.String)arguments[1], ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]);
((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]);
}
if (_methodName189.equals(name) &&
Arrays.deepEquals(_methodParameterTypes189, parameterTypes)) {
return AsseverazioneLocalServiceUtil.testoAsseverazione((java.lang.String)arguments[0],
(java.lang.String)arguments[1],
(it.tref.liferay.portos.bo.model.DettPratica)arguments[2],
(java.lang.String)arguments[3]);
}
if (_methodName192.equals(name) &&
Arrays.deepEquals(_methodParameterTypes192, parameterTypes)) {
return AsseverazioneLocalServiceUtil.addAsseverazione(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
((Long)arguments[2]).longValue(),
(java.lang.String)arguments[3], (java.lang.String)arguments[4],
(com.liferay.portal.service.ServiceContext)arguments[5]);
} }
if (_methodName193.equals(name) && if (_methodName193.equals(name) &&
@ -846,10 +803,6 @@ public class AsseverazioneLocalServiceClpInvoker {
private String[] _methodParameterTypes187; private String[] _methodParameterTypes187;
private String _methodName188; private String _methodName188;
private String[] _methodParameterTypes188; private String[] _methodParameterTypes188;
private String _methodName189;
private String[] _methodParameterTypes189;
private String _methodName192;
private String[] _methodParameterTypes192;
private String _methodName193; private String _methodName193;
private String[] _methodParameterTypes193; private String[] _methodParameterTypes193;
private String _methodName194; private String _methodName194;

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java

@ -169,6 +169,6 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
@Override @Override
public AllegatoManuale deleteAllegatoManuale(long allegatoManualeId) throws PortalException, SystemException { public AllegatoManuale deleteAllegatoManuale(long allegatoManualeId) throws PortalException, SystemException {
return deleteAllegatoManuale(allegatoManualeLocalService.getAllegatoManuale(allegatoManualeId)); return deleteAllegatoManuale(getAllegatoManuale(allegatoManualeId));
} }
} }

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeServiceImpl.java

@ -14,7 +14,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.AllegatoManualeServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.AllegatoManualeServiceBaseImpl;
import java.util.List; import java.util.List;
@ -96,7 +95,7 @@ public class AllegatoManualeServiceImpl extends AllegatoManualeServiceBaseImpl {
@Override @Override
public AllegatoManuale deleteAllegatoManuale(AllegatoManuale allegatoManuale) throws SystemException { public AllegatoManuale deleteAllegatoManuale(AllegatoManuale allegatoManuale) throws SystemException {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(allegatoManuale.getAvvisoId()); Avviso avviso = avvisoLocalService.fetchAvviso(allegatoManuale.getAvvisoId());
if (Validator.isNotNull(avviso) && Validator.isNull(avviso.getFileEntryIdInvio())) { if (Validator.isNotNull(avviso) && Validator.isNull(avviso.getFileEntryIdInvio())) {
return allegatoManualeLocalService.deleteAllegatoManuale(allegatoManuale); return allegatoManualeLocalService.deleteAllegatoManuale(allegatoManuale);
} else { } else {

173
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java

@ -17,11 +17,6 @@ import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.AsseverazioneLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.AsseverazioneLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants; import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import it.tref.liferay.portos.bo.shared.util.GenericUtils; import it.tref.liferay.portos.bo.shared.util.GenericUtils;
@ -51,6 +46,7 @@ import java.util.Scanner;
import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import com.liferay.portal.NoSuchUserException;
import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
@ -65,9 +61,7 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys; import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
/** /**
* The implementation of the asseverazione local service. * The implementation of the asseverazione local service.
@ -95,66 +89,70 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
Log _log = LogFactoryUtil.getLog(AsseverazioneLocalServiceImpl.class); Log _log = LogFactoryUtil.getLog(AsseverazioneLocalServiceImpl.class);
@Override @Override
public String anteprimaAsseverazione(String tipo, User user, DettPratica dettPratica, String relazioni) public String anteprimaAsseverazione(Asseverazione asseverazione) throws SystemException, PortalException,
throws IOException, SystemException, PortalException { IOException {
return testoAsseverazione(tipo, user.getScreenName(), dettPratica, relazioni, true); return testoAsseverazione(asseverazione, null, true);
} }
@Override @Override
public String testoAsseverazione(String tipo, User user, long dettPraticaId, String relazioni) public String anteprimaAsseverazioneGeologo(String codiceFiscale, long dettPraticaId) throws SystemException,
throws SystemException, PortalException, IOException { PortalException, IOException {
return testoAsseverazione(tipo, user.getScreenName(), dettPraticaId, relazioni); return testoAsseverazioneGeologo(codiceFiscale, dettPraticaId, null, true);
} }
@Override @Override
public String testoAsseverazione(String tipo, String codiceFiscale, long dettPraticaId, String relazioni) public String testoAsseverazioneGeologo(String codiceFiscale, long dettPraticaId, String relazioni)
throws PortalException, SystemException, IOException { throws SystemException, PortalException, IOException {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); return testoAsseverazioneGeologo(codiceFiscale, dettPraticaId, relazioni, false);
return testoAsseverazione(tipo, codiceFiscale, dettPratica, relazioni);
} }
@Override private String testoAsseverazioneGeologo(String codiceFiscale, long dettPraticaId, String relazioni,
public String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica, String relazioni) boolean anteprima) throws SystemException, PortalException, IOException {
throws SystemException, PortalException, IOException {
return testoAsseverazione(tipo, codiceFiscale, dettPratica, relazioni, false); List<Soggetto> soggetti = soggettoLocalService.findByDettPratica_TipologiaSoggetto_CodiceFiscale(dettPraticaId,
TipoSoggettoUtil.GEOLOGO, codiceFiscale);
if (soggetti.isEmpty()) {
return null;
}
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
return testoAsseverazione(soggetti.get(0), dettPratica, relazioni, false);
} }
private String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica, String relazioni, private String testoAsseverazione(Asseverazione asseverazione, String relazioni, boolean anteprima)
boolean anteprima) throws SystemException, PortalException, IOException { throws SystemException, PortalException, IOException {
Soggetto soggetto = SoggettoLocalServiceUtil.getValidTmpByIntPratica_CodiceFiscale_TipologiaSoggetto( Soggetto soggetto = null;
dettPratica.getIntPraticaId(), codiceFiscale, tipo); try {
if (Validator.isNotNull(soggetto)) { soggetto = soggettoLocalService.getSoggetto(asseverazione.getSoggettoId());
String nome = Validator.isNull(soggetto.getCognome()) ? soggetto.getLegaleRap() : soggetto.getNome(); } catch (SystemException | PortalException e) {
String cognome = Validator.isNull(soggetto.getCognome()) ? StringPool.BLANK : soggetto.getCognome();
String albo = soggetto.getAlbo();
String albon = soggetto.getNumIscrAlbo();
String albop = soggetto.getProvinciaAlbo();
return testoAsseverazione(tipo, nome, cognome, codiceFiscale, soggetto.getAmbitoProfessione(), dettPratica,
relazioni, false, albo, albon, albop);
} }
User user = UserLocalServiceUtil.fetchUserByScreenName(dettPratica.getCompanyId(), codiceFiscale); if (Validator.isNull(soggetto)
if (Validator.isNotNull(user)) { || !soggetto.getCodiceFiscale().equalsIgnoreCase(asseverazione.getCodiceFiscale())) {
return testoAsseverazione(tipo, user.getFirstName(), user.getLastName(), user.getScreenName(), soggetto = null;
StringPool.BLANK, dettPratica, relazioni, anteprima, StringPool.BLANK, StringPool.BLANK, List<Soggetto> soggetti = soggettoLocalService.findByDettPratica_TipologiaSoggetto_CodiceFiscale(
StringPool.BLANK); asseverazione.getDettPraticaId(), asseverazione.getTipologia(), asseverazione.getCodiceFiscale());
if (!soggetti.isEmpty()) {
_log.info("Asseverazione " + asseverazione.getAsseverazioneId() + " recuperato per codice fiscale");
soggetto = soggetti.get(0);
}
}
if (Validator.isNull(soggetto)) {
_log.error("Asseverazione " + asseverazione.getAsseverazioneId() + " soggetto non trovato");
return null;
} }
return null; DettPratica dettPratica = dettPraticaLocalService.getDettPratica(asseverazione.getDettPraticaId());
return testoAsseverazione(soggetto, dettPratica, relazioni, anteprima);
} }
private String testoAsseverazione(String tipo, String nome, String cognome, String codiceFiscale, private String testoAsseverazione(Soggetto soggetto, DettPratica dettPratica, String relazioni, boolean anteprima)
String ambitoProfessione, DettPratica dettPratica, String relazioni, boolean anteprima, String albo, throws SystemException, PortalException, IOException {
String albon, String albop) throws IOException, SystemException, PortalException {
IntPratica intpratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
String tipoProcedura = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId()).getTipoProcedura();
String file = null; String file = null;
switch (tipo) { switch (soggetto.getTipologiaSoggetto()) {
case TipoSoggettoUtil.COLLAUDATORE: case TipoSoggettoUtil.COLLAUDATORE:
file = "collaudatore"; file = "collaudatore";
break; break;
@ -171,9 +169,9 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
file = "geologo"; file = "geologo";
break; break;
case TipoSoggettoUtil.PROGETTISTA: case TipoSoggettoUtil.PROGETTISTA:
if (intpratica.getTipoProcedura().equalsIgnoreCase(Constants.PROCEDURA_C)) { if (tipoProcedura.equalsIgnoreCase(Constants.PROCEDURA_C)) {
file = "progettista_c"; file = "progettista_c";
} else if (ambitoProfessione.equalsIgnoreCase("architettonico")) { } else if (soggetto.getAmbitoProfessione().equalsIgnoreCase("architettonico")) {
file = "progettista_architettonico"; file = "progettista_architettonico";
} else { } else {
file = "calcolista"; file = "calcolista";
@ -201,8 +199,8 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
boolean rischio = (RG.equals("3") || RG.equals("4") || RG.equals("5") || RI.equals("3") || RI.equals("4") boolean rischio = (RG.equals("3") || RG.equals("4") || RG.equals("5") || RI.equals("3") || RI.equals("4")
|| PG.equals("3") || PG.equals("4") || PI.equals("3") || PI.equals("4") || PI.equals("5")); || PG.equals("3") || PG.equals("4") || PI.equals("3") || PI.equals("4") || PI.equals("5"));
boolean coniugio = Validator.isNotNull(relazioni); boolean coniugio = Validator.isNotNull(relazioni);
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId());
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
float ag = 0; float ag = 0;
if (Validator.isNotNull(dettPratica.getAg())) { if (Validator.isNotNull(dettPratica.getAg())) {
ag = Float.parseFloat(dettPratica.getAg().replace(',', '.')); ag = Float.parseFloat(dettPratica.getAg().replace(',', '.'));
@ -236,16 +234,18 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
.replace("{{agalto}}", agAlto ? CHECKED : StringPool.SPACE) .replace("{{agalto}}", agAlto ? CHECKED : StringPool.SPACE)
.replace("{{agmedio}}", agMedio ? CHECKED : StringPool.SPACE) .replace("{{agmedio}}", agMedio ? CHECKED : StringPool.SPACE)
.replace("{{agricoli}}", agricoli ? CHECKED : StringPool.SPACE) .replace("{{agricoli}}", agricoli ? CHECKED : StringPool.SPACE)
.replace("{{codicefiscale}}", codiceFiscale).replace("{{cognome}}", cognome) .replace("{{codicefiscale}}", soggetto.getCodiceFiscale())
.replace("{{complesse}}", complesse ? CHECKED : StringPool.SPACE).replace("{{nome}}", nome) .replace("{{cognome}}", soggetto.getCognome())
.replace("{{nuove}}", nuove ? CHECKED : StringPool.SPACE) .replace("{{complesse}}", complesse ? CHECKED : StringPool.SPACE)
.replace("{{nome}}", soggetto.getNome()).replace("{{nuove}}", nuove ? CHECKED : StringPool.SPACE)
.replace("{{rilevanti}}", rilevanti ? CHECKED : StringPool.SPACE) .replace("{{rilevanti}}", rilevanti ? CHECKED : StringPool.SPACE)
.replace("{{nonrilevanti}}", nonRilevanti ? CHECKED : StringPool.SPACE) .replace("{{nonrilevanti}}", nonRilevanti ? CHECKED : StringPool.SPACE)
.replace("{{riparazioni}}", riparazioni ? CHECKED : StringPool.SPACE) .replace("{{riparazioni}}", riparazioni ? CHECKED : StringPool.SPACE)
.replace("{{rischio}}", rischio ? CHECKED : StringPool.SPACE) .replace("{{rischio}}", rischio ? CHECKED : StringPool.SPACE)
.replace("{{!rischio}}", rischio ? StringPool.SPACE : CHECKED) .replace("{{!rischio}}", rischio ? StringPool.SPACE : CHECKED)
.replace("{{strategico}}", strategico ? CHECKED : StringPool.SPACE).replace("{{albo}}", albo) .replace("{{strategico}}", strategico ? CHECKED : StringPool.SPACE)
.replace("{{albop}}", albop).replace("{{albon}}", albon); .replace("{{albo}}", soggetto.getAlbo()).replace("{{albop}}", soggetto.getProvinciaAlbo())
.replace("{{albon}}", soggetto.getNumIscrAlbo());
if (null == relazioni) { if (null == relazioni) {
html = html.replace("{{coniugio}}", StringPool.SPACE).replace("{{!coniugio}}", StringPool.SPACE) html = html.replace("{{coniugio}}", StringPool.SPACE).replace("{{!coniugio}}", StringPool.SPACE)
.replace("{{relazioni}}", StringPool.BLANK); .replace("{{relazioni}}", StringPool.BLANK);
@ -258,29 +258,24 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
return html; return html;
} }
@Override private Asseverazione addAsseverazione(long userId, long intPraticaId, long dettPraticaId, Soggetto soggetto,
public Asseverazione addAsseverazione(long userId, long intPraticaId, long dettPraticaId, String tipologia, ServiceContext serviceContext) throws NoSuchUserException, SystemException {
String codiceFiscale, ServiceContext serviceContext) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date(); Date now = new Date();
Asseverazione asseverazione = asseverazionePersistence.create(counterLocalService.increment(Asseverazione.class Asseverazione asseverazione = asseverazionePersistence.create(counterLocalService.increment(Asseverazione.class
.getName())); .getName()));
asseverazione.setCompanyId(serviceContext.getCompanyId()); asseverazione.setCompanyId(serviceContext.getCompanyId());
asseverazione.setUserId(user.getUserId()); asseverazione.setUserId(userId);
asseverazione.setUserName(user.getFullName()); asseverazione.setUserName(userPersistence.findByPrimaryKey(userId).getFullName());
asseverazione.setCreateDate(serviceContext.getCreateDate(now)); asseverazione.setCreateDate(now);
asseverazione.setModifiedDate(serviceContext.getModifiedDate(now)); asseverazione.setModifiedDate(now);
asseverazione.setGroupId(serviceContext.getScopeGroupId()); asseverazione.setGroupId(serviceContext.getScopeGroupId());
asseverazione.setIntPraticaId(intPraticaId); asseverazione.setIntPraticaId(intPraticaId);
asseverazione.setDettPraticaId(dettPraticaId); asseverazione.setDettPraticaId(dettPraticaId);
asseverazione.setTipologia(tipologia); asseverazione.setTipologia(soggetto.getTipologiaSoggetto());
asseverazione.setEsito(DelegheUtil.STATO_ASSEGNATA); asseverazione.setEsito(DelegheUtil.STATO_ASSEGNATA);
asseverazione.setCodiceFiscale(codiceFiscale); asseverazione.setCodiceFiscale(soggetto.getCodiceFiscale());
List<Soggetto> soggetti = soggettoLocalService.findByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale); asseverazione.setSoggettoId(soggetto.getSoggettoId());
if (!soggetti.isEmpty()) {
asseverazione.setSoggettoId(soggetti.get(0).getUserId());
}
asseverazione = asseverazionePersistence.update(asseverazione); asseverazione = asseverazionePersistence.update(asseverazione);
return asseverazione; return asseverazione;
} }
@ -291,6 +286,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
long intPraticaId = dettPratica.getIntPraticaId(); long intPraticaId = dettPratica.getIntPraticaId();
long userId = serviceContext.getUserId();
IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione()) if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())
|| TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione()) || TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())
@ -299,7 +295,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
soggettoLocalService.getValidTmpByDettPratica(dettPraticaId)); soggettoLocalService.getValidTmpByDettPratica(dettPraticaId));
List<String> cfNuoviSoggetti = soggettoLocalService.getCfValidTmpByDettPratica(dettPraticaId); List<String> cfNuoviSoggetti = soggettoLocalService.getCfValidTmpByDettPratica(dettPraticaId);
List<String> nuoviDelegati = new ArrayList<String>( List<String> nuoviDelegati = new ArrayList<String>(
DelegaLocalServiceUtil.findCfByDettPratica_Tipologia_InEsito(dettPraticaId, new String[] { delegaLocalService.findCfByDettPratica_Tipologia_InEsito(dettPraticaId, new String[] {
TipoSoggettoUtil.COMMITTENTE, TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.GEOLOGO, TipoSoggettoUtil.COMMITTENTE, TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.GEOLOGO,
TipoSoggettoUtil.DITTA, TipoSoggettoUtil.PROGETTISTA }, TipoSoggettoUtil.DITTA, TipoSoggettoUtil.PROGETTISTA },
new String[] { AsseverazioniUtil.STATO_ESEGUITA })); new String[] { AsseverazioniUtil.STATO_ESEGUITA }));
@ -310,14 +306,12 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
GenericUtils.addAllIfnotExist(nuoviSoggetti, delegato); GenericUtils.addAllIfnotExist(nuoviSoggetti, delegato);
} }
if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
User titolaredigitaleUser = UserLocalServiceUtil.getUser(intPratica.getUserId()); User titolaredigitaleUser = userLocalService.getUser(intPratica.getUserId());
// il titolare digitale potrebbe avere più ruoli // il titolare digitale potrebbe avere più ruoli
List<Soggetto> titolareDigitali = soggettoLocalService.getValidTmpByIntPratica_CodiceFiscale( List<Soggetto> titolareDigitali = soggettoLocalService.getValidTmpByIntPratica_CodiceFiscale(
intPraticaId, titolaredigitaleUser.getScreenName(), 0l); intPraticaId, titolaredigitaleUser.getScreenName(), 0l);
for (Soggetto titolareDigitale : titolareDigitali) { for (Soggetto titolareDigitale : titolareDigitali) {
addAsseverazione(serviceContext.getUserId(), dettPratica.getIntPraticaId(), dettPraticaId, addAsseverazione(userId, intPraticaId, dettPraticaId, titolareDigitale, serviceContext);
titolareDigitale.getTipologiaSoggetto(), titolareDigitale.getCodiceFiscale(),
serviceContext);
} }
} else if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { } else if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
String[] tipoSoggetti = new String[] { TipoSoggettoUtil.COMMITTENTE, TipoSoggettoUtil.DIRETTORE_LAVORI, String[] tipoSoggetti = new String[] { TipoSoggettoUtil.COMMITTENTE, TipoSoggettoUtil.DIRETTORE_LAVORI,
@ -332,12 +326,10 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
for (Soggetto soggetto : nuoviSoggetti) { for (Soggetto soggetto : nuoviSoggetti) {
if (TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(soggetto.getTipologiaSoggetto())) { if (TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(soggetto.getTipologiaSoggetto())) {
if (!ValidazionePraticaUtil.isA98Required(dettPratica)) { if (!ValidazionePraticaUtil.isA98Required(dettPratica)) {
addAsseverazione(serviceContext.getUserId(), dettPratica.getIntPraticaId(), dettPraticaId, addAsseverazione(userId, intPraticaId, dettPraticaId, soggetto, serviceContext);
soggetto.getTipologiaSoggetto(), soggetto.getCodiceFiscale(), serviceContext);
} }
} else { } else {
addAsseverazione(serviceContext.getUserId(), dettPratica.getIntPraticaId(), dettPraticaId, addAsseverazione(userId, intPraticaId, dettPraticaId, soggetto, serviceContext);
soggetto.getTipologiaSoggetto(), soggetto.getCodiceFiscale(), serviceContext);
} }
} }
} else { } else {
@ -347,8 +339,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
if (TipoSoggettoUtil.COLLAUDATORE.equalsIgnoreCase(soggetto.getTipologiaSoggetto()) if (TipoSoggettoUtil.COLLAUDATORE.equalsIgnoreCase(soggetto.getTipologiaSoggetto())
&& dettPratica.getCodiceFiscalePrincipaleCollaudatore().equalsIgnoreCase( && dettPratica.getCodiceFiscalePrincipaleCollaudatore().equalsIgnoreCase(
soggetto.getCodiceFiscale())) { soggetto.getCodiceFiscale())) {
addAsseverazione(serviceContext.getUserId(), dettPratica.getIntPraticaId(), dettPraticaId, addAsseverazione(userId, intPraticaId, dettPraticaId, soggetto, serviceContext);
soggetto.getTipologiaSoggetto(), soggetto.getCodiceFiscale(), serviceContext);
collaudatoreInserito = true; collaudatoreInserito = true;
break; break;
} }
@ -361,8 +352,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
|| TipoSoggettoUtil.DIRETTORE_LAVORI.equalsIgnoreCase(tipologia) || TipoSoggettoUtil.DIRETTORE_LAVORI.equalsIgnoreCase(tipologia)
|| TipoSoggettoUtil.PROGETTISTA.equalsIgnoreCase(tipologia) || TipoSoggettoUtil.PROGETTISTA.equalsIgnoreCase(tipologia)
|| (TipoSoggettoUtil.COLLAUDATORE.equalsIgnoreCase(tipologia) && !collaudatoreInserito)) { || (TipoSoggettoUtil.COLLAUDATORE.equalsIgnoreCase(tipologia) && !collaudatoreInserito)) {
addAsseverazione(serviceContext.getUserId(), dettPratica.getIntPraticaId(), dettPraticaId, addAsseverazione(userId, intPraticaId, dettPraticaId, soggetto, serviceContext);
tipologia, soggetto.getCodiceFiscale(), serviceContext);
} }
} }
} }
@ -371,7 +361,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
@Override @Override
public void resetAsseverazione(long asseverazioneId) throws PortalException, SystemException { public void resetAsseverazione(long asseverazioneId) throws PortalException, SystemException {
Asseverazione asseverazione = asseverazioneLocalService.getAsseverazione(asseverazioneId); Asseverazione asseverazione = getAsseverazione(asseverazioneId);
if (!asseverazione.getEsito().equalsIgnoreCase(AsseverazioniUtil.STATO_ESEGUITA) if (!asseverazione.getEsito().equalsIgnoreCase(AsseverazioniUtil.STATO_ESEGUITA)
&& !asseverazione.getEsito().equalsIgnoreCase(AsseverazioniUtil.STATO_ASSEGNATA)) { && !asseverazione.getEsito().equalsIgnoreCase(AsseverazioniUtil.STATO_ASSEGNATA)) {
return; return;
@ -379,7 +369,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
asseverazione.setEsito(AsseverazioniUtil.STATO_ASSEGNATA); asseverazione.setEsito(AsseverazioniUtil.STATO_ASSEGNATA);
asseverazione.setDtEsito(null); asseverazione.setDtEsito(null);
if (asseverazione.getFileEntryId() != 0L) { if (asseverazione.getFileEntryId() != 0L) {
DLAppLocalServiceUtil.deleteFileEntry(asseverazione.getFileEntryId()); dlAppLocalService.deleteFileEntry(asseverazione.getFileEntryId());
asseverazione.setFileEntryId(0); asseverazione.setFileEntryId(0);
} }
asseverazionePersistence.update(asseverazione); asseverazionePersistence.update(asseverazione);
@ -395,7 +385,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
public void cambioStatoAsseverazione(long userId, long asseverazioneId, String stato) throws IOException, public void cambioStatoAsseverazione(long userId, long asseverazioneId, String stato) throws IOException,
SystemException, PortalException { SystemException, PortalException {
Asseverazione asseverazione = asseverazioneLocalService.getAsseverazione(asseverazioneId); Asseverazione asseverazione = getAsseverazione(asseverazioneId);
Date now = new Date(); Date now = new Date();
if (AsseverazioniUtil.STATO_ESEGUITA.equals(stato)) { if (AsseverazioniUtil.STATO_ESEGUITA.equals(stato)) {
asseverazione = generateReportAsseverazione(asseverazione, userId); asseverazione = generateReportAsseverazione(asseverazione, userId);
@ -445,8 +435,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
relazioni = StringPool.BLANK; relazioni = StringPool.BLANK;
} }
} }
String testoAsseverazione = testoAsseverazione(asseverazione.getTipologia(), asseverazione.getCodiceFiscale(), String testoAsseverazione = testoAsseverazione(asseverazione, relazioni, false);
asseverazione.getDettPraticaId(), relazioni);
if (Validator.isNull(testoAsseverazione)) { if (Validator.isNull(testoAsseverazione)) {
testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(asseverazione, testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(asseverazione,
asseverazione.getCodiceFiscale()); asseverazione.getCodiceFiscale());
@ -479,7 +468,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
@Override @Override
public void concludiAsseverazioniExpired(long dettPraticaId) throws IOException, SystemException, PortalException { public void concludiAsseverazioniExpired(long dettPraticaId) throws IOException, SystemException, PortalException {
List<Asseverazione> asseverazioni = asseverazioneLocalService.findByDettPratica_InEsito(dettPraticaId, List<Asseverazione> asseverazioni = findByDettPratica_InEsito(dettPraticaId,
new String[] { AsseverazioniUtil.STATO_ASSEGNATA }, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); new String[] { AsseverazioniUtil.STATO_ASSEGNATA }, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
for (Asseverazione asseverazione : asseverazioni) { for (Asseverazione asseverazione : asseverazioni) {
cambioStatoAsseverazione(asseverazione.getUserId(), asseverazione.getAsseverazioneId(), cambioStatoAsseverazione(asseverazione.getUserId(), asseverazione.getAsseverazioneId(),
@ -490,10 +479,10 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
@Override @Override
public void rimuoviFileAsseverazione(long asseverazioneId) throws SystemException, PortalException { public void rimuoviFileAsseverazione(long asseverazioneId) throws SystemException, PortalException {
Asseverazione asseverazione = asseverazioneLocalService.getAsseverazione(asseverazioneId); Asseverazione asseverazione = getAsseverazione(asseverazioneId);
if (asseverazione.getEsito().equalsIgnoreCase(AsseverazioniUtil.STATO_ESEGUITA) if (asseverazione.getEsito().equalsIgnoreCase(AsseverazioniUtil.STATO_ESEGUITA)
&& asseverazione.getFileEntryId() != 0) { && asseverazione.getFileEntryId() != 0) {
DLAppLocalServiceUtil.deleteFileEntry(asseverazione.getFileEntryId()); dlAppLocalService.deleteFileEntry(asseverazione.getFileEntryId());
asseverazione.setEsito(null); asseverazione.setEsito(null);
asseverazione.setDtEsito(null); asseverazione.setDtEsito(null);
asseverazione.setFileEntryId(0); asseverazione.setFileEntryId(0);
@ -516,14 +505,14 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
@Override @Override
public Asseverazione deleteAsseverazione(long asseverazioneId) throws PortalException, SystemException { public Asseverazione deleteAsseverazione(long asseverazioneId) throws PortalException, SystemException {
return deleteAsseverazione(asseverazioneLocalService.getAsseverazione(asseverazioneId)); return deleteAsseverazione(getAsseverazione(asseverazioneId));
} }
@Override @Override
public FileEntry allegaFileAsseverazione(long asseverazioneId, byte[] content, String sourceFileName, public FileEntry allegaFileAsseverazione(long asseverazioneId, byte[] content, String sourceFileName,
ServiceContext serviceContext) throws SystemException, PortalException { ServiceContext serviceContext) throws SystemException, PortalException {
Asseverazione asseverazione = asseverazioneLocalService.getAsseverazione(asseverazioneId); Asseverazione asseverazione = getAsseverazione(asseverazioneId);
DettPratica dettPratica = dettPraticaLocalService.getLastEditableByIntPratica(asseverazione.getIntPraticaId()); DettPratica dettPratica = dettPraticaLocalService.getLastEditableByIntPratica(asseverazione.getIntPraticaId());
// TODO forse dobbiamo mettere i permesssi ma non mi pare sicuro. // TODO forse dobbiamo mettere i permesssi ma non mi pare sicuro.
FileEntry fileEntry = null; FileEntry fileEntry = null;

17
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java

@ -16,8 +16,6 @@ import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Sorteggio; import it.tref.liferay.portos.bo.model.Sorteggio;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.AvvisoLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.AvvisoLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.Constants; 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.StatoPraticaConstants;
@ -66,7 +64,6 @@ import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys; import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.util.dao.orm.CustomSQLUtil; import com.liferay.util.dao.orm.CustomSQLUtil;
/** /**
@ -1091,16 +1088,16 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
public Avviso addFileFirmato(long avvisoId, long classPk, String fileToSave, ServiceContext serviceContext) public Avviso addFileFirmato(long avvisoId, long classPk, String fileToSave, ServiceContext serviceContext)
throws Exception { throws Exception {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(avvisoId); Avviso avviso = avvisoLocalService.fetchAvviso(avvisoId);
long folderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(avviso.getCompanyId(), avvisoLocalService long folderId = configurazioneLocalService.findByC_ChiaveLong(avviso.getCompanyId(), avvisoLocalService
.getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento())); .getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento()));
String fileName = getFileNameAvviso(classPk, avviso.getTipoDocumento(), avviso.getAvvisoId(), "F"); String fileName = getFileNameAvviso(classPk, avviso.getTipoDocumento(), avviso.getAvvisoId(), "F");
if (Validator.isNotNull(folderId)) { if (Validator.isNotNull(folderId)) {
Folder folder = DLAppLocalServiceUtil.getFolder(folderId); Folder folder = dlAppLocalService.getFolder(folderId);
if (Validator.isNotNull(folder)) { if (Validator.isNotNull(folder)) {
byte[] bytes = Base64.decode(fileToSave); byte[] bytes = Base64.decode(fileToSave);
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW }); serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(), folder.getRepositoryId(), FileEntry fileEntry = dlAppLocalService.addFileEntry(avviso.getUserId(), folder.getRepositoryId(),
folderId, fileName, MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m", folderId, fileName, MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m",
StringPool.BLANK, StringPool.BLANK, bytes, serviceContext); StringPool.BLANK, StringPool.BLANK, bytes, serviceContext);
avviso.setFileEntryIdInvio(fileEntry.getFileEntryId()); avviso.setFileEntryIdInvio(fileEntry.getFileEntryId());
@ -1152,7 +1149,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
if (Validator.isNotNull(numeroProtocollo) || Validator.isNotNull(dataDa) || Validator.isNotNull(dataA)) { if (Validator.isNotNull(numeroProtocollo) || Validator.isNotNull(dataDa) || Validator.isNotNull(dataA)) {
Order defaultOrder = OrderFactoryUtil.asc("dtProtocollo"); Order defaultOrder = OrderFactoryUtil.asc("dtProtocollo");
query.addOrder(defaultOrder); query.addOrder(defaultOrder);
lista = AvvisoLocalServiceUtil.dynamicQuery(query, start, end); lista = avvisoLocalService.dynamicQuery(query, start, end);
} }
return lista; return lista;
} }
@ -1267,7 +1264,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
@Override @Override
public Avviso getAvvisoVidimazione(long intPraticaId, long dettPraticaID) throws SystemException { public Avviso getAvvisoVidimazione(long intPraticaId, long dettPraticaID) throws SystemException {
DynamicQuery dynamicQuery = AvvisoLocalServiceUtil.dynamicQuery(); DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in( dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in(
new String[] { StatoPraticaConstants.VIDIMATA })); new String[] { StatoPraticaConstants.VIDIMATA }));
dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L)); dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L));
@ -1284,7 +1281,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
@Override @Override
public Avviso getLastAvvisoIntegrazione(long intPraticaId) throws SystemException { public Avviso getLastAvvisoIntegrazione(long intPraticaId) throws SystemException {
DynamicQuery dynamicQuery = AvvisoLocalServiceUtil.dynamicQuery(); DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in( dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in(
new String[] { StatoPraticaConstants.INTEGRAZIONE })); new String[] { StatoPraticaConstants.INTEGRAZIONE }));
dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L)); dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L));

17
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/CollaudoLocalServiceImpl.java

@ -18,7 +18,6 @@ import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.CollaudoLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.CollaudoLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants; import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@ -97,7 +96,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
public Collaudo addCollaudo(long intPraticaId, ServiceContext serviceContext) throws PortalException, public Collaudo addCollaudo(long intPraticaId, ServiceContext serviceContext) throws PortalException,
SystemException { SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Collaudo collaudo = initCollaudo(serviceContext); Collaudo collaudo = initCollaudo(serviceContext);
collaudo.setGroupId(intPratica.getGroupId()); collaudo.setGroupId(intPratica.getGroupId());
collaudo.setIntPraticaId(intPraticaId); collaudo.setIntPraticaId(intPraticaId);
@ -153,6 +152,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", false));
dynamicQuery.addOrder(OrderFactoryUtil.desc("collaudoId")); dynamicQuery.addOrder(OrderFactoryUtil.desc("collaudoId"));
@SuppressWarnings("unchecked")
List<Collaudo> collaudoList = dynamicQuery(dynamicQuery, 0, 1); List<Collaudo> collaudoList = dynamicQuery(dynamicQuery, 0, 1);
if (!collaudoList.isEmpty()) if (!collaudoList.isEmpty())
return collaudoList.get(0); return collaudoList.get(0);
@ -166,6 +166,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true));
dynamicQuery.addOrder(OrderFactoryUtil.desc("collaudoId")); dynamicQuery.addOrder(OrderFactoryUtil.desc("collaudoId"));
@SuppressWarnings("unchecked")
List<Collaudo> collaudoList = dynamicQuery(dynamicQuery, 0, 1); List<Collaudo> collaudoList = dynamicQuery(dynamicQuery, 0, 1);
if (!collaudoList.isEmpty()) if (!collaudoList.isEmpty())
return collaudoList.get(0); return collaudoList.get(0);
@ -273,11 +274,11 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
public Collaudo updateCollaudoProtocollo(long collaudoId, String protocollo) throws PortalException, public Collaudo updateCollaudoProtocollo(long collaudoId, String protocollo) throws PortalException,
SystemException { SystemException {
Collaudo collaudo = collaudoLocalService.fetchCollaudo(collaudoId); Collaudo collaudo = fetchCollaudo(collaudoId);
collaudo.setModifiedDate(new Date()); collaudo.setModifiedDate(new Date());
collaudo.setProtocollo(protocollo); collaudo.setProtocollo(protocollo);
collaudo.setDtProtocollo(new Date()); collaudo.setDtProtocollo(new Date());
collaudo = collaudoLocalService.updateCollaudo(collaudo); collaudo = updateCollaudo(collaudo);
return collaudo; return collaudo;
} }
@ -362,6 +363,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
return collaudoPersistence.countByCodiceFiscale_Completata(codiceFiscaleDelegato, completata); return collaudoPersistence.countByCodiceFiscale_Completata(codiceFiscaleDelegato, completata);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Collaudo> findByIntPraticaId_Parziale_leCollaudoId(long collaudoId, long intPraticaId, public List<Collaudo> findByIntPraticaId_Parziale_leCollaudoId(long collaudoId, long intPraticaId,
boolean parziale, int start, int end, OrderByComparator orderByComparator) throws SystemException { boolean parziale, int start, int end, OrderByComparator orderByComparator) throws SystemException {
@ -381,10 +383,12 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
dynamicQuery.add(RestrictionsFactoryUtil.lt("collaudoId", collaudoId)); dynamicQuery.add(RestrictionsFactoryUtil.lt("collaudoId", collaudoId));
dynamicQuery.add(RestrictionsFactoryUtil.eq("parziale", parziale)); dynamicQuery.add(RestrictionsFactoryUtil.eq("parziale", parziale));
@SuppressWarnings("unchecked")
List<Collaudo> results = dynamicQuery(dynamicQuery); List<Collaudo> results = dynamicQuery(dynamicQuery);
return results.size(); return results.size();
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Collaudo> findCollaudiCompletiNotProtocollo(int start, int end) throws SystemException { public List<Collaudo> findCollaudiCompletiNotProtocollo(int start, int end) throws SystemException {
@ -402,7 +406,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
private DynamicQuery getDynamicQueryCollaudiCompletiNotProtocollo() { private DynamicQuery getDynamicQueryCollaudiCompletiNotProtocollo() {
DynamicQuery dynamicQuery = collaudoLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true));
dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false));
Disjunction or = RestrictionsFactoryUtil.disjunction(); Disjunction or = RestrictionsFactoryUtil.disjunction();
@ -412,6 +416,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Collaudo> findCollaudiCompletiNotGestiti(int start, int end) throws SystemException { public List<Collaudo> findCollaudiCompletiNotGestiti(int start, int end) throws SystemException {
@ -429,7 +434,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
private DynamicQuery getDynamicQueryCollaudiCompletiNotGestiti() { private DynamicQuery getDynamicQueryCollaudiCompletiNotGestiti() {
DynamicQuery dynamicQuery = collaudoLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true));
dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false));
dynamicQuery.add(RestrictionsFactoryUtil.ne("protocollo", StringPool.BLANK)); dynamicQuery.add(RestrictionsFactoryUtil.ne("protocollo", StringPool.BLANK));

84
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java

@ -20,7 +20,6 @@ import it.tref.liferay.portos.bo.DenominazioneException;
import it.tref.liferay.portos.bo.DuplicateComuneException; import it.tref.liferay.portos.bo.DuplicateComuneException;
import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ComuneLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ComuneLocalServiceBaseImpl;
import java.util.ArrayList; import java.util.ArrayList;
@ -47,13 +46,12 @@ import com.liferay.portal.service.ServiceContext;
* The implementation of the comune local service. * The implementation of the comune local service.
* *
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* ServiceBuilder to copy their definitions into the * their definitions into the {@link it.tref.liferay.portos.bo.service.ComuneLocalService} interface.
* {@link it.tref.liferay.portos.bo.service.ComuneLocalService} interface.
* *
* <p> * <p>
* This is a local service. Methods of this service will not have security checks based on the * This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* propagated JAAS credentials because this service can only be accessed from within the same VM. * credentials because this service can only be accessed from within the same VM.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting * @author Davide Barbagallo, 3F Consulting
@ -63,8 +61,8 @@ import com.liferay.portal.service.ServiceContext;
public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl { public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
@Override @Override
public Comune addComune(long userId, String codiceProvincia, String codiceComune, String codiceIstat, public Comune addComune(long userId, String codiceProvincia, String codiceComune, String codiceIstat,
String codiceBelfiore, String denominazione, boolean provincia, boolean stato, String mailSuap, String mailSue, String codiceBelfiore, String denominazione, boolean provincia, boolean stato, String mailSuap,
ServiceContext serviceContext) throws PortalException, SystemException { String mailSue, ServiceContext serviceContext) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId); User user = userPersistence.findByPrimaryKey(userId);
@ -216,6 +214,7 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
return comunePersistence.findByC_CP(companyId, codiceProvincia); return comunePersistence.findByC_CP(companyId, codiceProvincia);
} }
@Override
public List<Comune> findByCompanyIdCodiceProvincia(long companyId, String codiceProvincia, int start, int end, public List<Comune> findByCompanyIdCodiceProvincia(long companyId, String codiceProvincia, int start, int end,
OrderByComparator orderByComparator) throws SystemException { OrderByComparator orderByComparator) throws SystemException {
@ -239,8 +238,8 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
@Override @Override
public Comune updateComune(long userId, long comuneId, String codiceProvincia, String codiceComune, public Comune updateComune(long userId, long comuneId, String codiceProvincia, String codiceComune,
String codiceIstat, String denominazione, boolean provincia, boolean stato, String mailSuap, String mailSue, String codiceIstat, String denominazione, boolean provincia, boolean stato, String mailSuap,
ServiceContext serviceContext) throws PortalException, SystemException { String mailSue, ServiceContext serviceContext) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId); User user = userPersistence.findByPrimaryKey(userId);
@ -304,6 +303,7 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
return comune; return comune;
} }
@Override
public List<Comune> getComuniForOrganizationByUserId(long userId) throws SystemException { public List<Comune> getComuniForOrganizationByUserId(long userId) throws SystemException {
List<Comune> comuni = new ArrayList<Comune>(); List<Comune> comuni = new ArrayList<Comune>();
@ -312,13 +312,13 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
if (Validator.isNotNull(organizationList)) { if (Validator.isNotNull(organizationList)) {
for (Organization org : organizationList) { for (Organization org : organizationList) {
List<Territorio> territori = List<Territorio> territori = territorioLocalService.getTerritori(org.getCompanyId(), org.getGroupId(),
TerritorioLocalServiceUtil.getTerritori(org.getCompanyId(), org.getGroupId(), -1, -1); -1, -1);
if (Validator.isNotNull(territori)) { if (Validator.isNotNull(territori)) {
for (Territorio terr : territori) { for (Territorio terr : territori) {
Comune comune = comuneLocalService.fetchComune(terr.getComuneId()); Comune comune = fetchComune(terr.getComuneId());
if (Validator.isNotNull(comune)) { if (Validator.isNotNull(comune)) {
if(!checkIfContained(comune, comuni)){ if (!checkIfContained(comune, comuni)) {
comuni.add(comune); comuni.add(comune);
} }
} }
@ -332,7 +332,8 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
return comuni; return comuni;
} }
//ADT BUG BO ID = 1 SEZIONE ATTIVITÀ // ADT BUG BO ID = 1 SEZIONE ATTIVITÀ
@Override
public List<Comune> getComuniForOrganizationByUserIdUfficioId(long userId, long ufficioId) throws SystemException { public List<Comune> getComuniForOrganizationByUserIdUfficioId(long userId, long ufficioId) throws SystemException {
List<Comune> comuni = new ArrayList<Comune>(); List<Comune> comuni = new ArrayList<Comune>();
@ -341,15 +342,15 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
if (Validator.isNotNull(organizationList)) { if (Validator.isNotNull(organizationList)) {
for (Organization org : organizationList) { for (Organization org : organizationList) {
if(org.getGroupId()== ufficioId){ if (org.getGroupId() == ufficioId) {
List<Territorio> territori = List<Territorio> territori = territorioLocalService.getTerritori(org.getCompanyId(),
TerritorioLocalServiceUtil.getTerritori(org.getCompanyId(), org.getGroupId(), -1, -1); org.getGroupId(), -1, -1);
if (Validator.isNotNull(territori)) { if (Validator.isNotNull(territori)) {
for (Territorio terr : territori) { for (Territorio terr : territori) {
Comune comune = comuneLocalService.fetchComune(terr.getComuneId()); Comune comune = fetchComune(terr.getComuneId());
if (Validator.isNotNull(comune)) { if (Validator.isNotNull(comune)) {
if(!checkIfContained(comune, comuni)){ if (!checkIfContained(comune, comuni)) {
comuni.add(comune); comuni.add(comune);
} }
} }
@ -369,26 +370,23 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
DynamicQuery query = DynamicQueryFactoryUtil.forClass(Comune.class); DynamicQuery query = DynamicQueryFactoryUtil.forClass(Comune.class);
query.add(PropertyFactoryUtil.forName("companyId").eq(companyId)); query.add(PropertyFactoryUtil.forName("companyId").eq(companyId));
Criterion criterion = Criterion criterion = RestrictionsFactoryUtil.ilike("codiceProvincia", StringPool.PERCENT + keywords
RestrictionsFactoryUtil.ilike("codiceProvincia", StringPool.PERCENT + keywords + StringPool.PERCENT); + StringPool.PERCENT);
criterion = criterion = RestrictionsFactoryUtil.or(criterion,
RestrictionsFactoryUtil.or(criterion, RestrictionsFactoryUtil.ilike("codiceComune", StringPool.PERCENT + keywords + StringPool.PERCENT));
RestrictionsFactoryUtil.ilike("codiceComune", StringPool.PERCENT + keywords + StringPool.PERCENT)); criterion = RestrictionsFactoryUtil.or(criterion,
criterion = RestrictionsFactoryUtil.ilike("codiceIstat", StringPool.PERCENT + keywords + StringPool.PERCENT));
RestrictionsFactoryUtil.or(criterion, criterion = RestrictionsFactoryUtil.or(criterion,
RestrictionsFactoryUtil.ilike("codiceIstat", StringPool.PERCENT + keywords + StringPool.PERCENT)); RestrictionsFactoryUtil.ilike("codiceBelfiore", StringPool.PERCENT + keywords + StringPool.PERCENT));
criterion = criterion = RestrictionsFactoryUtil.or(criterion,
RestrictionsFactoryUtil.or(criterion, RestrictionsFactoryUtil.ilike("denominazione", StringPool.PERCENT + keywords + StringPool.PERCENT));
RestrictionsFactoryUtil.ilike("codiceBelfiore", StringPool.PERCENT + keywords + StringPool.PERCENT));
criterion =
RestrictionsFactoryUtil.or(criterion,
RestrictionsFactoryUtil.ilike("denominazione", StringPool.PERCENT + keywords + StringPool.PERCENT));
query.add(criterion); query.add(criterion);
return query; return query;
} }
private void validate(long companyId, long comuneId, String codiceProvincia, String codiceComune, String codiceIstat, private void validate(long companyId, long comuneId, String codiceProvincia, String codiceComune,
String codiceBelfiore, String denominazione, boolean provincia) throws PortalException, SystemException { String codiceIstat, String codiceBelfiore, String denominazione, boolean provincia) throws PortalException,
SystemException {
if (codiceBelfiore != null && !codiceBelfiore.startsWith("Z")) { if (codiceBelfiore != null && !codiceBelfiore.startsWith("Z")) {
@ -414,18 +412,18 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
throw new DuplicateComuneException(); throw new DuplicateComuneException();
} }
} }
boolean checkIfContained(Comune comune, List<Comune> comuni){ boolean checkIfContained(Comune comune, List<Comune> comuni) {
boolean result = false; boolean result = false;
for(Comune comuneEl: comuni){ for (Comune comuneEl : comuni) {
if(comuneEl.getComuneId() == comune.getComuneId()){ if (comuneEl.getComuneId() == comune.getComuneId()) {
result = true; result = true;
break; break;
} }
} }
return result; return result;
} }
} }

39
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneServiceImpl.java

@ -13,7 +13,6 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ComuneServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ComuneServiceBaseImpl;
import java.util.List; import java.util.List;
@ -25,13 +24,12 @@ import com.liferay.portal.kernel.exception.SystemException;
* The implementation of the comune remote service. * The implementation of the comune remote service.
* *
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* ServiceBuilder to copy their definitions into the * their definitions into the {@link it.tref.liferay.portos.bo.service.ComuneService} interface.
* {@link it.tref.liferay.portos.bo.service.ComuneService} interface.
* *
* <p> * <p>
* This is a remote service. Methods of this service are expected to have security checks based on * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS
* the propagated JAAS credentials because this service can be accessed remotely. * credentials because this service can be accessed remotely.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting * @author Davide Barbagallo, 3F Consulting
@ -39,19 +37,18 @@ import com.liferay.portal.kernel.exception.SystemException;
* @see it.tref.liferay.portos.bo.service.ComuneServiceUtil * @see it.tref.liferay.portos.bo.service.ComuneServiceUtil
*/ */
public class ComuneServiceImpl extends ComuneServiceBaseImpl { public class ComuneServiceImpl extends ComuneServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* * it.tref.liferay.portos.bo.service.ComuneServiceUtil} to access the comune remote service.
* Never reference this interface directly. Always use {@link */
* it.tref.liferay.portos.bo.service.ComuneServiceUtil} to access the comune remote service.
*/ @Override
public Comune getComune(long comuneId) throws PortalException, SystemException {
public Comune getComune(long comuneId) throws PortalException, SystemException { return comuneLocalService.getComune(comuneId);
return ComuneLocalServiceUtil.getComune(comuneId); }
}
@Override
public List<Comune> getComunes(int start, int end) throws SystemException { public List<Comune> getComunes(int start, int end) throws SystemException {
return ComuneLocalServiceUtil.getComunes(start, end); return comuneLocalService.getComunes(start, end);
} }
} }

44
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneServiceImpl.java

@ -23,13 +23,12 @@ import com.liferay.portal.service.ServiceContext;
* The implementation of the comunicazione remote service. * The implementation of the comunicazione remote service.
* *
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* ServiceBuilder to copy their definitions into the * their definitions into the {@link it.tref.liferay.portos.bo.service.ComunicazioneService} interface.
* {@link it.tref.liferay.portos.bo.service.ComunicazioneService} interface.
* *
* <p> * <p>
* This is a remote service. Methods of this service are expected to have security checks based on * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS
* the propagated JAAS credentials because this service can be accessed remotely. * credentials because this service can be accessed remotely.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting * @author Davide Barbagallo, 3F Consulting
@ -37,21 +36,22 @@ import com.liferay.portal.service.ServiceContext;
* @see it.tref.liferay.portos.bo.service.ComunicazioneServiceUtil * @see it.tref.liferay.portos.bo.service.ComunicazioneServiceUtil
*/ */
public class ComunicazioneServiceImpl extends ComunicazioneServiceBaseImpl { public class ComunicazioneServiceImpl extends ComunicazioneServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* * it.tref.liferay.portos.bo.service.ComunicazioneServiceUtil} to access the comunicazione remote service.
* Never reference this interface directly. Always use {@link */
* it.tref.liferay.portos.bo.service.ComunicazioneServiceUtil} to access the comunicazione remote
* service. @Override
*/ public Comunicazione addComunicazione(long userId, long intPraticaId, String domanda, ServiceContext serviceContext)
throws SystemException, PortalException {
public Comunicazione addComunicazione(long userId, long intPraticaId, String domanda, ServiceContext serviceContext)
throws SystemException, PortalException { return comunicazioneLocalService.addComunicazione(userId, intPraticaId, domanda, serviceContext);
return comunicazioneLocalService.addComunicazione(userId, intPraticaId, domanda, serviceContext); }
}
@Override
public Comunicazione updateComunicazione(long comunicazioneId, String risposta) throws SystemException, public Comunicazione updateComunicazione(long comunicazioneId, String risposta) throws SystemException,
PortalException { PortalException {
return comunicazioneLocalService.updateComunicazione(comunicazioneId, risposta);
} return comunicazioneLocalService.updateComunicazione(comunicazioneId, risposta);
}
} }

51
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ConfigurazioneServiceImpl.java

@ -14,7 +14,6 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ConfigurazioneServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ConfigurazioneServiceBaseImpl;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
@ -25,13 +24,12 @@ import com.liferay.portal.service.ServiceContext;
* The implementation of the configurazione remote service. * The implementation of the configurazione remote service.
* *
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* ServiceBuilder to copy their definitions into the * their definitions into the {@link it.tref.liferay.portos.bo.service.ConfigurazioneService} interface.
* {@link it.tref.liferay.portos.bo.service.ConfigurazioneService} interface.
* *
* <p> * <p>
* This is a remote service. Methods of this service are expected to have security checks based on * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS
* the propagated JAAS credentials because this service can be accessed remotely. * credentials because this service can be accessed remotely.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting * @author Davide Barbagallo, 3F Consulting
@ -39,22 +37,27 @@ import com.liferay.portal.service.ServiceContext;
* @see it.tref.liferay.portos.bo.service.ConfigurazioneServiceUtil * @see it.tref.liferay.portos.bo.service.ConfigurazioneServiceUtil
*/ */
public class ConfigurazioneServiceImpl extends ConfigurazioneServiceBaseImpl { public class ConfigurazioneServiceImpl extends ConfigurazioneServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* it.tref.liferay.portos.bo.service.ConfigurazioneServiceUtil} to access the configurazione * it.tref.liferay.portos.bo.service.ConfigurazioneServiceUtil} to access the configurazione remote service.
* remote service. */
*/
@Override
public long findByC_ChiaveLong(long companyId, String chiave) throws SystemException { public long findByC_ChiaveLong(long companyId, String chiave) throws SystemException {
return ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, chiave);
} return configurazioneLocalService.findByC_ChiaveLong(companyId, chiave);
}
public String findByC_ChiaveString(long companyId, String chiave) throws SystemException {
return ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, chiave); @Override
} public String findByC_ChiaveString(long companyId, String chiave) throws SystemException {
public void storeConfig(String chiave, String valore, ServiceContext serviceContext) throws PortalException, return configurazioneLocalService.findByC_ChiaveString(companyId, chiave);
SystemException { }
ConfigurazioneLocalServiceUtil.storeConfig(chiave, valore, serviceContext);
} @Override
public void storeConfig(String chiave, String valore, ServiceContext serviceContext) throws PortalException,
SystemException {
configurazioneLocalService.storeConfig(chiave, valore, serviceContext);
}
} }

52
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java

@ -17,11 +17,6 @@ import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TempisticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ControlloPraticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ControlloPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@ -74,7 +69,6 @@ import com.liferay.portal.model.UserGroupRole;
import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.workflow.kaleo.model.KaleoInstance; import com.liferay.portal.workflow.kaleo.model.KaleoInstance;
import com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil; import com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil;
import com.liferay.portlet.asset.NoSuchEntryException; import com.liferay.portlet.asset.NoSuchEntryException;
@ -144,7 +138,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
serviceContext.getAssetLinkEntryIds(), now); serviceContext.getAssetLinkEntryIds(), now);
// ADT: BUG BO GESTIONE WORKFLOW // ADT: BUG BO GESTIONE WORKFLOW
Map<String, Serializable> wfContextMap = new HashMap<String, Serializable>(); Map<String, Serializable> wfContextMap = new HashMap<String, Serializable>();
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) { if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) {
wfContextMap.put("wf_variante", "OK"); wfContextMap.put("wf_variante", "OK");
} }
@ -157,8 +151,8 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
} else { } else {
dtInvio = entry.getCreateDate(); dtInvio = entry.getCreateDate();
} }
TempisticaLocalServiceUtil.addTempistica(intPraticaId, dettPraticaId, TempisticaConstants.TIPO_PRATICA, tempisticaLocalService.addTempistica(intPraticaId, dettPraticaId, TempisticaConstants.TIPO_PRATICA, dtInvio,
dtInvio, serviceContext); serviceContext);
return entry; return entry;
} }
@ -279,13 +273,13 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public boolean generazioneDocumento(long controlloPraticaId, String jsonParams, String tipoAvviso, public boolean generazioneDocumento(long controlloPraticaId, String jsonParams, String tipoAvviso,
long userIdFirma, Map<String, Serializable> workflowContext) throws PortalException, SystemException { long userIdFirma, Map<String, Serializable> workflowContext) throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId()); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(controlloPratica.getDettPraticaId());
ServiceContext serviceContext = new ServiceContext(); ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId()); serviceContext.setCompanyId(controlloPratica.getCompanyId());
serviceContext.setScopeGroupId(controlloPratica.getGroupId()); serviceContext.setScopeGroupId(controlloPratica.getGroupId());
serviceContext.setUserId(controlloPratica.getUserId()); serviceContext.setUserId(controlloPratica.getUserId());
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId());
String userCodiceFiscale = GestioneFirmeUtil.getCodiceFiscaleFirma(controlloPratica.getCompanyId(), String userCodiceFiscale = GestioneFirmeUtil.getCodiceFiscaleFirma(controlloPratica.getCompanyId(),
controlloPratica.getGroupId(), intPratica.getStatoPratica()); controlloPratica.getGroupId(), intPratica.getStatoPratica());
if (Validator.isNull(intPratica.getDtSorteggio()) if (Validator.isNull(intPratica.getDtSorteggio())
@ -309,14 +303,14 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public boolean generaDocumentoFinale(long controlloPraticaId, String jsonParams, long userIdFirma, public boolean generaDocumentoFinale(long controlloPraticaId, String jsonParams, long userIdFirma,
Map<String, Serializable> workflowContext) throws PortalException, SystemException { Map<String, Serializable> workflowContext) throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId()); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(controlloPratica.getDettPraticaId());
ServiceContext serviceContext = new ServiceContext(); ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId()); serviceContext.setCompanyId(controlloPratica.getCompanyId());
serviceContext.setScopeGroupId(controlloPratica.getGroupId()); serviceContext.setScopeGroupId(controlloPratica.getGroupId());
serviceContext.setUserId(controlloPratica.getUserId()); serviceContext.setUserId(controlloPratica.getUserId());
String statoPratica = getEsitoFinale(controlloPraticaId, workflowContext); String statoPratica = getEsitoFinale(controlloPraticaId, workflowContext);
User user = UserLocalServiceUtil.fetchUser(userIdFirma); User user = userLocalService.fetchUser(userIdFirma);
String codiceFiscale = StringPool.BLANK; String codiceFiscale = StringPool.BLANK;
if (user != null) { if (user != null) {
codiceFiscale = user.getScreenName(); codiceFiscale = user.getScreenName();
@ -336,7 +330,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public void updateIstruttore(long controlloPraticaId, Map<String, Serializable> workflowContext) public void updateIstruttore(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException { throws PortalException, SystemException {
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
Map<String, String> parametri = (Map<String, String>) workflowContext.get("CONTEXT_TASK_FORM_PARAMETERS"); Map<String, String> parametri = (Map<String, String>) workflowContext.get("CONTEXT_TASK_FORM_PARAMETERS");
IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId());
@ -361,7 +355,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
String esito = getEsitoFinale(controlloPraticaId, workflowContext); String esito = getEsitoFinale(controlloPraticaId, workflowContext);
String ramoWorkflow = StringPool.BLANK; String ramoWorkflow = StringPool.BLANK;
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
Avviso avviso = avvisoLocalService Avviso avviso = avvisoLocalService
.fetchLastAvvisoByIntPraticaPerStatoFinale(controlloPratica.getIntPraticaId()); .fetchLastAvvisoByIntPraticaPerStatoFinale(controlloPratica.getIntPraticaId());
if (avviso != null && avviso.getRifiutato()) { if (avviso != null && avviso.getRifiutato()) {
@ -399,7 +393,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
private String getEsitoFinale(long controlloPraticaId, Map<String, Serializable> workflowContext) private String getEsitoFinale(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException { throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
Map<String, Serializable> parametri = WorkflowUtil.getFormParameters(controlloPratica); Map<String, Serializable> parametri = WorkflowUtil.getFormParameters(controlloPratica);
String esitoScelta = (String) parametri.get(WorkflowConstants.WORKFLOW_TASKNAME_ESITO); String esitoScelta = (String) parametri.get(WorkflowConstants.WORKFLOW_TASKNAME_ESITO);
if (StatoPraticaConstants.CONFORME.equalsIgnoreCase(esitoScelta) if (StatoPraticaConstants.CONFORME.equalsIgnoreCase(esitoScelta)
@ -416,7 +410,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public void aggiornaStatoPerRichiestaIntegrazione(long controlloPraticaId, Map<String, Serializable> workflowContext) public void aggiornaStatoPerRichiestaIntegrazione(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException { throws PortalException, SystemException {
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId());
intPratica.setStatoPratica(StatoPraticaConstants.INTEGRAZIONE); intPratica.setStatoPratica(StatoPraticaConstants.INTEGRAZIONE);
intPraticaLocalService.updateIntPratica(intPratica); intPraticaLocalService.updateIntPratica(intPratica);
@ -426,7 +420,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getJsonListaIstruttori(long controlloPraticaId, Map<String, Serializable> workflowContext) public String getJsonListaIstruttori(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException { throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
jsonObject.put("istruttore", jsonArray); jsonObject.put("istruttore", jsonArray);
@ -447,7 +441,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getJsonEsitoPratica(long controlloPraticaId, Map<String, Serializable> workflowContext) public String getJsonEsitoPratica(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException { throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
jsonObject.put(WorkflowConstants.WORKFLOW_TASKNAME_ESITO, jsonArray); jsonObject.put(WorkflowConstants.WORKFLOW_TASKNAME_ESITO, jsonArray);
@ -500,7 +494,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
@Override @Override
public ControlloPratica addPraticheAlControllo(long controlloPraticaId, long dettPraticaId) throws PortalException, public ControlloPratica addPraticheAlControllo(long controlloPraticaId, long dettPraticaId) throws PortalException,
SystemException { SystemException {
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
controlloPratica.setDettPraticaId(dettPraticaId); controlloPratica.setDettPraticaId(dettPraticaId);
controlloPratica.setModifiedDate(new Date()); controlloPratica.setModifiedDate(new Date());
@ -513,7 +507,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
_log.info("start addPraticheAlControlloVarianti per controlloPraticaId=" + controlloPraticaId); _log.info("start addPraticheAlControlloVarianti per controlloPraticaId=" + controlloPraticaId);
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
controlloPratica.setDettPraticaId(dettPraticaId); controlloPratica.setDettPraticaId(dettPraticaId);
controlloPratica.setModifiedDate(new Date()); controlloPratica.setModifiedDate(new Date());
ControlloPratica result = controlloPraticaPersistence.update(controlloPratica); ControlloPratica result = controlloPraticaPersistence.update(controlloPratica);
@ -543,8 +537,8 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
@Override @Override
public String getReturnValueScriptIniziale(long controlloPraticaId) throws PortalException, SystemException { public String getReturnValueScriptIniziale(long controlloPraticaId) throws PortalException, SystemException {
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId()); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(controlloPratica.getDettPraticaId());
if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
return "portos1_integrazioni"; return "portos1_integrazioni";
} else { } else {
@ -556,7 +550,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getTipoEsito(long controlloPraticaId) throws SystemException, PortalException { public String getTipoEsito(long controlloPraticaId) throws SystemException, PortalException {
String tipoEsito = StringPool.BLANK; String tipoEsito = StringPool.BLANK;
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = fetchControlloPratica(controlloPraticaId);
ClassLoader classLoaderKaleo = (ClassLoader) PortletBeanLocatorUtil.locate( ClassLoader classLoaderKaleo = (ClassLoader) PortletBeanLocatorUtil.locate(
com.liferay.portal.workflow.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader"); com.liferay.portal.workflow.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader");
DynamicQuery dqKaleo = DynamicQueryFactoryUtil.forClass(KaleoInstance.class, classLoaderKaleo); DynamicQuery dqKaleo = DynamicQueryFactoryUtil.forClass(KaleoInstance.class, classLoaderKaleo);
@ -623,15 +617,15 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
@Override @Override
public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException, PortalException { public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException, PortalException {
ControlloPratica controllo = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controlloPraticaId); ControlloPratica controllo = fetchControlloPratica(controlloPraticaId);
IntPratica pratica = IntPraticaLocalServiceUtil.fetchIntPratica(controllo.getIntPraticaId()); IntPratica pratica = intPraticaLocalService.fetchIntPratica(controllo.getIntPraticaId());
if (pratica.getStatoPratica().equalsIgnoreCase(StatoPraticaConstants.AUTORIZZATA)) { if (pratica.getStatoPratica().equalsIgnoreCase(StatoPraticaConstants.AUTORIZZATA)) {
return 0L; return 0L;
} }
Date apertura = pratica.getDtPratica(); Date apertura = pratica.getDtPratica();
Date chiusura = null; Date chiusura = null;
long stop = 0L; long stop = 0L;
List<Avviso> avvisi = AvvisoLocalServiceUtil.findByIntPratica( List<Avviso> avvisi = avvisoLocalService.findByIntPratica(
pratica.getIntPraticaId(), pratica.getIntPraticaId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, QueryUtil.ALL_POS,

7
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java

@ -13,11 +13,9 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.Delega; import it.tref.liferay.portos.bo.model.Delega;
import it.tref.liferay.portos.bo.service.AsseverazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DelegaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.DelegaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.bean.FirmeBean; import it.tref.liferay.portos.bo.shared.bean.FirmeBean;
import it.tref.liferay.portos.bo.shared.util.FirmeUtil; import it.tref.liferay.portos.bo.shared.util.FirmeUtil;
import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import it.tref.liferay.portos.bo.util.AsseverazioniUtil; import it.tref.liferay.portos.bo.util.AsseverazioniUtil;
import it.tref.liferay.portos.bo.util.DelegheUtil; import it.tref.liferay.portos.bo.util.DelegheUtil;
import it.tref.liferay.portos.report.shared.constants.ReportConstants; import it.tref.liferay.portos.report.shared.constants.ReportConstants;
@ -48,7 +46,6 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.model.DLFolder; import com.liferay.portlet.documentlibrary.model.DLFolder;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil; import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil;
/** /**
@ -389,7 +386,7 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl {
long userId = serviceContext.getUserId(); long userId = serviceContext.getUserId();
DLFolder folderTemplate = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay() DLFolder folderTemplate = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay()
.getCompanyGroupId(), 0L, "Template"); .getCompanyGroupId(), 0L, "Template");
FileEntry fileEntryIdTemplate = DLAppLocalServiceUtil.getFileEntry(serviceContext.getThemeDisplay() FileEntry fileEntryIdTemplate = dlAppLocalService.getFileEntry(serviceContext.getThemeDisplay()
.getCompanyGroupId(), folderTemplate.getFolderId(), "Modello Asseverazione"); .getCompanyGroupId(), folderTemplate.getFolderId(), "Modello Asseverazione");
DLFolder folderAllegati = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay() DLFolder folderAllegati = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay()
.getCompanyGroupId(), 0L, "Allegati"); .getCompanyGroupId(), 0L, "Allegati");
@ -418,7 +415,7 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl {
relazioni = (String) dichiarazioniMap.get("relazioni"); relazioni = (String) dichiarazioniMap.get("relazioni");
} }
User user = userLocalService.getUser(userId); User user = userLocalService.getUser(userId);
parameters.put("html", AsseverazioneLocalServiceUtil.testoAsseverazione(TipoSoggettoUtil.GEOLOGO, user, parameters.put("html", asseverazioneLocalService.testoAsseverazioneGeologo(user.getScreenName(),
dettPraticaId, relazioni)); dettPraticaId, relazioni));
parameters.put("modello", "AS-GEO"); parameters.put("modello", "AS-GEO");
ReportResultDto result = ReportUtil.generateReport(delega.getCompanyId(), userId, reportDto, null); ReportResultDto result = ReportUtil.generateReport(delega.getCompanyId(), userId, reportDto, null);

39
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java

@ -23,7 +23,6 @@ import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DettPraticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.DettPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants; import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
@ -110,8 +109,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
User user = userLocalService.getUser(serviceContext.getUserId()); User user = userLocalService.getUser(serviceContext.getUserId());
Date now = new Date(); Date now = new Date();
DettPratica dettPratica = dettPraticaLocalService.createDettPratica(counterLocalService DettPratica dettPratica = createDettPratica(counterLocalService.increment(DettPratica.class.getName()));
.increment(DettPratica.class.getName()));
dettPratica.setCompanyId(serviceContext.getCompanyId()); dettPratica.setCompanyId(serviceContext.getCompanyId());
dettPratica.setGroupId(serviceContext.getScopeGroupId()); dettPratica.setGroupId(serviceContext.getScopeGroupId());
dettPratica.setUserId(serviceContext.getUserId()); dettPratica.setUserId(serviceContext.getUserId());
@ -309,8 +307,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
@Indexable(type = IndexableType.REINDEX) @Indexable(type = IndexableType.REINDEX)
public DettPratica addDettPraticaForImport(ServiceContext serviceContext) throws SystemException, PortalException { public DettPratica addDettPraticaForImport(ServiceContext serviceContext) throws SystemException, PortalException {
DettPratica dettPratica = dettPraticaLocalService.createDettPratica(counterLocalService DettPratica dettPratica = createDettPratica(counterLocalService.increment(DettPratica.class.getName()));
.increment(DettPratica.class.getName()));
dettPratica.setCompanyId(serviceContext.getCompanyId()); dettPratica.setCompanyId(serviceContext.getCompanyId());
dettPratica.setGroupId(serviceContext.getScopeGroupId()); dettPratica.setGroupId(serviceContext.getScopeGroupId());
dettPratica.setUserId(serviceContext.getUserId()); dettPratica.setUserId(serviceContext.getUserId());
@ -1234,7 +1231,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
} else if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(dettPratica.getTipoIntegrazione())) { } else if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(dettPratica.getTipoIntegrazione())) {
sendMail = true; sendMail = true;
} }
dettPratica = dettPraticaLocalService.updateDettPratica(dettPratica); dettPratica = updateDettPratica(dettPratica);
docPraticaLocalService.completeInvalidation(dettPratica.getIntPraticaId()); docPraticaLocalService.completeInvalidation(dettPratica.getIntPraticaId());
soggettoLocalService.completeInvalidation(dettPratica.getIntPraticaId()); soggettoLocalService.completeInvalidation(dettPratica.getIntPraticaId());
// chiudo timer pratica se presente // chiudo timer pratica se presente
@ -1351,7 +1348,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
} }
dettPratica = updateDettPratica(dettPratica); dettPratica = updateDettPratica(dettPratica);
updateStatus(dettPraticaId, WorkflowConstants.STATUS_INCOMPLETE); updateStatus(dettPraticaId, WorkflowConstants.STATUS_INCOMPLETE);
dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId); dettPratica = getDettPratica(dettPraticaId);
return dettPratica; return dettPratica;
} }
@ -1405,11 +1402,11 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
public DettPratica updateDettPraticaProtocollo(long dettPraticaId, String protocollo) throws PortalException, public DettPratica updateDettPraticaProtocollo(long dettPraticaId, String protocollo) throws PortalException,
SystemException { SystemException {
DettPratica dettPratica = dettPraticaLocalService.fetchDettPratica(dettPraticaId); DettPratica dettPratica = fetchDettPratica(dettPraticaId);
dettPratica.setModifiedDate(new Date()); dettPratica.setModifiedDate(new Date());
dettPratica.setProtocollo(protocollo); dettPratica.setProtocollo(protocollo);
dettPratica.setDtProtocollo(new Date()); dettPratica.setDtProtocollo(new Date());
dettPratica = dettPraticaLocalService.updateDettPratica(dettPratica); dettPratica = updateDettPratica(dettPratica);
IntPratica intPratica = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId());
if (intPratica.getStatus() == WorkflowConstants.STATUS_ANY if (intPratica.getStatus() == WorkflowConstants.STATUS_ANY
|| intPratica.getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { || intPratica.getStatus() == WorkflowConstants.STATUS_INCOMPLETE) {
@ -1448,7 +1445,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
@Override @Override
public List<DettPratica> findByIntPraticaIdInviate(long intPraticaId, int start, int end) throws SystemException { public List<DettPratica> findByIntPraticaIdInviate(long intPraticaId, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dettPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
dynamicQuery.add(RestrictionsFactoryUtil.ne("status", WorkflowConstants.STATUS_ANY)); dynamicQuery.add(RestrictionsFactoryUtil.ne("status", WorkflowConstants.STATUS_ANY));
dynamicQuery.add(RestrictionsFactoryUtil.ne("status", WorkflowConstants.STATUS_INCOMPLETE)); dynamicQuery.add(RestrictionsFactoryUtil.ne("status", WorkflowConstants.STATUS_INCOMPLETE));
@ -1474,7 +1471,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
private DynamicQuery getDynamicQueryPraticheCompleteNotProtocollo() { private DynamicQuery getDynamicQueryPraticheCompleteNotProtocollo() {
DynamicQuery dynamicQuery = dettPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("completa", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completa", true));
dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false));
Disjunction or = RestrictionsFactoryUtil.disjunction(); Disjunction or = RestrictionsFactoryUtil.disjunction();
@ -1502,7 +1499,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
private DynamicQuery getDynamicQueryPraticheCompleteNotGestite() { private DynamicQuery getDynamicQueryPraticheCompleteNotGestite() {
DynamicQuery dynamicQuery = dettPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("completa", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completa", true));
dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false));
dynamicQuery.add(RestrictionsFactoryUtil.ne("protocollo", StringPool.BLANK)); dynamicQuery.add(RestrictionsFactoryUtil.ne("protocollo", StringPool.BLANK));
@ -1544,7 +1541,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
private DynamicQuery getDynamicQueryPraticheCompletateNonVersionate() { private DynamicQuery getDynamicQueryPraticheCompletateNonVersionate() {
DynamicQuery dynamicQuery = dettPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("completa", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completa", true));
dynamicQuery.add(RestrictionsFactoryUtil.eq("versionata", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("versionata", false));
dynamicQuery.add(RestrictionsFactoryUtil.ne("protocollo", StringPool.BLANK)); dynamicQuery.add(RestrictionsFactoryUtil.ne("protocollo", StringPool.BLANK));
@ -1555,11 +1552,11 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
@Override @Override
public DettPratica updateDettPraticaGestita(long dettPraticaId, boolean gestita) throws SystemException { public DettPratica updateDettPraticaGestita(long dettPraticaId, boolean gestita) throws SystemException {
DettPratica dettPratica = dettPraticaLocalService.fetchDettPratica(dettPraticaId); DettPratica dettPratica = fetchDettPratica(dettPraticaId);
dettPratica.setModifiedDate(new Date()); dettPratica.setModifiedDate(new Date());
dettPratica.setGestita(gestita); dettPratica.setGestita(gestita);
return dettPraticaLocalService.updateDettPratica(dettPratica); return updateDettPratica(dettPratica);
} }
@Override @Override
@ -1570,7 +1567,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
@Override @Override
public void updateStatus(long dettPraticaId, int status) throws PortalException, SystemException { public void updateStatus(long dettPraticaId, int status) throws PortalException, SystemException {
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId); DettPratica dettPratica = getDettPratica(dettPraticaId);
dettPratica.setStatus(status); dettPratica.setStatus(status);
updateDettPratica(dettPratica); updateDettPratica(dettPratica);
} }
@ -1580,7 +1577,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId); DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
dettPratica.setDtInvioSignal(dtInvioSignal); dettPratica.setDtInvioSignal(dtInvioSignal);
return dettPraticaLocalService.updateDettPratica(dettPratica); return updateDettPratica(dettPratica);
} }
@Override @Override
@ -1611,7 +1608,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
@Override @Override
public DynamicQuery dynamicQueryInvioSignal(Long dettPraticaId) throws SystemException { public DynamicQuery dynamicQueryInvioSignal(Long dettPraticaId) throws SystemException {
DynamicQuery dynamicQuery = dettPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
if (Validator.isNotNull(dettPraticaId)) { if (Validator.isNotNull(dettPraticaId)) {
dynamicQuery.add(PropertyFactoryUtil.forName("avvisoId").eq(dettPraticaId)); dynamicQuery.add(PropertyFactoryUtil.forName("avvisoId").eq(dettPraticaId));
} }
@ -1626,7 +1623,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
@Override @Override
public List<DettPratica> findByPagamentoId(long pagamentoId) throws SystemException { public List<DettPratica> findByPagamentoId(long pagamentoId) throws SystemException {
DynamicQuery dynamicQuery = dettPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); Disjunction disjunction = RestrictionsFactoryUtil.disjunction();
disjunction.add(RestrictionsFactoryUtil.eq("pagamentoIdOneri", pagamentoId)); disjunction.add(RestrictionsFactoryUtil.eq("pagamentoIdOneri", pagamentoId));
disjunction.add(RestrictionsFactoryUtil.eq("pagamentoIdBolli", pagamentoId)); disjunction.add(RestrictionsFactoryUtil.eq("pagamentoIdBolli", pagamentoId));
@ -1639,7 +1636,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
public DettPratica updatePrincipale(long dettPraticaId, String codiceFiscale, String tipologiaSoggetto) public DettPratica updatePrincipale(long dettPraticaId, String codiceFiscale, String tipologiaSoggetto)
throws PortalException, SystemException { throws PortalException, SystemException {
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId); DettPratica dettPratica = getDettPratica(dettPraticaId);
switch (tipologiaSoggetto) { switch (tipologiaSoggetto) {
case TipoSoggettoUtil.COMMITTENTE: case TipoSoggettoUtil.COMMITTENTE:
dettPratica.setCodiceFiscalePrincipaleCommittente(codiceFiscale); dettPratica.setCodiceFiscalePrincipaleCommittente(codiceFiscale);
@ -1660,7 +1657,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
dettPratica.setCodiceFiscalePrincipaleDitta(codiceFiscale); dettPratica.setCodiceFiscalePrincipaleDitta(codiceFiscale);
break; break;
} }
dettPratica = DettPraticaLocalServiceUtil.updateDettPratica(dettPratica); dettPratica = updateDettPratica(dettPratica);
return dettPratica; return dettPratica;
} }

35
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java

@ -14,8 +14,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.DettPraticaServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DettPraticaServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.DettPraticaServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.DettPraticaEntryPermission; import it.tref.liferay.portos.bo.service.permission.DettPraticaEntryPermission;
import it.tref.liferay.portos.bo.service.permission.DettPraticaPermission; import it.tref.liferay.portos.bo.service.permission.DettPraticaPermission;
@ -65,7 +63,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
public DettPratica addDettPratica(long territorioId, String tipoProcedura, ServiceContext serviceContext) public DettPratica addDettPratica(long territorioId, String tipoProcedura, ServiceContext serviceContext)
throws PortalException, SystemException { throws PortalException, SystemException {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); Territorio territorio = territorioLocalService.getTerritorio(territorioId);
DettPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.ADD_ENTRY); DettPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.ADD_ENTRY);
return dettPraticaLocalService.addDettPratica(territorioId, tipoProcedura, serviceContext); return dettPraticaLocalService.addDettPratica(territorioId, tipoProcedura, serviceContext);
} }
@ -73,12 +71,14 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
@Override @Override
public DettPratica addDettPraticaToIntPratica(long intPraticaId, ServiceContext serviceContext) public DettPratica addDettPraticaToIntPratica(long intPraticaId, ServiceContext serviceContext)
throws PortalException, SystemException { throws PortalException, SystemException {
return dettPraticaLocalService.addDettPraticaToIntPratica(intPraticaId, serviceContext); return dettPraticaLocalService.addDettPraticaToIntPratica(intPraticaId, serviceContext);
} }
@Override @Override
public DettPratica addDettPraticaClonedToIntPratica(long intPraticaId, long dettPraticaToCloneId, public DettPratica addDettPraticaClonedToIntPratica(long intPraticaId, long dettPraticaToCloneId,
String tipoIntegrazione, ServiceContext serviceContext) throws PortalException, SystemException { String tipoIntegrazione, ServiceContext serviceContext) throws PortalException, SystemException {
return dettPraticaLocalService.addDettPraticaClonedToIntPratica(intPraticaId, dettPraticaToCloneId, return dettPraticaLocalService.addDettPraticaClonedToIntPratica(intPraticaId, dettPraticaToCloneId,
tipoIntegrazione, serviceContext); tipoIntegrazione, serviceContext);
} }
@ -257,39 +257,24 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
@Override @Override
public DettPratica getLastEditabledByIntPraticaAndTipoPratica(long intPraticaId, List<String> tipoPratiche) public DettPratica getLastEditabledByIntPraticaAndTipoPratica(long intPraticaId, List<String> tipoPratiche)
throws SystemException { throws SystemException {
return dettPraticaLocalService.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId, tipoPratiche); return dettPraticaLocalService.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId, tipoPratiche);
} }
@Override @Override
public List<DettPratica> findCompletedByIntPraticaAndTipoPratica(long intPraticaId, List<String> tipoPratiche) public List<DettPratica> findCompletedByIntPraticaAndTipoPratica(long intPraticaId, List<String> tipoPratiche)
throws SystemException { throws SystemException {
return dettPraticaLocalService.findCompletedByIntPraticaAndTipoPratica(intPraticaId, tipoPratiche); return dettPraticaLocalService.findCompletedByIntPraticaAndTipoPratica(intPraticaId, tipoPratiche);
} }
@Override @Override
public int countCompletedByIntPraticaAndTipoPratica(long intPraticaId, List<String> tipoPratiche) public int countCompletedByIntPraticaAndTipoPratica(long intPraticaId, List<String> tipoPratiche)
throws SystemException { throws SystemException {
return dettPraticaLocalService.countCompletedByIntPraticaAndTipoPratica(intPraticaId, tipoPratiche); return dettPraticaLocalService.countCompletedByIntPraticaAndTipoPratica(intPraticaId, tipoPratiche);
} }
// public void updatePagamentoManuale(long pagamentoId, long dettPraticaId,
// byte[] content, String
// sourceFileName,
// ServiceContext serviceContext) throws PortalException, SystemException {
//
// DettPratica dettPratica =
// dettPraticaLocalService.getDettPratica(dettPraticaId);
// if (getUserId() == dettPratica.getUserId()) {
// dettPraticaLocalService.updatePagamentoManuale(pagamentoId,
// dettPraticaId, content,
// sourceFileName,
// serviceContext);
// } else {
// throw new
// SystemException("pagamento manuale aggiornabile solo da titolare del dettPratica");
// }
// }
@Override @Override
public DettPratica pagaInvia(long dettPraticaId, int pagAdeguamentoSismico, int pagAltro, public DettPratica pagaInvia(long dettPraticaId, int pagAdeguamentoSismico, int pagAltro,
int pagMiglioramentoSismico, int pagNuovaCostruzione, boolean pagNuoveCostruzioni, int pagMiglioramentoSismico, int pagNuovaCostruzione, boolean pagNuoveCostruzioni,
@ -314,12 +299,14 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
@Override @Override
public DettPratica updateCheckPagamenti(long dettPraticaId, boolean normEsenteSpese, boolean normEsenteBollo) public DettPratica updateCheckPagamenti(long dettPraticaId, boolean normEsenteSpese, boolean normEsenteBollo)
throws SystemException, PortalException { throws SystemException, PortalException {
return dettPraticaLocalService.updateCheckPagamenti(dettPraticaId, normEsenteSpese, normEsenteBollo); return dettPraticaLocalService.updateCheckPagamenti(dettPraticaId, normEsenteSpese, normEsenteBollo);
} }
@Override @Override
public DettPratica updateEsito(long dettPraticaId, int stato) throws IOException, SystemException, PortalException { public DettPratica updateEsito(long dettPraticaId, int stato) throws IOException, SystemException, PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
DettPratica dettPratica = getDettPratica(dettPraticaId);
DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY); DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY);
return dettPraticaLocalService.updateEsito(dettPraticaId, stato); return dettPraticaLocalService.updateEsito(dettPraticaId, stato);
} }
@ -327,7 +314,8 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
@Override @Override
public DettPratica updateEsitoIntegrazione(long dettPraticaId, int stato) throws IOException, SystemException, public DettPratica updateEsitoIntegrazione(long dettPraticaId, int stato) throws IOException, SystemException,
PortalException { PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
DettPratica dettPratica = getDettPratica(dettPraticaId);
DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY); DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY);
return dettPraticaLocalService.updateEsitoIntegrazione(dettPraticaId, stato); return dettPraticaLocalService.updateEsitoIntegrazione(dettPraticaId, stato);
} }
@ -335,6 +323,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
@Override @Override
public DettPratica updatePrincipale(long dettPraticaId, String codiceFiscale, String tipologiaSoggetto) public DettPratica updatePrincipale(long dettPraticaId, String codiceFiscale, String tipologiaSoggetto)
throws PortalException, SystemException { throws PortalException, SystemException {
return dettPraticaLocalService.updatePrincipale(dettPraticaId, codiceFiscale, tipologiaSoggetto); return dettPraticaLocalService.updatePrincipale(dettPraticaId, codiceFiscale, tipologiaSoggetto);
} }

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java

@ -233,7 +233,7 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
long companyId = territorio.getCompanyId(); long companyId = territorio.getCompanyId();
long groupId = territorio.getGroupId(); long groupId = territorio.getGroupId();
// TODO forse è meglio ragionare con un'altra logica per i permessi // TODO forse è meglio ragionare con un'altra logica per i permessi
User user = UserLocalServiceUtil.getRoleUsers( User user = userLocalService.getRoleUsers(
RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId()) RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId())
.get(0); .get(0);
try { try {

15
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java

@ -18,7 +18,6 @@ import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.FineLavoriLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.FineLavoriLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants; import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@ -104,7 +103,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
public FineLavori addFineLavori(long intPraticaId, ServiceContext serviceContext) throws PortalException, public FineLavori addFineLavori(long intPraticaId, ServiceContext serviceContext) throws PortalException,
SystemException { SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
FineLavori fineLavori = initFineLavori(serviceContext); FineLavori fineLavori = initFineLavori(serviceContext);
fineLavori.setGroupId(intPratica.getGroupId()); fineLavori.setGroupId(intPratica.getGroupId());
fineLavori.setIntPraticaId(intPraticaId); fineLavori.setIntPraticaId(intPraticaId);
@ -300,11 +299,11 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
public FineLavori updateFineLavoriProtocollo(long fineLavoriId, String protocollo) throws PortalException, public FineLavori updateFineLavoriProtocollo(long fineLavoriId, String protocollo) throws PortalException,
SystemException { SystemException {
FineLavori fineLavori = fineLavoriLocalService.fetchFineLavori(fineLavoriId); FineLavori fineLavori = fetchFineLavori(fineLavoriId);
fineLavori.setModifiedDate(new Date()); fineLavori.setModifiedDate(new Date());
fineLavori.setProtocollo(protocollo); fineLavori.setProtocollo(protocollo);
fineLavori.setDtProtocollo(new Date()); fineLavori.setDtProtocollo(new Date());
fineLavori = fineLavoriLocalService.updateFineLavori(fineLavori); fineLavori = updateFineLavori(fineLavori);
return fineLavori; return fineLavori;
} }
@ -452,7 +451,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
private DynamicQuery getDynamicQueryFineLavoriCompleteNotProtocollo() { private DynamicQuery getDynamicQueryFineLavoriCompleteNotProtocollo() {
DynamicQuery dynamicQuery = fineLavoriLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true));
dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false));
Disjunction or = RestrictionsFactoryUtil.disjunction(); Disjunction or = RestrictionsFactoryUtil.disjunction();
@ -479,7 +478,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
private DynamicQuery getDynamicQueryFineLavoriCompleteNotGestite() { private DynamicQuery getDynamicQueryFineLavoriCompleteNotGestite() {
DynamicQuery dynamicQuery = fineLavoriLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true));
dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("gestita", false));
dynamicQuery.add(RestrictionsFactoryUtil.ne("protocollo", StringPool.BLANK)); dynamicQuery.add(RestrictionsFactoryUtil.ne("protocollo", StringPool.BLANK));
@ -490,7 +489,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
@Override @Override
public List<Long> findIntPraticaByFineLavori() throws PortalException, SystemException { public List<Long> findIntPraticaByFineLavori() throws PortalException, SystemException {
DynamicQuery dynamicQuery = fineLavoriLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true));
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("intPraticaId"))); dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("intPraticaId")));
List<Long> ids = fineLavoriPersistence.findWithDynamicQuery(dynamicQuery); List<Long> ids = fineLavoriPersistence.findWithDynamicQuery(dynamicQuery);
@ -501,7 +500,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
public List<Long> findIntPraticaByFineLavori(String codiceFiscaleDelegatoCollaudo) throws PortalException, public List<Long> findIntPraticaByFineLavori(String codiceFiscaleDelegatoCollaudo) throws PortalException,
SystemException { SystemException {
DynamicQuery dynamicQuery = fineLavoriLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true)); dynamicQuery.add(RestrictionsFactoryUtil.eq("completata", true));
dynamicQuery.add(RestrictionsFactoryUtil.ilike("codiceFiscaleDelegatoCollaudo", codiceFiscaleDelegatoCollaudo)); dynamicQuery.add(RestrictionsFactoryUtil.ilike("codiceFiscaleDelegatoCollaudo", codiceFiscaleDelegatoCollaudo));
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("intPraticaId"))); dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("intPraticaId")));

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java

@ -13,7 +13,6 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.HistoryWorkflowAction; import it.tref.liferay.portos.bo.model.HistoryWorkflowAction;
import it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.HistoryWorkflowActionLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.HistoryWorkflowActionLocalServiceBaseImpl;
import java.util.List; import java.util.List;
@ -58,12 +57,11 @@ public class HistoryWorkflowActionLocalServiceImpl extends HistoryWorkflowAction
} else { } else {
query.addOrder(OrderFactoryUtil.desc("createDate")); query.addOrder(OrderFactoryUtil.desc("createDate"));
} }
return HistoryWorkflowActionLocalServiceUtil.dynamicQuery(query); return dynamicQuery(query);
} }
@Override @Override
public List<HistoryWorkflowAction> findByIntPratica(long intPraticaId) throws SystemException { public List<HistoryWorkflowAction> findByIntPratica(long intPraticaId) throws SystemException {
return historyWorkflowActionPersistence.findByIntPratica(intPraticaId); return historyWorkflowActionPersistence.findByIntPratica(intPraticaId);
} }
} }

49
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java

@ -32,13 +32,6 @@ import it.tref.liferay.portos.bo.model.Sorteggio;
import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica; import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica;
import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ConfigurazioneServiceUtil;
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.StoricoSoggettoPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.IntPraticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.IntPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.service.persistence.IntPraticaFinderUtil; import it.tref.liferay.portos.bo.service.persistence.IntPraticaFinderUtil;
import it.tref.liferay.portos.bo.shared.bean.FirmeBean; import it.tref.liferay.portos.bo.shared.bean.FirmeBean;
@ -109,7 +102,6 @@ import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys; import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.security.permission.PermissionThreadLocal; import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil; import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@ -136,7 +128,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
*/ */
private static Log _log = LogFactoryUtil.getLog(IntPraticaLocalServiceImpl.class); private static Log _log = LogFactoryUtil.getLog(IntPraticaLocalServiceImpl.class);
private static final Map<String, String> tipiProcedure = new LinkedHashMap<>(); private static final Map<String, String> tipiProcedure = new LinkedHashMap<>();
static { static {
putTipoProcedura(Constants.PROCEDURA_A); putTipoProcedura(Constants.PROCEDURA_A);
@ -152,7 +144,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
public Map<String, String> getTipiProcedure() { public Map<String, String> getTipiProcedure() {
return tipiProcedure; return tipiProcedure;
} }
/** /**
* Restituisce la lista di pratiche da sottoporre a sorteggio suddivisa per codice provincia. Modificata secondo il * Restituisce la lista di pratiche da sottoporre a sorteggio suddivisa per codice provincia. Modificata secondo il
@ -167,7 +158,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
HashMap<String, List<IntPratica>> ret = new HashMap<>(); HashMap<String, List<IntPratica>> ret = new HashMap<>();
List<IntPratica> lista = new ArrayList<IntPratica>(); List<IntPratica> lista = new ArrayList<IntPratica>();
int dow = Integer.parseInt(ConfigurazioneServiceUtil.findByC_ChiaveString(companyId, int dow = Integer.parseInt(configurazioneService.findByC_ChiaveString(companyId,
ConfigurazioneConstants.DAY_OF_WEEK_SORTEGGIO)); ConfigurazioneConstants.DAY_OF_WEEK_SORTEGGIO));
Date[] date = SismicaUtil.getWeekInterval(dow, dtSorteggio); Date[] date = SismicaUtil.getWeekInterval(dow, dtSorteggio);
DynamicQuery dq = intPraticaLocalService.dynamicQuery(); DynamicQuery dq = intPraticaLocalService.dynamicQuery();
@ -189,8 +180,8 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
for (IntPratica pratica : lista) { for (IntPratica pratica : lista) {
long territorioId = pratica.getTerritorioId(); long territorioId = pratica.getTerritorioId();
if (!territoriProvince.containsKey(territorioId)) { if (!territoriProvince.containsKey(territorioId)) {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); Territorio territorio = territorioLocalService.getTerritorio(territorioId);
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); Comune comune = comuneLocalService.getComune(territorio.getComuneId());
territoriProvince.put(territorioId, comune.getCodiceProvincia()); territoriProvince.put(territorioId, comune.getCodiceProvincia());
} }
String codiceProvincia = territoriProvince.get(territorioId); String codiceProvincia = territoriProvince.get(territorioId);
@ -213,7 +204,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
HashMap<String, List<IntPratica>> ret = new HashMap<>(); HashMap<String, List<IntPratica>> ret = new HashMap<>();
List<IntPratica> lista = new ArrayList<IntPratica>(); List<IntPratica> lista = new ArrayList<IntPratica>();
int dow = Integer.parseInt(ConfigurazioneServiceUtil.findByC_ChiaveString(companyId, int dow = Integer.parseInt(configurazioneService.findByC_ChiaveString(companyId,
ConfigurazioneConstants.DAY_OF_WEEK_SORTEGGIO)); ConfigurazioneConstants.DAY_OF_WEEK_SORTEGGIO));
Date[] date = SismicaUtil.getWeekInterval(dow, dtSorteggio); Date[] date = SismicaUtil.getWeekInterval(dow, dtSorteggio);
@ -233,8 +224,8 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
for (IntPratica pratica : lista) { for (IntPratica pratica : lista) {
long territorioId = pratica.getTerritorioId(); long territorioId = pratica.getTerritorioId();
if (!territoriProvince.containsKey(territorioId)) { if (!territoriProvince.containsKey(territorioId)) {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); Territorio territorio = territorioLocalService.getTerritorio(territorioId);
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); Comune comune = comuneLocalService.getComune(territorio.getComuneId());
territoriProvince.put(territorioId, comune.getCodiceProvincia()); territoriProvince.put(territorioId, comune.getCodiceProvincia());
} }
String codiceProvincia = territoriProvince.get(territorioId); String codiceProvincia = territoriProvince.get(territorioId);
@ -252,7 +243,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
throws SystemException, PortalException { throws SystemException, PortalException {
User user = userLocalService.getUser(serviceContext.getUserId()); User user = userLocalService.getUser(serviceContext.getUserId());
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); Territorio territorio = territorioLocalService.getTerritorio(territorioId);
Date now = new Date(); Date now = new Date();
IntPratica intPratica = intPraticaLocalService.createIntPratica(counterLocalService.increment(IntPratica.class IntPratica intPratica = intPraticaLocalService.createIntPratica(counterLocalService.increment(IntPratica.class
.getName())); .getName()));
@ -280,7 +271,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
int esitoControllo, Date dtPratica, ServiceContext serviceContext) throws PortalException, SystemException { int esitoControllo, Date dtPratica, ServiceContext serviceContext) throws PortalException, SystemException {
Date now = new Date(); Date now = new Date();
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); Territorio territorio = territorioLocalService.getTerritorio(territorioId);
IntPratica intPratica = intPraticaPersistence.create(counterLocalService.increment(IntPratica.class.getName())); IntPratica intPratica = intPraticaPersistence.create(counterLocalService.increment(IntPratica.class.getName()));
intPratica.setCompanyId(serviceContext.getCompanyId()); intPratica.setCompanyId(serviceContext.getCompanyId());
intPratica.setUserId(userId); intPratica.setUserId(userId);
@ -493,8 +484,8 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
private void inviaMailNotifica(IntPratica intPratica) throws SystemException, PortalException { private void inviaMailNotifica(IntPratica intPratica) throws SystemException, PortalException {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); Comune comune = comuneLocalService.getComune(territorio.getComuneId());
DettPratica dettPratica = dettPraticaLocalService.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); DettPratica dettPratica = dettPraticaLocalService.getLastCompletedByIntPratica(intPratica.getIntPraticaId());
String eMail = StringPool.BLANK; String eMail = StringPool.BLANK;
if (dettPratica.getSuap()) { if (dettPratica.getSuap()) {
@ -541,8 +532,8 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
intPratica.setModifiedDate(new Date()); intPratica.setModifiedDate(new Date());
User oldUser = UserLocalServiceUtil.getUser(intPratica.getUserId()); User oldUser = userLocalService.getUser(intPratica.getUserId());
User newUser = UserLocalServiceUtil.getUser(soggettoId); User newUser = userLocalService.getUser(soggettoId);
// sostituisci int pratica // sostituisci int pratica
intPratica.setUserId(soggettoId); intPratica.setUserId(soggettoId);
intPratica.setUserName(newUser.getFullName()); intPratica.setUserName(newUser.getFullName());
@ -550,11 +541,11 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
* TODO: verificare che sia veramente come implementato sotto oppure bisogna cambiare il titolare anche di tutti * TODO: verificare che sia veramente come implementato sotto oppure bisogna cambiare il titolare anche di tutti
* i dettPratica * i dettPratica
*/ */
DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId); DettPratica dettPratica = dettPraticaLocalService.getLastCompletedByIntPratica(intPraticaId);
dettPratica.setCodiceFiscaleDelegatoCommittente(newUser.getScreenName()); dettPratica.setCodiceFiscaleDelegatoCommittente(newUser.getScreenName());
DettPraticaLocalServiceUtil.updateDettPratica(dettPratica); dettPraticaLocalService.updateDettPratica(dettPratica);
// registra storico // registra storico
StoricoSoggettoPraticaLocalServiceUtil.addStoricoSoggettoPratica(intPraticaId, oldUser.getFirstName(), storicoSoggettoPraticaLocalService.addStoricoSoggettoPratica(intPraticaId, oldUser.getFirstName(),
oldUser.getLastName(), oldUser.getScreenName(), serviceContext); oldUser.getLastName(), oldUser.getScreenName(), serviceContext);
Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class);
intPratica = updateIntPratica(intPratica); intPratica = updateIntPratica(intPratica);
@ -980,7 +971,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId())); queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId()));
queryCP.addOrder(OrderFactoryUtil.desc("controlloPraticaId")); queryCP.addOrder(OrderFactoryUtil.desc("controlloPraticaId"));
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
List<ControlloPratica> appList = ControlloPraticaLocalServiceUtil.dynamicQuery(queryCP, QueryUtil.ALL_POS, List<ControlloPratica> appList = controlloPraticaLocalService.dynamicQuery(queryCP, QueryUtil.ALL_POS,
QueryUtil.ALL_POS); QueryUtil.ALL_POS);
if (appList != null && !appList.isEmpty()) { if (appList != null && !appList.isEmpty()) {
for (ControlloPratica controlloPratica : appList) { for (ControlloPratica controlloPratica : appList) {
@ -1355,7 +1346,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
if (intPratica != null) { if (intPratica != null) {
intIndexer.delete(companyId, intPratica.getUuid()); intIndexer.delete(companyId, intPratica.getUuid());
intIndexer.reindex(IntPratica.class.getName(), intPratica.getIntPraticaId()); intIndexer.reindex(IntPratica.class.getName(), intPratica.getIntPraticaId());
List<ControlloPratica> appList = ControlloPraticaLocalServiceUtil.findByIntPratica(intPratica List<ControlloPratica> appList = controlloPraticaLocalService.findByIntPratica(intPratica
.getIntPraticaId()); .getIntPraticaId());
if (appList != null) { if (appList != null) {
for (ControlloPratica controlloPratica : appList) { for (ControlloPratica controlloPratica : appList) {
@ -1373,14 +1364,14 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
@Override @Override
public void reIndexFasciolo(String numeroProgetto, long companyId) throws SystemException { public void reIndexFasciolo(String numeroProgetto, long companyId) throws SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto); IntPratica intPratica = intPraticaLocalService.findByNumeroProgetto(numeroProgetto);
reIndexFascicolo(intPratica, companyId); reIndexFascicolo(intPratica, companyId);
} }
@Override @Override
public void reIndexFasciolo(long intPraticaId, long companyId) throws PortalException, SystemException { public void reIndexFasciolo(long intPraticaId, long companyId) throws PortalException, SystemException {
reIndexFascicolo(IntPraticaLocalServiceUtil.getIntPratica(intPraticaId), companyId); reIndexFascicolo(intPraticaLocalService.getIntPratica(intPraticaId), companyId);
} }
@Override @Override

16
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java

@ -14,8 +14,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.IntPraticaServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.IntPraticaServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission; import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission;
import it.tref.liferay.portos.bo.shared.util.ActionKeys; import it.tref.liferay.portos.bo.shared.util.ActionKeys;
@ -65,7 +63,7 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
@Override @Override
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); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
if (ValidazionePraticaUtil.canDeletePratica(intPraticaId, userId)) { if (ValidazionePraticaUtil.canDeletePratica(intPraticaId, userId)) {
intPraticaLocalService.deleteIntPratica(intPratica); intPraticaLocalService.deleteIntPratica(intPratica);
} else { } else {
@ -92,8 +90,8 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
@Override @Override
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); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.SOSPENDI_FASCICOLO); IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.SOSPENDI_FASCICOLO);
intPraticaLocalService.sospendiPratica(intPraticaId, sospesa); intPraticaLocalService.sospendiPratica(intPraticaId, sospesa);
@ -104,8 +102,8 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
public void cambiaTitolare(long intPraticaId, long soggettoId, ServiceContext serviceContext) public void cambiaTitolare(long intPraticaId, long soggettoId, ServiceContext serviceContext)
throws PortalException, SystemException { throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_TITOLARE); IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_TITOLARE);
intPraticaLocalService.cambiaTitolare(intPraticaId, soggettoId, serviceContext); intPraticaLocalService.cambiaTitolare(intPraticaId, soggettoId, serviceContext);
@ -114,8 +112,8 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
@Override @Override
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); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_STATO); IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_STATO);
intPraticaLocalService.updateStatoPratica(intPraticaId, statoPratica); intPraticaLocalService.updateStatoPratica(intPraticaId, statoPratica);
} }

33
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java

@ -44,7 +44,6 @@ import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys; import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
/** /**
* The implementation of the pagamento local service. * The implementation of the pagamento local service.
@ -333,7 +332,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
} }
private DynamicQuery createPendingQuery(Date date) { private DynamicQuery createPendingQuery(Date date) {
DynamicQuery dynamicQuery = pagamentoLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.in("utilizzata", new String[] { dynamicQuery.add(RestrictionsFactoryUtil.in("utilizzata", new String[] {
PagamentoConstants.UTILIZZATA_IN_CORSO, PagamentoConstants.UTILIZZATA_ANNULLATO })); PagamentoConstants.UTILIZZATA_IN_CORSO, PagamentoConstants.UTILIZZATA_ANNULLATO }));
dynamicQuery.add(RestrictionsFactoryUtil.le("createDate", date)); dynamicQuery.add(RestrictionsFactoryUtil.le("createDate", date));
@ -348,7 +347,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
@Override @Override
public Pagamento deletePagamento(long pagamentoId) throws PortalException, SystemException { public Pagamento deletePagamento(long pagamentoId) throws PortalException, SystemException {
return deletePagamento(pagamentoLocalService.getPagamento(pagamentoId)); return deletePagamento(getPagamento(pagamentoId));
} }
@Override @Override
@ -356,7 +355,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
if (Validator.isNotNull(pagamento.getFileEntryId())) { if (Validator.isNotNull(pagamento.getFileEntryId())) {
try { try {
DLAppLocalServiceUtil.deleteFileEntry(pagamento.getFileEntryId()); dlAppLocalService.deleteFileEntry(pagamento.getFileEntryId());
} catch (PortalException e) { } catch (PortalException e) {
} }
} }
@ -370,10 +369,10 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
public Pagamento updateEmailPendingPagamento(long pagamentoId, boolean emailPending) throws PortalException, public Pagamento updateEmailPendingPagamento(long pagamentoId, boolean emailPending) throws PortalException,
SystemException { SystemException {
Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId); Pagamento pagamento = getPagamento(pagamentoId);
pagamento.setModifiedDate(new Date()); pagamento.setModifiedDate(new Date());
pagamento.setEmailPending(emailPending); pagamento.setEmailPending(emailPending);
return pagamentoLocalService.updatePagamento(pagamento); return updatePagamento(pagamento);
} }
private void deleteDettPraticaPagamento(Pagamento pagamento) throws SystemException { private void deleteDettPraticaPagamento(Pagamento pagamento) throws SystemException {
@ -392,7 +391,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
private DynamicQuery dynamicQueryFindByCommittente_Mezzo_Utilizzata(String codiceFiscaleCommittente, String mezzo, private DynamicQuery dynamicQueryFindByCommittente_Mezzo_Utilizzata(String codiceFiscaleCommittente, String mezzo,
String utilizzata) { String utilizzata) {
DynamicQuery dynamicQuery = pagamentoLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.ilike("codiceFiscaleCommittente", codiceFiscaleCommittente)); dynamicQuery.add(RestrictionsFactoryUtil.ilike("codiceFiscaleCommittente", codiceFiscaleCommittente));
dynamicQuery.add(RestrictionsFactoryUtil.eq("mezzo", mezzo)); dynamicQuery.add(RestrictionsFactoryUtil.eq("mezzo", mezzo));
if (Validator.isNotNull(utilizzata)) { if (Validator.isNotNull(utilizzata)) {
@ -441,7 +440,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
private DynamicQuery createPagamentiVisibleByIntPratica(long intPraticaId) { private DynamicQuery createPagamentiVisibleByIntPratica(long intPraticaId) {
DynamicQuery dynamicQuery = pagamentoLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
dynamicQuery.add(RestrictionsFactoryUtil.ne("utilizzata", PagamentoConstants.UTILIZZATA_IN_CORSO)); dynamicQuery.add(RestrictionsFactoryUtil.ne("utilizzata", PagamentoConstants.UTILIZZATA_IN_CORSO));
return dynamicQuery; return dynamicQuery;
@ -451,7 +450,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
public void sostituisciPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo, String url, public void sostituisciPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo, String url,
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId); Pagamento pagamento = getPagamento(pagamentoId);
long intPraticaId = pagamento.getIntPraticaId(); long intPraticaId = pagamento.getIntPraticaId();
String currentUtilizzata = pagamento.getUtilizzata(); String currentUtilizzata = pagamento.getUtilizzata();
String currentMezzo = pagamento.getMezzo(); String currentMezzo = pagamento.getMezzo();
@ -485,7 +484,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
} }
pagamento.setUtilizzata(PagamentoConstants.UTILIZZATA_SOSTITUITA); pagamento.setUtilizzata(PagamentoConstants.UTILIZZATA_SOSTITUITA);
pagamento.setUtilizzataSostituita(currentUtilizzata); pagamento.setUtilizzataSostituita(currentUtilizzata);
pagamentoLocalService.updatePagamento(pagamento); updatePagamento(pagamento);
PagamentiUtil.nuovoPagamento(url, pagamento.getClassPk(), pagamento.getClassName(), tipoPagamento, PagamentiUtil.nuovoPagamento(url, pagamento.getClassPk(), pagamento.getClassName(), tipoPagamento,
pagamento.getImporto(), codiceFiscaleCommittente, serviceContext); pagamento.getImporto(), codiceFiscaleCommittente, serviceContext);
} else { } else {
@ -520,7 +519,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
} }
pagamento.setUtilizzata(PagamentoConstants.UTILIZZATA_SOSTITUITA); pagamento.setUtilizzata(PagamentoConstants.UTILIZZATA_SOSTITUITA);
pagamento.setUtilizzataSostituita(currentUtilizzata); pagamento.setUtilizzataSostituita(currentUtilizzata);
pagamentoLocalService.updatePagamento(pagamento); updatePagamento(pagamento);
PagamentiUtil.nuovoPagamento(url, pagamento.getClassPk(), pagamento.getClassName(), PagamentiUtil.nuovoPagamento(url, pagamento.getClassPk(), pagamento.getClassName(),
pagamento.getTipoPagamento(), pagamento.getImporto(), codiceFiscaleCommittente, serviceContext); pagamento.getTipoPagamento(), pagamento.getImporto(), codiceFiscaleCommittente, serviceContext);
} else { } else {
@ -535,7 +534,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
public void updatePagamentoManuale(long pagamentoId, byte[] content, String sourceFileName, public void updatePagamentoManuale(long pagamentoId, byte[] content, String sourceFileName,
ServiceContext serviceContext) throws IOException, PortalException, SystemException { ServiceContext serviceContext) throws IOException, PortalException, SystemException {
Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId); Pagamento pagamento = getPagamento(pagamentoId);
if (pagamento.getMezzo().equalsIgnoreCase(PagamentoConstants.MEZZO_MANUALE) if (pagamento.getMezzo().equalsIgnoreCase(PagamentoConstants.MEZZO_MANUALE)
&& pagamento.getUtilizzata().equalsIgnoreCase(PagamentoConstants.UTILIZZATA_IN_CORSO)) { && pagamento.getUtilizzata().equalsIgnoreCase(PagamentoConstants.UTILIZZATA_IN_CORSO)) {
long fileEntryId = 0L; long fileEntryId = 0L;
@ -564,7 +563,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
description, changeLog, content, serviceContext); description, changeLog, content, serviceContext);
fileEntryId = fileEntry.getFileEntryId(); fileEntryId = fileEntry.getFileEntryId();
pagamento.setFileEntryId(fileEntryId); pagamento.setFileEntryId(fileEntryId);
pagamento = pagamentoLocalService.updatePagamento(pagamento); pagamento = updatePagamento(pagamento);
if (DettPratica.class.getName().equals(pagamento.getClassName())) { if (DettPratica.class.getName().equals(pagamento.getClassName())) {
dettPraticaLocalService.updateEsitoPagamento(pagamentoId, pagamento.getClassPk(), fileEntryId, dettPraticaLocalService.updateEsitoPagamento(pagamentoId, pagamento.getClassPk(), fileEntryId,
PagamentoConstants.UTILIZZATA_PAGATA); PagamentoConstants.UTILIZZATA_PAGATA);
@ -587,7 +586,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
public void updatePagamentoManualeFromImport(long pagamentoId, byte[] content, String sourceFileName, public void updatePagamentoManualeFromImport(long pagamentoId, byte[] content, String sourceFileName,
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId); Pagamento pagamento = getPagamento(pagamentoId);
if (pagamento.getMezzo().equalsIgnoreCase(PagamentoConstants.MEZZO_MANUALE)) { if (pagamento.getMezzo().equalsIgnoreCase(PagamentoConstants.MEZZO_MANUALE)) {
long fileEntryId = 0L; long fileEntryId = 0L;
long defaultFolderId = configurazioneLocalService.findByC_ChiaveLong(serviceContext.getCompanyId(), long defaultFolderId = configurazioneLocalService.findByC_ChiaveLong(serviceContext.getCompanyId(),
@ -615,7 +614,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
description, changeLog, content, serviceContext); description, changeLog, content, serviceContext);
fileEntryId = fileEntry.getFileEntryId(); fileEntryId = fileEntry.getFileEntryId();
pagamento.setFileEntryId(fileEntryId); pagamento.setFileEntryId(fileEntryId);
pagamento = pagamentoLocalService.updatePagamento(pagamento); pagamento = updatePagamento(pagamento);
} else { } else {
throw new SystemException("pagamento manuale non aggiornabile"); throw new SystemException("pagamento manuale non aggiornabile");
} }
@ -630,13 +629,13 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
@Override @Override
public Pagamento updateOtf(long pagamentoId, boolean otf) throws PortalException, SystemException { public Pagamento updateOtf(long pagamentoId, boolean otf) throws PortalException, SystemException {
Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId); Pagamento pagamento = getPagamento(pagamentoId);
pagamento.setOtf(otf); pagamento.setOtf(otf);
if (otf) { if (otf) {
pagamento.setOtfCreateDate(new Date()); pagamento.setOtfCreateDate(new Date());
} else { } else {
pagamento.setOtfCreateDate(null); pagamento.setOtfCreateDate(null);
} }
return pagamentoLocalService.updatePagamento(pagamento); return updatePagamento(pagamento);
} }
} }

55
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoServiceImpl.java

@ -12,18 +12,17 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import java.io.IOException;
import it.tref.liferay.portos.bo.model.Collaudo; import it.tref.liferay.portos.bo.model.Collaudo;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.PagamentoServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.PagamentoServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.PendingPagamentiPermission; import it.tref.liferay.portos.bo.service.permission.PendingPagamentiPermission;
import it.tref.liferay.portos.bo.shared.util.ActionKeys; import it.tref.liferay.portos.bo.shared.util.ActionKeys;
import it.tref.liferay.portos.bo.util.DelegheUtil; import it.tref.liferay.portos.bo.util.DelegheUtil;
import java.io.IOException;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
@ -32,14 +31,12 @@ import com.liferay.portal.service.ServiceContext;
* The implementation of the pagamento remote service. * The implementation of the pagamento remote service.
* *
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* added, rerun ServiceBuilder to copy their definitions into the * their definitions into the {@link it.tref.liferay.portos.bo.service.PagamentoService} interface.
* {@link it.tref.liferay.portos.bo.service.PagamentoService} interface.
* *
* <p> * <p>
* This is a remote service. Methods of this service are expected to have * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS
* security checks based on the propagated JAAS credentials because this service * credentials because this service can be accessed remotely.
* can be accessed remotely.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting * @author Davide Barbagallo, 3F Consulting
@ -48,17 +45,16 @@ import com.liferay.portal.service.ServiceContext;
*/ */
public class PagamentoServiceImpl extends PagamentoServiceBaseImpl { public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* {@link it.tref.liferay.portos.bo.service.PagamentoServiceUtil} to access * it.tref.liferay.portos.bo.service.PagamentoServiceUtil} to access the pagamento remote service.
* the pagamento remote service.
*/ */
public void sostituisciPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo, @Override
String url, ServiceContext serviceContext) throws PortalException, SystemException { public void sostituisciPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo, String url,
ServiceContext serviceContext) throws PortalException, SystemException {
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId); Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
long userId = findTitolare(pagamentoId); long userId = findTitolare(pagamentoId);
if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) { if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) {
pagamentoLocalService.sostituisciPagamento(pagamentoId, codiceFiscaleCommittente, mezzo, url, pagamentoLocalService.sostituisciPagamento(pagamentoId, codiceFiscaleCommittente, mezzo, url,
serviceContext); serviceContext);
@ -68,20 +64,12 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
} }
} }
public void rigeneraPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo, @Override
String url, ServiceContext serviceContext) throws PortalException, SystemException { public void rigeneraPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo, String url,
ServiceContext serviceContext) throws PortalException, SystemException {
if (PendingPagamentiPermission.contains(getPermissionChecker(), serviceContext.getScopeGroupId(), if (PendingPagamentiPermission.contains(getPermissionChecker(), serviceContext.getScopeGroupId(),
ActionKeys.PAGAMENTI_PENDING)) { ActionKeys.PAGAMENTI_PENDING)) {
// long userId = serviceContext.getUserId();
// List<Role> roles = RoleLocalServiceUtil.getUserRoles(userId);
// boolean isAllowed = false;
// for (Role role : roles) {
// if (role.getTitle().equals("portos_admin")) {
// isAllowed = true;
// }
// }
// if (isAllowed) {
pagamentoLocalService.sostituisciPagamento(pagamentoId, codiceFiscaleCommittente, mezzo, url, pagamentoLocalService.sostituisciPagamento(pagamentoId, codiceFiscaleCommittente, mezzo, url,
serviceContext); serviceContext);
} else { } else {
@ -89,6 +77,7 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
} }
} }
@Override
public void annullaPagamento(long pagamentoId, ServiceContext serviceContext) throws PortalException, public void annullaPagamento(long pagamentoId, ServiceContext serviceContext) throws PortalException,
SystemException { SystemException {
@ -100,15 +89,15 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
} }
} }
@Override
public void updatePagamentoManuale(long pagamentoId, byte[] content, String sourceFileName, public void updatePagamentoManuale(long pagamentoId, byte[] content, String sourceFileName,
ServiceContext serviceContext) throws IOException, PortalException, SystemException { ServiceContext serviceContext) throws IOException, PortalException, SystemException {
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId); Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
long userId = findTitolare(pagamentoId); long userId = findTitolare(pagamentoId);
if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) { if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) {
pagamentoLocalService pagamentoLocalService.updatePagamentoManuale(pagamentoId, content, sourceFileName, serviceContext);
.updatePagamentoManuale(pagamentoId, content, sourceFileName, serviceContext);
} else { } else {
throw new SystemException("pagamento manuale aggiornabile solo da titolare digitale del " throw new SystemException("pagamento manuale aggiornabile solo da titolare digitale del "
+ pagamento.getClassName()); + pagamento.getClassName());
@ -118,7 +107,7 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
private long findTitolare(long pagamentoId) throws PortalException, SystemException { private long findTitolare(long pagamentoId) throws PortalException, SystemException {
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId); Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
long userId = 0l; long userId = 0l;
if (DettPratica.class.getName().equals(pagamento.getClassName())) { if (DettPratica.class.getName().equals(pagamento.getClassName())) {
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(pagamento.getClassPk()); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(pagamento.getClassPk());
@ -130,8 +119,8 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
Collaudo collaudo = collaudoLocalService.getCollaudo(pagamento.getClassPk()); Collaudo collaudo = collaudoLocalService.getCollaudo(pagamento.getClassPk());
userId = collaudo.getUserId(); userId = collaudo.getUserId();
} else { } else {
throw new RuntimeException("unable to replace pagamento for entity type " throw new RuntimeException("unable to replace pagamento for entity type " + pagamento.getClassName()
+ pagamento.getClassName() + " with id " + pagamento.getClassPk()); + " with id " + pagamento.getClassPk());
} }
return userId; return userId;
} }

130
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java

@ -33,7 +33,6 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys; import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@ -41,15 +40,12 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
* The implementation of the parere geologo local service. * The implementation of the parere geologo local service.
* *
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* added, rerun ServiceBuilder to copy their definitions into the * their definitions into the {@link it.tref.liferay.portos.bo.service.ParereGeologoLocalService} interface.
* {@link it.tref.liferay.portos.bo.service.ParereGeologoLocalService}
* interface.
* *
* <p> * <p>
* This is a local service. Methods of this service will not have security * This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* checks based on the propagated JAAS credentials because this service can only * credentials because this service can only be accessed from within the same VM.
* be accessed from within the same VM.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting * @author Davide Barbagallo, 3F Consulting
@ -58,104 +54,83 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
*/ */
public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBaseImpl { public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* {@link it.tref.liferay.portos.bo.service.ParereGeologoLocalServiceUtil} * it.tref.liferay.portos.bo.service.ParereGeologoLocalServiceUtil} to access the parere geologo local service.
* to access the parere geologo local service.
*/ */
@Override
public ParereGeologo addParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId, public ParereGeologo addParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId,
ServiceContext serviceContext) throws SystemException, PortalException { ServiceContext serviceContext) throws SystemException, PortalException {
validateParereGeologo(geologoUserId, intPraticaId, dettPraticaId); validateParereGeologo(geologoUserId, intPraticaId, dettPraticaId);
long parereGeologoId = counterLocalService.increment(ParereGeologo.class.getName()); long parereGeologoId = counterLocalService.increment(ParereGeologo.class.getName());
ParereGeologo parereGeologo = parereGeologoPersistence.create(parereGeologoId); ParereGeologo parereGeologo = parereGeologoPersistence.create(parereGeologoId);
parereGeologo.setCompanyId(serviceContext.getCompanyId()); parereGeologo.setCompanyId(serviceContext.getCompanyId());
User user = userLocalService.getUser(serviceContext.getUserId());
User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
parereGeologo.setUserId(user.getUserId()); parereGeologo.setUserId(user.getUserId());
parereGeologo.setUserName(user.getScreenName()); parereGeologo.setUserName(user.getScreenName());
parereGeologo.setCreateDate(serviceContext.getCreateDate()); parereGeologo.setCreateDate(serviceContext.getCreateDate());
parereGeologo.setModifiedDate(serviceContext.getModifiedDate()); parereGeologo.setModifiedDate(serviceContext.getModifiedDate());
parereGeologo.setGroupId(serviceContext.getScopeGroupId()); parereGeologo.setGroupId(serviceContext.getScopeGroupId());
parereGeologo.setIntPraticaId(intPraticaId); parereGeologo.setIntPraticaId(intPraticaId);
parereGeologo.setDettPraticaId(dettPraticaId); parereGeologo.setDettPraticaId(dettPraticaId);
parereGeologo.setGeologoUserId(geologoUserId); parereGeologo.setGeologoUserId(geologoUserId);
parereGeologo.setDtRichista(new Date()); parereGeologo.setDtRichista(new Date());
return parereGeologoPersistence.update(parereGeologo); return parereGeologoPersistence.update(parereGeologo);
} }
private void validateParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId) { private void validateParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId) {
// TODO // TODO
} }
public ParereGeologo updateParereGeologo(long parereGeologoId, String parere, byte[] content, @Override
String fileName, ServiceContext serviceContext) throws PortalException, SystemException { public ParereGeologo updateParereGeologo(long parereGeologoId, String parere, byte[] content, String fileName,
ServiceContext serviceContext) throws PortalException, SystemException {
ParereGeologo parereGeologo = getParereGeologo(parereGeologoId); ParereGeologo parereGeologo = getParereGeologo(parereGeologoId);
User geologo = UserLocalServiceUtil.getUser(serviceContext.getUserId()); User geologo = userLocalService.getUser(serviceContext.getUserId());
if (Validator.isNotNull(geologo) && serviceContext.getUserId() == geologo.getUserId()) { if (Validator.isNotNull(geologo) && serviceContext.getUserId() == geologo.getUserId()) {
Date now = new Date(); Date now = new Date();
parereGeologo.setModifiedDate(serviceContext.getModifiedDate()); parereGeologo.setModifiedDate(serviceContext.getModifiedDate());
parereGeologo.setDtCompilazione(now); parereGeologo.setDtCompilazione(now);
parereGeologo.setParere(parere); parereGeologo.setParere(parere);
if (Validator.isNotNull(content) && Validator.isNotNull(fileName)) { if (Validator.isNotNull(content) && Validator.isNotNull(fileName)) {
long fileEntryId = 0L;
long fileEntryId = 0l; long defaultFolderId = configurazioneLocalService.findByC_ChiaveLong(serviceContext.getCompanyId(),
ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
long defaultFolderId = configurazioneLocalService.findByC_ChiaveLong(
serviceContext.getCompanyId(), ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId); Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(parereGeologo.getDettPraticaId()); String folderName = PraticaUtil.getFolderName(parereGeologo.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW }); serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null; Folder folder = null;
try { try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(),
defaultFolder.getFolderId(), folderName); folderName);
} catch (NoSuchFolderException e) { } catch (NoSuchFolderException e) {
// cartella non presente -> creo cartella // cartella non presente -> creo cartella
folder = dlAppLocalService.addFolder(serviceContext.getUserId(), folder = dlAppLocalService.addFolder(serviceContext.getUserId(), defaultFolder.getRepositoryId(),
defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName, defaultFolder.getFolderId(), folderName, StringPool.BLANK, serviceContext);
StringPool.BLANK, serviceContext);
} }
String title = now.getTime() + StringPool.UNDERLINE + "parere_geologo" + StringPool.UNDERLINE String title = now.getTime() + StringPool.UNDERLINE + "parere_geologo" + StringPool.UNDERLINE
+ parereGeologoId + StringPool.UNDERLINE + fileName; + parereGeologoId + StringPool.UNDERLINE + fileName;
String description = ""; String description = "";
String mimeType = MimeTypesUtil.getContentType(fileName); String mimeType = MimeTypesUtil.getContentType(fileName);
String changeLog = StringPool.BLANK; String changeLog = StringPool.BLANK;
FileEntry fileEntry = dlAppLocalService.addFileEntry(serviceContext.getUserId(), FileEntry fileEntry = dlAppLocalService.addFileEntry(serviceContext.getUserId(),
folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_" + fileName, folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_" + fileName, mimeType,
mimeType, title, description, changeLog, content, serviceContext); title, description, changeLog, content, serviceContext);
fileEntryId = fileEntry.getFileEntryId(); fileEntryId = fileEntry.getFileEntryId();
parereGeologo.setFileEntryId(fileEntryId); parereGeologo.setFileEntryId(fileEntryId);
} }
return updateParereGeologo(parereGeologo); return updateParereGeologo(parereGeologo);
} else { } else {
// TODO error chi sta compilando non è il geologo designato o il // TODO error chi sta compilando non è il geologo designato o il geologo non esiste.
// geologo non esiste.
return parereGeologo; return parereGeologo;
} }
} }
@Override @Override
public ParereGeologo deleteParereGeologo(long parereGeologoId) throws PortalException, SystemException { public ParereGeologo deleteParereGeologo(long parereGeologoId) throws PortalException, SystemException {
return deleteParereGeologo(parereGeologoLocalService.getParereGeologo(parereGeologoId)); return deleteParereGeologo(getParereGeologo(parereGeologoId));
} }
@Override @Override
@ -170,106 +145,103 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
} catch (PortalException e) { } catch (PortalException e) {
throw new SystemException(e); throw new SystemException(e);
} }
return super.deleteParereGeologo(parereGeologo); return super.deleteParereGeologo(parereGeologo);
} }
@Override
public ParereGeologo updateParereGeologo(ParereGeologo parereGeologo) throws SystemException { public ParereGeologo updateParereGeologo(ParereGeologo parereGeologo) throws SystemException {
return parereGeologoPersistence.update(parereGeologo); return parereGeologoPersistence.update(parereGeologo);
} }
@Override
public ParereGeologo remove(ParereGeologo parereGeologoId) throws SystemException { public ParereGeologo remove(ParereGeologo parereGeologoId) throws SystemException {
return parereGeologoPersistence.remove(parereGeologoId); return parereGeologoPersistence.remove(parereGeologoId);
} }
public List<ParereGeologo> findByIntPraticaId(long intPraticaId, int start, int end) @Override
throws SystemException { public List<ParereGeologo> findByIntPraticaId(long intPraticaId, int start, int end) throws SystemException {
return parereGeologoPersistence.findByIntPraticaId(intPraticaId, start, end); return parereGeologoPersistence.findByIntPraticaId(intPraticaId, start, end);
} }
@Override
public int countByIntPraticaId(long intPraticaId) throws SystemException { public int countByIntPraticaId(long intPraticaId) throws SystemException {
return parereGeologoPersistence.countByIntPraticaId(intPraticaId); return parereGeologoPersistence.countByIntPraticaId(intPraticaId);
} }
@Override
public List<ParereGeologo> findByIntPraticaIdParereVuoto(long intPraticaId, int start, int end) public List<ParereGeologo> findByIntPraticaIdParereVuoto(long intPraticaId, int start, int end)
throws SystemException { throws SystemException {
return parereGeologoPersistence.findByIntPraticaId_Parere(intPraticaId, StringPool.BLANK, start, end); return parereGeologoPersistence.findByIntPraticaId_Parere(intPraticaId, StringPool.BLANK, start, end);
} }
@Override
public int countByIntPraticaIdParereVuoto(long intPraticaId) throws SystemException { public int countByIntPraticaIdParereVuoto(long intPraticaId) throws SystemException {
return parereGeologoPersistence.countByIntPraticaId_Parere(intPraticaId, StringPool.BLANK); return parereGeologoPersistence.countByIntPraticaId_Parere(intPraticaId, StringPool.BLANK);
} }
public List<ParereGeologo> findByIntPraticaId_GeologoId(long intPraticaId, long geologoUserId, int start, @Override
int end) throws SystemException { public List<ParereGeologo> findByIntPraticaId_GeologoId(long intPraticaId, long geologoUserId, int start, int end)
throws SystemException {
return parereGeologoPersistence.findByIntPraticaId_GeologoId(intPraticaId, geologoUserId, start, end); return parereGeologoPersistence.findByIntPraticaId_GeologoId(intPraticaId, geologoUserId, start, end);
} }
@Override
public int countByIntPraticaId_GeologoId(long intPraticaId, long geologoUserId) throws SystemException { public int countByIntPraticaId_GeologoId(long intPraticaId, long geologoUserId) throws SystemException {
return parereGeologoPersistence.countByIntPraticaId_GeologoId(intPraticaId, geologoUserId); return parereGeologoPersistence.countByIntPraticaId_GeologoId(intPraticaId, geologoUserId);
} }
@Override
public List<ParereGeologo> findByGeologoId(long geologoUserId, int start, int end) throws SystemException { public List<ParereGeologo> findByGeologoId(long geologoUserId, int start, int end) throws SystemException {
return parereGeologoPersistence.findByGeologoId(geologoUserId, start, end); return parereGeologoPersistence.findByGeologoId(geologoUserId, start, end);
} }
@Override
public List<ParereGeologo> findByCompanyIdGroupId(long companyId, long groupId) throws SystemException { public List<ParereGeologo> findByCompanyIdGroupId(long companyId, long groupId) throws SystemException {
return parereGeologoPersistence.findByC_GroupId(companyId, groupId); return parereGeologoPersistence.findByC_GroupId(companyId, groupId);
} }
@Override
public int countByGeologoId(long geologoUserId) throws SystemException { public int countByGeologoId(long geologoUserId) throws SystemException {
return parereGeologoPersistence.countByGeologoId(geologoUserId); return parereGeologoPersistence.countByGeologoId(geologoUserId);
} }
public List<ParereGeologo> findNotParereByGeologoId(long geologoUserId, int start, int end) @SuppressWarnings("unchecked")
throws SystemException { @Override
public List<ParereGeologo> findNotParereByGeologoId(long geologoUserId, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = parereGeologoLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("geologoUserId", geologoUserId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("geologoUserId", geologoUserId));
dynamicQuery.add(RestrictionsFactoryUtil.eq("parere", "")); dynamicQuery.add(RestrictionsFactoryUtil.eq("parere", ""));
return dynamicQuery(dynamicQuery, start, end);
return parereGeologoLocalService.dynamicQuery(dynamicQuery, start, end);
} }
public List<ParereGeologo> findWithParereByGeologoId(long geologoUserId, int start, int end) @SuppressWarnings("unchecked")
throws SystemException { @Override
public List<ParereGeologo> findWithParereByGeologoId(long geologoUserId, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = parereGeologoLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("geologoUserId", geologoUserId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("geologoUserId", geologoUserId));
dynamicQuery.add(RestrictionsFactoryUtil.ne("parere", "")); dynamicQuery.add(RestrictionsFactoryUtil.ne("parere", ""));
return dynamicQuery(dynamicQuery, start, end);
return parereGeologoLocalService.dynamicQuery(dynamicQuery, start, end);
} }
@Override
public int countFindNotParereByGeologoId(long geologoUserId) throws SystemException { public int countFindNotParereByGeologoId(long geologoUserId) throws SystemException {
DynamicQuery dynamicQuery = parereGeologoLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("geologoUserId", geologoUserId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("geologoUserId", geologoUserId));
dynamicQuery.add(RestrictionsFactoryUtil.eq("parere", "")); dynamicQuery.add(RestrictionsFactoryUtil.eq("parere", ""));
return (int) parereGeologoPersistence.countWithDynamicQuery(dynamicQuery); return (int) parereGeologoPersistence.countWithDynamicQuery(dynamicQuery);
} }
@Override
public int countFindWithParereByGeologoId(long geologoUserId) throws SystemException { public int countFindWithParereByGeologoId(long geologoUserId) throws SystemException {
DynamicQuery dynamicQuery = parereGeologoLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("geologoUserId", geologoUserId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("geologoUserId", geologoUserId));
dynamicQuery.add(RestrictionsFactoryUtil.ne("parere", "")); dynamicQuery.add(RestrictionsFactoryUtil.ne("parere", ""));
return (int) parereGeologoPersistence.countWithDynamicQuery(dynamicQuery); return (int) parereGeologoPersistence.countWithDynamicQuery(dynamicQuery);
} }
} }

33
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoServiceImpl.java

@ -15,8 +15,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.ParereGeologo; import it.tref.liferay.portos.bo.model.ParereGeologo;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ParereGeologoServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ParereGeologoServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission; import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission;
import it.tref.liferay.portos.bo.shared.util.ActionKeys; import it.tref.liferay.portos.bo.shared.util.ActionKeys;
@ -52,40 +50,46 @@ public class ParereGeologoServiceImpl extends ParereGeologoServiceBaseImpl {
*/ */
public ParereGeologo addParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId, @Override
public ParereGeologo addParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId,
ServiceContext serviceContext) throws SystemException, PortalException { ServiceContext serviceContext) throws SystemException, PortalException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.RICHIEDI_PARERE_GEOLOGO); IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.RICHIEDI_PARERE_GEOLOGO);
return parereGeologoLocalService.addParereGeologo(geologoUserId, intPraticaId, dettPraticaId, serviceContext); return parereGeologoLocalService.addParereGeologo(geologoUserId, intPraticaId, dettPraticaId, serviceContext);
} }
public ParereGeologo updateParereGeologo(long parereGeologoId, String parere, byte[] content, String fileName, @Override
public ParereGeologo updateParereGeologo(long parereGeologoId, String parere, byte[] content, String fileName,
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
return parereGeologoLocalService.updateParereGeologo(parereGeologoId, parere, content, fileName, serviceContext); return parereGeologoLocalService.updateParereGeologo(parereGeologoId, parere, content, fileName, serviceContext);
} }
public ParereGeologo deleteParereGeologo(long parereGeologoId) throws SystemException, PortalException { @Override
public ParereGeologo deleteParereGeologo(long parereGeologoId) throws SystemException, PortalException {
return parereGeologoLocalService.deleteParereGeologo(parereGeologoId); return parereGeologoLocalService.deleteParereGeologo(parereGeologoId);
} }
public ParereGeologo updateParereGeologo(ParereGeologo parereGeologo) throws SystemException { @Override
public ParereGeologo updateParereGeologo(ParereGeologo parereGeologo) throws SystemException {
return parereGeologoLocalService.deleteParereGeologo(parereGeologo); return parereGeologoLocalService.deleteParereGeologo(parereGeologo);
} }
public List<ParereGeologo> findByIntPraticaId(long intPraticaId, int start, int end) throws SystemException { @Override
public List<ParereGeologo> findByIntPraticaId(long intPraticaId, int start, int end) throws SystemException {
// TODO permessi // TODO permessi
return parereGeologoLocalService.findByIntPraticaId(intPraticaId, start, end); return parereGeologoLocalService.findByIntPraticaId(intPraticaId, start, end);
} }
public List<ParereGeologo> findByIntPraticaId_GeologoId(long intPraticaId, long geologoUserId, int start, int end) @Override
public List<ParereGeologo> findByIntPraticaId_GeologoId(long intPraticaId, long geologoUserId, int start, int end)
throws SystemException { throws SystemException {
// TODO permessi // TODO permessi
@ -93,21 +97,24 @@ public class ParereGeologoServiceImpl extends ParereGeologoServiceBaseImpl {
return parereGeologoLocalService.findByIntPraticaId_GeologoId(intPraticaId, geologoUserId, start, end); return parereGeologoLocalService.findByIntPraticaId_GeologoId(intPraticaId, geologoUserId, start, end);
} }
public int countByIntPraticaId_GeologoId(long intPraticaId, long geologoUserId) throws SystemException { @Override
public int countByIntPraticaId_GeologoId(long intPraticaId, long geologoUserId) throws SystemException {
// TODO permessi // TODO permessi
return parereGeologoLocalService.countByIntPraticaId_GeologoId(intPraticaId, geologoUserId); return parereGeologoLocalService.countByIntPraticaId_GeologoId(intPraticaId, geologoUserId);
} }
public List<ParereGeologo> findByGeologoId(long geologoUserId, int start, int end) throws SystemException { @Override
public List<ParereGeologo> findByGeologoId(long geologoUserId, int start, int end) throws SystemException {
// TODO permessi // TODO permessi
return parereGeologoLocalService.findByGeologoId(geologoUserId, start, end); return parereGeologoLocalService.findByGeologoId(geologoUserId, start, end);
} }
public int countByGeologoId(long geologoUserId) throws SystemException { @Override
public int countByGeologoId(long geologoUserId) throws SystemException {
// TODO permessi // TODO permessi

33
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java

@ -364,11 +364,11 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
docPraticaLocalService.deleteDocPratica(soggetto.getFileVariazioneId()); docPraticaLocalService.deleteDocPratica(soggetto.getFileVariazioneId());
} }
} catch (PortalException e) { } catch (PortalException e) {
} }
Soggetto ret = super.deleteSoggetto(soggetto); Soggetto ret = super.deleteSoggetto(soggetto);
long intPraticaId = soggetto.getIntPraticaId(); long intPraticaId = soggetto.getIntPraticaId();
long idSoggetto = soggetto.getSoggettoId(); long idSoggetto = soggetto.getSoggettoId();
List<Soggetto> soggettiIntPratica = soggettoLocalService.findByIntPratica(intPraticaId); List<Soggetto> soggettiIntPratica = soggettoLocalService.findByIntPratica(intPraticaId);
@ -382,7 +382,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
} }
return ret; return ret;
} }
@Override @Override
@ -662,6 +662,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
tipologiaSoggetto, dettPraticaIdRimozione); tipologiaSoggetto, dettPraticaIdRimozione);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getValidByIntPratica(long intPraticaId) throws SystemException { public List<Soggetto> getValidByIntPratica(long intPraticaId) throws SystemException {
@ -670,6 +671,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery); return soggettoPersistence.findWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getValidByDettPratica(long dettPraticaId) throws SystemException { public List<Soggetto> getValidByDettPratica(long dettPraticaId) throws SystemException {
@ -696,6 +698,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getValidTmpByIntPratica(long intPraticaId) throws SystemException { public List<Soggetto> getValidTmpByIntPratica(long intPraticaId) throws SystemException {
DynamicQuery dynamicQuery = createValidTmpQueryByIntPratica(intPraticaId); DynamicQuery dynamicQuery = createValidTmpQueryByIntPratica(intPraticaId);
@ -720,6 +723,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getTmpNotCompletedByDettPratica(long dettPraticaId) throws SystemException { public List<Soggetto> getTmpNotCompletedByDettPratica(long dettPraticaId) throws SystemException {
@ -746,6 +750,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getSoggettiPrincipaliValidTmpByDettPratica(long dettPraticaId) throws SystemException, public List<Soggetto> getSoggettiPrincipaliValidTmpByDettPratica(long dettPraticaId) throws SystemException,
PortalException { PortalException {
@ -755,6 +760,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery); return soggettoPersistence.findWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getSoggettiPrincipaliValidTmpByDettPratica_TipologiaSoggetto(long dettPraticaId, public List<Soggetto> getSoggettiPrincipaliValidTmpByDettPratica_TipologiaSoggetto(long dettPraticaId,
String[] tipologieSoggetto) throws SystemException, PortalException { String[] tipologieSoggetto) throws SystemException, PortalException {
@ -774,6 +780,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return (int) soggettoPersistence.countWithDynamicQuery(dynamicQuery); return (int) soggettoPersistence.countWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<String> getCfSoggettiPrincipaliValidTmpByDettPratica_TipologiaSoggetto(long dettPraticaId, public List<String> getCfSoggettiPrincipaliValidTmpByDettPratica_TipologiaSoggetto(long dettPraticaId,
String[] tipologieSoggetto) throws SystemException, PortalException { String[] tipologieSoggetto) throws SystemException, PortalException {
@ -802,6 +809,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getValidTmpByDettPratica(long dettPraticaId) throws SystemException { public List<Soggetto> getValidTmpByDettPratica(long dettPraticaId) throws SystemException {
@ -810,6 +818,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery); return soggettoPersistence.findWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<String> getCfValidTmpByDettPratica(long dettPraticaId) throws SystemException { public List<String> getCfValidTmpByDettPratica(long dettPraticaId) throws SystemException {
@ -818,6 +827,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery); return soggettoPersistence.findWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<String> getCfValidTmpByIntPratica_TipologiaSoggetto(long intPraticaId, String tipologiaSoggetto) public List<String> getCfValidTmpByIntPratica_TipologiaSoggetto(long intPraticaId, String tipologiaSoggetto)
throws SystemException { throws SystemException {
@ -831,6 +841,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery); return soggettoPersistence.findWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<String> getCfValidTmpByDettPratica_TipologiaSoggetto(long dettPraticaId, String tipologiaSoggetto) public List<String> getCfValidTmpByDettPratica_TipologiaSoggetto(long dettPraticaId, String tipologiaSoggetto)
throws SystemException { throws SystemException {
@ -858,6 +869,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getValidTmpByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale, public List<Soggetto> getValidTmpByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale,
long docDettPraticaId) throws SystemException { long docDettPraticaId) throws SystemException {
@ -884,6 +896,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
DynamicQuery dynamicQuery = createValidTmpQueryByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale, 0l); DynamicQuery dynamicQuery = createValidTmpQueryByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale, 0l);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologiaSoggetto", tipologiaSoggetto)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologiaSoggetto", tipologiaSoggetto));
dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId")); dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId"));
@SuppressWarnings("unchecked")
List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery); List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery);
if (soggetti.isEmpty()) { if (soggetti.isEmpty()) {
return null; return null;
@ -900,6 +913,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
docDettPraticaId); docDettPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologiaSoggetto", tipologiaSoggetto)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologiaSoggetto", tipologiaSoggetto));
dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId")); dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId"));
@SuppressWarnings("unchecked")
List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery); List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery);
if (soggetti.isEmpty()) { if (soggetti.isEmpty()) {
return null; return null;
@ -933,6 +947,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
DynamicQuery dynamicQuery = createValidQueryByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale); DynamicQuery dynamicQuery = createValidQueryByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologiaSoggetto", tipologiaSoggetto)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologiaSoggetto", tipologiaSoggetto));
dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId")); dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId"));
@SuppressWarnings("unchecked")
List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery); List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery);
if (soggetti.isEmpty()) { if (soggetti.isEmpty()) {
return null; return null;
@ -941,6 +956,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
} }
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getValidByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale) public List<Soggetto> getValidByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale)
throws SystemException { throws SystemException {
@ -950,6 +966,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery); return soggettoPersistence.findWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getValidByIntPratica_NoCodiceFiscale(long intPraticaId, String codiceFiscale) public List<Soggetto> getValidByIntPratica_NoCodiceFiscale(long intPraticaId, String codiceFiscale)
throws SystemException { throws SystemException {
@ -990,6 +1007,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.isNull("dtDataRimozione")); dynamicQuery.add(RestrictionsFactoryUtil.isNull("dtDataRimozione"));
dynamicQuery.add(RestrictionsFactoryUtil.eq("tmp", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tmp", false));
dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId")); dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId"));
@SuppressWarnings("unchecked")
List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery); List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery);
return soggetti; return soggetti;
} }
@ -1004,6 +1022,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", 0l)); dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", 0l));
dynamicQuery.add(RestrictionsFactoryUtil.eq("tmp", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tmp", false));
dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId")); dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId"));
@SuppressWarnings("unchecked")
List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery); List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery);
return soggetti; return soggetti;
} }
@ -1018,10 +1037,12 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", 0l)); dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", 0l));
dynamicQuery.add(RestrictionsFactoryUtil.eq("tmp", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tmp", false));
dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId")); dynamicQuery.addOrder(OrderFactoryUtil.asc("soggettoId"));
@SuppressWarnings("unchecked")
List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery); List<Soggetto> soggetti = soggettoPersistence.findWithDynamicQuery(dynamicQuery);
return soggetti; return soggetti;
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<String> getCfValidByIntPratica(long intPraticaId) throws SystemException { public List<String> getCfValidByIntPratica(long intPraticaId) throws SystemException {
@ -1040,6 +1061,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getValidByIntPratica_CodiciFiscali(long intPraticaId, List<String> codiciFiscali) public List<Soggetto> getValidByIntPratica_CodiciFiscali(long intPraticaId, List<String> codiciFiscali)
throws SystemException { throws SystemException {
@ -1049,6 +1071,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery); return soggettoPersistence.findWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getInvalidByIntPratica(long intPraticaId) throws SystemException { public List<Soggetto> getInvalidByIntPratica(long intPraticaId) throws SystemException {
@ -1059,6 +1082,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery); return soggettoPersistence.findWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<Soggetto> getInvalidTmpByIntPratica(long intPraticaId) throws SystemException { public List<Soggetto> getInvalidTmpByIntPratica(long intPraticaId) throws SystemException {
@ -1234,6 +1258,7 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil
.property("soggettoSostituitoId"))); .property("soggettoSostituitoId")));
@SuppressWarnings("unchecked")
List<Long> ids = soggettoPersistence.findWithDynamicQuery(dynamicQuery); List<Long> ids = soggettoPersistence.findWithDynamicQuery(dynamicQuery);
return ids; return ids;
} }

23
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TempisticaLocalServiceImpl.java

@ -16,8 +16,6 @@ import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.impl.TempisticaImpl; import it.tref.liferay.portos.bo.model.impl.TempisticaImpl;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.TempisticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.TempisticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@ -71,8 +69,7 @@ public class TempisticaLocalServiceImpl extends TempisticaLocalServiceBaseImpl {
User user = userLocalService.fetchUser(serviceContext.getUserId()); User user = userLocalService.fetchUser(serviceContext.getUserId());
Date now = new Date(); Date now = new Date();
Tempistica tempistica = tempisticaLocalService.createTempistica(counterLocalService.increment(Tempistica.class Tempistica tempistica = createTempistica(counterLocalService.increment(Tempistica.class.getName()));
.getName()));
tempistica.setCompanyId(serviceContext.getCompanyId()); tempistica.setCompanyId(serviceContext.getCompanyId());
tempistica.setGroupId(serviceContext.getScopeGroupId()); tempistica.setGroupId(serviceContext.getScopeGroupId());
tempistica.setUserId(serviceContext.getUserId()); tempistica.setUserId(serviceContext.getUserId());
@ -83,34 +80,34 @@ public class TempisticaLocalServiceImpl extends TempisticaLocalServiceBaseImpl {
tempistica.setDettPraticaId(dettPraticaId); tempistica.setDettPraticaId(dettPraticaId);
tempistica.setTipo(tipo); tempistica.setTipo(tipo);
tempistica.setStart(DateUtils.truncate(start, Calendar.DATE).getTime()); tempistica.setStart(DateUtils.truncate(start, Calendar.DATE).getTime());
return tempisticaLocalService.addTempistica(tempistica); return addTempistica(tempistica);
} }
@Override @Override
public Tempistica stopTempistica(long tempisticaId, Date stop) throws SystemException { public Tempistica stopTempistica(long tempisticaId, Date stop) throws SystemException {
Tempistica tempistica = tempisticaLocalService.fetchTempistica(tempisticaId); Tempistica tempistica = fetchTempistica(tempisticaId);
tempistica.setStop(DateUtils.truncate(stop, Calendar.DATE).getTime()); tempistica.setStop(DateUtils.truncate(stop, Calendar.DATE).getTime());
return tempisticaLocalService.updateTempistica(tempistica); return updateTempistica(tempistica);
} }
@Override @Override
public Tempistica ravvioTempistica(long tempisticaId, Date date) throws SystemException { public Tempistica ravvioTempistica(long tempisticaId, Date date) throws SystemException {
Tempistica tempistica = tempisticaLocalService.fetchTempistica(tempisticaId); Tempistica tempistica = fetchTempistica(tempisticaId);
tempistica.setWait(tempistica.getWait() + (DateUtils.truncate(date, Calendar.DATE).getTime()) tempistica.setWait(tempistica.getWait() + (DateUtils.truncate(date, Calendar.DATE).getTime())
- tempistica.getStop()); - tempistica.getStop());
tempistica.setStop(0L); tempistica.setStop(0L);
return tempisticaLocalService.updateTempistica(tempistica); return updateTempistica(tempistica);
} }
@Override @Override
public Tempistica concludiTempistica(long tempisticaId, Date stop) throws SystemException { public Tempistica concludiTempistica(long tempisticaId, Date stop) throws SystemException {
Tempistica tempistica = tempisticaLocalService.fetchTempistica(tempisticaId); Tempistica tempistica = fetchTempistica(tempisticaId);
tempistica.setStop(DateUtils.truncate(stop, Calendar.DATE).getTime()); tempistica.setStop(DateUtils.truncate(stop, Calendar.DATE).getTime());
tempistica.setCompleto(true); tempistica.setCompleto(true);
return tempisticaLocalService.updateTempistica(tempistica); return updateTempistica(tempistica);
} }
@Override @Override
@ -252,7 +249,7 @@ public class TempisticaLocalServiceImpl extends TempisticaLocalServiceBaseImpl {
public String getDtSottopostaAParere(long intPraticaId) throws SystemException { public String getDtSottopostaAParere(long intPraticaId) throws SystemException {
// //////////////////ADT: BUG SCADENZARIO // //////////////////ADT: BUG SCADENZARIO
DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId); DettPratica dettPratica = dettPraticaLocalService.getLastCompletedByIntPratica(intPraticaId);
if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) { if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) {
Date d = dettPratica.getDtProtocollo(); Date d = dettPratica.getDtProtocollo();
if (d != null) { if (d != null) {
@ -267,7 +264,7 @@ public class TempisticaLocalServiceImpl extends TempisticaLocalServiceBaseImpl {
Order defaultOrder = OrderFactoryUtil.desc("createDate"); Order defaultOrder = OrderFactoryUtil.desc("createDate");
queryAvv.addOrder(defaultOrder); queryAvv.addOrder(defaultOrder);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
List<Avviso> listaAvv = AvvisoLocalServiceUtil.dynamicQuery(queryAvv); List<Avviso> listaAvv = avvisoLocalService.dynamicQuery(queryAvv);
return listaAvv.isEmpty() ? StringPool.BLANK : sdf.format(listaAvv.get(0).getDtInvio()); return listaAvv.isEmpty() ? StringPool.BLANK : sdf.format(listaAvv.get(0).getDtInvio());
} }

15
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TerritorioServiceImpl.java

@ -13,7 +13,6 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.TerritorioServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.TerritorioServiceBaseImpl;
import java.util.Date; import java.util.Date;
@ -50,7 +49,7 @@ public class TerritorioServiceImpl extends TerritorioServiceBaseImpl {
boolean articolo61, Date dtIni, Date dtFin, String agMax, String agMin, long oldId, boolean articolo61, Date dtIni, Date dtFin, String agMax, String agMin, long oldId,
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
return TerritorioLocalServiceUtil.addTerritorio(comuneId, groupId, codiceProvincia, zona, fascia, articolo61, return territorioLocalService.addTerritorio(comuneId, groupId, codiceProvincia, zona, fascia, articolo61,
dtIni, dtFin, agMax, agMin, oldId, serviceContext); dtIni, dtFin, agMax, agMin, oldId, serviceContext);
} }
@ -59,31 +58,31 @@ public class TerritorioServiceImpl extends TerritorioServiceBaseImpl {
String zona, String fascia, boolean articolo61, Date dtIni, Date dtFin, String agMax, String agMin, String zona, String fascia, boolean articolo61, Date dtIni, Date dtFin, String agMax, String agMin,
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
return TerritorioLocalServiceUtil.updateTerritorio(territorioId, groupId, comuneId, codiceProvincia, zona, return territorioLocalService.updateTerritorio(territorioId, groupId, comuneId, codiceProvincia, zona, fascia,
fascia, articolo61, dtIni, dtFin, agMax, agMin, serviceContext); articolo61, dtIni, dtFin, agMax, agMin, serviceContext);
} }
@Override @Override
public Territorio fetchTerritorio(long territorioId) throws SystemException { public Territorio fetchTerritorio(long territorioId) throws SystemException {
return TerritorioLocalServiceUtil.fetchTerritorio(territorioId); return territorioLocalService.fetchTerritorio(territorioId);
} }
@Override @Override
public Territorio createTerritorio(long territorioId) { public Territorio createTerritorio(long territorioId) {
return TerritorioLocalServiceUtil.createTerritorio(territorioId); return territorioLocalService.createTerritorio(territorioId);
} }
@Override @Override
public List<Territorio> getTerritori(long companyId, long groupId, int start, int end) throws SystemException { public List<Territorio> getTerritori(long companyId, long groupId, int start, int end) throws SystemException {
return TerritorioLocalServiceUtil.getTerritori(companyId, groupId, start, end); return territorioLocalService.getTerritori(companyId, groupId, start, end);
} }
@Override @Override
public int countTerritori(long companyId, long groupId) throws SystemException { public int countTerritori(long companyId, long groupId) throws SystemException {
return TerritorioLocalServiceUtil.countTerritori(companyId, groupId); return territorioLocalService.countTerritori(companyId, groupId);
} }
} }

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchAllegatoManualeException;
import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.impl.AllegatoManualeImpl; import it.tref.liferay.portos.bo.model.impl.AllegatoManualeImpl;
import it.tref.liferay.portos.bo.model.impl.AllegatoManualeModelImpl; import it.tref.liferay.portos.bo.model.impl.AllegatoManualeModelImpl;
import it.tref.liferay.portos.bo.service.persistence.AllegatoManualePersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchAsseverazioneException;
import it.tref.liferay.portos.bo.model.Asseverazione; import it.tref.liferay.portos.bo.model.Asseverazione;
import it.tref.liferay.portos.bo.model.impl.AsseverazioneImpl; import it.tref.liferay.portos.bo.model.impl.AsseverazioneImpl;
import it.tref.liferay.portos.bo.model.impl.AsseverazioneModelImpl; import it.tref.liferay.portos.bo.model.impl.AsseverazioneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.AsseverazionePersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchAvvisoException;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.impl.AvvisoImpl; import it.tref.liferay.portos.bo.model.impl.AvvisoImpl;
import it.tref.liferay.portos.bo.model.impl.AvvisoModelImpl; import it.tref.liferay.portos.bo.model.impl.AvvisoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.AvvisoPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchCollaudoException;
import it.tref.liferay.portos.bo.model.Collaudo; import it.tref.liferay.portos.bo.model.Collaudo;
import it.tref.liferay.portos.bo.model.impl.CollaudoImpl; import it.tref.liferay.portos.bo.model.impl.CollaudoImpl;
import it.tref.liferay.portos.bo.model.impl.CollaudoModelImpl; import it.tref.liferay.portos.bo.model.impl.CollaudoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.CollaudoPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchComuneException;
import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.impl.ComuneImpl; import it.tref.liferay.portos.bo.model.impl.ComuneImpl;
import it.tref.liferay.portos.bo.model.impl.ComuneModelImpl; import it.tref.liferay.portos.bo.model.impl.ComuneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ComunePersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchComunicazioneException;
import it.tref.liferay.portos.bo.model.Comunicazione; import it.tref.liferay.portos.bo.model.Comunicazione;
import it.tref.liferay.portos.bo.model.impl.ComunicazioneImpl; import it.tref.liferay.portos.bo.model.impl.ComunicazioneImpl;
import it.tref.liferay.portos.bo.model.impl.ComunicazioneModelImpl; import it.tref.liferay.portos.bo.model.impl.ComunicazioneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ComunicazionePersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchConfigurazioneException;
import it.tref.liferay.portos.bo.model.Configurazione; import it.tref.liferay.portos.bo.model.Configurazione;
import it.tref.liferay.portos.bo.model.impl.ConfigurazioneImpl; import it.tref.liferay.portos.bo.model.impl.ConfigurazioneImpl;
import it.tref.liferay.portos.bo.model.impl.ConfigurazioneModelImpl; import it.tref.liferay.portos.bo.model.impl.ConfigurazioneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ConfigurazionePersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchControlloPraticaException;
import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.impl.ControlloPraticaImpl; import it.tref.liferay.portos.bo.model.impl.ControlloPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.ControlloPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.ControlloPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ControlloPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchDelegaException;
import it.tref.liferay.portos.bo.model.Delega; import it.tref.liferay.portos.bo.model.Delega;
import it.tref.liferay.portos.bo.model.impl.DelegaImpl; import it.tref.liferay.portos.bo.model.impl.DelegaImpl;
import it.tref.liferay.portos.bo.model.impl.DelegaModelImpl; import it.tref.liferay.portos.bo.model.impl.DelegaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DelegaPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchDettPraticaException;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.DettPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.DettPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DettPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchDocAggiuntivaException;
import it.tref.liferay.portos.bo.model.DocAggiuntiva; import it.tref.liferay.portos.bo.model.DocAggiuntiva;
import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaImpl; import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaImpl;
import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaModelImpl; import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DocAggiuntivaPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchDocPraticaException;
import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.impl.DocPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DocPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.DocPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.DocPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DocPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchFineLavoriException;
import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.impl.FineLavoriImpl; import it.tref.liferay.portos.bo.model.impl.FineLavoriImpl;
import it.tref.liferay.portos.bo.model.impl.FineLavoriModelImpl; import it.tref.liferay.portos.bo.model.impl.FineLavoriModelImpl;
import it.tref.liferay.portos.bo.service.persistence.FineLavoriPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java

@ -42,6 +42,7 @@ import it.tref.liferay.portos.bo.NoSuchHistoryWorkflowActionException;
import it.tref.liferay.portos.bo.model.HistoryWorkflowAction; import it.tref.liferay.portos.bo.model.HistoryWorkflowAction;
import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionImpl; import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionImpl;
import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionModelImpl; import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionModelImpl;
import it.tref.liferay.portos.bo.service.persistence.HistoryWorkflowActionPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java

@ -48,6 +48,7 @@ import it.tref.liferay.portos.bo.NoSuchIntPraticaException;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.impl.IntPraticaImpl; import it.tref.liferay.portos.bo.model.impl.IntPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.IntPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.IntPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.IntPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchPagamentoException;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.impl.PagamentoImpl; import it.tref.liferay.portos.bo.model.impl.PagamentoImpl;
import it.tref.liferay.portos.bo.model.impl.PagamentoModelImpl; import it.tref.liferay.portos.bo.model.impl.PagamentoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.PagamentoPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchParereGeologoException;
import it.tref.liferay.portos.bo.model.ParereGeologo; import it.tref.liferay.portos.bo.model.ParereGeologo;
import it.tref.liferay.portos.bo.model.impl.ParereGeologoImpl; import it.tref.liferay.portos.bo.model.impl.ParereGeologoImpl;
import it.tref.liferay.portos.bo.model.impl.ParereGeologoModelImpl; import it.tref.liferay.portos.bo.model.impl.ParereGeologoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ParereGeologoPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java

@ -43,6 +43,7 @@ import it.tref.liferay.portos.bo.NoSuchProvinciaException;
import it.tref.liferay.portos.bo.model.Provincia; import it.tref.liferay.portos.bo.model.Provincia;
import it.tref.liferay.portos.bo.model.impl.ProvinciaImpl; import it.tref.liferay.portos.bo.model.impl.ProvinciaImpl;
import it.tref.liferay.portos.bo.model.impl.ProvinciaModelImpl; import it.tref.liferay.portos.bo.model.impl.ProvinciaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ProvinciaPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchSoggettoException;
import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.impl.SoggettoImpl; import it.tref.liferay.portos.bo.model.impl.SoggettoImpl;
import it.tref.liferay.portos.bo.model.impl.SoggettoModelImpl; import it.tref.liferay.portos.bo.model.impl.SoggettoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.SoggettoPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchSorteggioException;
import it.tref.liferay.portos.bo.model.Sorteggio; import it.tref.liferay.portos.bo.model.Sorteggio;
import it.tref.liferay.portos.bo.model.impl.SorteggioImpl; import it.tref.liferay.portos.bo.model.impl.SorteggioImpl;
import it.tref.liferay.portos.bo.model.impl.SorteggioModelImpl; import it.tref.liferay.portos.bo.model.impl.SorteggioModelImpl;
import it.tref.liferay.portos.bo.service.persistence.SorteggioPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java

@ -42,6 +42,7 @@ import it.tref.liferay.portos.bo.NoSuchStoricoSoggettoPraticaException;
import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica; import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica;
import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaImpl; import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.StoricoSoggettoPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchTempisticaException;
import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.impl.TempisticaImpl; import it.tref.liferay.portos.bo.model.impl.TempisticaImpl;
import it.tref.liferay.portos.bo.model.impl.TempisticaModelImpl; import it.tref.liferay.portos.bo.model.impl.TempisticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.TempisticaPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java

@ -44,6 +44,7 @@ import it.tref.liferay.portos.bo.NoSuchTerritorioException;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.model.impl.TerritorioImpl; import it.tref.liferay.portos.bo.model.impl.TerritorioImpl;
import it.tref.liferay.portos.bo.model.impl.TerritorioModelImpl; import it.tref.liferay.portos.bo.model.impl.TerritorioModelImpl;
import it.tref.liferay.portos.bo.service.persistence.TerritorioPersistence;
import java.io.Serializable; import java.io.Serializable;

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/portlet.properties

@ -42,7 +42,7 @@ geniocivile.iris.error.iuv.url = IUV service url not set
geniocivile.iris.email.destinatario = support.iris@tasgroup.it geniocivile.iris.email.destinatario = support.iris@tasgroup.it
geniocivile.iris.email.mittente = noreply-FE-PORTOS@regione.toscana.it geniocivile.iris.email.mittente = noreply-FE-PORTOS@regione.toscana.it
geniocivile.iris.email.oggetto = Notifica pendenza in corso geniocivile.iris.email.oggetto = Notifica pendenza in corso
geniocivile.iris.email.corpo = La pendenza [$CODICE_PENDENZA$] con causale [$DESCRIZIONE_CAUSALE$] creata in data [$DATA_CREAZIONE_PENDENZA$] e associata a [$CODICE_FISCALE_PAGAMENTO$] \uFFFD in pending. geniocivile.iris.email.corpo = La pendenza [$CODICE_PENDENZA$] con causale [$DESCRIZIONE_CAUSALE$] creata in data [$DATA_CREAZIONE_PENDENZA$] e associata a [$CODICE_FISCALE_PAGAMENTO$] è in pending.
#protocollo.cvs.url=http://localhost:9090/portos-protocollazione-service/v1/api-rest/export-protocolli #protocollo.cvs.url=http://localhost:9090/portos-protocollazione-service/v1/api-rest/export-protocolli
protocollo.cvs.url=http://localhost:9080/portos-protocollazione-service/v1/api-rest/export-protocolli protocollo.cvs.url=http://localhost:9080/portos-protocollazione-service/v1/api-rest/export-protocolli

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_bo build.namespace=portos_bo
build.number=2675 build.number=2694
build.date=1629722017169 build.date=1629898346801
build.auto.upgrade=true build.auto.upgrade=true
## ##

489
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/common/save_actions.jspf

@ -27,8 +27,7 @@
<%@page import="it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.AsseverazioniUtil"%> <%@page import="it.tref.liferay.portos.bo.util.AsseverazioniUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.DelegheUtil"%> <%@page import="it.tref.liferay.portos.bo.util.DelegheUtil"%>
<div class="pull-right"> <%
<%
String randomId = StringUtil.randomId(); String randomId = StringUtil.randomId();
String formName = "fmDomande"; String formName = "fmDomande";
String buttonId = "fmbuttonsalvaconferma_" + randomId; String buttonId = "fmbuttonsalvaconferma_" + randomId;
@ -36,293 +35,249 @@ String buttonAsseverazioneId = "fmbuttonasseverazione_" + randomId;
String script = String script =
"var el_relazioni = $('textarea[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Relazioni]');" "var el_relazioni = $('textarea[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Relazioni]');"
+ "if (el_relazioni.length) {" + "if (el_relazioni.length) {"
+ " var el_coniugio = $('input[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Coniugio]');" + "var el_coniugio = $('input[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Coniugio]');"
+ " var el_coniugiochk = $('input[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Coniugio]:checked');" + "var el_coniugiochk = $('input[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Coniugio]:checked');"
+ " console.log('length: ' + el_relazioni.length);" + "console.log('length: ' + el_relazioni.length);"
+ " var err_coniugio = (el_coniugiochk.length == 0);" + "var err_coniugio = (el_coniugiochk.length == 0);"
+ " var err_relazioni = ((el_relazioni.val().replace(/\\s*/g, '').length < 10) && (el_coniugiochk.val() == 1));" + "var err_relazioni = ((el_relazioni.val().replace(/\\s*/g, '').length < 10) && (el_coniugiochk.val() == 1));"
+ " el_coniugio.parent().css({color:(err_coniugio ? '#a94442' : '#333')});" + "el_coniugio.parent().css({color:(err_coniugio ? '#a94442' : '#333')});"
+ " el_relazioni.css({'border-color':(err_relazioni ?'#a94442' : '#ccc')});" + "el_relazioni.css({'border-color':(err_relazioni ?'#a94442' : '#ccc')});"
+ " if (err_coniugio || err_relazioni) {" + "if (err_coniugio || err_relazioni) {"
+ " $('#" + renderResponse.getNamespace() + "{{prefix}}SaveAndCloseDiv_" + randomId + "').parent().scrollTop(0);" + "$('#" + renderResponse.getNamespace() + "{{prefix}}SaveAndCloseDiv_" + randomId + "').parent().scrollTop(0);"
+ " return false;" + "return false;"
+ " }" + "}"
+ "}" + "}"
+ "saveDettPratica(false, '{{type}}');"; + "saveDettPratica(false, '{{type}}');";
boolean hasDelegaAttiva = DelegheUtil.hasDelegaAttiva(user.getUserId(), dettPraticaId); boolean hasDelegaAttiva = DelegheUtil.hasDelegaAttiva(user.getUserId(), dettPraticaId);
boolean hasAsseverazioneAttiva = AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), intPraticaId); boolean hasAsseverazioneAttiva = AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), intPraticaId);
%> %>
<div class="pull-right">
<aui:input type="hidden" name="cmd" value="" /> <aui:input type="hidden" name="cmd" value="" />
<aui:input type="hidden" name="verifyArea" value="" /> <aui:input type="hidden" name="verifyArea" value="" />
<liferay-ui:icon-menu showWhenSingleIcon="<%=false%>" extended="false" showExpanded="true" <liferay-ui:icon-menu showWhenSingleIcon="false" extended="false" showExpanded="true" cssClass="inline_toolbar">
cssClass="inline_toolbar"> <c:if test="<%= !TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione) %>">
<c:if test="<%= intPratica.getUserId() == user.getUserId() %>">
<c:if test="<%=!TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione)%>"> <liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true)"
linkCssClass="btn" />
<c:if test="<%=intPratica.getUserId() == user.getUserId()%>">
<liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true);"
linkCssClass="btn" />
</c:if> </c:if>
<c:if test="<%=intPratica.getUserId() == user.getUserId() && !hasDelegaAttiva && !hasAsseverazioneAttiva%>"> <c:if test="<%= intPratica.getUserId() == user.getUserId() && !hasDelegaAttiva
&& !hasAsseverazioneAttiva %>">
<liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica" <liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda', 'verifyFascicolo');" linkCssClass="btn btn-primary" /> url="javascript:saveDettPratica(false, 'domanda', 'verifyFascicolo')"
linkCssClass="btn btn-primary" />
</c:if> </c:if>
<c:if test="<%= DelegheUtil.canCompilaDomanda(user.getUserId(), dettPraticaId) %>">
<c:if test="<%=DelegheUtil.canCompilaDomanda(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon iconCssClass="fa fa-users" <liferay-ui:icon iconCssClass="fa fa-users"
linkCssClass='<%=ValidazionePraticaUtil.delegheCompilazioneIsEnable(dettPraticaId) ? "btn" linkCssClass='<%=ValidazionePraticaUtil.delegheCompilazioneIsEnable(dettPraticaId) ? "btn"
: "btn disabled"%>' : "btn disabled"%>' message="gestione-deleghe"
message="gestione-deleghe" url="javascript:saveDettPratica(false, 'domanda', 'verifyDeleghe');" /> url="javascript:saveDettPratica(false, 'domanda', 'verifyDeleghe')" />
</c:if> </c:if>
<c:if test="<%= DelegheUtil.canDoPayment(user.getUserId(), dettPraticaId) %>">
<c:if test="<%=DelegheUtil.canDoPayment(user.getUserId(), dettPraticaId)%>">
<% <%
boolean isEsente = dettPratica.getNormEsenteBollo() boolean isEsente = dettPratica.getNormEsenteBollo() && dettPratica.getNormEsenteSpese();
&& dettPratica.getNormEsenteSpese(); boolean isIntegrazione = dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil
boolean isIntegrazione = dettPratica.getTipoIntegrazione().equals( .RICHIESTA_INTEGRAZIONE);
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE); Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("id", renderResponse.getNamespace() + "openVerificaFascicolo");
Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("id", renderResponse.getNamespace() + "openVerificaFascicolo");
%> %>
<liferay-portlet:renderURL var="completedURL" windowState="<%=LiferayWindowState.POP_UP.toString()%>"> <liferay-portlet:renderURL var="completedURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/completed_fascicolo.jsp" /> <liferay-portlet:param name="mvcPath" value="/html/fascicolofe/completed_fascicolo.jsp" />
<liferay-portlet:param name="classPk" value="<%=String.valueOf(dettPraticaId)%>" /> <liferay-portlet:param name="classPk" value="<%= String.valueOf(dettPraticaId) %>" />
<liferay-portlet:param name="className" value="<%=DettPratica.class.getName()%>" /> <liferay-portlet:param name="className" value="<%= DettPratica.class.getName() %>" />
<liferay-portlet:param name="comingFrom" value="domanda" /> <liferay-portlet:param name="comingFrom" value="domanda" />
</liferay-portlet:renderURL> </liferay-portlet:renderURL>
<c:if test="<%=isIntegrazione%>"> <c:if test="<%= isIntegrazione %>">
<liferay-portlet:actionURL name="completeIntegrazione" var="completeIntegrazioneURL" <liferay-portlet:actionURL name="completeIntegrazione" var="completeIntegrazioneURL"
windowState="<%=LiferayWindowState.POP_UP.toString()%>"> windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp" /> <liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp" />
<liferay-portlet:param name="dettPraticaId" value="<%=String.valueOf(dettPraticaId)%>" /> <liferay-portlet:param name="dettPraticaId" value="<%= String.valueOf(dettPraticaId) %>" />
<liferay-portlet:param name="redirect" value="<%=completedURL%>" /> <liferay-portlet:param name="redirect" value="<%= completedURL %>" />
</liferay-portlet:actionURL> </liferay-portlet:actionURL>
<liferay-ui:icon <liferay-ui:icon linkCssClass='<%= ValidazionePraticaUtil.canCompleteIntegrazione(dettPraticaId) ?
linkCssClass='<%=ValidazionePraticaUtil.canCompleteIntegrazione(dettPraticaId) ? "btn btn-primary" "btn btn-primary" : "btn btn-primary disabled"%>'
: "btn btn-primary disabled"%>' iconCssClass="fa fa-check" message="Concludi Integrazione"
iconCssClass="fa fa-check" message="Concludi Integrazione" url="<%=completeIntegrazioneURL%>" url="<%= completeIntegrazioneURL %>" data="<%=dataMap%>" />
data="<%=dataMap%>" />
</c:if> </c:if>
<c:if test="<%=!isIntegrazione%>"> <c:if test="<%= !isIntegrazione %>">
<c:if test="<%=isEsente%>"> <c:if test="<%= isEsente %>">
<liferay-portlet:actionURL name="completeDomandaEsente" var="completeDomandaEsenteURL" <liferay-portlet:actionURL name="completeDomandaEsente" var="completeDomandaEsenteURL"
windowState="<%=LiferayWindowState.POP_UP.toString()%>"> windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp" /> <liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp" />
<liferay-portlet:param name="dettPraticaId" value="<%=String.valueOf(dettPraticaId)%>" /> <liferay-portlet:param name="dettPraticaId" value="<%= String.valueOf(dettPraticaId) %>" />
<liferay-portlet:param name="redirect" value="<%=completedURL%>" /> <liferay-portlet:param name="redirect" value="<%= completedURL %>" />
</liferay-portlet:actionURL> </liferay-portlet:actionURL>
<liferay-ui:icon <liferay-ui:icon
linkCssClass='<%=ValidazionePraticaUtil.canCompleteDettPraticaEsente(dettPraticaId) ? "btn btn-primary" linkCssClass='<%=ValidazionePraticaUtil.canCompleteDettPraticaEsente(dettPraticaId) ?
: "btn btn-primary disabled"%>' "btn btn-primary" : "btn btn-primary disabled"%>'
iconCssClass="fa fa-check" useDialog="<%=true%>" message="Concludi Domanda" iconCssClass="fa fa-check" useDialog="<%=true%>" message="Concludi Domanda"
url="<%=completeDomandaEsenteURL%>" data="<%=dataMap%>" /> url="<%= completeDomandaEsenteURL %>" data="<%= dataMap %>" />
</c:if> </c:if>
<c:if test="<%=!isEsente%>"> <c:if test="<%= !isEsente %>">
<liferay-ui:icon iconCssClass="fa fa-cogs" <liferay-ui:icon iconCssClass="fa fa-cogs" linkCssClass='<%= pagamentoIsEnable ?
linkCssClass='<%= pagamentoIsEnable ? "btn btn-primary" : "btn btn-primary disabled" %>' "btn btn-primary" : "btn btn-primary disabled" %>'
message='<%=PagamentoLocalServiceUtil.countByClassPk(dettPraticaId) > 0 ? LanguageUtil message='<%= PagamentoLocalServiceUtil.countByClassPk(dettPraticaId) > 0 ? LanguageUtil
.get(pageContext, "dati-pagamento") : LanguageUtil.get(pageContext, .get(pageContext, "dati-pagamento") : LanguageUtil.get(pageContext,
"calcola-importo")%>' "calcola-importo")%>'
url="javascript:saveDettPratica(false, 'domanda', 'verifyPagamenti');" data="<%=dataMap%>" /> url="javascript:saveDettPratica(false, 'domanda', 'verifyPagamenti');"
data="<%=dataMap%>" />
</c:if> </c:if>
</c:if> </c:if>
</c:if> </c:if>
<c:if test="<%= hasDelegaAttiva && !DelegheUtil.hasDelegaPagamento(user.getUserId(), dettPraticaId) %>"> <c:if test="<%= hasDelegaAttiva && !DelegheUtil.hasDelegaPagamento(user.getUserId(), dettPraticaId) %>">
<liferay-ui:icon iconCssClass="fa fa-save" message="save" url="javascript:saveDettPratica(true);" <liferay-ui:icon iconCssClass="fa fa-save" message="save" url="javascript:saveDettPratica(true);"
linkCssClass="btn" /> linkCssClass="btn" />
<% <%
long delegaId = ParamUtil.getLong(request, "delegaId"); long delegaId = ParamUtil.getLong(request, "delegaId");
Delega delega = DelegaLocalServiceUtil.getDelega(delegaId); Delega delega = DelegaLocalServiceUtil.getDelega(delegaId);
boolean validated = true; boolean validated = true;
StringBuilder tooltipSection = new StringBuilder(); StringBuilder tooltipSection = new StringBuilder();
if (delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)) { if (delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)) {
//List<String> notCompleted = ValidazionePraticaUtil.notCompletedSection(SezioniUtil.SEZIONE_GEOLOGICA, dettPraticaId); List<String> notCompleted = ValidazionePraticaUtil.hasDelegaGeologoCompleted(dettPraticaId);
List<String> notCompleted = ValidazionePraticaUtil if (!notCompleted.isEmpty()) {
.hasDelegaGeologoCompleted(dettPraticaId); validated = false;
if (!notCompleted.isEmpty()) { tooltipSection.append("<ul class='list-body-modal'>");
validated = false; for (String incomplete : notCompleted) {
tooltipSection.append("<ul class='list-body-modal'>"); tooltipSection.append("<li class='item-body-modal'>")
for (String incomplete : notCompleted) { .append(LanguageUtil.get(pageContext, incomplete)).append("</li>");
tooltipSection.append("<li class='item-body-modal'>" }
+ LanguageUtil.get(pageContext, incomplete) + "</li>"); tooltipSection.append("</ul>");
} }
tooltipSection.append("</ul>"); }
}
}
%> %>
<c:if test="<%= !validated %>">
<c:if test="<%=!validated%>">
<% <%
String buttonIdVerifica = "fmbuttonverifica_" + randomId; String buttonIdVerifica = "fmbuttonverifica_" + randomId;
%> %>
<!-- ADT BUG FE ID = 14 -->
<liferay-ui:icon id="<%=buttonIdVerifica%>" iconCssClass="fa fa-times-circle txt-red" <liferay-ui:icon id="<%=buttonIdVerifica%>" iconCssClass="fa fa-times-circle txt-red"
message="verifica-delega" url="javascript:saveDettPratica(true,'saveAndVerify');" linkCssClass="btn" /> message="verifica-delega" url="javascript:saveDettPratica(true,'saveAndVerify');"
linkCssClass="btn" />
<!-- ADT BUG FE ID = 14 -->
<div id="${isBar}" hidden> <div id="${isBar}" hidden>
<liferay-util:include page="/html/common/submit_window_delega.jsp" servletContext="<%=application%>"> <liferay-util:include page="/html/common/submit_window_delega.jsp"
<liferay-util:param name="titolo" value="Validazione Sezione Geologia"></liferay-util:param> servletContext="<%= application %>">
<liferay-util:param name="headerCSS" value="display-inline"></liferay-util:param> <liferay-util:param name="titolo" value="Validazione Sezione Geologia" />
<liferay-util:param name="contentDiv" value='<%="verificaDiv_" + randomId%>'></liferay-util:param> <liferay-util:param name="headerCSS" value="display-inline" />
<liferay-util:param name="buttonId" value="<%=buttonIdVerifica%>"></liferay-util:param> <liferay-util:param name="contentDiv" value='<%="verificaDiv_" + randomId%>' />
<liferay-util:param name="buttonAnnulla" value="Chiudi"></liferay-util:param> <liferay-util:param name="buttonId" value="<%=buttonIdVerifica%>" />
<liferay-util:param name="okVisible" value="false"></liferay-util:param> <liferay-util:param name="buttonAnnulla" value="Chiudi" />
<liferay-util:param name="width" value="500"></liferay-util:param> <liferay-util:param name="okVisible" value="false" />
<liferay-util:param name="height" value="320"></liferay-util:param> <liferay-util:param name="width" value="500" />
<liferay-util:param name="height" value="320" />
</liferay-util:include> </liferay-util:include>
<div hidden id='<%= renderResponse.getNamespace() + "verificaDiv_" + randomId %>'
<div hidden id='<%=renderResponse.getNamespace() + "verificaDiv_" + randomId%>' class="text-center"> class="text-center">
<h4 class="txt-bold text-center">Sezione Geologia incompleta:</h4> <h4 class="txt-bold text-center">Sezione Geologia incompleta:</h4>
<%=tooltipSection.toString()%> <%= tooltipSection.toString() %>
</div> </div>
</div> </div>
</c:if> </c:if>
<c:if test="<%= validated && DelegheUtil.TIPO_GEOLOGO.equalsIgnoreCase(delega.getTipologia())%>">
<c:if test="<%=validated
&& DelegheUtil.TIPO_GEOLOGO.equalsIgnoreCase(delega.getTipologia())%>">
<liferay-ui:icon iconCssClass="fa fa-check-circle txt-green" message="verifica-delega" <liferay-ui:icon iconCssClass="fa fa-check-circle txt-green" message="verifica-delega"
url="javascript:void(0)" linkCssClass="btn disabled" /> url="javascript:void(0)" linkCssClass="btn disabled" />
</c:if> </c:if>
<span class='<%= validated ? StringPool.BLANK : "tooltip-info" %>' title="Delega incompleta">
<span class="<%=!validated ? "tooltip-info" : StringPool.BLANK%>" title="Delega incompleta"> <liferay-ui:icon <liferay-ui:icon id="<%= buttonId %>" iconCssClass="fa fa-check-circle" message="concludi-delega"
id="<%=buttonId%>" iconCssClass="fa fa-check-circle" message="concludi-delega" url="javascript:void(0)" url="javascript:void(0)"
linkCssClass='<%=!validated ? "btn btn-primary disabled" : "btn btn-primary"%>' /> linkCssClass='<%= validated ? "btn btn-primary" : "btn btn-primary disabled" %>' />
</span> </span>
<c:if test="<%=validated%>"> <c:if test="<%= validated %>">
<div id='<%=renderResponse.getNamespace() + "dgSaveAndCloseDiv_" + randomId%>' class="hide"> <div id='<%= renderResponse.getNamespace() + "dgSaveAndCloseDiv_" + randomId %>' class="hide">
<span> <c:choose> <span>
<c:when <c:choose>
test="<%=delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_TOTALE) <c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_TOTALE)
&& delega.getCodiceFiscale().equalsIgnoreCase( && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
user.getScreenName())%>"> <%= LanguageUtil.format(pageContext, "confirm-delega-totale",
<%=LanguageUtil.format( new String[] { user.getFirstName(), user.getLastName() })%>
pageContext,
"confirm-delega-totale",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when <c:when test="<%=delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_COMPILAZIONE)
test="<%=delega.getTipologia().equalsIgnoreCase( && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
DelegheUtil.TIPO_COMPILAZIONE) <%= LanguageUtil.format(pageContext, "confirm-delega-compilazione",
&& delega.getCodiceFiscale().equalsIgnoreCase( new String[] { user.getFirstName(), user.getLastName() }) %>
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-compilazione",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when <c:when test="<%=delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)
test="<%=delega.getTipologia() && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName())%>">
.equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<input type="hidden" name="_<%=PortletKeys.FASCICOLOFE%>_dgPresenti" value="1" /> <input type="hidden" name="_<%=PortletKeys.FASCICOLOFE%>_dgPresenti" value="1" />
Dichiara<br> Dichiara<br>
<label><input required type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_dgConiugio" <label>
onclick="$('#<portlet:namespace />dgrelazioni').hide()" value="0" /> di non trovarsi in rapporti di <input required type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_dgConiugio"
coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i onclick="$('#<portlet:namespace />dgrelazioni').hide()" value="0" />
dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label> di non trovarsi in rapporti di coniugio, parentela o affinità, del coniuge o
del convivente, entro il 2° grado, con i dirigenti e i dipendenti dell'Ufficio
del Genio Civile deputati alla trattazione del procedimento.
</label>
<br> <br>
<label><input type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_dgConiugio" <label>
onclick="$('#<portlet:namespace />dgrelazioni').show()" value="1" /> di trovarsi in rapporti di <input type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_dgConiugio"
coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio onclick="$('#<portlet:namespace />dgrelazioni').show()" value="1" />
Civile (indicare un nominativo per riga).</label> di trovarsi in rapporti di coniugio, parentela o affinità entro il 2° grado con
<textarea id="<portlet:namespace />dgrelazioni" name="_<%=PortletKeys.FASCICOLOFE%>_dgRelazioni" i seguenti dipendenti dell'Ufficio del Genio Civile (indicare un nominativo per
style="display: none"></textarea> riga).
</label>
<textarea id="<portlet:namespace />dgrelazioni"
name="_<%=PortletKeys.FASCICOLOFE%>_dgRelazioni"
style="display: none"></textarea>
<hr> <hr>
<div class="anteprimaasseverazione"><%=AsseverazioneLocalServiceUtil.anteprimaAsseverazione( <div class="anteprimaasseverazione">
TipoSoggettoUtil.GEOLOGO, user, dettPratica, null)%></div> <%= AsseverazioneLocalServiceUtil.anteprimaAsseverazioneGeologo(
user.getScreenName(), dettPraticaId) %>
</div>
</c:when> </c:when>
<c:when <c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil
test="<%=delega.getTipologia().equalsIgnoreCase( .TIPO_FIRMA_INSERIMENTO_ALLEGATI)
DelegheUtil.TIPO_FIRMA_INSERIMENTO_ALLEGATI) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName())%>">
&& delega.getCodiceFiscale().equalsIgnoreCase( <%= LanguageUtil.format(pageContext, "confirm-delega-firma-inserimento",
user.getScreenName())%>"> new String[] { user.getFirstName(), user.getLastName() }) %>
<%=LanguageUtil.format(
pageContext,
"confirm-delega-firma-inserimento",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when <c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_FINE_LAVORI)
test="<%=delega.getTipologia().equalsIgnoreCase( && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
DelegheUtil.TIPO_FINE_LAVORI) <%= LanguageUtil.format(pageContext, "confirm-delega-fine-lavori",
&& delega.getCodiceFiscale().equalsIgnoreCase( new String[] { user.getFirstName(), user.getLastName() }) %>
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-fine-lavori",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when <c:when test="<%=delega.getTipologia().equalsIgnoreCase(DelegheUtil
test="<%=delega.getTipologia().equalsIgnoreCase( .TIPO_VISUALIZZAZIONE)
DelegheUtil.TIPO_VISUALIZZAZIONE) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
&& delega.getCodiceFiscale().equalsIgnoreCase( <%= LanguageUtil.format(pageContext, "confirm-delega-visualizzazione",
user.getScreenName())%>"> new String[] { user.getFirstName(), user.getLastName() }) %>
<%=LanguageUtil.format(
pageContext,
"confirm-delega-visualizzazione",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when <c:when test="<%=delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_COLLAUDO)
test="<%=delega.getTipologia().equalsIgnoreCase( && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName())%>">
DelegheUtil.TIPO_COLLAUDO) <%= LanguageUtil.format(pageContext, "confirm-delega-collaudo",
&& delega.getCodiceFiscale().equalsIgnoreCase( new String[] { user.getFirstName(), user.getLastName() }) %>
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-collaudo",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
</c:choose> </c:choose>
</span> </span>
</div> </div>
<liferay-portlet:resourceURL id="isCompletedDelegaGeologo" var="isCompletedDelegaGeologoURL" /> <liferay-portlet:resourceURL id="isCompletedDelegaGeologo" var="isCompletedDelegaGeologoURL" />
<% <%
String function = "A.io.request('" String function = "A.io.request('" + isCompletedDelegaGeologoURL
+ isCompletedDelegaGeologoURL + "',{data: {"
+ "',{data: {" + renderResponse.getNamespace()
+ renderResponse.getNamespace() + "classPk: "
+ "classPk: " + dettPraticaId
+ dettPraticaId + "},"
+ "}," + "dataType: 'json',on: {success: function(event, id, obj) {console.log(this.get('responseData'));var response = this.get('responseData');"
+ "dataType: 'json',on: {success: function(event, id, obj) {console.log(this.get('responseData'));var response = this.get('responseData');" + "console.log(response.isCompleted);"
+ "console.log(response.isCompleted);" + "if(!response.isCompleted){var body = A.one('#"
+ "if(!response.isCompleted){var body = A.one('#" + renderResponse.getNamespace()
+ renderResponse.getNamespace() + "dgSaveAndCloseDiv_"
+ "dgSaveAndCloseDiv_" + randomId
+ randomId + "');"
+ "');" + "body.html('<p class=\"text-center\">Delega incompleta<a href=\"javascript:void(0)\" class=\"btn btn-success\" style=\"margin-bottom:20px\" onclick=\"window.location.reload()\">Refresh</a></p>');"
+ "body.html('<p class=\"text-center\">Delega incompleta<a href=\"javascript:void(0)\" class=\"btn btn-success\" style=\"margin-bottom:20px\" onclick=\"window.location.reload()\">Refresh</a></p>');" + "body.ancestor('.modal-body').next('.modal-footer').remove();return;}"
+ "body.ancestor('.modal-body').next('.modal-footer').remove();return;}" + "}, complete: function(event){A.one('#" + renderResponse.getNamespace()
+ "}, complete: function(event){A.one('#" + renderResponse.getNamespace() + "dgSaveAndCloseDiv_" + randomId + "').show();modal.show();}" + "}});";
+ "dgSaveAndCloseDiv_" + randomId + "').show();modal.show();}" + "}});";
%> %>
<liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%=application%>"> <liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%= application %>">
<liferay-util:param name="formName" value="<%=formName%>"></liferay-util:param> <liferay-util:param name="formName" value="<%= formName %>" />
<liferay-util:param name="onClick" <liferay-util:param name="onClick" value="<%= script.replace(\"{{prefix}}\",\"dg\")
value="<%=script.replace(\"{{prefix}}\",\"dg\") .replace(\"{{type}}\",\"delega\") %>" />
.replace(\"{{type}}\",\"delega\")%>"></liferay-util:param> <liferay-util:param name="titolo" value="Conclusione Delega" />
<liferay-util:param name="titolo" value="Conclusione Delega"></liferay-util:param> <liferay-util:param name="contentDiv" value='<%= "dgSaveAndCloseDiv_" + randomId %>' />
<liferay-util:param name="contentDiv" value='<%="dgSaveAndCloseDiv_" + randomId%>'></liferay-util:param> <liferay-util:param name="buttonId" value="<%= buttonId %>" />
<liferay-util:param name="buttonId" value="<%=buttonId%>"></liferay-util:param> <liferay-util:param name="buttonConferma" value="Conferma" />
<liferay-util:param name="buttonConferma" value="Conferma"></liferay-util:param> <liferay-util:param name="width" value="500" />
<liferay-util:param name="width" value="500"></liferay-util:param> <liferay-util:param name="height" value="320" />
<liferay-util:param name="height" value="320"></liferay-util:param> <c:if test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO) %>">
<c:if test='<%=delega.getTipologia() <liferay-util:param name="function" value="<%= function %>" />
.equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)%>'>
<liferay-util:param name="function" value="<%=function%>"></liferay-util:param>
</c:if> </c:if>
</liferay-util:include> </liferay-util:include>
</c:if> </c:if>
@ -330,69 +285,57 @@ boolean hasAsseverazioneAttiva = AsseverazioniUtil.hasAsseverazioneAttiva(user.g
<c:if test="<%= hasAsseverazioneAttiva %>"> <c:if test="<%= hasAsseverazioneAttiva %>">
<liferay-ui:icon id="<%=buttonAsseverazioneId%>" iconCssClass="fa fa-save" message="Assevera" url="#" <liferay-ui:icon id="<%=buttonAsseverazioneId%>" iconCssClass="fa fa-save" message="Assevera" url="#"
linkCssClass="btn btn-primary" /> linkCssClass="btn btn-primary" />
<div id='<%=renderResponse.getNamespace() + "asSaveAndCloseDiv_" + randomId%>' class="hide"> <div id='<%= renderResponse.getNamespace() + "asSaveAndCloseDiv_" + randomId %>' class="hide">
<input type="hidden" name="_<%=PortletKeys.FASCICOLOFE%>_asPresenti" value="1" /> <label><input <input type="hidden" name="_<%= PortletKeys.FASCICOLOFE %>_asPresenti" value="1" />
required type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_asConiugio" <label>
onclick="$('#<portlet:namespace />asrelazioni').hide()" value="0" /> di non trovarsi in rapporti di <input required type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_asConiugio"
coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i onclick="$('#<portlet:namespace />asrelazioni').hide()" value="0" />
dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label><br> <label><input di non trovarsi in rapporti di coniugio, parentela o affinità, del coniuge o del convivente,
type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_asConiugio" entro il 2° grado, con i dirigenti e i dipendenti dell'Ufficio del Genio Civile deputati alla
onclick="$('#<portlet:namespace />asrelazioni').show()" value="1" /> di trovarsi in rapporti di trattazione del procedimento.
coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio Civile </label><br>
(indicare un nominativo per riga).</label> <label>
<textarea id="<portlet:namespace />asrelazioni" name="_<%=PortletKeys.FASCICOLOFE%>_asRelazioni" <input type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_asConiugio"
onclick="$('#<portlet:namespace />asrelazioni').show()" value="1" />
di trovarsi in rapporti di coniugio, parentela o affinità entro il 2° grado con i seguenti
dipendenti dell'Ufficio del Genio Civile (indicare un nominativo per riga).
</label>
<textarea id="<portlet:namespace />asrelazioni" name="_<%= PortletKeys.FASCICOLOFE %>_asRelazioni"
style="display: none"></textarea> style="display: none"></textarea>
<hr> <hr>
<ol class="asseverazioni-list"> <ol class="asseverazioni-list">
<% <%
List<Asseverazione> asseverazioni = AsseverazioneServiceUtil List<Asseverazione> asseverazioni = AsseverazioneServiceUtil
.findByDettPratica_CodiceFiscale_InEsito(dettPraticaId, user.getScreenName(), .findByDettPratica_CodiceFiscale_InEsito(dettPraticaId, user.getScreenName(),
new String[] { DelegheUtil.STATO_ASSEGNATA }, QueryUtil.ALL_POS, new String[] { DelegheUtil.STATO_ASSEGNATA }, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null); QueryUtil.ALL_POS, null);
for (Asseverazione asseverazione : asseverazioni) { for (Asseverazione asseverazione : asseverazioni) {
%> %>
<li class="anteprimaasseverazione"> <li class="anteprimaasseverazione">
<p> <p><%= AsseverazioneLocalServiceUtil.anteprimaAsseverazione(asseverazione) %></p>
<c:if test="<%=asseverazione.getCodiceFiscale().equalsIgnoreCase( </li>
user.getScreenName())%>">
<%
String testoAsseverazione = AsseverazioneLocalServiceUtil
.anteprimaAsseverazione(asseverazione.getTipologia(), user,
dettPratica, null);
if (Validator.isNull(testoAsseverazione)) {
testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(
asseverazione, user.getScreenName());
}
%>
<%=testoAsseverazione%>
</c:if>
</p>
</li>
<% <%
} }
%> %>
</ol> </ol>
</div> </div>
<liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%=application%>"> <liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%=application%>">
<liferay-util:param name="formName" value="formAsseverazione"></liferay-util:param> <liferay-util:param name="formName" value="formAsseverazione" />
<liferay-util:param name="onClick" <liferay-util:param name="onClick" value="<%= script.replace(\"{{prefix}}\",\"as\")
value="<%=script.replace(\"{{prefix}}\",\"as\").replace(\"{{type}}\",\"asseverazione\")%>"></liferay-util:param> .replace(\"{{type}}\",\"asseverazione\") %>" />
<liferay-util:param name="titolo" value="Conferma Asseverazione"></liferay-util:param> <liferay-util:param name="titolo" value="Conferma Asseverazione" />
<liferay-util:param name="contentDiv" value='<%="asSaveAndCloseDiv_" + randomId%>'></liferay-util:param> <liferay-util:param name="contentDiv" value='<%= "asSaveAndCloseDiv_" + randomId %>' />
<liferay-util:param name="buttonId" value="<%=buttonAsseverazioneId%>"></liferay-util:param> <liferay-util:param name="buttonId" value="<%= buttonAsseverazioneId %>" />
<liferay-util:param name="buttonConferma" value="Conferma"></liferay-util:param> <liferay-util:param name="buttonConferma" value="Conferma" />
<liferay-util:param name="width" value="800"></liferay-util:param> <liferay-util:param name="width" value="800" />
</liferay-util:include> </liferay-util:include>
</c:if> </c:if>
</c:if> </c:if>
<c:if test="<%=TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione)%>"> <c:if test="<%= TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione) %>">
<liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true);" <liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true);"
linkCssClass="btn" /> linkCssClass="btn" />
<liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica" <liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda');" linkCssClass="btn btn-primary" /> url="javascript:saveDettPratica(false, 'domanda');" linkCssClass="btn btn-primary" />
</c:if> </c:if>
</liferay-ui:icon-menu> </liferay-ui:icon-menu>
</div> </div>

4
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=Kaleo build.namespace=Kaleo
build.number=32 build.number=34
build.date=1625582098151 build.date=1629802401816
build.auto.upgrade=true build.auto.upgrade=true
## ##

Caricamento…
Annulla
Salva