Sfoglia il codice sorgente

Memorizza la sezione attività dalla quale viene prelevata una pratica

master 22.02
Salvatore La Manna 3 anni fa
parent
commit
49c3df80f8
  1. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AvvisoUtil.java
  2. 10
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java
  3. 13
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Language.properties
  4. 29
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java
  5. 140
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/fascicolo_actions.jsp
  6. 172
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/action_button.jsp
  7. 27
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/init.jsp
  8. 53
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp
  9. 13
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/fascicolo_action.jsp
  10. 297
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf
  11. 5
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp
  12. 13
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/workflow_task_action.jsp
  13. BIN
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/portos-kaleo-portlet-service.jar
  14. 5
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language_it.properties
  15. 28
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java
  16. 4
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

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

@ -57,7 +57,7 @@ public class AvvisoUtil {
};
@SuppressWarnings("serial")
private final static Map<String, String> allTipoDocumentoFolderTemplateProps = new LinkedHashMap<String, String>(17) {
private final static Map<String, String> allTipoDocumentoFolderTemplateProps = new LinkedHashMap<String, String>(18) {
{
put(StatoPraticaConstants.VIDIMATA, "conf.geniocivile.avviso.folder.id.vidimata");
put(StatoPraticaConstants.CONFORME, "conf.geniocivile.avviso.folder.id.conforme");

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

@ -19,7 +19,7 @@ public class PraticaUtil {
public static String getFolderName(long dettPraticaId) {
return StringUtils.leftPad(String.valueOf(dettPraticaId), 10, '0') + StringPool.UNDERLINE + dettPraticaId;
return StringUtils.leftPad(String.valueOf(dettPraticaId), 10, '0') + '_' + dettPraticaId;
}
public static String getFolderNameDocumentazione() {
@ -28,7 +28,7 @@ public class PraticaUtil {
}
@SuppressWarnings("serial")
private static final Map<String, String[]> statusChangeMap = new LinkedHashMap<String, String[]>(4) {
private static final Map<String, String[]> STATUS_CHANGE_MAP = new LinkedHashMap<String, String[]>(4) {
{
put(StatoPraticaConstants.CONFORME, new String[] { StatoPraticaConstants.NON_CONFORME });
put(StatoPraticaConstants.NON_CONFORME, new String[] { StatoPraticaConstants.CONFORME });
@ -41,10 +41,10 @@ public class PraticaUtil {
public static Map<String, String[]> getStatusChangeMap(long dettPraticaId) throws PortalException, SystemException {
return statusChangeMap;
return STATUS_CHANGE_MAP;
}
private static final List<String> dettPraticaHiddenFields = Arrays.asList("uuid", "uuid_", "dettPraticaId",
private static final List<String> DETT_PRATICA_HIDDEN_FIELDS = Arrays.asList("uuid", "uuid_", "dettPraticaId",
"companyId", "userId", "userName", "createDate", "modifiedDate", "groupId", "intPraticaId",
"dataEffettuazione", "integrazione", "validata", "dtProtocollo", "protocollo", "completa", "gestita",
"version", "versionata", "status", "statusByUserId", "statusByUserName", "statusDate", "statusTask",
@ -65,7 +65,7 @@ public class PraticaUtil {
public static List<String> getDettPraticaHiddenFields() {
return dettPraticaHiddenFields;
return DETT_PRATICA_HIDDEN_FIELDS;
}
public static String getStatoPraticaLabel(String statoPratica, IntPratica intPratica) throws PortalException,

13
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Language.properties

@ -348,4 +348,15 @@ Approvato = Approvato
NonApprovato = Non approvato
label-integrazione-05 = Richiesta Integrazione
label-integrazione-13 = Variante
label-integrazione-13 = Variante
tipo-avviso = Tipo di avviso
invia-avviso-avvio-procedimento-non-trovato = Avvio procedimento non trovato
invia-avviso-collaudo-non-trovato = Collaudo non trovato
invia-avviso-dettpratica-non-trovato = Dettaglio Pratica non trovato, contattare l'assistenza
invia-avviso-finelavori-non-trovato = Fine lavori non trovato
invia-avviso-progetto-inesistente = Numero di progetto non trovato
invia-avviso-progetto-obbligatorio = È obbligatorio specificare il numero del progetto
invia-avviso-tipo-obbligatorio = È obbligatorio specificare il tipo di avviso
invia-avviso-tipo-pratica-non-deposito = La pratica indicata non è un deposito
invia-avviso-variante-non-trovato = Variante non trovata

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

@ -449,7 +449,7 @@ public class SismicaUtil {
for (ControlloPratica controllo : controlli) {
controlloPraticaId = controllo.getControlloPraticaId();
}
String tipoDocumento = null;
String templateDocumento = null;
String className = null;
long classPk = 0L;
switch (tipoAvviso) {
@ -467,7 +467,8 @@ public class SismicaUtil {
SessionErrors.add(actionRequest, "invia-avviso-collaudo-non-trovato");
return;
}
tipoDocumento = StatoPraticaConstants.VIDIMATA;
templateDocumento = StatoPraticaConstants.VIDIMATA;
tipoAvviso = templateDocumento;
className = Collaudo.class.getName();
classPk = collaudo.getPrimaryKey();
controlloPraticaId = 0L;
@ -486,7 +487,8 @@ public class SismicaUtil {
SessionErrors.add(actionRequest, "invia-avviso-finelavori-non-trovato");
return;
}
tipoDocumento = StatoPraticaConstants.VIDIMATA;
templateDocumento = StatoPraticaConstants.VIDIMATA;
tipoAvviso = templateDocumento;
className = FineLavori.class.getName();
classPk = fineLavoro.getPrimaryKey();
controlloPraticaId = 0L;
@ -504,7 +506,8 @@ public class SismicaUtil {
SessionErrors.add(actionRequest, "invia-avviso-variante-non-trovato");
return;
}
tipoDocumento = StatoPraticaConstants.VIDIMATA;
templateDocumento = StatoPraticaConstants.VIDIMATA;
tipoAvviso = templateDocumento;
className = DettPratica.class.getName();
classPk = variante.getPrimaryKey();
controlloPraticaId = 0L;
@ -521,12 +524,17 @@ public class SismicaUtil {
SessionErrors.add(actionRequest, "invia-avviso-avvio-procedimento-non-trovato");
return;
}
tipoDocumento = StatoPraticaConstants.SOTTOPOSTA_A_PARERE;
templateDocumento = StatoPraticaConstants.SOTTOPOSTA_A_PARERE;
tipoAvviso = templateDocumento;
className = DettPratica.class.getName();
classPk = praticaSp.getPrimaryKey();
controlloPraticaId = 0L;
break;
case "avviso_vidimazione":
case "avviso_conformita":
if (!intPratica.getTipoPratica().equals(Constants.TIPO_PRATICA_DEPOSITO)) {
SessionErrors.add(actionRequest, "invia-avviso-tipo-pratica-non-deposito");
return;
}
List<DettPratica> pratichePresentate = DettPraticaLocalServiceUtil.findByIntPraticaId(intPraticaId);
DettPratica praticaPresentata = null;
for (DettPratica el : pratichePresentate) {
@ -535,10 +543,11 @@ public class SismicaUtil {
}
}
if (Validator.isNull(praticaPresentata)) {
SessionErrors.add(actionRequest, "invia-avviso-vidimazione-non-trovato");
SessionErrors.add(actionRequest, "invia-avviso-conformita-non-trovato");
return;
}
tipoDocumento = StatoPraticaConstants.VIDIMATA;
templateDocumento = "DPB2";
tipoAvviso = StatoPraticaConstants.CONFORME;
className = DettPratica.class.getName();
classPk = praticaPresentata.getPrimaryKey();
controlloPraticaId = 0L;
@ -547,12 +556,12 @@ public class SismicaUtil {
SessionErrors.add(actionRequest, "operazione-non-supportata");
return;
}
String templateName = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(tipoAvviso);
String templateName = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(templateDocumento);
long template = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, templateName);
esitoLog(esito, "template = " + templateName);
try {
AvvisoLocalServiceUtil.addAvviso(intPraticaId, StringPool.BLANK, new Date(),
AvvisoUtil.TIPO_AVVISO_DIRETTO, tipoDocumento, template, classPk, className, controlloPraticaId,
AvvisoUtil.TIPO_AVVISO_DIRETTO, tipoAvviso, template, classPk, className, controlloPraticaId,
getServiceContextbyIntPratica(intPratica));
} catch (PortalException e) {
SessionErrors.add(actionRequest, "errore-generico");

140
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/fascicolo_actions.jsp

@ -14,52 +14,41 @@
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil"%>
<%@include file="/html/fascicolo/init.jsp"%>
<%
SearchContainer searchContainer = (SearchContainer) request
.getAttribute("liferay-ui:search:searchContainer");
String redirect = ParamUtil.getString(request, "backUrl");
IntPratica intPratica = null;
boolean showExpanded = true;
if (searchContainer != null) {
redirect = searchContainer.getIteratorURL().toString();
ResultRow row = (ResultRow) request
.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
intPratica = (IntPratica) row.getObject();
showExpanded = false;
} else {
long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
}
String randomId = StringUtil.randomId();
String buttonIdCambiaStato = "buttonIdCambiaStato_"+randomId;
String buttonIdToggleSospensione = "buttonIdToggleSospensione_"+randomId;
String buttonIdCambiaTitolare = "buttonIdCambiaTitolare_"+randomId;
String buttonIdToggleWorkflow = "buttonIdToggleWorkflow_"+randomId;
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_"+randomId;
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId());
Map<String, String[]> changeMap = null;
if (lastDettPratica == null) {
changeMap = new HashMap<String, String[]>();
} else {
changeMap = PraticaUtil.getStatusChangeMap(lastDettPratica.getDettPraticaId());
}
List<String> statiPossibili = ListUtil.toList(changeMap.get(intPratica.getStatoPratica()));
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
long territorioGroupId = territorio.getGroupId();
SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer");
String redirect = ParamUtil.getString(request, "backUrl");
IntPratica intPratica = null;
boolean showExpanded = true;
if (searchContainer != null) {
redirect = searchContainer.getIteratorURL().toString();
ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
intPratica = (IntPratica) row.getObject();
showExpanded = false;
} else {
long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
}
String randomId = StringUtil.randomId();
String buttonIdCambiaStato = "buttonIdCambiaStato_" + randomId;
String buttonIdToggleSospensione = "buttonIdToggleSospensione_" + randomId;
String buttonIdCambiaTitolare = "buttonIdCambiaTitolare_" + randomId;
String buttonIdToggleWorkflow = "buttonIdToggleWorkflow_" + randomId;
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_" + randomId;
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId());
Map<String, String[]> changeMap = null;
if (lastDettPratica == null) {
changeMap = new HashMap<String, String[]>();
} else {
changeMap = PraticaUtil.getStatusChangeMap(lastDettPratica.getDettPraticaId());
}
List<String> statiPossibili = ListUtil.toList(changeMap.get(intPratica.getStatoPratica()));
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
long territorioGroupId = territorio.getGroupId();
%>
<portlet:renderURL var="viewEntryURL">
<portlet:param name="mvcPath" value="/html/fascicolo/view_fascicolo.jsp" />
<portlet:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId())%>" />
<portlet:param name="backURL" value="<%=redirect%>" />
<portlet:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" />
<portlet:param name="backURL" value="<%= redirect %>" />
</portlet:renderURL>
<liferay-ui:icon-menu icon="" showWhenSingleIcon="true" showExpanded="<%=showExpanded%>">
@ -70,53 +59,52 @@
</c:if>
<c:if test="<%=!intPratica.isSospesa() %>">
<%if(!statiPossibili.isEmpty() && IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO)){ %>
<liferay-ui:icon id="<%=buttonIdCambiaStato%>" iconCssClass="fa fa-exchange" message="fascicolo-action-cambia-stato" url="#" />
<%} %>
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_TITOLARE ) %>">
<liferay-ui:icon id="<%=buttonIdCambiaTitolare%>" iconCssClass="fa fa-users" message="fascicolo-action-cambia-titolare" url="#" />
<c:if test="<%= !statiPossibili.isEmpty()
&& IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO) %>">
<liferay-ui:icon id="<%= buttonIdCambiaStato%>" iconCssClass="fa fa-exchange"
message="fascicolo-action-cambia-stato" url="#" />
</c:if>
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO_WORKFLOW ) %>">
<liferay-ui:icon id="<%=buttonIdToggleWorkflow%>" iconCssClass="fa fa-random" message="fascicolo-action-toggle-workflow" url="#" />
<c:if test="<%= IntPraticaPermission
.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_TITOLARE ) %>">
<liferay-ui:icon id="<%= buttonIdCambiaTitolare%>" iconCssClass="fa fa-users"
message="fascicolo-action-cambia-titolare" url="#" />
</c:if>
<c:if test="<%= IntPraticaPermission
.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO_WORKFLOW ) %>">
<liferay-ui:icon id="<%= buttonIdToggleWorkflow%>" iconCssClass="fa fa-random"
message="fascicolo-action-toggle-workflow" url="#" />
</c:if>
</c:if>
</liferay-ui:icon-menu>
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>">
<liferay-util:include page="/html/fascicolo/actions/action_toggle_sospensione.jsp" servletContext="<%= application %>" >
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="buttonIdToggleSospensione" value="<%=buttonIdToggleSospensione %>"></liferay-util:param>
<c:if test="<%= IntPraticaPermission
.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>">
<liferay-util:include page="/html/fascicolo/actions/action_toggle_sospensione.jsp"
servletContext="<%= application %>" >
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>" />
<liferay-util:param name="buttonIdToggleSospensione" value="<%=buttonIdToggleSospensione %>" />
</liferay-util:include>
</c:if>
<c:if test="<%=!intPratica.isSospesa() %>">
<%if(!statiPossibili.isEmpty() && IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO)){ %>
<c:if test="<%= !intPratica.isSospesa() %>">
<c:if test="<%= statiPossibili.isEmpty() && IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO) %>">
<liferay-util:include page="/html/fascicolo/actions/action_cambia_stato_pratica.jsp" servletContext="<%= application %>" >
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="buttonIdCambiaStato" value="<%=buttonIdCambiaStato %>"></liferay-util:param>
</liferay-util:include>
<%} %>
<!--
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>">
<liferay-util:include page="/html/fascicolo/actions/action_toggle_sospensione.jsp" servletContext="<%= application %>" >
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="buttonIdToggleSospensione" value="<%=buttonIdToggleSospensione %>"></liferay-util:param>
</liferay-util:include>
</c:if>
-->
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_TITOLARE ) %>">
<liferay-util:include page="/html/fascicolo/actions/action_cambia_titolare.jsp" servletContext="<%= application %>" >
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="buttonIdCambiaTitolare" value="<%=buttonIdCambiaTitolare %>"></liferay-util:param>
<c:if test="<%= IntPraticaPermission
.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_TITOLARE ) %>">
<liferay-util:include page="/html/fascicolo/actions/action_cambia_titolare.jsp"
servletContext="<%= application %>">
<liferay-util:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" />
<liferay-util:param name="buttonIdCambiaTitolare" value="<%= buttonIdCambiaTitolare %>" />
</liferay-util:include>
</c:if>
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO_WORKFLOW ) %>">
<liferay-util:include page="/html/fascicolo/actions/action_toggle_workflow.jsp" servletContext="<%= application %>" >
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="buttonIdToggleWorkflow" value="<%=buttonIdToggleWorkflow %>"></liferay-util:param>
<c:if test="<%= IntPraticaPermission
.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO_WORKFLOW ) %>">
<liferay-util:include page="/html/fascicolo/actions/action_toggle_workflow.jsp"
servletContext="<%= application %>">
<liferay-util:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" />
<liferay-util:param name="buttonIdToggleWorkflow" value="<%= buttonIdToggleWorkflow %>" />
</liferay-util:include>
</c:if>
</c:if>

