Confronta commit

..

15 Commit

  1. 1
      .gitignore
  2. BIN
      liferay-plugins-sdk-6.2/dist/portos-bo-shared-6.2.0.1.jar
  3. 4
      liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/easyconf/ClassLoaderComponentConfiguration.java
  4. 1
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/build.xml
  5. BIN
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/itext-xtra-5.5.9.jar
  6. BIN
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/itextpdf-5.5.9.jar
  7. BIN
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar
  8. BIN
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/portos-report-shared.jar
  9. BIN
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/velocity.jar
  10. BIN
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/xmlworker-5.5.9.jar
  11. 82
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/portlet/AdvancedOperationPortlet.java
  12. 79
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/util/AdvancedOperationUtil.java
  13. 10
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/css/main.css
  14. 731
      liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/html/view.jsp
  15. 15
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.settings/org.eclipse.wst.common.component
  16. BIN
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar
  17. 72
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/MailUtil.java
  18. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java
  19. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java
  20. 213
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java
  21. 1
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java

1
.gitignore vendored

@ -24,4 +24,3 @@ liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/.classpath
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/.project
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/.tern-project
*.MD5
service-classes

BIN
liferay-plugins-sdk-6.2/dist/portos-bo-shared-6.2.0.1.jar vendored

File binario non mostrato.

4
liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/easyconf/ClassLoaderComponentConfiguration.java

