Sfoglia il codice sorgente

fix advanced operation portlet

feature/fix_soggetti
Marco Alderighi 1 anno fa
parent
commit
e4f3e54b2c
  1. 6
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/portlet/AdvancedOperationPortlet.java

6
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/portlet/AdvancedOperationPortlet.java

@ -184,7 +184,7 @@ public class AdvancedOperationPortlet extends MVCPortlet {
long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId", -1L);
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
if(WorkflowConstants.STATUS_INCOMPLETE == intPratica.getStatus()){
if(WorkflowConstants.STATUS_INACTIVE == intPratica.getStatus()){
_log.info("AdvancedOperationPortlet --- Recovering Pratica Vidimata (INCOMPLETE ==> DRAFT) "
+ "with IntPraticaId " + intPraticaId);
_ripristinaPratica(intPratica, WorkflowConstants.STATUS_DRAFT);
@ -241,7 +241,7 @@ public class AdvancedOperationPortlet extends MVCPortlet {
long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId", -1L);
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
if(WorkflowConstants.STATUS_INCOMPLETE == intPratica.getStatus()){
if(WorkflowConstants.STATUS_INACTIVE == intPratica.getStatus()){
_log.info("AdvancedOperationPortlet --- Recovering Pratica Vidimata (INCOMPLETE ==> APPROVED) "
+ "with IntPraticaId " + intPraticaId);
_ripristinaPratica(intPratica, WorkflowConstants.STATUS_APPROVED);
@ -300,7 +300,9 @@ public class AdvancedOperationPortlet extends MVCPortlet {
private void _ripristinaPratica(IntPratica intPratica, int status) throws PortalException, SystemException{
long docPraticaAnnullamentoId = intPratica.getDocPraticaAnnullamentoId();
if(Validator.isNotNull(docPraticaAnnullamentoId)){
IntPraticaLocalServiceUtil.deleteFileAnnullamento(docPraticaAnnullamentoId);
}
IntPraticaLocalServiceUtil.updateStatus(intPratica.getIntPraticaId(), status);
}

Caricamento…
Annulla
Salva