|
|
@ -22,20 +22,32 @@ import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil; |
|
|
|
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; |
|
|
|
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; |
|
|
|
import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil; |
|
|
|
import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil; |
|
|
|
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 java.io.Console; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
public class AdvancedOperationUtil { |
|
|
|
public class AdvancedOperationUtil { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean isNotWorkflowManuallyStarted(IntPratica intPratica){ |
|
|
|
|
|
|
|
switch (intPratica.getStatoPratica()) { |
|
|
|
|
|
|
|
case StatoPraticaConstants.VIDIMATA : |
|
|
|
|
|
|
|
case StatoPraticaConstants.AUTORIZZATA: |
|
|
|
|
|
|
|
case StatoPraticaConstants.CONFORME: |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static boolean hasControlloPratica_ProceduraC(IntPratica intPratica){ |
|
|
|
public static boolean hasControlloPratica_ProceduraC(IntPratica intPratica){ |
|
|
|
if(Constants.PROCEDURA_C.equalsIgnoreCase(intPratica.getTipoProcedura())){ |
|
|
|
if(Constants.PROCEDURA_C.equalsIgnoreCase(intPratica.getTipoProcedura())){ |
|
|
|
try{ |
|
|
|
try{ |
|
|
|
long intPraticaId = intPratica.getIntPraticaId(); |
|
|
|
long intPraticaId = intPratica.getIntPraticaId(); |
|
|
|
List<ControlloPratica> controlloPraticas = ControlloPraticaLocalServiceUtil.findByIntPratica(intPraticaId); |
|
|
|
List<ControlloPratica> controlloPraticas = |
|
|
|
return !controlloPraticas.isEmpty(); |
|
|
|
ControlloPraticaLocalServiceUtil.findByIntPraticaId_Status(intPraticaId, WorkflowConstants.STATUS_APPROVED); |
|
|
|
|
|
|
|
return !controlloPraticas.isEmpty(); |
|
|
|
} catch (SystemException e){ |
|
|
|
} catch (SystemException e){ |
|
|
|
_log.error(e,e); |
|
|
|
_log.error(e,e); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|