@ -76,6 +76,10 @@ public class ClassLoaderComponentConfiguration extends ComponentConfiguration {
public ComponentProperties getProperties() {
ComponentProperties componentProperties = _getAvailableProperties();
if(componentProperties == null) {
_log.warn("No properties found for " + _componentName)
}
if (!componentProperties.hasBaseConfiguration()) {
throw new ConfigurationNotFoundException(
_componentName, "The base properties file was not found");

1
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/build.xml

@ -2,6 +2,5 @@
<!DOCTYPE project>
<project name="portos-advanced-operation-portlet" basedir="." default="deploy">
<property name="import.shared" value="portos-report-shared,portos-bo-shared" />
<import file="../build-common-portlet.xml" />
</project>

BIN
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/itext-xtra-5.5.9.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/itextpdf-5.5.9.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/portos-report-shared.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/velocity.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/lib/xmlworker-5.5.9.jar

File binario non mostrato.

82
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/portlet/AdvancedOperationPortlet.java

@ -5,30 +5,26 @@ 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.ArrayUtil;
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;
import com.liferay.portal.kernel.workflow.WorkflowConstants;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.theme.ThemeDisplay;
import com.liferay.portal.util.PortalUtil;
import com.liferay.util.bridges.mvc.MVCPortlet;
import java.util.Date;
import java.util.List;
import it.nextmind.liferay.portos.advanced.operation.util.AdvancedOperationUtil;
import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.IntPratica;
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.service.IntPraticaLocalServiceUtil;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
@ -36,62 +32,20 @@ public class AdvancedOperationPortlet extends MVCPortlet {
private static final Log _log = LogFactoryUtil.getLog(AdvancedOperationPortlet.class);
public void deleteControlloPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
_checkIfUserIsCompanyAdmin(actionRequest);
long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId", 0L);
if (intPraticaId != 0L) {
List<ControlloPratica> controlloPraticaList =
ControlloPraticaLocalServiceUtil.findByIntPratica(intPraticaId);
if(_log.isDebugEnabled()){
_log.debug("AdvancedOperationPortlet --- There are " + controlloPraticaList.size() +" ControlloPratica");
}
for(ControlloPratica cp : controlloPraticaList){
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() +
" with Status " + cp.getStatus() +" of IntPraticaId " + intPraticaId);
ControlloPraticaLocalServiceUtil.deleteControlloPratica(cp);
}
}
}
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId));
}
public void reindexPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
_checkIfUserIsCompanyAdmin(actionRequest);
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId", 0L);
if (intPraticaId != 0L) {
_log.info("AdvancedOperationPortlet --- Reindexing fascicolo of IntPraticaId " + intPraticaId);
IntPraticaLocalServiceUtil.reIndexFasciolo(intPraticaId, themeDisplay.getCompanyId());
}
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId));
}
public void cambiaDataInizioLavori(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
_checkIfUserIsCompanyAdmin(actionRequest);
long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId", -1L);
Date dataInizioLavoriOpera = ParamUtil.getDate(actionRequest, "dataInizioLavoriOperaInput",
DateFormatFactoryUtil.getSimpleDateFormat("yyyy-MM-dd"), null);
Date dataInizioLavoriOpera = ParamUtil.getDate(actionRequest, "dataInizioLavoriOperaInput", null);
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
_log.info("AdvancedOperationPortlet --- Changing DataInizioLavori on DettPraticas of IntPraticaId" + intPraticaId);
List<DettPratica> dettPraticaListWithInizioLavori = AdvancedOperationUtil.fetchDettPraticaListWithInizioLavori(intPratica);
for(DettPratica dettPratica : dettPraticaListWithInizioLavori){
dettPratica.setDataInizioLavoriOpera(dataInizioLavoriOpera);
dettPratica.setModifiedDate(new Date());
DettPraticaLocalServiceUtil.updateDettPratica(dettPratica);
}
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId));
}
public void fixNormLavoriInProprio(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
@ -102,7 +56,6 @@ public class AdvancedOperationPortlet extends MVCPortlet {
boolean normLavoriInProprioFlag = ParamUtil.getBoolean(actionRequest, "normLavoriInProprioFlag");
List<DettPratica> dettPraticaList = DettPraticaLocalServiceUtil.findByIntPraticaId(intPraticaId);
_log.info("AdvancedOperationPortlet --- Fixing NormLavoriInProprio flag of IntPraticaId " + intPraticaId);
for(DettPratica dettPratica : dettPraticaList){
if(dettPratica.getNormLavoriInProprio() == normLavoriInProprioFlag){
dettPratica.setNormLavoriInProprio(!normLavoriInProprioFlag);
@ -110,7 +63,6 @@ public class AdvancedOperationPortlet extends MVCPortlet {
DettPraticaLocalServiceUtil.updateDettPratica(dettPratica);
}
}
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId));
}
public void fixCollaudoStatico(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
@ -121,7 +73,6 @@ public class AdvancedOperationPortlet extends MVCPortlet {
boolean collaudoStaticoFlag = ParamUtil.getBoolean(actionRequest, "collaudoStaticoFlag");
List<DettPratica> dettPraticaList = DettPraticaLocalServiceUtil.findByIntPraticaId(intPraticaId);
_log.info("AdvancedOperationPortlet --- Fixing CollaudoStatico flag of IntPraticaId " + intPraticaId);
for(DettPratica dettPratica : dettPraticaList){
if(dettPratica.getCollaudoStatico() == collaudoStaticoFlag){
dettPratica.setCollaudoStatico(!collaudoStaticoFlag);
@ -129,7 +80,6 @@ public class AdvancedOperationPortlet extends MVCPortlet {
DettPraticaLocalServiceUtil.updateDettPratica(dettPratica);
}
}
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId));
}
public void fixStatusPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
@ -140,17 +90,10 @@ public class AdvancedOperationPortlet extends MVCPortlet {
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
if(WorkflowConstants.STATUS_DRAFT == intPratica.getStatus()){
_log.info("AdvancedOperationPortlet --- Fixing StatusPratica (From DRAFT to PENDING) "
+ "of IntPraticaId " + intPraticaId);
intPratica.setStatus(WorkflowConstants.STATUS_PENDING);
intPratica.setModifiedDate(new Date());
IntPraticaLocalServiceUtil.updateIntPratica(intPratica);
IntPraticaLocalServiceUtil.updateStatus(intPraticaId, WorkflowConstants.STATUS_PENDING);
} else {
_log.info("AdvancedOperationPortlet --- Impossible operation: Fixing StatusPratica (From DRAFT to PENDING) "
+ "of IntPraticaId " + intPraticaId);
SessionErrors.add(actionRequest, "operazione-impossibile");
}
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId));
}
public void ripristinaPraticaVidimata(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
@ -161,14 +104,11 @@ public class AdvancedOperationPortlet extends MVCPortlet {
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
if(WorkflowConstants.STATUS_INCOMPLETE == intPratica.getStatus()){
_log.info("AdvancedOperationPortlet --- Recovering Pratica Vidimata (INCOMPLETE ==> DRAFT) "
+ "with IntPraticaId " + intPraticaId);
_ripristinaPratica(intPratica, WorkflowConstants.STATUS_DRAFT);
} else {
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{
@ -179,14 +119,11 @@ public class AdvancedOperationPortlet extends MVCPortlet {
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
if(WorkflowConstants.STATUS_INCOMPLETE == intPratica.getStatus()){
_log.info("AdvancedOperationPortlet --- Recovering Pratica Vidimata (INCOMPLETE ==> APPROVED) "
+ "with IntPraticaId " + intPraticaId);
_ripristinaPratica(intPratica, WorkflowConstants.STATUS_APPROVED);
} else {
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{
@ -196,14 +133,9 @@ public class AdvancedOperationPortlet extends MVCPortlet {
long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId", -1L);
List<DocPratica> docPraticaOrfani = AdvancedOperationUtil.getDocPraticaOrfani(intPraticaId);
_log.info("AdvancedOperationPortlet --- Deleting Documenti Orfani "
+ "of IntPraticaId " + intPraticaId);
for(DocPratica docPratica : docPraticaOrfani){
_log.info("AdvancedOperationPortlet --- Deleting Documento Orfan " + docPratica.getDocPraticaId()
+ " of IntPraticaId " + intPraticaId);
DocPraticaLocalServiceUtil.deleteDocPratica(docPratica);
}
actionResponse.setRenderParameter("intPraticaId", String.valueOf(intPraticaId));
}
public void findIntPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{

79
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/WEB-INF/src/it/nextmind/liferay/portos/advanced/operation/util/AdvancedOperationUtil.java

@ -1,28 +1,18 @@
package it.nextmind.liferay.portos.advanced.operation.util;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil;
import com.liferay.portal.kernel.exception.PortalException;
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.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants;
import com.liferay.portal.kernel.workflow.WorkflowTask;
import com.liferay.portal.kernel.workflow.WorkflowTaskManagerUtil;
import com.liferay.portal.model.WorkflowInstanceLink;
import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil;
import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.IntPratica;
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.util.ArrayList;
import java.util.Date;
@ -30,73 +20,7 @@ import java.util.List;
public class AdvancedOperationUtil {
public static final int[] STATUS_ARRAY =
{WorkflowConstants.STATUS_DRAFT, WorkflowConstants.STATUS_INACTIVE, WorkflowConstants.STATUS_PENDING};
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();
for(int i : STATUS_ARRAY){
List<ControlloPratica> controlloPraticas =
ControlloPraticaLocalServiceUtil.findByIntPraticaId_Status(intPraticaId, i);
if(!controlloPraticas.isEmpty()){
return true;
}
}
} catch (SystemException e){
_log.error(e,e);
return false;
}
}
return false;
}
public static List<WorkflowTask> getListaTask(IntPratica intPratica) {
if(Validator.isNull(intPratica)){
return null;
}
try {
ControlloPratica controlloPratica = null;
List<ControlloPratica> controlloPraticaList =
ControlloPraticaLocalServiceUtil.findByIntPraticaId_Status(intPratica.getIntPraticaId(), intPratica.getStatus());
if(controlloPraticaList.size() > 1){
for(ControlloPratica cp : controlloPraticaList){
if(Validator.isNull(controlloPratica) || cp.getCreateDate().after(controlloPratica.getCreateDate())) {
controlloPratica = cp;
}
}
} else if(controlloPraticaList.size() == 1){
controlloPratica = controlloPraticaList.get(0);
} else {
return null;
}
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(
controlloPratica.getCompanyId(),controlloPratica.getGroupId(), ControlloPratica.class.getName(),
controlloPratica.getPrimaryKey());
List<WorkflowTask> listaTask = null;
if (workflowInstanceLink == null) {
return null;
} else {
return listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null,
workflowInstanceLink.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
}
} catch (SystemException | PortalException e){
_log.error(e,e);
return null;
}
}
public static boolean isPraticaAnnullata(IntPratica intPratica){
if(Validator.isNotNull(intPratica)){
@ -110,8 +34,7 @@ public class AdvancedOperationUtil {
try {
List<DocPratica> docPraticaList = DocPraticaLocalServiceUtil.findByIntPratica(intPraticaId);
for(DocPratica docPratica : docPraticaList){
if(Validator.isNull(DettPraticaLocalServiceUtil.fetchDettPratica(docPratica.getClassPk()))
&& DettPratica.class.getName().equals(docPratica.getClassName())){
if(Validator.isNull(DettPraticaLocalServiceUtil.fetchDettPratica(docPratica.getClassPk()))){
docPraticaOrfaniList.add(docPratica);
}
}

10
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/css/main.css

@ -1,10 +0,0 @@
.title-text{
font-weight: bold;
}
#impersonaSoggettiBtn{
cursor: pointer;
}

731
liferay-plugins-sdk-6.2/portlets/portos-advanced-operation-portlet/docroot/html/view.jsp

@ -1,25 +1,3 @@
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.User"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<%@page import="javax.portlet.PortletMode"%>
<%@page import="com.liferay.portal.util.PortletKeys"%>
<%@page import="javax.portlet.PortletRequest"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="com.liferay.portal.model.Group"%>
<%@page import="com.liferay.portlet.PortletURLFactoryUtil"%>
<%@page import="com.liferay.portal.service.LayoutLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.GroupConstants"%>
<%@page import="com.liferay.portal.service.GroupLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.ControlloPratica"%>
<%@page import="it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.WorkflowInstanceLink"%>
<%@page import="com.liferay.portal.kernel.workflow.WorkflowTask"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.tref.liferay.portos.bo.util.SoggettiUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@page import="com.liferay.portal.kernel.util.DateFormatFactoryUtil"%>
<%@page import="java.util.Date"%>
<%@page import="com.liferay.portal.util.PortalUtil"%>
@ -88,475 +66,282 @@
<aui:row style="margin-top: 10px" id="praticaAdminDiv">
<aui:row id="praticaRecapDiv">
<aui:row>
<liferay-security:doAsURL
doAsUserId="<%= intPratica.getUserId() %>"
var="impersonateUserURL">
</liferay-security:doAsURL>
<aui:col span="3">
<p style="font-size: 30px; margin: 20px 0;">
<b>Pratica:</b> <%= intPraticaId %>
<liferay-ui:icon
image="impersonate_user"
target="_blank"
url="<%= impersonateUserURL %>">
</liferay-ui:icon>
</p>
</aui:col>
</aui:row>
<aui:row>
<div class="module-group">
<liferay-ui:panel title="DETTAGLI" collapsible="false" extended="true">
<aui:row>
<aui:col span="2">
<p><b>Numero Progetto:</b> <%= intPratica.getNumeroProgetto() %></p>
</aui:col>
<aui:col span="2">
<p><b>Username:</b> <%= intPratica.getUserName() %></p>
</aui:col>
<aui:col span="2">
<p><b>Tipo Pratica:</b> <%= intPratica.getTipoPratica() %></p>
</aui:col>
<aui:col span="2">
<p><b>ID Territorio:</b> <%= intPratica.getTerritorioId() %></p>
</aui:col>
</aui:row>
<aui:row>
<aui:col span="2">
<p><b>Tipo Procedura:</b> <%= intPratica.getTipoProcedura() %></p>
</aui:col>
<aui:col span="2">
<p><b>Stato Pratica:</b> <%= intPratica.getStatoPratica() %></p>
</aui:col>
<aui:col span="2">
<p><b>Validata:</b> <%= intPratica.getValidata() %></p>
</aui:col>
<aui:col span="2">
<p><b>Esito Controllo:</b> <%= intPratica.getEsitoControllo() %></p>
</aui:col>
</aui:row>
<aui:row>
<aui:col span="2">
<p><b>Status:</b> <%= intPratica.getStatus() %></p>
</aui:col>
</aui:row>
<%
Date dataInizioLavoriOpera = AdvancedOperationUtil.fetchDataInizioLavoriOpera(intPratica);
if(Validator.isNotNull(dataInizioLavoriOpera)){
%>
<aui:row>
<liferay-portlet:actionURL
name="cambiaDataInizioLavori"
var="cambiaDataInizioLavoriURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionDataInizio = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"cambiaDataInizioLavori','Sei sicuro di voler modificare la DATA di INIZIO LAVORI?')";
%>
<aui:form action="<%= cambiaDataInizioLavoriURL %>" method="post" name="cambiaDataInizioLavori">
<div style="display:flex;">
<p><b>Data inizio Lavori Opera:</b></p>
<aui:input
name="dataInizioLavoriOperaInput"
label=""
inlineLabel="left"
type="date"
value='<%= DateFormatFactoryUtil.getSimpleDateFormat("yyyy-MM-dd").format(dataInizioLavoriOpera) %>'>
</aui:input>
<div>
<aui:button
name="cambiaDataInizioLavoriBtn"
cssClass="btn-primary"
type="button"
value="Cambia"
onClick='<%= functionDataInizio %>'/>
</div>
</div>
</aui:form>
</aui:row>
<% } %>
<aui:row>
<div style="display:flex;">
<% if(AdvancedOperationUtil.hasDettPratica(intPraticaId)){
boolean normLavoriInProprioFlag = AdvancedOperationUtil.getNormLavoriInProprioFlag(intPraticaId);
%>
<div style="margin-right: 50px;">
<liferay-portlet:actionURL
name="fixNormLavoriInProprio"
var="fixNormLavoriInProprioURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="normLavoriInProprioFlag" value="<%= String.valueOf(normLavoriInProprioFlag) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionLavori = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"fixLavoriInEconomia','Sei sicuro di voler cambiare i flag LAVORI IN ECONOMIA di questa pratica?')";
%>
<aui:form action="<%= fixNormLavoriInProprioURL %>" method="post" name="fixLavoriInEconomia">
<aui:button
name="normLavoriInProprioBtn"
cssClass="btn-primary"
type="button"
value="<%= AdvancedOperationUtil.getLavoriInEconomiaBtnLabel(normLavoriInProprioFlag) %>"
onClick='<%= functionLavori %>'/>
</aui:form>
</div>
<% } %>
<% if(AdvancedOperationUtil.hasDettPratica(intPraticaId)){
boolean collaudoStaticoFlag = AdvancedOperationUtil.getCollaudoStaticoFlag(intPraticaId);
%>
<div style="margin-right: 50px;">
<liferay-portlet:actionURL
name="fixCollaudoStatico"
var="fixCollaudoStaticoURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="collaudoStaticoFlag" value="<%= String.valueOf(collaudoStaticoFlag) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionCollaudoStatico = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"fixCollaudoStatico','Sei sicuro di voler cambiare i flag COLLAUDO STATICO di questa pratica?')";
%>
<aui:form action="<%= fixCollaudoStaticoURL %>" method="post" name="fixCollaudoStatico">
<aui:button
name="fixCollaudoStaticoBtn"
cssClass="btn-primary"
type="button"
value="<%= AdvancedOperationUtil.getCollaudoStaticoBtnLabel(collaudoStaticoFlag) %>"
onClick='<%= functionCollaudoStatico %>'/>
</aui:form>
</div>
<% } %>
<% if(AdvancedOperationUtil.isStatoPraticaIN(intPratica)){ %>
<div style="margin-right: 50px;">
<liferay-portlet:actionURL
name="fixStatusPratica"
var="fixStatusPraticaURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionStatus = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"fixStatusPratica','Sei sicuro di voler modificare lo status di questa pratica?')";
%>
<aui:form action="<%= fixStatusPraticaURL %>" method="post" name="fixStatusPratica">
<aui:button
type="button"
cssClass="btn-primary"
name="fixStatusPraticaBtn"
onClick='<%= functionStatus %>'
value="Fixa lo STATUS"
>
</aui:button>
</aui:form>
</div>
<% } %>
<% if(AdvancedOperationUtil.hasControlloPratica_ProceduraC(intPratica) &&
AdvancedOperationUtil.isNotWorkflowManuallyStarted(intPratica)){ %>
<div style="margin-right: 50px;">
<liferay-portlet:actionURL
name="deleteControlloPratica"
var="deleteControlloPraticaURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionControlloPratica = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"deleteControlloPratica','Sei sicuro di voler eliminare questo ControlloPratica ed il relativo WorkFlow?')";
%>
<aui:form action="<%= deleteControlloPraticaURL %>" method="post" name="deleteControlloPratica">
<aui:button
type="button"
cssClass="btn-primary"
name="deleteControlloPraticaBtn"
onClick='<%= functionControlloPratica %>'
value="Elimina WorkFlow"
>
</aui:button>
</aui:form>
</div>
<% } %>
<% if(AdvancedOperationUtil.isPraticaAnnullata(intPratica)){ %>
<div style="margin-right: 50px;">
<liferay-portlet:actionURL
name="ripristinaPraticaVidimata"
var="ripristinaPraticaVidimataURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionRipristinaVidimata = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"ripristinaPraticaVidimata','Sei sicuro di voler ripristinare questa pratica come VIDIMATA?')";
%>
<aui:form action="<%= ripristinaPraticaVidimataURL %>" method="post" name="ripristinaPraticaVidimata">
<aui:button
type="button"
cssClass="btn-primary"
name="ripristinaPraticaVidimataBtn"
onClick='<%= functionRipristinaVidimata %>'
value="Ripristina come VIDIMATA"
>
</aui:button>
</aui:form>
</div>
<div style="margin-right: 50px;">
<liferay-portlet:actionURL
name="ripristinaPraticaConforme"
var="ripristinaPraticaConformeURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionRipristinaConforme = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"ripristinaPraticaConforme','Sei sicuro di voler ripristinare questa pratica come AUTORIZZATA/CONFORME?')";
%>
<aui:form action="<%= ripristinaPraticaConformeURL %>" method="post" name="ripristinaPraticaConforme">
<aui:button
type="button"
cssClass="btn-primary"
name="ripristinaPraticaConformeBtn"
onClick='<%= functionRipristinaConforme %>'
value="Ripristina come AUTORIZZATA/CONFORME"
>
</aui:button>
</aui:form>
</div>
<% } %>
</div>
</aui:row>
</liferay-ui:panel>
</div>
<div class="module-group">
<liferay-ui:panel title="REINDICIZZAZIONE" extended="true" collapsible="false">
<aui:row>
<liferay-portlet:actionURL
name="reindexPratica"
var="reindexPraticaURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionReindex = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"reindexPratica','Sei sicuro di voler reindicizzare questa pratica?')";
%>
<aui:form action="<%= reindexPraticaURL %>" method="post" name="reindexPratica">
<aui:col span="2">
<p><b>Numero Progetto:</b> <%= intPratica.getNumeroProgetto() %></p>
</aui:col>
<aui:col span="2">
<p><b>Username:</b> <%= intPratica.getUserName() %></p>
</aui:col>
<aui:col span="2">
<p><b>Tipo Pratica:</b> <%= intPratica.getTipoPratica() %></p>
</aui:col>
<aui:col span="2">
<p><b>ID Territorio:</b> <%= intPratica.getTerritorioId() %></p>
</aui:col>
</aui:row>
<aui:row>
<aui:col span="2">
<p><b>Tipo Procedura:</b> <%= intPratica.getTipoProcedura() %></p>
</aui:col>
<aui:col span="2">
<p><b>Stato Pratica:</b> <%= intPratica.getStatoPratica() %></p>
</aui:col>
<aui:col span="2">
<p><b>Validata:</b> <%= intPratica.getValidata() %></p>
</aui:col>
<aui:col span="2">
<p><b>Esito Controllo:</b> <%= intPratica.getEsitoControllo() %></p>
</aui:col>
</aui:row>
<aui:row>
<aui:col span="2">
<p><b>Status:</b> <%= intPratica.getStatus() %></p>
</aui:col>
</aui:row>
<%
Date dataInizioLavoriOpera = AdvancedOperationUtil.fetchDataInizioLavoriOpera(intPratica);
if(Validator.isNotNull(dataInizioLavoriOpera)){
%>
<aui:row>
<liferay-portlet:actionURL
name="cambiaDataInizioLavori"
var="cambiaDataInizioLavoriURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionDataInizio = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"cambiaDataInizioLavori','Sei sicuro di voler modificare la DATA di INIZIO LAVORI?')";
%>
<aui:form action="<%= cambiaDataInizioLavoriURL %>" method="post" name="cambiaDataInizioLavori">
<div style="display:flex;">
<aui:input
name="dataInizioLavoriOperaInput"
label="Data inizio Lavori Opera"
inlineLabel="left"
type="date"
value='<%= DateFormatFactoryUtil.getSimpleDateFormat("yyyy-MM-dd").format(dataInizioLavoriOpera) %>'>
</aui:input>
<div>
<aui:button
type="button"
name="cambiaDataInizioLavoriBtn"
cssClass="btn-primary"
name="reindexPraticaBtn"
onClick='<%= functionReindex %>'
value="Reindicizza Pratica"
>
</aui:button>
</aui:form>
</aui:row>
</liferay-ui:panel>
</div>
<div class="module-group">
<liferay-ui:panel title="IMPERSONAMENTO" extended="true" collapsible="false">
<aui:row>
<div style="display:flex;">
<liferay-security:doAsURL
doAsUserId="<%= intPratica.getUserId() %>"
var="impersonateUserURL">
</liferay-security:doAsURL>
<div style=" margin-right: 15px;">
<p><b>Impersona titolare:</b></p>
</div>
<liferay-ui:icon
image="impersonate_user"
target="_blank"
url="<%= impersonateUserURL %>">
</liferay-ui:icon>
type="button"
value="Cambia"
onClick='<%= functionDataInizio %>'/>
</div>
</aui:row>
<% if(SoggettoLocalServiceUtil.countByIntPratica(intPraticaId) > 1){ %>
<aui:row>
<div style="display:flex;">
<div style=" margin-right: 15px;">
<p><b>Impersona soggetti:</b></p>
</div>
<liferay-ui:icon
id="impersonaSoggettiBtn"
image="team_icon"
message="Visualizza Soggetti"
target="_blank"
>
</liferay-ui:icon>
</div>
</aui:row>
<aui:row>
<div id="sc-soggetti-da-impersonare" class="hide">
<liferay-ui:search-container emptyResultsMessage="Nessun soggetto disponibile">
<liferay-ui:search-container-results
results="<%= SoggettoLocalServiceUtil.findByIntPratica(intPraticaId) %>"
total="<%= SoggettoLocalServiceUtil.countByIntPratica(intPraticaId) %>"
/>
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.Soggetto" modelVar="soggetto">
<liferay-security:doAsURL
doAsUserId="<%= soggetto.getUserId() %>"
var="impersonateSoggettoURL">
</liferay-security:doAsURL>
<liferay-ui:search-container-column-text name="RUOLO">
<%= soggetto.getFullTipologiaSoggetto() %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="DENOMINAZIONE">
<%= soggetto.getDescrizioneCompleta() %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="AGGIUNTO DA">
<%
DettPratica adding = DettPraticaLocalServiceUtil.fetchDettPratica(soggetto.getDettPraticaId());
if (adding != null) {
out.print(adding.getFullDescription());
}
%>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="IMPERSONA" cssClass="text-center text-nowrap">
<liferay-ui:icon
image="impersonate_user"
message="Impersona Soggetto"
target="_blank"
url="<%= impersonateSoggettoURL %>"
>
</liferay-ui:icon>
</liferay-ui:search-container-column-text>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="false" />
</liferay-ui:search-container>
</div>
</aui:row>
<% } %>
</liferay-ui:panel>
</div>
<div class="module-group">
</div>
</aui:form>
</aui:row>
<% } %>
<aui:row>
<% if(AdvancedOperationUtil.hasDettPratica(intPraticaId)){
boolean normLavoriInProprioFlag = AdvancedOperationUtil.getNormLavoriInProprioFlag(intPraticaId);
%>
<aui:col span="3">
<liferay-portlet:actionURL
name="fixNormLavoriInProprio"
var="fixNormLavoriInProprioURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="normLavoriInProprioFlag" value="<%= String.valueOf(normLavoriInProprioFlag) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
List<WorkflowTask> listaTask = AdvancedOperationUtil.getListaTask(intPratica);
if(Validator.isNotNull(listaTask) && !listaTask.isEmpty()){
String functionLavori = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"fixLavoriInEconomia','Sei sicuro di voler cambiare i flag LAVORI IN ECONOMIA di questa pratica?')";
%>
<liferay-ui:panel title="GESTIONE ATTIVITÀ" extended="true" collapsible="false">
<aui:row>
<div style="display:flex;">
<div style=" margin-right: 15px;">
<p><b>Gestisci ultima attività:</b></p>
</div>
<%
Group controlPanelGroup = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.CONTROL_PANEL);
long controlPanelPlid = LayoutLocalServiceUtil.getDefaultPlid(controlPanelGroup.getGroupId(),true);
PortletURL workflowTaskURL = PortletURLFactoryUtil.create(request, PortletKeys.MY_WORKFLOW_TASKS,
controlPanelPlid, PortletRequest.RENDER_PHASE);
workflowTaskURL.setParameter("struts_action", "/my_workflow_tasks/edit_workflow_task");
workflowTaskURL.setParameter("workflowTaskId", String.valueOf(listaTask.get(0).getWorkflowTaskId()));
workflowTaskURL.setPortletMode(PortletMode.VIEW);
workflowTaskURL.setWindowState(LiferayWindowState.POP_UP);
%>
<div title='<%= LanguageUtil.get(pageContext,"workflow-action-manage") %>' class="tooltip-info">
<liferay-ui:icon
useDialog="true"
image="action_right"
message="Gestisci Attività"
url='<%= workflowTaskURL.toString() + "&controlPanelCategory=my" %>'
/>
</div>
</div>
</aui:row>
<%
if(intPratica.getStatusByUserId() != 0L ){
User tecnico = UserLocalServiceUtil.fetchUser(intPratica.getStatusByUserId());
if (Validator.isNotNull(tecnico)) {
<aui:form action="<%= fixNormLavoriInProprioURL %>" method="post" name="fixLavoriInEconomia">
<aui:button
name="normLavoriInProprioBtn"
cssClass="btn-primary"
type="button"
value="<%= AdvancedOperationUtil.getLavoriInEconomiaBtnLabel(normLavoriInProprioFlag) %>"
onClick='<%= functionLavori %>'/>
</aui:form>
</aui:col>
<% } %>
%>
<aui:row>
<div style="display:flex;">
<liferay-security:doAsURL
doAsUserId="<%= tecnico.getUserId() %>"
var="impersonateIstruttoreURL">
</liferay-security:doAsURL>
<div style=" margin-right: 15px;">
<p><b>Impersona Istruttore:</b></p>
</div>
<liferay-ui:icon
image="impersonate_user"
target="_blank"
message="Impersona Istruttore"
url="<%= impersonateIstruttoreURL %>">
</liferay-ui:icon>
</div>
</aui:row>
<%
}
}
%>
</liferay-ui:panel>
<% if(AdvancedOperationUtil.hasDettPratica(intPraticaId)){
boolean collaudoStaticoFlag = AdvancedOperationUtil.getCollaudoStaticoFlag(intPraticaId);
%>
<aui:col span="3">
<liferay-portlet:actionURL
name="fixCollaudoStatico"
var="fixCollaudoStaticoURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="collaudoStaticoFlag" value="<%= String.valueOf(collaudoStaticoFlag) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
}
String functionCollaudoStatico = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"fixCollaudoStatico','Sei sicuro di voler cambiare i flag COLLAUDO STATICO di questa pratica?')";
%>
</div>
</aui:row>
<aui:row id="docPraticaDiv">
<div class="module-group">
<liferay-ui:panel title="DOCUMENTI ORFANI" collapsible="false" extended="true">
<aui:form action="<%= fixCollaudoStaticoURL %>" method="post" name="fixCollaudoStatico">
<aui:button
name="fixCollaudoStaticoBtn"
cssClass="btn-primary"
type="button"
value="<%= AdvancedOperationUtil.getCollaudoStaticoBtnLabel(collaudoStaticoFlag) %>"
onClick='<%= functionCollaudoStatico %>'/>
</aui:form>
</aui:col>
<% } %>
<% if(AdvancedOperationUtil.isStatoPraticaIN(intPratica)){ %>
<aui:col span="3">
<liferay-portlet:actionURL
name="fixStatusPratica"
var="fixStatusPraticaURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
List<DocPratica> docPraticaList = DocPraticaLocalServiceUtil.findByIntPratica(intPraticaId);
String functionStatus = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"fixStatusPratica','Sei sicuro di voler modificare lo status di questa pratica?')";
%>
<h2>Documenti Totali: <%= docPraticaList.size() %></h2>
<aui:form action="<%= fixStatusPraticaURL %>" method="post" name="fixStatusPratica">
<aui:button
type="button"
cssClass="btn-primary"
name="fixStatusPraticaBtn"
onClick='<%= functionStatus %>'
value="Fixa lo STATUS"
>
</aui:button>
</aui:form>
</aui:col>
<% } %>
<% if(AdvancedOperationUtil.isPraticaAnnullata(intPratica)){ %>
<aui:col span="3">
<liferay-portlet:actionURL
name="ripristinaPraticaVidimata"
var="ripristinaPraticaVidimataURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
List<DocPratica> docPraticaOrfaniList = AdvancedOperationUtil.getDocPraticaOrfani(intPraticaId);
if(!docPraticaOrfaniList.isEmpty()){
String functionRipristinaVidimata = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"ripristinaPraticaVidimata','Sei sicuro di voler ripristinare questa pratica come VIDIMATA?')";
%>
<liferay-portlet:actionURL
name="deleteDocPratica"
var="deleteDocPraticaURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<aui:row>
<h2>Documenti orfani di DettPratica: <%= docPraticaOrfaniList.size() %></h2>
<aui:row>
<aui:col span="2">
<h3>DlFileEntryId</h3>
</aui:col>
<aui:col span="2">
<h3>docPraticaId</h3>
</aui:col>
<aui:col span="2">
<h3>dettPraticaId</h3>
</aui:col>
<aui:col span="6">
<h3>FileName</h3>
</aui:col>
</aui:row>
<aui:form action="<%= ripristinaPraticaVidimataURL %>" method="post" name="ripristinaPraticaVidimata">
<aui:button
type="button"
cssClass="btn-primary"
name="ripristinaPraticaVidimataBtn"
onClick='<%= functionRipristinaVidimata %>'
value="Ripristina come VIDIMATA"
>
</aui:button>
</aui:form>
</aui:col>
<aui:col span="3">
<liferay-portlet:actionURL
name="ripristinaPraticaConforme"
var="ripristinaPraticaConformeURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionRipristinaConforme = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"ripristinaPraticaConforme','Sei sicuro di voler ripristinare questa pratica come AUTORIZZATA/CONFORME?')";
%>
<aui:form action="<%= ripristinaPraticaConformeURL %>" method="post" name="ripristinaPraticaConforme">
<aui:button
type="button"
cssClass="btn-primary"
name="ripristinaPraticaConformeBtn"
onClick='<%= functionRipristinaConforme %>'
value="Ripristina come AUTORIZZATA/CONFORME"
>
</aui:button>
</aui:form>
</aui:col>
<% } %>
</aui:row>
</aui:row>
<aui:row id="docPraticaDiv">
<%
List<DocPratica> docPraticaList = DocPraticaLocalServiceUtil.findByIntPratica(intPraticaId);
%>
<h2>Documenti Totali: <%= docPraticaList.size() %></h2>
<%
List<DocPratica> docPraticaOrfaniList = AdvancedOperationUtil.getDocPraticaOrfani(intPraticaId);
if(!docPraticaOrfaniList.isEmpty()){
%>
<liferay-portlet:actionURL
name="deleteDocPratica"
var="deleteDocPraticaURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<aui:row>
<h2>Documenti orfani di DettPratica: <%= docPraticaOrfaniList.size() %></h2>
<aui:row>
<aui:col span="2">
<h3>DlFileEntryId</h3>
</aui:col>
<aui:col span="2">
<h3>docPraticaId</h3>
</aui:col>
<aui:col span="2">
<h3>dettPraticaId</h3>
</aui:col>
<aui:col span="6">
<h3>FileName</h3>
</aui:col>
</aui:row>
<%
for(DocPratica docPratica : docPraticaOrfaniList){
if(Validator.isNotNull(docPratica)){
%>
<aui:row>
<aui:col span="2">
<p><%= docPratica.getDlFileEntryId() %></p>
</aui:col>
<aui:col span="2">
<p><%= docPratica.getDocPraticaId() %></p>
</aui:col>
<aui:col span="2">
<p><%= docPratica.getClassPk() %></p>
</aui:col>
<aui:col span="6">
<p><%= docPratica.getFileName() %></p>
</aui:col>
</aui:row>
<%
}
}
%>
<%
String functionEliminaDoc = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"deleteDocPratica','Sei sicuro di voler eliminare tutti i documenti?')";
%>
<aui:form action="<%= deleteDocPraticaURL %>" method="post" name="deleteDocPratica">
<aui:button-row>
<aui:button
type="button"
name="deleteDocPraticaBtn"
cssClass="btn-primary"
onClick='<%= functionEliminaDoc %>'
value="Elimina tutti">
</aui:button>
</aui:button-row>
</aui:form>
<%
for(DocPratica docPratica : docPraticaOrfaniList){
if(Validator.isNotNull(docPratica)){
%>
<aui:row>
<aui:col span="2">
<p><%= docPratica.getDlFileEntryId() %></p>
</aui:col>
<aui:col span="2">
<p><%= docPratica.getDocPraticaId() %></p>
</aui:col>
<aui:col span="2">
<p><%= docPratica.getClassPk() %></p>
</aui:col>
<aui:col span="6">
<p><%= docPratica.getFileName() %></p>
</aui:col>
</aui:row>
</liferay-ui:panel>
</div>
<%
}
}
%>
</aui:row>
<%
String functionEliminaDoc = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"deleteDocPratica','Sei sicuro di voler eliminare tutti i documenti?')";
%>
<aui:form action="<%= deleteDocPraticaURL %>" method="post" name="deleteDocPratica">
<aui:button-row>
<aui:button
type="button"
name="deleteDocPraticaBtn"
cssClass="btn-primary"
onClick='<%= functionEliminaDoc %>'
value="Elimina tutti">
</aui:button>
</aui:button-row>
</aui:form>
</aui:row>
<%
}
%>
</aui:row>
</aui:row>
<% } %>
@ -572,18 +357,6 @@
<aui:script use="event-valuechange,aui-modal,aui-io-request">
<% if(Validator.isNotNull(intPratica)){ %>
A.one('#impersonaSoggettiBtn').on('click', function(){
var soggettoDiv = A.one('#sc-soggetti-da-impersonare');
if(soggettoDiv.hasClass('hide')){
soggettoDiv.show();
} else {
soggettoDiv.hide();
}
});
<% } %>
A.one('#<portlet:namespace />intPraticaId').on('valuechange', function(e){
if(e.newVal <= 0 ){
A.one('#<portlet:namespace />numeroProgetto').attr('disabled', false);

15
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.settings/org.eclipse.wst.common.component

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="portos-bo-portlet">
<wb-resource deploy-path="/" source-path="/docroot" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/docroot/WEB-INF/src"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/docroot/WEB-INF/service"/>
<dependent-module archiveName="portos-kaleo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-kaleo-portlet/docroot/WEB-INF/lib/portos-kaleo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-mail-manager-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-mail-manager-portlet/docroot/WEB-INF/lib/portos-mail-manager-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="portos-bo-portlet"/>
<property name="java-output-path" value="/portos-bo-portlet/docroot/WEB-INF/classes"/>
</wb-module>
</project-modules>

BIN
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar

File binario non mostrato.

72
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/MailUtil.java

@ -161,37 +161,43 @@ public class MailUtil {
intPraticaId = parereGeologo.getIntPraticaId();
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
User tecnicoIstruttore = recuperaTecnicoIstruttore(intPratica);
_log.info("email tecnico istruttore=" + tecnicoIstruttore.getEmailAddress());
String[] to = { tecnicoIstruttore.getEmailAddress() };
String[] cc = new String[0];
String[] ccn = new String[0];
// recupero dati
String tipoPratica = StringPool.BLANK;
if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) {
tipoPratica = LanguageUtil.get(LocaleUtil.ITALIAN, "tipo-pratica-01");
} else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) {
tipoPratica = LanguageUtil.get(LocaleUtil.ITALIAN, "tipo-pratica-02");
if(tecnicoIstruttore != null){
_log.info("email tecnico istruttore=" + tecnicoIstruttore.getEmailAddress());
String[] to = { tecnicoIstruttore.getEmailAddress() };
String[] cc = new String[0];
String[] ccn = new String[0];
// recupero dati
String tipoPratica = StringPool.BLANK;
if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) {
tipoPratica = LanguageUtil.get(LocaleUtil.ITALIAN, "tipo-pratica-01");
} else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) {
tipoPratica = LanguageUtil.get(LocaleUtil.ITALIAN, "tipo-pratica-02");
}
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(),
territorio.getCodiceProvincia());
JSONObject templateVariables = JSONFactoryUtil.createJSONObject();
templateVariables.put("receiver", tecnicoIstruttore.getFullName());
templateVariables.put("tipoPratica", tipoPratica);
templateVariables.put("tipoOggetto", "Risposta a Richiesta Parere Geologo");
templateVariables
.put("dataInvio",
FastDateFormatFactoryUtil.getSimpleDateFormat("dd/MM/yyyy HH:mm").format(
parereGeologo.getDtCompilazione() != null ? parereGeologo.getDtCompilazione()
: new Date()));
templateVariables.put("praticaNum", intPratica.getNumeroProgetto());
templateVariables.put("provincia", provincia.getProvincia());
templateVariables.put("comune", comune.getDenominazione());
String className = ParereGeologo.class.getName();
long classPk = parereGeologoId;
MailManagerUtil.sendMailByTemplatName(className, classPk, "NOTIFICA-BO", to, cc, ccn, templateVariables,
null, serviceContext);
} else {
_log.warn("invioNotificaIstruttoreByGeologo - Tecnico istruttore mancante per pratica id="
+ intPraticaId);
}
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(),
territorio.getCodiceProvincia());
JSONObject templateVariables = JSONFactoryUtil.createJSONObject();
templateVariables.put("receiver", tecnicoIstruttore.getFullName());
templateVariables.put("tipoPratica", tipoPratica);
templateVariables.put("tipoOggetto", "Risposta a Richiesta Parere Geologo");
templateVariables
.put("dataInvio",
FastDateFormatFactoryUtil.getSimpleDateFormat("dd/MM/yyyy HH:mm").format(
parereGeologo.getDtCompilazione() != null ? parereGeologo.getDtCompilazione()
: new Date()));
templateVariables.put("praticaNum", intPratica.getNumeroProgetto());
templateVariables.put("provincia", provincia.getProvincia());
templateVariables.put("comune", comune.getDenominazione());
String className = ParereGeologo.class.getName();
long classPk = parereGeologoId;
MailManagerUtil.sendMailByTemplatName(className, classPk, "NOTIFICA-BO", to, cc, ccn, templateVariables,
null, serviceContext);
} catch (Exception e) {
_log.error("invioNotificaIstruttoreByGeologo - Errore invio mail al tecnico istruttore per pratica id="
+ intPraticaId, e);
@ -248,8 +254,10 @@ public class MailUtil {
User istruttoreUser = null;
if (Validator.isNotNull(statusByUserId) && intPratica.getStatus() != WorkflowConstants.STATUS_DRAFT) {
istruttoreUser = UserLocalServiceUtil.getUser(statusByUserId);
_log.info("istruttore pratica id=" + intPratica.getIntPraticaId() + ":" + istruttoreUser.getScreenName()
+ " " + istruttoreUser.getEmailAddress());
if(istruttoreUser != null){
_log.info("istruttore pratica id=" + intPratica.getIntPraticaId() + ":" + istruttoreUser.getScreenName()
+ " " + istruttoreUser.getEmailAddress());
}
}
return istruttoreUser;
}

8
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java

@ -256,9 +256,11 @@ public class WorkflowUtil {
ControlloPratica controlloPratica) throws PortalException, SystemException {
WorkflowTask workflowTask = getLastTask(companyId, groupId, null, controlloPratica);
Map<String, Serializable> workflowContext = getWorkflowContext(controlloPratica);
WorkflowTaskManagerUtil.assignWorkflowTaskToUser(companyId, assegnatoreUserId,
workflowTask.getWorkflowTaskId(), istruttoreId, StringPool.BLANK, null, workflowContext);
if(workflowTask != null) {
Map<String, Serializable> workflowContext = getWorkflowContext(controlloPratica);
WorkflowTaskManagerUtil.assignWorkflowTaskToUser(companyId, assegnatoreUserId,
workflowTask.getWorkflowTaskId(), istruttoreId, StringPool.BLANK, null, workflowContext);
}
}
public static Map<String, Serializable> getWorkflowContext(ControlloPratica controlloPratica)

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java

@ -1089,7 +1089,9 @@ public class ManutenzioneDatabase {
try {
instance = WorkflowInstanceManagerUtil.getWorkflowInstance(link.getCompanyId(),
link.getWorkflowInstanceId());
} catch (PortalException e) {}
} catch (PortalException e) {
_log.error(e, e);
}
if (Validator.isNull(instance)) {
WorkflowInstanceLinkLocalServiceUtil.deleteWorkflowInstanceLink(link);
} else {

213
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java

@ -726,13 +726,15 @@ public class SismicaUtil {
+ pratica.getNumeroProgetto() + ": " + e2.getMessage());
}
}
controllo.setStatus(WorkflowConstants.STATUS_APPROVED);
AvvisoLocalServiceUtil.addAvviso(pratica.getIntPraticaId(),
"Attestazione di deposito progetto", new Date(), AvvisoUtil.TIPO_AVVISO_DIRETTO,
StatoPraticaConstants.CONFORME, fileEntryIdTemplate, dettPratica.getDettPraticaId(),
DettPratica.class.getName(), controllo.getControlloPraticaId(), serviceContext);
pratica.setStatoPratica(StatoPraticaConstants.CONFORME);
IntPraticaLocalServiceUtil.updateIntPratica(pratica);
if(controllo != null){
controllo.setStatus(WorkflowConstants.STATUS_APPROVED);
AvvisoLocalServiceUtil.addAvviso(pratica.getIntPraticaId(),
"Attestazione di deposito progetto", new Date(), AvvisoUtil.TIPO_AVVISO_DIRETTO,
StatoPraticaConstants.CONFORME, fileEntryIdTemplate, dettPratica.getDettPraticaId(),
DettPratica.class.getName(), controllo.getControlloPraticaId(), serviceContext);
pratica.setStatoPratica(StatoPraticaConstants.CONFORME);
IntPraticaLocalServiceUtil.updateIntPratica(pratica);
}
}
}
} catch (PortalException | SystemException e) {
@ -958,7 +960,7 @@ public class SismicaUtil {
if (tokens.contains(controllo.getControlloPraticaId()))
tokenCount++;
}
if (0 == tokenCount) {
if (0 == tokenCount && Validator.isNotNull(last)) {
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(last.getCompanyId());
serviceContext.setScopeGroupId(last.getGroupId());
@ -1266,53 +1268,56 @@ public class SismicaUtil {
public static List<String> resetFirme(long companyId, String numeroProgetto) throws SystemException,
PortalException {
List<String> esito = new ArrayList<>();
if (Validator.isNull(numeroProgetto)) {
esito.addAll(firmeBloccate(companyId));
} else {
IntPratica pratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto);
ControlloPratica controllo = getLastControlloPratica(pratica.getIntPraticaId());
KaleoInstanceToken instanceToken = findInstanceToken(controllo.getControlloPraticaId());
if (Validator.isNotNull(instanceToken)) {
esitoLog(esito, "Trovato KaleoInstanceToken " + instanceToken.getKaleoInstanceTokenId()
+ ", currentKaleoNodeName = \"" + instanceToken.getCurrentKaleoNodeName() + StringPool.QUOTE);
if (instanceToken.getCurrentKaleoNodeName().equalsIgnoreCase("signal_ff")) {
List<KaleoTaskInstanceToken> taskInstanceTokens = findTaskInstanceTokens(instanceToken
.getKaleoInstanceTokenId());
esitoLog(esito, "Trovati " + taskInstanceTokens.size() + " KaleoTaskInstanceToken");
List<KaleoTaskAssignmentInstance> taskAssignmentInstances = findTaskAssignmentInstances(instanceToken
.getKaleoInstanceId());
esitoLog(esito, "Trovati " + taskAssignmentInstances.size() + " KaleoTaskAssignmentInstance");
KaleoTaskInstanceToken taskInstanceToken = taskInstanceTokens.get(taskInstanceTokens.size() - 1);
KaleoTaskAssignmentInstance taskAssignmentInstance = taskAssignmentInstances
.get(taskAssignmentInstances.size() - 1);
esitoLog(esito,
"Cancello KaleoTaskInstanceToken " + taskInstanceToken.getKaleoTaskInstanceTokenId());
KaleoTaskInstanceTokenLocalServiceUtil.deleteKaleoTaskInstanceToken(taskInstanceToken);
esitoLog(
esito,
"Cancello KaleoTaskAssignmentInstance "
+ taskAssignmentInstance.getKaleoTaskAssignmentInstanceId());
KaleoTaskAssignmentInstanceLocalServiceUtil
.deleteKaleoTaskAssignmentInstance(taskAssignmentInstance);
taskInstanceToken = taskInstanceTokens.get(taskInstanceTokens.size() - 2);
esitoLog(esito,
"Aggiorno KaleoTaskInstanceToken " + taskInstanceToken.getKaleoTaskInstanceTokenId());
taskInstanceToken.setCompleted(false);
taskInstanceToken.setCompletionUserId(0);
taskInstanceToken.setCompletionDate(null);
KaleoTaskInstanceTokenLocalServiceUtil.updateKaleoTaskInstanceToken(taskInstanceToken);
esitoLog(esito, "Aggiorno KaleoInstanceToken " + instanceToken.getKaleoInstanceTokenId());
instanceToken.setCurrentKaleoNodeId(21639);
instanceToken.setCurrentKaleoNodeName("Esito");
KaleoInstanceTokenLocalServiceUtil.updateKaleoInstanceToken(instanceToken);
try{
List<String> esito = new ArrayList<>();
if (Validator.isNull(numeroProgetto)) {
esito.addAll(firmeBloccate(companyId));
} else {
IntPratica pratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto);
ControlloPratica controllo = getLastControlloPratica(pratica.getIntPraticaId());
KaleoInstanceToken instanceToken = findInstanceToken(controllo.getControlloPraticaId());
if (Validator.isNotNull(instanceToken)) {
esitoLog(esito, "Trovato KaleoInstanceToken " + instanceToken.getKaleoInstanceTokenId()
+ ", currentKaleoNodeName = \"" + instanceToken.getCurrentKaleoNodeName() + StringPool.QUOTE);
if (instanceToken.getCurrentKaleoNodeName().equalsIgnoreCase("signal_ff")) {
List<KaleoTaskInstanceToken> taskInstanceTokens = findTaskInstanceTokens(instanceToken
.getKaleoInstanceTokenId());
esitoLog(esito, "Trovati " + taskInstanceTokens.size() + " KaleoTaskInstanceToken");
List<KaleoTaskAssignmentInstance> taskAssignmentInstances = findTaskAssignmentInstances(instanceToken
.getKaleoInstanceId());
esitoLog(esito, "Trovati " + taskAssignmentInstances.size() + " KaleoTaskAssignmentInstance");
KaleoTaskInstanceToken taskInstanceToken = taskInstanceTokens.get(taskInstanceTokens.size() - 1);
KaleoTaskAssignmentInstance taskAssignmentInstance = taskAssignmentInstances
.get(taskAssignmentInstances.size() - 1);
esitoLog(esito,
"Cancello KaleoTaskInstanceToken " + taskInstanceToken.getKaleoTaskInstanceTokenId());
KaleoTaskInstanceTokenLocalServiceUtil.deleteKaleoTaskInstanceToken(taskInstanceToken);
esitoLog(
esito,
"Cancello KaleoTaskAssignmentInstance "
+ taskAssignmentInstance.getKaleoTaskAssignmentInstanceId());
KaleoTaskAssignmentInstanceLocalServiceUtil
.deleteKaleoTaskAssignmentInstance(taskAssignmentInstance);
taskInstanceToken = taskInstanceTokens.get(taskInstanceTokens.size() - 2);
esitoLog(esito,
"Aggiorno KaleoTaskInstanceToken " + taskInstanceToken.getKaleoTaskInstanceTokenId());
taskInstanceToken.setCompleted(false);
taskInstanceToken.setCompletionUserId(0);
taskInstanceToken.setCompletionDate(null);
KaleoTaskInstanceTokenLocalServiceUtil.updateKaleoTaskInstanceToken(taskInstanceToken);
esitoLog(esito, "Aggiorno KaleoInstanceToken " + instanceToken.getKaleoInstanceTokenId());
instanceToken.setCurrentKaleoNodeId(21639);
instanceToken.setCurrentKaleoNodeName("Esito");
KaleoInstanceTokenLocalServiceUtil.updateKaleoInstanceToken(instanceToken);
}
}
}
}catch(Exception e){
_log.error(e, e);
}
return esito;
}
@ -1452,18 +1457,22 @@ public class SismicaUtil {
IntPratica pratica = null;
try {
pratica = IntPraticaLocalServiceUtil.getIntPratica(documento.getIntPraticaId());
} catch (PortalException e) {}
} catch (PortalException e) {
_log.error(e,e);
}
if (Validator.isNotNull(pratica) && (documento.getFileEntryId() != 0)) {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId());
FileEntry fileEntry = null;
try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) {
// _log.info(e.getClass() + ": " + e.getMessage());
_log.error(e,e);
}
if(Validator.isNotNull(fileEntry)){
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
}
inizio += SLICE;
@ -1499,10 +1508,14 @@ public class SismicaUtil {
FileEntry fileEntry = null;
try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) {}
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
} catch (Exception e) {
_log.error(e,e);
}
if(Validator.isNotNull(fileEntry)){
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
}
}
inizio += SLICE;
@ -1538,10 +1551,14 @@ public class SismicaUtil {
FileEntry fileEntry = null;
try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdBase());
} catch (Exception e) {}
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
} catch (Exception e) {
_log.error(e,e);
}
if(Validator.isNotNull(fileEntry)){
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
}
if (Validator.isNotNull(pratica) && (documento.getFileEntryIdInvio() != 0)) {
@ -1549,20 +1566,28 @@ public class SismicaUtil {
FileEntry fileEntry = null;
try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdInvio());
} catch (Exception e) {}
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
} catch (Exception e) {
_log.error(e,e);
}
if(Validator.isNotNull(fileEntry)){
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
}
if (Validator.isNotNull(pratica) && (documento.getFileEntryIdProtocollo() != 0)) {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId());
FileEntry fileEntry = null;
try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdProtocollo());
} catch (Exception e) {}
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
} catch (Exception e) {
_log.error(e,e);
}
if(Validator.isNotNull(fileEntry)){
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
}
}
inizio += SLICE;
@ -1599,11 +1624,13 @@ public class SismicaUtil {
try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) {
// _log.info(e.getClass() + ": " + e.getMessage());
_log.error(e,e);
}
if(Validator.isNotNull(fileEntry){
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
}
inizio += SLICE;
@ -1640,11 +1667,13 @@ public class SismicaUtil {
try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getDlFileEntryId());
} catch (Exception e) {
// _log.info(e.getClass() + ": " + e.getMessage());
_log.error(e,e);
}
if(Validator.isNotNull(fileEntry)){
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
}
inizio += SLICE;
@ -1681,11 +1710,13 @@ public class SismicaUtil {
try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) {
// _log.info(e.getClass() + ": " + e.getMessage());
_log.error(e,e);
}
if(Validator.isNotNull(fileEntry)){
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
}
inizio += SLICE;
@ -1722,11 +1753,13 @@ public class SismicaUtil {
try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) {
// _log.info(e.getClass() + ": " + e.getMessage());
_log.error(e,e);
}
if(Validator.isNotNull(fileEntry)){
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, "Pratica "
+ pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() + "), " + tipoDocumento
+ StringPool.SPACE + documento.getPrimaryKey());
}
}
inizio += SLICE;

1
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java

@ -685,6 +685,7 @@ public class FascicoloFePortlet extends MVCPortlet {
response.sendRedirect(successURL);
} else if ("domanda".equalsIgnoreCase(cmd)) {
saveDatiDettPratica(dettPraticaId, request, response);
} else {
throw new SystemException("operazione non gestita (" + cmd + StringPool.CLOSE_PARENTHESIS);
}

Caricamento…
Annulla
Salva