|
|
@ -5,6 +5,7 @@ import com.liferay.portal.kernel.exception.SystemException; |
|
|
|
import com.liferay.portal.kernel.log.Log; |
|
|
|
import com.liferay.portal.kernel.log.Log; |
|
|
|
import com.liferay.portal.kernel.log.LogFactoryUtil; |
|
|
|
import com.liferay.portal.kernel.log.LogFactoryUtil; |
|
|
|
import com.liferay.portal.kernel.servlet.SessionErrors; |
|
|
|
import com.liferay.portal.kernel.servlet.SessionErrors; |
|
|
|
|
|
|
|
import com.liferay.portal.kernel.util.ArrayUtil; |
|
|
|
import com.liferay.portal.kernel.util.DateFormatFactoryUtil; |
|
|
|
import com.liferay.portal.kernel.util.DateFormatFactoryUtil; |
|
|
|
import com.liferay.portal.kernel.util.ParamUtil; |
|
|
|
import com.liferay.portal.kernel.util.ParamUtil; |
|
|
|
import com.liferay.portal.kernel.util.Validator; |
|
|
|
import com.liferay.portal.kernel.util.Validator; |
|
|
@ -43,10 +44,17 @@ public class AdvancedOperationPortlet extends MVCPortlet { |
|
|
|
if (intPraticaId != 0L) { |
|
|
|
if (intPraticaId != 0L) { |
|
|
|
List<ControlloPratica> controlloPraticaList = |
|
|
|
List<ControlloPratica> controlloPraticaList = |
|
|
|
ControlloPraticaLocalServiceUtil.findByIntPratica(intPraticaId); |
|
|
|
ControlloPraticaLocalServiceUtil.findByIntPratica(intPraticaId); |
|
|
|
|
|
|
|
if(_log.isDebugEnabled()){ |
|
|
|
|
|
|
|
_log.debug("AdvancedOperationPortlet --- There are " + controlloPraticaList.size() +" ControlloPratica"); |
|
|
|
|
|
|
|
} |
|
|
|
for(ControlloPratica cp : controlloPraticaList){ |
|
|
|
for(ControlloPratica cp : controlloPraticaList){ |
|
|
|
if(Arrays.asList(AdvancedOperationUtil.STATUS_ARRAY).contains(cp.getStatus())){ |
|
|
|
if(_log.isDebugEnabled()){ |
|
|
|
|
|
|
|
_log.debug("AdvancedOperationPortlet --- Cycling... ControlloPraticaID " + cp.getCompanyId() |
|
|
|
|
|
|
|
+ " Status " + cp.getStatus()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(ArrayUtil.contains(AdvancedOperationUtil.STATUS_ARRAY, cp.getStatus())){ |
|
|
|
_log.info("AdvancedOperationPortlet --- Deleting ControlloPratica " + cp.getControlloPraticaId() + |
|
|
|
_log.info("AdvancedOperationPortlet --- Deleting ControlloPratica " + cp.getControlloPraticaId() + |
|
|
|
" with Status " + cp.getStatus() +" of IntPraticaId " + intPraticaId); |
|
|
|
" with Status " + cp.getStatus() +" of IntPraticaId " + intPraticaId); |
|
|
|
ControlloPraticaLocalServiceUtil.deleteControlloPratica(cp); |
|
|
|
ControlloPraticaLocalServiceUtil.deleteControlloPratica(cp); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|