|
|
|
@ -5,6 +5,7 @@ import com.liferay.portal.kernel.exception.SystemException;
|
|
|
|
|
import com.liferay.portal.kernel.log.Log; |
|
|
|
|
import com.liferay.portal.kernel.log.LogFactoryUtil; |
|
|
|
|
import com.liferay.portal.kernel.servlet.SessionErrors; |
|
|
|
|
import com.liferay.portal.kernel.util.DateFormatFactoryUtil; |
|
|
|
|
import com.liferay.portal.kernel.util.ParamUtil; |
|
|
|
|
import com.liferay.portal.kernel.util.Validator; |
|
|
|
|
import com.liferay.portal.kernel.util.WebKeys; |
|
|
|
@ -37,7 +38,8 @@ public class AdvancedOperationPortlet extends MVCPortlet {
|
|
|
|
|
_checkIfUserIsCompanyAdmin(actionRequest); |
|
|
|
|
|
|
|
|
|
long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId", -1L); |
|
|
|
|
Date dataInizioLavoriOpera = ParamUtil.getDate(actionRequest, "dataInizioLavoriOperaInput", null); |
|
|
|
|
Date dataInizioLavoriOpera = ParamUtil.getDate(actionRequest, "dataInizioLavoriOperaInput", |
|
|
|
|
DateFormatFactoryUtil.getSimpleDateFormat("yyyy-MM-dd"), null); |
|
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId); |
|
|
|
|
|
|
|
|
|
List<DettPratica> dettPraticaListWithInizioLavori = AdvancedOperationUtil.fetchDettPraticaListWithInizioLavori(intPratica); |
|
|
|
@ -46,6 +48,7 @@ public class AdvancedOperationPortlet extends MVCPortlet {
|
|
|
|
|
dettPratica.setModifiedDate(new Date()); |
|
|
|
|
DettPraticaLocalServiceUtil.updateDettPratica(dettPratica); |
|
|
|
|
} |
|
|
|
|
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void fixNormLavoriInProprio(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{ |
|
|
|
@ -63,6 +66,7 @@ public class AdvancedOperationPortlet extends MVCPortlet {
|
|
|
|
|
DettPraticaLocalServiceUtil.updateDettPratica(dettPratica); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void fixCollaudoStatico(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{ |
|
|
|
@ -80,6 +84,7 @@ public class AdvancedOperationPortlet extends MVCPortlet {
|
|
|
|
|
DettPraticaLocalServiceUtil.updateDettPratica(dettPratica); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void fixStatusPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{ |
|
|
|
@ -96,6 +101,7 @@ public class AdvancedOperationPortlet extends MVCPortlet {
|
|
|
|
|
} else { |
|
|
|
|
SessionErrors.add(actionRequest, "operazione-impossibile"); |
|
|
|
|
} |
|
|
|
|
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void ripristinaPraticaVidimata(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{ |
|
|
|
@ -111,6 +117,7 @@ public class AdvancedOperationPortlet extends MVCPortlet {
|
|
|
|
|
SessionErrors.add(actionRequest, "operazione-impossibile"); |
|
|
|
|
throw new Exception("This Pratica is not in status=5, action RIPRISTINA is not available"); |
|
|
|
|
} |
|
|
|
|
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void ripristinaPraticaConforme(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{ |
|
|
|
@ -126,6 +133,7 @@ public class AdvancedOperationPortlet extends MVCPortlet {
|
|
|
|
|
SessionErrors.add(actionRequest, "operazione-impossibile"); |
|
|
|
|
throw new Exception("This Pratica is not in status=5, action RIPRISTINA is not available"); |
|
|
|
|
} |
|
|
|
|
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void deleteDocPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{ |
|
|
|
@ -138,6 +146,7 @@ public class AdvancedOperationPortlet extends MVCPortlet {
|
|
|
|
|
for(DocPratica docPratica : docPraticaOrfani){ |
|
|
|
|
DocPraticaLocalServiceUtil.deleteDocPratica(docPratica); |
|
|
|
|
} |
|
|
|
|
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void findIntPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{ |
|
|
|
|