172
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/action_button.jsp

@ -33,115 +33,96 @@
<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil"%>
<%@ include file="/html/gestioneattivita/init.jsp" %>
<%
SearchContainer searchContainer = (SearchContainer) request
.getAttribute("liferay-ui:search:searchContainer");
String redirect = ParamUtil.getString(request, "backUrl");
ControlloPratica controlloPratica = null;
redirect = searchContainer.getIteratorURL().toString();
ResultRow row = (ResultRow) request
.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
controlloPratica = (ControlloPratica) row.getObject();
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId());
Group controlPanelGroup = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.CONTROL_PANEL);
long controlPanelPlid = LayoutLocalServiceUtil.getDefaultPlid(controlPanelGroup.getGroupId(),true);
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(
controlloPratica.getCompanyId(),controlloPratica.getGroupId(), ControlloPratica.class.getName(),controlloPratica.getPrimaryKey());
List<WorkflowTask> listaTask = null;
if (workflowInstanceLink == null) {
listaTask = new ArrayList<WorkflowTask>();
} else {
listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null,
workflowInstanceLink.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
}
String randomId = StringUtil.randomId();
long lastDettPraticaId = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()).getDettPraticaId();
String buttonIdCambioIstruttore = "buttonIdCambioIstruttore_"+randomId;
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_"+randomId;
String buttonIdAggiungiDettPraticheAlControllo = "buttonIdAggiungiDettPraticheAlControllo_"+randomId;
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
long territorioGroupId = territorio.getGroupId();
SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer");
String redirect = ParamUtil.getString(request, "backUrl");
ControlloPratica controlloPratica = null;
redirect = searchContainer.getIteratorURL().toString();
ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
controlloPratica = (ControlloPratica) row.getObject();
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId());
Group controlPanelGroup = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.CONTROL_PANEL);
long controlPanelPlid = LayoutLocalServiceUtil.getDefaultPlid(controlPanelGroup.getGroupId(),true);
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(
controlloPratica.getCompanyId(),controlloPratica.getGroupId(), ControlloPratica.class.getName(),controlloPratica.getPrimaryKey());
List<WorkflowTask> listaTask = null;
if (workflowInstanceLink == null) {
listaTask = new ArrayList<WorkflowTask>();
} else {
listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null,
workflowInstanceLink.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
}
String randomId = StringUtil.randomId();
long lastDettPraticaId = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()).getDettPraticaId();
String buttonIdCambioIstruttore = "buttonIdCambioIstruttore_" + randomId;
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_" + randomId;
String buttonIdAggiungiDettPraticheAlControllo = "buttonIdAggiungiDettPraticheAlControllo_" + randomId;
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
long territorioGroupId = territorio.getGroupId();
%>
<liferay-ui:icon-menu icon="" showWhenSingleIcon="false" showExpanded="true" cssClass="menu_button_activity">
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-open-pratica") %>' class="tooltip-info">
<liferay-ui:icon iconCssClass="fa fa-folder-open"
linkCssClass="btn btn-action"
target="_blank"
message=""
url="<%= FascicoloURLUtil.getFascicoloViewURL(controlloPratica.getCompanyId(), controlloPratica.getIntPraticaId()) %>" />
<liferay-ui:icon iconCssClass="fa fa-folder-open" linkCssClass="btn btn-action" target="_blank" message=""
url="<%= FascicoloURLUtil.getFascicoloBOViewURL(controlloPratica.getCompanyId(),
controlloPratica.getIntPraticaId()) %>" />
</div>
<c:if test="<%= listaTask.isEmpty() && workflowInstanceLink != null %>">
<%
listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null,
workflowInstanceLink.getWorkflowInstanceId(), true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(),
null, workflowInstanceLink.getWorkflowInstanceId(), true, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
null);
%>
</c:if>
<c:if test="<%= !listaTask.isEmpty() %>">
<%
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);
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.setParameter("tab", tabs1);
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"
iconCssClass="fa fa-list-ol"
linkCssClass="btn btn-action"
message=""
url='<%=workflowTaskURL.toString()+"&controlPanelCategory=my" %>' />
<div title='<%= LanguageUtil.get(pageContext,"workflow-action-manage") %>' class="tooltip-info">
<liferay-ui:icon useDialog="true" iconCssClass="fa fa-list-ol" linkCssClass="btn btn-action" message=""
url='<%= workflowTaskURL.toString() + "&controlPanelCategory=my" %>' />
</div>
</c:if>
<c:if test="<%=WorkflowConstants.STATUS_PENDING == controlloPratica.getStatus()%>">
<c:if test="<%= (listaTask.size() > 0)
&& IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.ASSEGNA_AL_RUOLO)
&& Validator.isNotNull(listaTask.get(0).getAssigneeUserId())
&& (listaTask.get(0).getAssigneeUserId() != -1)
&& (listaTask.get(0).getName().equals(\"Assegnazione\")
|| listaTask.get(0).getName().equals(\"Approvazione\")) %>">
&& IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.ASSEGNA_AL_RUOLO)
&& Validator.isNotNull(listaTask.get(0).getAssigneeUserId())
&& (listaTask.get(0).getAssigneeUserId() != -1)
&& (listaTask.get(0).getName().equals(\"Assegnazione\")
|| listaTask.get(0).getName().equals(\"Approvazione\")) %>">
<liferay-portlet:actionURL name="riassegnaAlRuolo" var="riassegnaAlRuoloUrl">
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="workflowTaskId" value="<%=String.valueOf(listaTask.get(0).getWorkflowTaskId())%>" />
<liferay-util:param name="controlloPraticaId" value="<%=String.valueOf(controlloPratica.getControlloPraticaId())%>" />
<liferay-util:param name="redirect" value="<%=currentURL%>" />
<liferay-util:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" />
<liferay-util:param name="workflowTaskId" value="<%= String.valueOf(listaTask.get(0).getWorkflowTaskId()) %>" />
<liferay-util:param name="controlloPraticaId" value="<%= String.valueOf(controlloPratica.getControlloPraticaId()) %>" />
<liferay-util:param name="redirect" value="<%= currentURL %>" />
</liferay-portlet:actionURL>
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-riassegna-al-ruolo") %>' class="tooltip-info">
<liferay-ui:icon iconCssClass="fa fa-users"
linkCssClass="btn btn-action"
message=""
linkCssClass="btn btn-action"
message=""
url="<%=riassegnaAlRuoloUrl %>" />
</div>
</c:if>
</c:if>
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_ISTRUTTORE) %>">
<c:if test="<%=Validator.isNotNull(intPratica.getStatusByUserId())%>">
<c:if test="<%=Validator.isNotNull(intPratica.getStatusByUserId())%>">
<liferay-util:include page="/html/gestioneattivita/actions/action_cambio_istruttore.jsp" servletContext="<%= application %>" >
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="controlloPraticaId" value="<%=String.valueOf(controlloPratica.getControlloPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="buttonIdCambioIstruttore" value="<%=buttonIdCambioIstruttore %>"></liferay-util:param>
</liferay-util:include>
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-cambia-istruttore") %>' class="tooltip-info">
<liferay-ui:icon id="<%=buttonIdCambioIstruttore %>"
iconCssClass="fa fa-user-circle"
<liferay-ui:icon id="<%=buttonIdCambioIstruttore %>"
iconCssClass="fa fa-user-circle"
linkCssClass="btn btn-action"
message=""
message=""
url="#" />
</div>
</c:if>
</c:if>
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.RICHIEDI_PARERE_GEOLOGO) || intPratica.getStatusByUserId() == user.getUserId()%>">
<c:if test="<%=!listaTask.isEmpty() %>">
<c:if test="<%= listaTask.get(0).getName().equalsIgnoreCase(WorkflowConstants.WORKFLOW_TASKNAME_ASSEGNAZIONE) || listaTask.get(0).getName().equalsIgnoreCase(WorkflowConstants.WORKFLOW_TASKNAME_ESITO)%>">
@ -151,7 +132,6 @@
<liferay-util:param name="dettPraticaId" value="<%=String.valueOf(controlloPratica.getDettPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="buttonIdSelezionaGeologo" value="<%=buttonIdSelezionaGeologo %>"></liferay-util:param>
</liferay-util:include>
<div title='<%=LanguageUtil.get(pageContext,"fascicolo-action-seleziona-geologo") %>' class="tooltip-info">
<liferay-ui:icon id="<%=buttonIdSelezionaGeologo%>" linkCssClass="btn btn-action" iconCssClass="fa fa-globe" message="" url="#" />
</div>
@ -165,47 +145,41 @@
<liferay-portlet:actionURL name="annullaRichiestaParere" var="annullaRichiestaParereUrl">
<liferay-util:param name="parereGeologoId" value="<%=String.valueOf(parereGeologo.getParereGeologoId())%>" />
<liferay-util:param name="redirect" value="<%=currentURL%>" />
</liferay-portlet:actionURL>
<div title='<%=LanguageUtil.get(pageContext,"fascicolo-cancella-parere-geologo") %>' class="tooltip-info">
</liferay-portlet:actionURL>
<div title='<%=LanguageUtil.get(pageContext,"fascicolo-cancella-parere-geologo") %>' class="tooltip-info">
<liferay-ui:icon id="<%=buttonIdSelezionaGeologo%>" linkCssClass="btn btn-action" iconCssClass="fa fa-times-circle" message="" url="<%=annullaRichiestaParereUrl %>" />
</div>
</c:if>
</c:if>
<c:if test="<%=lastDettPraticaId != controlloPratica.getDettPraticaId() && intPratica.getStatusByUserId()== user.getUserId()%>">
<c:if test="<%=lastDettPraticaId != controlloPratica.getDettPraticaId() && intPratica.getStatusByUserId()== user.getUserId()%>">
<liferay-util:include page="/html/gestioneattivita/actions/action_aggiungi_al_controllo.jsp" servletContext="<%= application %>" >
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="controlloPraticaId" value="<%=String.valueOf(controlloPratica.getControlloPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="buttonIdAggiungiDettPraticheAlControllo" value="<%=buttonIdAggiungiDettPraticheAlControllo %>"></liferay-util:param>
</liferay-util:include>
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-aggiungi-pratiche") %>' class="tooltip-info">
<liferay-ui:icon id="<%=buttonIdAggiungiDettPraticheAlControllo %>"
iconCssClass="fa fa-calendar-plus-o"
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-aggiungi-pratiche") %>' class="tooltip-info">
<liferay-ui:icon id="<%=buttonIdAggiungiDettPraticheAlControllo %>"
iconCssClass="fa fa-calendar-plus-o"
linkCssClass="btn btn-action"
message=""
message=""
url="#" />
</div>
</c:if>
</c:if>
</liferay-ui:icon-menu>
<script type="text/javascript">
YUI().use(
'aui-tooltip',
function(Y) {
new Y.TooltipDelegate(
{
trigger: '.tooltip-info',
position: 'top',
cssClass: 'tooltip-help',
html: true,
opacity: 1
}
);
new Y.TooltipDelegate(
{
trigger: '.tooltip-info',
position: 'top',
cssClass: 'tooltip-help',
html: true,
opacity: 1
}
);
}
);
</script>

27
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/init.jsp

@ -3,32 +3,23 @@
<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.Role"%>
<%@page import="com.liferay.portal.service.RoleLocalServiceUtil"%>
<%@ include file="/html/init.jsp" %>
<%@include file="/html/init.jsp"%>
<%@page import="it.tref.liferay.portos.bo.search.ControlloPraticaAdvancedSearch"%>
<%@page import="javax.portlet.PortletURL"%>
<%
String tabNames = "Tab_MieiTask,Tab_TaskMieiRuoli,Tab_AtriTask,Tab_TaskCompletati";
String tabs1 = ParamUtil.getString(request, "tabs1", StringUtil.split(tabNames)[0]);
Role ruoloDirigente = RoleLocalServiceUtil.getRole(company.getCompanyId(), "dirigente_generale");
boolean isPortosPo = false;
List<Organization> organizationList = user.getOrganizations();
for(Organization org : organizationList){
boolean appVerify = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(),org.getGroupId(), "portos_po");
if(appVerify){
isPortosPo = true;
}
for (Organization org : organizationList) {
boolean appVerify = UserGroupRoleLocalServiceUtil
.hasUserGroupRole(user.getUserId(), org.getGroupId(), "portos_po");
if (appVerify) {
isPortosPo = true;
}
}
//Per esportazione
String dataRichiestaInizio = ParamUtil.getString(renderRequest, "dataRichiestaInizio","");
String dataRichiestaFine = ParamUtil.getString(renderRequest, "dataRichiestaFine","");
String dataRichiestaInizio = ParamUtil.getString(renderRequest, "dataRichiestaInizio", "");
String dataRichiestaFine = ParamUtil.getString(renderRequest, "dataRichiestaFine", "");
%>

53
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp

@ -13,13 +13,12 @@ String dataSorteggio = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(compa
<liferay-ui:error key="operazione-non-supportata" message="Operazione non supportata" />
<liferay-ui:error key="invia-avviso-tipo-obbligatorio" message="Nessun tipo di avviso selezionato" />
<liferay-ui:error key="invia-avviso-progetto-obbligatorio"
message="Non è stato indicato nessun numero di progetto" />
message="Non è stato indicato nessun numero di progetto" />
<liferay-ui:error key="invia-avviso-progetto-inesistente" message="Progetto non trovato" />
<liferay-ui:error key="invia-avviso-collaudo-non-trovato"
message="Non è stato trovato alcun collaudo completo e protocollato per il progetto selezionato" />
message="Non è stato trovato alcun collaudo completo e protocollato per il progetto selezionato" />
<liferay-ui:error key="invia-avviso-finelavori-non-trovato"
message="Non è stato trovato alcun fine lavori completo e protocollato per il progetto selezionato" />
message="Non è stato trovato alcun fine lavori completo e protocollato per il progetto selezionato" />
<hr style="margin: 0" />
<liferay-portlet:actionURL name="reIndexFasciolo" var="reIndexFascioloURL" />
<liferay-portlet:actionURL name="reIndexFascicoli" var="reIndexFascicoliURL" />
@ -28,7 +27,7 @@ String dataSorteggio = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(compa
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Form per reindicizzare un
fascicolo</div>
<aui:form action="<%=reIndexFascioloURL%>" method="post" name="fmReIndexFasciolo">
<aui:form action="<%= reIndexFascioloURL %>" method="post" name="fmReIndexFasciolo">
<div>
<aui:input name="intPraticaId" label="IntPraticaId">
<aui:validator name="number" />
@ -39,7 +38,7 @@ String dataSorteggio = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(compa
<aui:button type="submit" value="Reindicizza Fascicolo" />
</div>
</aui:form>
<aui:form action="<%=reIndexFascicoliURL%>" method="post" name="fmReindexFascicoli">
<aui:form action="<%= reIndexFascicoliURL %>" method="post" name="fmReindexFascicoli">
<div>
<aui:button cssClass="btn-danger" type="submit" value="Reindicizza tutti i fascicoli" />
</div>
@ -57,7 +56,7 @@ String dataSorteggio = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(compa
Ultimo Sorteggio lanciato il
<%= dataSorteggio %>. <strong>Si è sicuri di volerlo lanciare?</strong>
</div>
<aui:form action="<%=lanciaSorteggioURL%>" method="post" name="fmLanciaSorteggio">
<aui:form action="<%= lanciaSorteggioURL %>" method="post" name="fmLanciaSorteggio">
<div>
<aui:button cssClass="btn-danger" type="submit" value="Lancia Sorteggio" />
</div>
@ -65,7 +64,7 @@ String dataSorteggio = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(compa
</div>
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Mostra configurazione server</div>
<aui:form action="<%=mostraConfigurazioneUrl%>" method="post" name="fmMostraConfigurazione">
<aui:form action="<%= mostraConfigurazioneUrl %>" method="post" name="fmMostraConfigurazione">
<div>
<aui:button cssClass="btn-danger" type="submit" value="Mostra configurazione" />
</div>
@ -78,7 +77,7 @@ String dataSorteggio = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(compa
<div class="row-fluid" style="margin-top: 10px;">
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Manutenzione database</div>
<aui:form action="<%=manutenzioneDatabaseURL%>" method="post" name="fmMD">
<aui:form action="<%= manutenzioneDatabaseURL %>" method="post" name="fmMD">
<div>
<aui:input name="mode" label="Modalità" />
<aui:button cssClass="btn-danger" type="submit" value="Avvia manutenzione" />
@ -87,7 +86,7 @@ String dataSorteggio = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(compa
</div>
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Ripara documenti</div>
<aui:form action="<%=generaDocumentiURL%>" method="post" name="fmGeneraDocumenti">
<aui:form action="<%= generaDocumentiURL %>" method="post" name="fmGeneraDocumenti">
<div>
<aui:button cssClass="btn-danger" type="submit" value="Ripara documenti" />
</div>
@ -101,7 +100,7 @@ String dataSorteggio = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(compa
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Form per reimpostare i documenti
alla firma</div>
<aui:form action="<%=resetFirmeURL%>" method="post" name="fmResetFirme">
<aui:form action="<%= resetFirmeURL %>" method="post" name="fmResetFirme">
<div>
<aui:input name="numeroProgetto" label="Numero progetto">
<aui:validator name="number" />
@ -111,30 +110,30 @@ String dataSorteggio = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(compa
</aui:form>
</div>
<%
String tipoAvviso = ParamUtil.getString(renderRequest, "tipoAvviso", "");
String numeroProgetto = ParamUtil.getString(renderRequest, "numeroProgetto", "");
String tipoAvviso = ParamUtil.getString(renderRequest, "tipoAvviso", "");
String numeroProgetto = ParamUtil.getString(renderRequest, "numeroProgetto", "");
%>
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Invia avviso</div>
<aui:form action="<%=inviaAvvisoURL%>" method="post" name="fmResetFirme">
<aui:form action="<%= inviaAvvisoURL %>" method="post" name="fmResetFirme">
<div>
<aui:select name="tipoAvviso">
<aui:option label="Seleziona tipo avviso" value=""></aui:option>
<aui:select name="tipoAvviso" cssClass="col8">
<aui:option label="Seleziona tipo avviso" value="" />
<aui:option label="Vidimazione collaudo"
selected="<%=tipoAvviso.equals(StatoPraticaConstants.COLLAUDO)%>"
value="<%=StatoPraticaConstants.COLLAUDO%>"></aui:option>
selected="<%= tipoAvviso.equals(StatoPraticaConstants.COLLAUDO) %>"
value="<%= StatoPraticaConstants.COLLAUDO %>" />
<aui:option label="Vidimazione fine lavoro"
selected="<%=tipoAvviso.equals(StatoPraticaConstants.FINE_LAVORI)%>"
value="<%=StatoPraticaConstants.FINE_LAVORI%>"></aui:option>
selected="<%= tipoAvviso.equals(StatoPraticaConstants.FINE_LAVORI) %>"
value="<%=StatoPraticaConstants.FINE_LAVORI%>" />
<aui:option label="Vidimazione variante"
selected="vidimazione_variante"
value="vidimazione_variante"></aui:option>
selected='<%= tipoAvviso.equals("vidimazione_variante") %>'
value="vidimazione_variante" />
<aui:option label="Avviso avvio procedimento"
selected="avviso_avvio_proced"
value="avviso_avvio_proced"></aui:option>
<aui:option label="Avviso vidimazione inizio pratica"
selected="avviso_vidimazione"
value="avviso_vidimazione"></aui:option>
selected='<%= tipoAvviso.equals("avviso_avvio_proced") %>'
value="avviso_avvio_proced" />
<aui:option label="Attestazione di deposito del progetto"
selected='<%= tipoAvviso.equals("avviso_conformita") %>'
value="avviso_conformita" />
</aui:select>
</div>
<div>

13
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/fascicolo_action.jsp

@ -36,19 +36,6 @@ if (searchContainer != null) {
}
String intPraticaIdString = String.valueOf(intPratica.getIntPraticaId());
String randomId = StringUtil.randomId() + StringPool.UNDERLINE + intPraticaIdString;
if (intPratica.getNumeroProgetto().equals("88320")) {
DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPratica.getIntPraticaId(),
Arrays.asList(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE));
if (Validator.isNotNull(dettPratica)) {
System.out.println("########### return false;");
}
System.out.println("########### 1 " + (intPratica.getStatus() != WorkflowConstants.STATUS_ANY));
System.out.println("########### 2 " + (intPratica.getStatus() != WorkflowConstants.STATUS_INCOMPLETE));
System.out.println("########### 3 " + intPratica.getStatoPratica());
System.out.println("########### 4 " + ValidazionePraticaUtil.praticaCanAddIntegrazione(intPratica.getIntPraticaId()));
System.out.println("########### 5 " + AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(),
AzioniPraticheUtil.ACTION_INTEGRAZIONE));
}
%>
<liferay-ui:icon-menu icon="" showWhenSingleIcon="true" showExpanded="<%= showExpanded %>">
<liferay-portlet:renderURL var="viewFascicoliUrl" >

297
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf

@ -37,10 +37,7 @@
</thead>
<tbody class="attivita-group__body">
<%
//ADT: bug bo id=33
Map<Long,String> historyWorkflowEsitiLogs = (Map<Long,String>)request.getAttribute("historyWorkflowEsitiLogs");
Map<Long,String> historyWorkflowEsitiLogs = (Map<Long,String>) request.getAttribute("historyWorkflowEsitiLogs");
for (WorkflowLog workflowLog : workflowLogs) {
Role curRole = null;
User curUser = null;
@ -60,143 +57,144 @@ for (WorkflowLog workflowLog : workflowLogs) {
kaleoNodeName = jsonObject.getString("kaleoNodeName");
transitionName = jsonObject.getString("transitionName");
} catch (JSONException e) {
kaleoNodeName = workflowLog.getState();
kaleoNodeName = workflowLog.getState();
}
String comment = null;
String tabProvenienza = null;
try {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(workflowLog.getComment());
comment = jsonObject.getString("comment");
tabProvenienza = jsonObject.getString("tab");
} catch (JSONException e) {
comment = workflowLog.getComment();
}
%>
<tr>
<td class="text-center date-col">
<%= dateFormatDateTime.format(workflowLog.getCreateDate()) %>
</td>
<td class="description-col">
<c:choose>
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_COMPLETION %>">
<div>
<c:choose>
<c:when test="<%= Validator.isNull(transitionName) %>">
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" />
</c:when>
<c:otherwise>
<c:if test='<%= "registra-esito".equalsIgnoreCase(transitionName) %>'>
<%
//ADT: bug bo id=33
String esito = (String)request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId());
}
%>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, esito} %>" key="x-completed-the-task-y-z" />
</c:if>
<c:if test='<%= "assegna".equalsIgnoreCase(transitionName) %>'>
<%
String assegna = (String)request.getAttribute("assegna-value");
%>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, assegna} %>" key="x-completed-the-task-y-z" />
</c:if>
<c:if test='<%= !"assegna".equalsIgnoreCase(transitionName) && !"registra-esito".equalsIgnoreCase(transitionName) %>'>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" />
</c:if>
</c:otherwise>
</c:choose>
<portlet:renderURL var="historyFormTaskURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<portlet:param name="struts_action" value="/workflow_tasks/render_history_form_task" />
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowLog.getWorkflowTaskId()) %>" />
</portlet:renderURL>
<span>&nbsp;</span>
<liferay-ui:icon
image="history"
url='<%=historyFormTaskURL %>'
useDialog='<%=true %>'
/>
</div>
</c:when>
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_UPDATE %>">
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="x-updated-the-due-date" />
</div>
</c:when>
<c:when test="<%= workflowLog.getType() == WorkflowLog.TRANSITION %>">
<div>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), workflowLog.getState()} %>" key="x-sent-signal-x" />
</div>
</c:when>
<c:otherwise>
<tr>
<td class="text-center date-col">
<%= dateFormatDateTime.format(workflowLog.getCreateDate()) %>
</td>
<td class="description-col">
<c:choose>
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_COMPLETION %>">
<div>
<c:choose>
<c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser.getUserId()) %>">
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>" key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself" : "x-assigned-the-task-to-herself" %>' />
</div>
<c:when test="<%= Validator.isNull(transitionName) %>">
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" />
</c:when>
<c:otherwise>
<%
if (curRole == null) {
String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK);
%>
<div>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName), HtmlUtil.escape(actorName)} %>" key="x-assigned-the-task-to-x" />
<c:if test="<%= workflowLog.getPreviousUserId() != 0 %>">
<liferay-ui:message arguments="<%= PortalUtil.getUserName(workflowLog.getPreviousUserId(), StringPool.BLANK) %>" key="previous-assignee-was-x" />
</c:if>
</div>
<%
}
else {
%>
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="task-initially-assigned-to-the-x-role" />
</div>
<%
}
%>
<c:if test='<%= "registra-esito".equalsIgnoreCase(transitionName) %>'>
<%
String esito = (String) request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId());
}
%>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, esito} %>" key="x-completed-the-task-y-z" />
</c:if>
<c:if test='<%= "assegna".equalsIgnoreCase(transitionName) %>'>
<%
String assegna = (String)request.getAttribute("assegna-value");
%>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, assegna} %>" key="x-completed-the-task-y-z" />
</c:if>
<c:if test='<%= !"assegna".equalsIgnoreCase(transitionName) && !"registra-esito".equalsIgnoreCase(transitionName) %>'>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" />
</c:if>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
</td>
<td class="text-center activity-col">
<%
if(Validator.isNotNull(kaleoNodeName)){
out.print(kaleoNodeName);
if(Validator.isNotNull(transitionName)){
if("registra-esito".equalsIgnoreCase(transitionName)){
//out.print(" ( " + (String)request.getAttribute("registra-esito-value") + " ) ");
//ADT BUG BO ID=33
String esito = (String)request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId());
<portlet:renderURL var="historyFormTaskURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<portlet:param name="struts_action" value="/workflow_tasks/render_history_form_task" />
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowLog.getWorkflowTaskId()) %>" />
</portlet:renderURL>
<span>&nbsp;</span>
<liferay-ui:icon
image="history"
url='<%=historyFormTaskURL %>'
useDialog='<%=true %>'
/>
</div>
</c:when>
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_UPDATE %>">
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="x-updated-the-due-date" />
</div>
</c:when>
<c:when test="<%= workflowLog.getType() == WorkflowLog.TRANSITION %>">
<div>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), workflowLog.getState()} %>" key="x-sent-signal-x" />
</div>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser.getUserId()) %>">
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>" key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself" : "x-assigned-the-task-to-herself" %>' />
<c:if test="<%= Validator.isNotNull(tabProvenienza) %>">
(<liferay-ui:message key='<%= tabProvenienza %>' />)
</c:if>
</div>
</c:when>
<c:otherwise>
<%
if (curRole == null) {
String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK);
%>
<div>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName), HtmlUtil.escape(actorName)} %>" key="x-assigned-the-task-to-x" />
<c:if test="<%= workflowLog.getPreviousUserId() != 0 %>">
<liferay-ui:message arguments="<%= PortalUtil.getUserName(workflowLog.getPreviousUserId(), StringPool.BLANK) %>" key="previous-assignee-was-x" />
</c:if>
</div>
<%
} else {
%>
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="task-initially-assigned-to-the-x-role" />
</div>
<%
}
out.print(" ( " + esito + " ) ");
} else if("assegna".equalsIgnoreCase(transitionName)){
out.print(" ( " + (String)request.getAttribute("assegna-value") + " ) ");
}
%>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
</td>
<td class="text-center activity-col">
<%
if (Validator.isNotNull(kaleoNodeName)) {
out.print(kaleoNodeName);
if (Validator.isNotNull(transitionName)) {
if ("registra-esito".equalsIgnoreCase(transitionName)) {
String esito = (String)request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId());
}
out.print(" ( " + esito + " ) ");
} else if ("assegna".equalsIgnoreCase(transitionName)) {
out.print(" ( " + (String)request.getAttribute("assegna-value") + " ) ");
}
%>
</td>
<td class="activity-note">
<c:if test='<%=Validator.isNotNull(workflowLog.getComment()) && !"Assigned initial task.".equals(workflowLog.getComment()) %>'>
<div class="post-it-note">
<div class="header-post-it">
<p class="header-post-it_date"><%= dateFormatDateTime.format(workflowLog.getCreateDate()) %></p>
<p class="header-post-it_name">
<c:if test="<%=Validator.isNotNull(curUser) %>">
<%= curUser.getFullName() %>
</c:if>
</p>
</div>
<div class="body-post-it">
<%= HtmlUtil.escape(workflowLog.getComment()) %>
</div>
</div>
</c:if>
</td>
</tr>
}
}
%>
</td>
<td class="activity-note">
<c:if test='<%= Validator.isNotNull(comment) && !"Assigned initial task.".equals(comment) %>'>
<div class="post-it-note">
<div class="header-post-it">
<p class="header-post-it_date"><%= dateFormatDateTime.format(workflowLog.getCreateDate()) %></p>
<p class="header-post-it_name">
<c:if test="<%=Validator.isNotNull(curUser) %>">
<%= curUser.getFullName() %>
</c:if>
</p>
</div>
<div class="body-post-it">
<%= HtmlUtil.escape(comment) %>
</div>
</div>
</c:if>
</td>
</tr>
<%
}
%>
@ -234,29 +232,28 @@ for (WorkflowLog workflowLog : workflowLogs) {
padding-bottom: 40px!important;
}
.post-it-note {
min-width: 13em;
background: rgb(255,215,7);
position: relative;
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
min-width: 13em;
background: rgb(255,215,7);
position: relative;
}
.post-it-note:after {
content: "";
position: absolute;
bottom: -2em;
left: 0;
right: 2em;
border-width: 1em;
border-style: solid;
border-color: rgb(255,215,7);
content: "";
position: absolute;
bottom: -2em;
left: 0;
right: 2em;
border-width: 1em;
border-style: solid;
border-color: rgb(255,215,7);
}
.post-it-note:before {
content: "";
position: absolute;
bottom: -2em;
right: 0;
border-width: 2em 2em 0 0;
border-style: solid;
border-color: #d3b100 transparent;
content: "";
position: absolute;
bottom: -2em;
right: 0;
border-width: 2em 2em 0 0;
border-style: solid;
border-color: #d3b100 transparent;
}
.header-post-it {

5
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp

@ -97,7 +97,7 @@ else {
viewFullContentURLString = viewFullContentURL.toString();
}
String tab = ParamUtil.getString(request, "tab", StringPool.BLANK);
request.setAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW, Boolean.TRUE);
%>
@ -211,9 +211,7 @@ request.setAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW, Boolean.TRUE);
</div>
<div class="container_gestione_attivita_body-right">
<div class="lfr-asset-summary">
<h2 class="title-action">Azioni</h2>
<div class="separator"></div>
</div>
@ -222,7 +220,6 @@ request.setAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW, Boolean.TRUE);
%>
<liferay-util:include page="/html/portlet/workflow_tasks/workflow_task_action.jsp">
<liferay-portlet:param name="viewFullContentURLString" value="<%= viewFullContentURLString %>"/>
<!-- ADT BUG BO ID= 27 -->
<liferay-portlet:param name="classPkForCarichiLavoro" value="<%= String.valueOf(classPK) %>"/>
</liferay-util:include>
</div>

