diff --git a/liferay-plugins-sdk-6.2/dist/portos-bo-shared-6.2.0.1.jar b/liferay-plugins-sdk-6.2/dist/portos-bo-shared-6.2.0.1.jar index 591ee83a..e56f03fc 100644 Binary files a/liferay-plugins-sdk-6.2/dist/portos-bo-shared-6.2.0.1.jar and b/liferay-plugins-sdk-6.2/dist/portos-bo-shared-6.2.0.1.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar index 2764a19b..48011e42 100644 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar and b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared-service.jar b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared-service.jar new file mode 100644 index 00000000..1e39d223 Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared-service.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar index 591ee83a..e56f03fc 100644 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar and b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java index cd63e7da..e2f9e679 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java @@ -100,6 +100,10 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl { public FineLavori addFineLavori(long intPraticaId, ServiceContext serviceContext) throws PortalException, SystemException { + if(Validator.isNotNull(getLastEditable(intPraticaId))){ + throw new PortalException("A Fine Lavori to be completed already exists"); + } + IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); FineLavori fineLavori = initFineLavori(serviceContext); fineLavori.setGroupId(intPratica.getGroupId()); @@ -112,7 +116,11 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl { @Indexable(type = IndexableType.REINDEX) public FineLavori addFineLavori(long intPraticaId, boolean richiestaAttestazione, boolean normEsenteCollaudo, ServiceContext serviceContext) throws PortalException, SystemException { - + + if(Validator.isNotNull(getLastEditable(intPraticaId))){ + throw new PortalException("A Fine Lavori to be completed already exists"); + } + IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); FineLavori fineLavori = initFineLavori(serviceContext); fineLavori.setGroupId(intPratica.getGroupId()); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 3b4476dd..83a95e15 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=2870 - build.date=1678981829109 + build.number=2872 + build.date=1679060232132 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/shared/portos-bo-shared/lib/portos-bo-shared-service.jar b/liferay-plugins-sdk-6.2/shared/portos-bo-shared/lib/portos-bo-shared-service.jar new file mode 100644 index 00000000..1e39d223 Binary files /dev/null and b/liferay-plugins-sdk-6.2/shared/portos-bo-shared/lib/portos-bo-shared-service.jar differ