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