13
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/workflow_task_action.jsp

@ -47,6 +47,7 @@ else {
}
long[] pooledActorsIds = WorkflowTaskManagerUtil
.getPooledActorsIds(company.getCompanyId(), workflowTask.getWorkflowTaskId());
String tab = ParamUtil.getString(request, "tab", StringPool.BLANK);
%>
<liferay-ui:icon-menu showExpanded="<%= (row == null) %>" showWhenSingleIcon="<%= (row == null) %>" cssClass="wrap-action">
<div class="task-content-actions">
@ -113,15 +114,11 @@ long[] pooledActorsIds = WorkflowTaskManagerUtil
<portlet:param name="closeRedirect" value="<%= closeRedirect %>" />
<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" />
<portlet:param name="assigneeUserId" value="<%= String.valueOf(user.getUserId()) %>" />
<portlet:param name="tab" value="<%= tab %>" />
</portlet:actionURL>
<liferay-ui:icon
iconCssClass="icon-reply"
linkCssClass='<%= "workflow-task-" + randomId + " task-assign-to-me-link btn btn-large button_custom btn-action" %>'
id='<%= randomId + "taskAssignToMeLink" %>'
message="assign-to-me"
method="get"
url="<%= assignToMeURL %>"
/>
<liferay-ui:icon iconCssClass="icon-reply" linkCssClass='<%= "workflow-task-" + randomId
+ " task-assign-to-me-link btn btn-large button_custom btn-action" %>' method="get"
id='<%= randomId + "taskAssignToMeLink" %>' message="assign-to-me" url="<%= assignToMeURL %>" />
</c:if>
<c:if test="<%= _hasOtherAssignees(pooledActorsIds, workflowTask, user) %>">
<portlet:actionURL var="assignURL">

