diff --git a/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar b/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar index a7ad6bcd..188cb9e4 100644 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar and b/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/util/AdvancedOperationUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/util/AdvancedOperationUtil.java index bc6e0f3c..80406238 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/util/AdvancedOperationUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/util/AdvancedOperationUtil.java @@ -196,6 +196,17 @@ public class AdvancedOperationUtil { } return false; } + + public static boolean isWorkFlowCompleted(ControlloPratica controlloPratica){ + try { + WorkflowTask task = WorkflowUtil.getLastTask(controlloPratica.getCompanyId(), + controlloPratica.getGroupId(), null, controlloPratica); + return task.isCompleted(); + } catch (PortalException | SystemException e) { + _log.error(e,e); + } + return false; + } public static List fetchDettPraticaListWithInizioLavori(IntPratica intPratica){ if(Validator.isNotNull(intPratica)){ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/html/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/html/view.jsp index 0fbd02bc..4ea1928e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/html/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/html/view.jsp @@ -616,13 +616,48 @@ } %> - -
- - - -
-
+ + +
+ + +
+ + + + + <%= controlloPratica.getControlloPraticaId() %> + + + + + (<%= controlloPratica.getStatus() %>) + + + <% + String statoWorkflowMsg = StringPool.BLANK; + statoWorkflowMsg = AdvancedOperationUtil.isWorkFlowCompleted(controlloPratica) ? + "COMPLETATO" : "ATTIVO"; + %> + + + + + + + +
+
+
+
+
+
<% } %> 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 a7ad6bcd..188cb9e4 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/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalService.java index dd38ed75..03b1c43f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalService.java @@ -426,6 +426,9 @@ public interface ControlloPraticaLocalService extends BaseLocalService, long intPraticaId) throws com.liferay.portal.kernel.exception.SystemException; + public int countByIntPratica(long intPraticaId) + throws com.liferay.portal.kernel.exception.SystemException; + public java.lang.Long calculateDateAvvioProcedimento( long controlloPraticaId) throws com.liferay.portal.kernel.exception.PortalException, diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceClp.java index 0e9c01af..abd45b54 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceClp.java @@ -232,9 +232,13 @@ public class ControlloPraticaLocalServiceClp _methodParameterTypes42 = new String[] { "long" }; - _methodName43 = "calculateDateAvvioProcedimento"; + _methodName43 = "countByIntPratica"; _methodParameterTypes43 = new String[] { "long" }; + + _methodName44 = "calculateDateAvvioProcedimento"; + + _methodParameterTypes44 = new String[] { "long" }; } @Override @@ -1691,6 +1695,34 @@ public class ControlloPraticaLocalServiceClp return (java.util.List)ClpSerializer.translateOutput(returnObj); } + @Override + public int countByIntPratica(long intPraticaId) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName43, + _methodParameterTypes43, new Object[] { intPraticaId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(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 ((Integer)returnObj).intValue(); + } + @Override public java.lang.Long calculateDateAvvioProcedimento( long controlloPraticaId) @@ -1699,8 +1731,8 @@ public class ControlloPraticaLocalServiceClp Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName43, - _methodParameterTypes43, new Object[] { controlloPraticaId }); + returnObj = _invokableLocalService.invokeMethod(_methodName44, + _methodParameterTypes44, new Object[] { controlloPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -1812,4 +1844,6 @@ public class ControlloPraticaLocalServiceClp private String[] _methodParameterTypes42; private String _methodName43; private String[] _methodParameterTypes43; + private String _methodName44; + private String[] _methodParameterTypes44; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceUtil.java index 4dcd469a..1f15ddb1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceUtil.java @@ -512,6 +512,11 @@ public class ControlloPraticaLocalServiceUtil { return getService().findByIntPratica(intPraticaId); } + public static int countByIntPratica(long intPraticaId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().countByIntPratica(intPraticaId); + } + public static java.lang.Long calculateDateAvvioProcedimento( long controlloPraticaId) throws com.liferay.portal.kernel.exception.PortalException, diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceWrapper.java index 50a6403a..a483187c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceWrapper.java @@ -543,6 +543,12 @@ public class ControlloPraticaLocalServiceWrapper return _controlloPraticaLocalService.findByIntPratica(intPraticaId); } + @Override + public int countByIntPratica(long intPraticaId) + throws com.liferay.portal.kernel.exception.SystemException { + return _controlloPraticaLocalService.countByIntPratica(intPraticaId); + } + @Override public java.lang.Long calculateDateAvvioProcedimento( long controlloPraticaId) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ControlloPraticaLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ControlloPraticaLocalServiceClpInvoker.java index 514bfa63..b1d91068 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ControlloPraticaLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ControlloPraticaLocalServiceClpInvoker.java @@ -240,9 +240,13 @@ public class ControlloPraticaLocalServiceClpInvoker { _methodParameterTypes236 = new String[] { "long" }; - _methodName237 = "calculateDateAvvioProcedimento"; + _methodName237 = "countByIntPratica"; _methodParameterTypes237 = new String[] { "long" }; + + _methodName238 = "calculateDateAvvioProcedimento"; + + _methodParameterTypes238 = new String[] { "long" }; } public Object invokeMethod(String name, String[] parameterTypes, @@ -522,6 +526,11 @@ public class ControlloPraticaLocalServiceClpInvoker { if (_methodName237.equals(name) && Arrays.deepEquals(_methodParameterTypes237, parameterTypes)) { + return ControlloPraticaLocalServiceUtil.countByIntPratica(((Long)arguments[0]).longValue()); + } + + if (_methodName238.equals(name) && + Arrays.deepEquals(_methodParameterTypes238, parameterTypes)) { return ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(((Long)arguments[0]).longValue()); } @@ -618,4 +627,6 @@ public class ControlloPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes236; private String _methodName237; private String[] _methodParameterTypes237; + private String _methodName238; + private String[] _methodParameterTypes238; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java index d5c5a1b8..ad1ee651 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java @@ -622,6 +622,12 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi return controlloPraticaPersistence.findByIntPraticaId(intPraticaId); } + + @Override + public int countByIntPratica(long intPraticaId) throws SystemException { + + return controlloPraticaPersistence.countByIntPraticaId(intPraticaId); + } @Override public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException, PortalException { 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 26a6270b..85764bab 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=2906 - build.date=1683294189849 + build.number=2907 + build.date=1683790768291 build.auto.upgrade=true ##