|
|
|
@ -22,19 +22,31 @@ import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
|
|
|
|
|
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; |
|
|
|
|
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.StatoPraticaConstants; |
|
|
|
|
|
|
|
|
|
import java.io.Console; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
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){ |
|
|
|
|
if(Constants.PROCEDURA_C.equalsIgnoreCase(intPratica.getTipoProcedura())){ |
|
|
|
|
try{ |
|
|
|
|
long intPraticaId = intPratica.getIntPraticaId(); |
|
|
|
|
List<ControlloPratica> controlloPraticas = ControlloPraticaLocalServiceUtil.findByIntPratica(intPraticaId); |
|
|
|
|
List<ControlloPratica> controlloPraticas = |
|
|
|
|
ControlloPraticaLocalServiceUtil.findByIntPraticaId_Status(intPraticaId, WorkflowConstants.STATUS_APPROVED); |
|
|
|
|
return !controlloPraticas.isEmpty(); |
|
|
|
|
} catch (SystemException e){ |
|
|
|
|
_log.error(e,e); |
|
|
|
|