BIN
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/portos-kaleo-portlet-service.jar

File binario non mostrato.

5
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language_it.properties

@ -13,3 +13,8 @@ error-portos-kaleo-required = {0} campo obbligatorio
x-assigned-the-task-to-x = L'attività è stata assegnata a {1}
x-completed-the-task-x-y={0} ha completato l'attività {1} ({2}).
x-sent-signal-x=Il sistema ha inviato un segnale {1}.
Tab_MieiTask = Pratica prelevata da le mie attività
Tab_TaskMieiRuoli = Pratica prelevata da attività dei miei ruoli
Tab_AtriTask = Pratica prelevata da altre attività
Tab_TaskCompletati = Pratica prelevata da attività completate

28
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java

@ -41,6 +41,7 @@ import com.liferay.portal.kernel.json.JSONObject;
import com.liferay.portal.kernel.json.JSONSerializer;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.portlet.DynamicActionRequest;
import com.liferay.portal.kernel.servlet.BrowserSnifferUtil;
import com.liferay.portal.kernel.servlet.SessionErrors;
import com.liferay.portal.kernel.servlet.SessionMessages;
@ -97,7 +98,16 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
if (cmd.equals(Constants.SAVE) || cmd.equals(Constants.RESET)) {
if (cmd.equals(Constants.ASSIGN)) {
Map<String, String> info = new HashMap<>();
info.put("comment", ParamUtil.getString(actionRequest, "comment", StringPool.BLANK));
info.put("tab", ParamUtil.getString(actionRequest, "tab", StringPool.BLANK));
String json = JSONFactoryUtil.createJSONSerializer().serializeDeep(info);
DynamicActionRequest dynamicActionRequest = new DynamicActionRequest(actionRequest);
dynamicActionRequest.setParameter("comment", json);
originalStrutsPortletAction.processAction(originalStrutsPortletAction, portletConfig, dynamicActionRequest,
actionResponse);
} else if (cmd.equals(Constants.SAVE) || cmd.equals(Constants.RESET)) {
try {
if (cmd.equals(Constants.SAVE)) {
completeTask(actionRequest);
@ -112,8 +122,7 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
+ SessionMessages.KEY_SUFFIX_CLOSE_REDIRECT, closeRedirect);
}
sendRedirect(actionRequest, actionResponse, redirect);
}
catch (Exception e) {
} catch (Exception e) {
if (e instanceof WorkflowTaskDueDateException) {
SessionErrors.add(actionRequest, e.getClass());
} else if (e instanceof PrincipalException || e instanceof WorkflowException) {
@ -296,8 +305,7 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
if (layoutTypePortlet.hasPortletId(portletId)) {
return true;
}
}
catch (PortalException pe) {
} catch (PortalException pe) {
if (_log.isDebugEnabled()) {
_log.debug(pe, pe);
}
@ -497,14 +505,12 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
}
}
}
}
catch (Exception e) {
} catch (Exception e) {
// l'errore non va gestito
e.printStackTrace();
}
}
}
catch (Exception e) {
} catch (Exception e) {
_log.error("Errore in getHistoryWorkflowLogs", e);
}
return esitiMapByWorkflowLogID;
@ -513,7 +519,6 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
/**
* ADT: check congruenza WF - presenza dell'istruttore
*
*
* @param transitionName
* @param workflowTaskId
*/
@ -553,8 +558,7 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
+ controlloPratica.getControlloPraticaId());
}
}
}
catch (Exception e) {
} catch (Exception e) {
_log.error("checkPresenzaIstruttore KO per workflowTaskId = " + workflowTaskId + " [" + e.getMessage()
+ " , " + e.getCause() + "]");
}

4
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
##
build.namespace=Kaleo
build.number=40
build.date=1636729923800
build.number=41
build.date=1644918876973
build.auto.upgrade=true
##

Caricamento…
Annulla
Salva