Salvatore La Manna
4 anni fa
26 ha cambiato i file con 355 aggiunte e 554 eliminazioni
@ -1,228 +1,182 @@
|
||||
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
||||
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> |
||||
<%@page import="com.liferay.portal.kernel.util.LocaleUtil"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowConstants"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil"%> |
||||
<%@page import="com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil"%> |
||||
<%@page import="com.liferay.portal.workflow.kaleo.model.KaleoInstance"%> |
||||
<%@page import="java.text.DateFormat"%> |
||||
<%@page import="com.liferay.portal.kernel.dao.orm.QueryUtil"%> |
||||
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> |
||||
<%@page import="com.liferay.portal.kernel.util.StringPool"%> |
||||
<%@page import="it.tref.liferay.portos.bo.util.WorkflowUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.impl.DettPraticaLocalServiceImpl"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil"%> |
||||
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> |
||||
<%@page import="com.liferay.portal.kernel.util.Validator"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowConstants"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowInstance"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowTask"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowTaskManagerUtil"%> |
||||
<%@page import="com.liferay.portal.model.User"%> |
||||
<%@page import="java.util.concurrent.TimeUnit"%> |
||||
<%@page import="java.util.Date"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.Provincia"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil"%> |
||||
<%@page import="com.liferay.portal.model.WorkflowInstanceLink"%> |
||||
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> |
||||
<%@page import="com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.Comune"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.ControlloPratica"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.Provincia"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.Territorio"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%> |
||||
<%@page import="com.liferay.portal.kernel.dao.orm.QueryUtil"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowTaskManagerUtil"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowTask"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> |
||||
<%@page import="it.tref.liferay.portos.bo.util.WorkflowUtil"%> |
||||
<%@page import="java.util.List"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil"%> |
||||
<%@page import="com.liferay.portal.kernel.workflow.WorkflowInstance"%> |
||||
<%@page import="it.tref.liferay.portos.bo.model.ControlloPratica"%> |
||||
<%@page import="com.liferay.portal.model.WorkflowInstanceLink"%> |
||||
<%@page import="com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil"%> |
||||
<% |
||||
String rowUrl = StringPool.BLANK; |
||||
|
||||
//ADT - BUG-12 Aggiunta colonna Data Esito |
||||
String currentTab = (String)request.getAttribute("tabs1"); |
||||
%> |
||||
|
||||
<% |
||||
String rowUrl = StringPool.BLANK; |
||||
//ADT - BUG-12 Aggiunta colonna Data Esito |
||||
String currentTab = (String)request.getAttribute("tabs1"); |
||||
//Informazioni relative alla pratica |
||||
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPratica.getIntPraticaId()); |
||||
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); |
||||
%> |
||||
<c:if test="<%= Validator.isNotNull(intPratica) %>"> |
||||
<% |
||||
|
||||
ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(controlloPratica.getControlloPraticaId()); |
||||
Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica.getTerritorioId()); |
||||
Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId()); |
||||
|
||||
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia()); |
||||
|
||||
if(controlloPratica.getStatus() == 0 || controlloPratica.getStatus() == 4 || controlloPratica.getStatus() == 6){ |
||||
|
||||
} |
||||
//Informazioni relative al workflow |
||||
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink( |
||||
controlloPratica.getCompanyId(),controlloPratica.getGroupId(), ControlloPratica.class.getName(),controlloPratica.getPrimaryKey()); |
||||
controlloPratica.getCompanyId(), controlloPratica.getGroupId(), ControlloPratica.class.getName(), |
||||
controlloPratica.getPrimaryKey()); |
||||
|
||||
List<WorkflowTask> listaTask = null; |
||||
WorkflowInstance workflowInstance = null; |
||||
if (workflowInstanceLink != null) { |
||||
long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId(); |
||||
workflowInstance = |
||||
WorkflowInstanceManagerUtil.getWorkflowInstance(controlloPratica.getCompanyId(), workflowInstanceId); |
||||
|
||||
workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(controlloPratica.getCompanyId(), workflowInstanceId); |
||||
listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null, |
||||
workflowInstance.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); |
||||
} |
||||
WorkflowTask task = null; |
||||
|
||||
if(listaTask != null && !listaTask.isEmpty()){ |
||||
if (listaTask != null && !listaTask.isEmpty()) { |
||||
task = listaTask.get(0); |
||||
} |
||||
|
||||
%> |
||||
|
||||
|
||||
<liferay-ui:search-container-column-text name="taskName"> |
||||
<% |
||||
String taskName = StringPool.BLANK; |
||||
if(task!=null){ |
||||
if (task != null) { |
||||
User userTask = UserLocalServiceUtil.fetchUser(task.getAssigneeUserId()); |
||||
taskName = LanguageUtil.get(pageContext,task.getName()); |
||||
if(userTask!=null){ |
||||
taskName += " ("+userTask.getFullName()+")"; |
||||
if (userTask != null) { |
||||
taskName += " (" + userTask.getFullName() + StringPool.CLOSE_PARENTHESIS; |
||||
} |
||||
}else if (workflowInstance != null){ |
||||
} else if (workflowInstance != null) { |
||||
taskName = LanguageUtil.get(pageContext, workflowInstance.getState()); |
||||
} |
||||
|
||||
if(lastDettPratica != null){ |
||||
|
||||
if (lastDettPratica != null) { |
||||
if (lastDettPratica.getTipoIntegrazione() != null) { |
||||
//BUG BO ID=14: NOME TASK SEZIONE ATTIVITA' |
||||
if(lastDettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)){ |
||||
taskName = taskName + " - Integrazione #" + (lastDettPratica.getIntegrazione()); |
||||
} else if(lastDettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)){ |
||||
taskName = taskName + " - Variante #" + (lastDettPratica.getVarianteNumero()); |
||||
if (lastDettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)) { |
||||
taskName += " - Integrazione #" + lastDettPratica.getIntegrazione(); |
||||
} else if (lastDettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) { |
||||
taskName += " - Variante #" + lastDettPratica.getVarianteNumero(); |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
out.print(taskName); |
||||
%> |
||||
</liferay-ui:search-container-column-text> |
||||
|
||||
<liferay-ui:search-container-column-text name="Esito"> |
||||
<% |
||||
String tipoEsito = ControlloPraticaLocalServiceUtil.getTipoEsito(controlloPratica.getControlloPraticaId()); |
||||
out.print(tipoEsito); |
||||
out.print(LanguageUtil.get(pageContext, tipoEsito)); |
||||
%> |
||||
</liferay-ui:search-container-column-text> |
||||
|
||||
<%-- ADT - BUG-12 Aggiunta colonna Data Esito --%> |
||||
<%-- Bug 33264 --%> |
||||
<c:if test='<%= "Tab_TaskCompletati".equals(currentTab) %>'> |
||||
<liferay-ui:search-container-column-text name="Data Esito" value='<%= |
||||
controlloPratica.getStatusDate()!=null ? dateFormatDate.format(controlloPratica.getStatusDate()): "" %>' > |
||||
<liferay-ui:search-container-column-text name="Data Esito" value='<%= controlloPratica.getStatusDate() != null ? |
||||
dateFormatDate.format(controlloPratica.getStatusDate()): StringPool.BLANK %>' > |
||||
</liferay-ui:search-container-column-text> |
||||
</c:if> |
||||
|
||||
<%-- <liferay-ui:search-container-column-text name="Sorteggiata"> |
||||
<% |
||||
/*boolean sorteggiata = SorteggioLocalServiceUtil.findByIntPratica(intPratica.getIntPraticaId())!=null; |
||||
String clazz = StringPool.BLANK; |
||||
if(sorteggiata){ |
||||
out.print("<span><i class=\"relative fa fa-check-square txt-green\"></i></span>"); |
||||
}*/ |
||||
%> |
||||
</liferay-ui:search-container-column-text> --%> |
||||
|
||||
<liferay-ui:search-container-column-text name="Pratica"> |
||||
<% |
||||
|
||||
|
||||
if(lastDettPratica != null){ |
||||
if (lastDettPratica != null) { |
||||
long lastDettPraticaId = lastDettPratica.getDettPraticaId(); |
||||
if(lastDettPraticaId != controlloPratica.getDettPraticaId()){ |
||||
String messageLabel = LanguageUtil.get(pageContext, "sono-presenti-aggiornamenti-fuori-dal-controllo-obbligatorio"); |
||||
if(controlloPratica.getStatus() == WorkflowConstants.STATUS_APPROVED || controlloPratica.getStatus() == WorkflowConstants.STATUS_INCOMPLETE || controlloPratica.getStatus() == WorkflowConstants.STATUS_DENIED){ |
||||
messageLabel = LanguageUtil.get(pageContext, "sono-presenti-aggiornamenti-fuori-dal-controllo-obbligatorio-closed"); |
||||
if (lastDettPraticaId != controlloPratica.getDettPraticaId()) { |
||||
String messageLabel = LanguageUtil.get(pageContext, |
||||
"sono-presenti-aggiornamenti-fuori-dal-controllo-obbligatorio"); |
||||
if (controlloPratica.getStatus() == WorkflowConstants.STATUS_APPROVED |
||||
|| controlloPratica.getStatus() == WorkflowConstants.STATUS_INCOMPLETE |
||||
|| controlloPratica.getStatus() == WorkflowConstants.STATUS_DENIED) { |
||||
messageLabel = LanguageUtil.get(pageContext, |
||||
"sono-presenti-aggiornamenti-fuori-dal-controllo-obbligatorio-closed"); |
||||
} |
||||
|
||||
%> |
||||
|
||||
<span class="txt-bold avviso-aggiornamenti"> |
||||
<i class="fa fa-exclamation-triangle txt-orange"></i> |
||||
<%=messageLabel %> |
||||
<i class="fa fa-exclamation-triangle txt-orange"></i> <%= messageLabel %> |
||||
</span> |
||||
|
||||
|
||||
<% |
||||
} |
||||
} |
||||
%> |
||||
<%= intPratica.getTitle(locale, true) %> |
||||
<%= Validator.isNull(intPratica.getTipoProcedura()) ? |
||||
"" : |
||||
"<br><small>" + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) + "</small>" %> |
||||
<%= Validator.isNull(intPratica.getTipoProcedura()) ? StringPool.BLANK |
||||
: "<br><small>" + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) |
||||
+ "</small>" %> |
||||
</liferay-ui:search-container-column-text> |
||||
|
||||
<liferay-ui:search-container-column-text name="istruttore"> |
||||
<c:if test="<%=intPratica.getStatusByUserId()!=0l %>"> |
||||
<c:if test="<%= intPratica.getStatusByUserId() != 0L %>"> |
||||
<% |
||||
User tecnico = UserLocalServiceUtil.fetchUser(intPratica.getStatusByUserId()); |
||||
if (tecnico != null) { |
||||
out.print(tecnico.getFullName()); |
||||
} else { |
||||
out.print(" [" + intPratica.getStatusByUserId() + "]"); |
||||
out.print(" [" + intPratica.getStatusByUserId() + StringPool.CLOSE_BRACKET); |
||||
} |
||||
%> |
||||
</c:if> |
||||
<c:if test="<%=intPratica.getStatusByUserId()==0l %>"> |
||||
<c:if test="<%= intPratica.getStatusByUserId() == 0L %>"> |
||||
- |
||||
</c:if> |
||||
</liferay-ui:search-container-column-text> |
||||
|
||||
<liferay-ui:search-container-column-text name="unita-operativa"> |
||||
<%= intPratica.getUnitaOperativa() > 0 ? String.valueOf(intPratica.getUnitaOperativa()) : StringPool.BLANK %> |
||||
</liferay-ui:search-container-column-text> |
||||
|
||||
<liferay-ui:search-container-column-text name="provenienza"> |
||||
<% |
||||
WorkflowTask workflowTask = WorkflowUtil.getLastCompletedTask(controlloPratica.getCompanyId(),controlloPratica.getGroupId(), null, controlloPratica); |
||||
WorkflowTask workflowTask = WorkflowUtil.getLastCompletedTask(controlloPratica.getCompanyId(), |
||||
controlloPratica.getGroupId(), null, controlloPratica); |
||||
%> |
||||
<c:if test="<%=workflowTask!=null%>"> |
||||
<c:if test="<%= workflowTask != null %>"> |
||||
<% |
||||
User approvatore = UserLocalServiceUtil.fetchUser(workflowTask.getAssigneeUserId()); |
||||
if(approvatore!=null){ |
||||
if (approvatore!=null) { |
||||
out.print(approvatore.getFullName()); |
||||
}else{ |
||||
if(workflowTask.getAssigneeUserId()==-1){ |
||||
} else { |
||||
if (workflowTask.getAssigneeUserId() == -1) { |
||||
out.print( " [Portos 1]"); |
||||
} else { |
||||
out.print( " ["+workflowTask.getAssigneeUserId()+"]"); |
||||
out.print( " [" + workflowTask.getAssigneeUserId() + StringPool.CLOSE_BRACKET); |
||||
} |
||||
} |
||||
out.print(" ("+workflowTask.getName()+")"); |
||||
out.print(" (" + workflowTask.getName() + StringPool.CLOSE_PARENTHESIS); |
||||
%> |
||||
</c:if> |
||||
<c:if test="<%=workflowTask==null%>"> |
||||
<c:if test="<%= workflowTask == null %>"> |
||||
- |
||||
</c:if> |
||||
</liferay-ui:search-container-column-text> |
||||
|
||||
<liferay-ui:search-container-column-text name="data-inizio-procedimento" value="<%= dateFormatDate.format(controlloPratica.getCreateDate()) %>" /> |
||||
|
||||
<liferay-ui:search-container-column-text name="data-inizio-procedimento" |
||||
value="<%= dateFormatDate.format(controlloPratica.getCreateDate()) %>" /> |
||||
<liferay-ui:search-container-column-text name="provincia" > |
||||
<%=provincia.getProvincia()+" - "+comune.getDenominazione() %> |
||||
<%= provincia.getProvincia() + " - " + comune.getDenominazione() %> |
||||
</liferay-ui:search-container-column-text> |
||||
|
||||
<liferay-ui:search-container-column-text name="GG*" cssClass="text-center"> |
||||
<% |
||||
long days = ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(controlloPratica.getControlloPraticaId()); |
||||
%> |
||||
<%=days %> |
||||
<%= days %> |
||||
</liferay-ui:search-container-column-text> |
||||
|
||||
<liferay-ui:search-container-column-jsp path="/html/gestioneattivita/action_button.jsp" align="right" cssClass="text-center"/> |
||||
|
||||
<liferay-ui:search-container-column-jsp path="/html/gestioneattivita/action_button.jsp" align="right" |
||||
cssClass="text-center"/> |
||||
</c:if> |
Caricamento…
Reference in new issue