|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
|
|
|
<%@page import="it.tref.liferay.portos.bo.util.ValidazionePraticaUtil"%> |
|
|
|
|
<%@page import="it.tref.liferay.portos.bo.shared.util.SessionUtil"%> |
|
|
|
|
<%@page import="java.util.HashMap"%> |
|
|
|
|
<%@page import="java.util.Map"%> |
|
|
|
@ -41,19 +42,27 @@ String comingFrom = ParamUtil.getString(
|
|
|
|
|
"comingFrom", |
|
|
|
|
GetterUtil.getString(PortalUtil.getOriginalServletRequest(request).getParameter("comingFrom"), "page_allegati") |
|
|
|
|
); |
|
|
|
|
boolean comingFromGeologica = comingFrom.equalsIgnoreCase("page_geologica"); |
|
|
|
|
boolean comingFromAllegati = comingFrom.equalsIgnoreCase("page_allegati"); |
|
|
|
|
boolean comingFromFineLavori = comingFrom.equalsIgnoreCase("page_fine_lavori"); |
|
|
|
|
boolean comingFromCollaudo = comingFrom.equalsIgnoreCase("page_collaudo"); |
|
|
|
|
|
|
|
|
|
long classPk = ParamUtil.getLong(request, "classPk"); |
|
|
|
|
String className = ParamUtil.getString(request, "className"); |
|
|
|
|
boolean isDettPratica = DettPratica.class.getName().equalsIgnoreCase(className); |
|
|
|
|
boolean isFineLavori = FineLavori.class.getName().equalsIgnoreCase(className); |
|
|
|
|
boolean isCollaudo = Collaudo.class.getName().equalsIgnoreCase(className); |
|
|
|
|
long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); |
|
|
|
|
|
|
|
|
|
if (FineLavori.class.getName().equalsIgnoreCase(className)) { |
|
|
|
|
boolean praticaIsEditable = false; |
|
|
|
|
if (isFineLavori) { |
|
|
|
|
FineLavori fineLavori = FineLavoriServiceUtil.getFineLavori(classPk); |
|
|
|
|
intPraticaId = fineLavori.getIntPraticaId(); |
|
|
|
|
} else if (Collaudo.class.getName().equalsIgnoreCase(className)) { |
|
|
|
|
} else if (isCollaudo) { |
|
|
|
|
Collaudo collaudo = CollaudoServiceUtil.getCollaudo(classPk); |
|
|
|
|
intPraticaId = collaudo.getIntPraticaId(); |
|
|
|
|
} else { |
|
|
|
|
DettPratica dettPratica = (DettPratica)request.getAttribute("bean.dettPratica"); |
|
|
|
|
DettPratica dettPratica = (DettPratica) request.getAttribute("bean.dettPratica"); |
|
|
|
|
HttpServletRequest httpServletRequest = PortalUtil.getOriginalServletRequest(request); |
|
|
|
|
if (dettPratica == null) { |
|
|
|
|
long dettPraticaIdParam = ParamUtil.getLong(request, "classPk"); |
|
|
|
@ -65,7 +74,7 @@ if (FineLavori.class.getName().equalsIgnoreCase(className)) {
|
|
|
|
|
if (dettPratica == null) { |
|
|
|
|
dettPratica = DettPraticaServiceUtil.getDettPratica(classPk); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
praticaIsEditable = ValidazionePraticaUtil.praticaIsEditable(dettPratica.getDettPraticaId()); |
|
|
|
|
request.setAttribute("bean.dettPratica", dettPratica); |
|
|
|
|
classPk = dettPratica.getDettPraticaId(); |
|
|
|
|
intPraticaId = dettPratica.getIntPraticaId(); |
|
|
|
@ -86,7 +95,7 @@ boolean disabledInput = true;
|
|
|
|
|
boolean canSignGeoDocs = false; |
|
|
|
|
if (Validator.isNotNull(request.getParameter("disabled"))) { |
|
|
|
|
disabledInput = disabled; |
|
|
|
|
} else if ("page_allegati".equalsIgnoreCase(comingFrom)) { |
|
|
|
|
} else if (comingFromAllegati) { |
|
|
|
|
Boolean hasDelegaCompilazioneDomanda = (Boolean) SessionUtil.getDettPraticaObject(request, classPk, "hasDelegaCompilazioneDomanda"); |
|
|
|
|
if (null == hasDelegaCompilazioneDomanda) { |
|
|
|
|
hasDelegaCompilazioneDomanda = DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(),classPk); |
|
|
|
@ -94,18 +103,18 @@ if (Validator.isNotNull(request.getParameter("disabled"))) {
|
|
|
|
|
disabledInput = !hasDelegaCompilazioneDomanda |
|
|
|
|
&& !DelegheUtil.hasDelegaFirmaAllegati(user.getUserId(),classPk); |
|
|
|
|
soggettoDelegato = DelegheUtil.getPersonaDelegaCompilazioneDomanda(classPk); |
|
|
|
|
} else if ("page_geologica".equalsIgnoreCase(comingFrom)) { |
|
|
|
|
} else if (comingFromGeologica) { |
|
|
|
|
disabledInput = !DelegheUtil.hasDelegaCompilazioneSezioneGeologica(user.getUserId(),classPk); |
|
|
|
|
soggettoDelegato = DelegheUtil.getPersonaDelegaCompilazioneSezioneGeologica(classPk); |
|
|
|
|
canSignGeoDocs = true; |
|
|
|
|
} else if ("page_fine_lavori".equalsIgnoreCase(comingFrom)) { |
|
|
|
|
} else if (comingFromFineLavori) { |
|
|
|
|
disabledInput = disabled; |
|
|
|
|
} else if ("page_collaudo".equalsIgnoreCase(comingFrom)) { |
|
|
|
|
} else if (comingFromCollaudo) { |
|
|
|
|
disabledInput = disabled; |
|
|
|
|
} |
|
|
|
|
%> |
|
|
|
|
|
|
|
|
|
<c:if test="<%= DettPratica.class.getName().equals(className) %>"> |
|
|
|
|
<c:if test="<%= isDettPratica %>"> |
|
|
|
|
<liferay-util:include page="/html/fascicolofe/navigator/header.jsp" servletContext="<%=application%>"> |
|
|
|
|
<liferay-util:param name="disabledInput" value="<%= String.valueOf(disabledInput) %>" /> |
|
|
|
|
<c:if test="<%=soggettoDelegato!=null%>"> |
|
|
|
@ -135,7 +144,7 @@ String refresh = "Liferay.fire('allegati-" + comingFrom + "-open');Liferay.Portl
|
|
|
|
|
<div class="navbar-container header_allegati_table"> |
|
|
|
|
<c:if test="<%= !inBO %>"> |
|
|
|
|
<c:choose> |
|
|
|
|
<c:when test='<%= comingFrom.equals("page_geologica") %>'> |
|
|
|
|
<c:when test='<%= comingFromGeologica %>'> |
|
|
|
|
<h3 class="title-table">Allegati Geologici</h3> |
|
|
|
|
</c:when> |
|
|
|
|
<c:otherwise> |
|
|
|
@ -165,13 +174,13 @@ String refresh = "Liferay.fire('allegati-" + comingFrom + "-open');Liferay.Portl
|
|
|
|
|
|
|
|
|
|
<% |
|
|
|
|
List<String> tipologiaAllegati = new ArrayList<String>(); |
|
|
|
|
if ("page_geologica".equals(comingFrom)) { |
|
|
|
|
if (comingFromGeologica) { |
|
|
|
|
tipologiaAllegati = DocumentiPraticaUtil.getDocGeologo(); |
|
|
|
|
}else if ("page_allegati".equals(comingFrom)) { |
|
|
|
|
} else if (comingFromAllegati) { |
|
|
|
|
tipologiaAllegati = DocumentiPraticaUtil.getDocDomanda(); |
|
|
|
|
}else if ("page_fine_lavori".equals(comingFrom)) { |
|
|
|
|
} else if (comingFromFineLavori) { |
|
|
|
|
tipologiaAllegati = DocumentiPraticaUtil.getDocFineLavori(); |
|
|
|
|
}else if ("page_collaudo".equals(comingFrom)) { |
|
|
|
|
} else if (comingFromCollaudo) { |
|
|
|
|
tipologiaAllegati = DocumentiPraticaUtil.getDocCollaudo(); |
|
|
|
|
} |
|
|
|
|
%> |
|
|
|
@ -198,14 +207,14 @@ if ("page_geologica".equals(comingFrom)) {
|
|
|
|
|
</div> |
|
|
|
|
</c:if> |
|
|
|
|
<c:if test="<%=inBO%>"> |
|
|
|
|
<c:if test='<%= !"page_geologica".equals(comingFrom) %>'> |
|
|
|
|
<c:if test='<%= !comingFromGeologica %>'> |
|
|
|
|
<div class='row asseverazioni-header'> |
|
|
|
|
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">Descrizione</div> |
|
|
|
|
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 asserazioni-header-title">Firme presenti</div> |
|
|
|
|
<div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">Azioni</div> |
|
|
|
|
</div> |
|
|
|
|
</c:if> |
|
|
|
|
<c:if test='<%=" page_geologica".equals(comingFrom) %>'> |
|
|
|
|
<c:if test='<%= comingFromGeologica %>'> |
|
|
|
|
<div class='row asseverazioni-header'> |
|
|
|
|
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">Descrizione</div> |
|
|
|
|
<div class="col-xs-2 col-sm-2 col-md-2 col-lg-2 asserazioni-header-title">Provenienza</div> |
|
|
|
@ -218,10 +227,10 @@ if ("page_geologica".equals(comingFrom)) {
|
|
|
|
|
</c:if> |
|
|
|
|
|
|
|
|
|
<% |
|
|
|
|
for (String codiceDoc:tipologiaAllegati) { |
|
|
|
|
List<DocPratica> docPraticas = new ArrayList<DocPratica>(); |
|
|
|
|
for (String codiceDoc : tipologiaAllegati) { |
|
|
|
|
List<DocPratica> docPraticas = null; |
|
|
|
|
|
|
|
|
|
if(FineLavori.class.getName().equals(className) || Collaudo.class.getName().equals(className)) { |
|
|
|
|
if (isFineLavori || isCollaudo) { |
|
|
|
|
docPraticas = DocPraticaServiceUtil.findByClassPk_Tipologia(classPk, codiceDoc, QueryUtil.ALL_POS,QueryUtil.ALL_POS); |
|
|
|
|
} else { |
|
|
|
|
docPraticas = DocPraticaServiceUtil.findByIntPratica_ClassPk_Tipologia(intPraticaId, classPk, codiceDoc, QueryUtil.ALL_POS,QueryUtil.ALL_POS); |
|
|
|
@ -246,19 +255,19 @@ for (String codiceDoc:tipologiaAllegati) {
|
|
|
|
|
|
|
|
|
|
StringBuilder title = new StringBuilder(); |
|
|
|
|
String cssIcon = StringPool.BLANK; |
|
|
|
|
String cssColor= StringPool.BLANK; |
|
|
|
|
String cssColor = StringPool.BLANK; |
|
|
|
|
String testoFirme = "Non ci sono firme sul file"; |
|
|
|
|
if (firme.getFirmeDigitali().size() > 0) { |
|
|
|
|
cssIcon = "fa-check"; |
|
|
|
|
cssColor= "txt-green"; |
|
|
|
|
cssColor = "txt-green"; |
|
|
|
|
testoFirme = StringPool.BLANK; |
|
|
|
|
} else if (docPratica.getStatus() == 1) { |
|
|
|
|
cssIcon= "fa-cog fa-spin"; |
|
|
|
|
cssColor= "txt-orange"; |
|
|
|
|
cssColor = "txt-orange"; |
|
|
|
|
testoFirme = "Estrazione firme in corso"; |
|
|
|
|
} else if (docPratica.getStatus() == 4) { |
|
|
|
|
cssIcon= "fa-alert"; |
|
|
|
|
cssColor= "txt-red"; |
|
|
|
|
cssColor = "txt-red"; |
|
|
|
|
testoFirme = "Errore nell'estrazione delle firme"; |
|
|
|
|
} else { |
|
|
|
|
cssIcon = "fa-close"; |
|
|
|
@ -319,16 +328,15 @@ for (String codiceDoc:tipologiaAllegati) {
|
|
|
|
|
|
|
|
|
|
<div class='col-xs-2 col-sm-2 col-md-2 col-lg-2 <%=inBO ? "hidden" : ""%> asserazioni-body-title'> |
|
|
|
|
<% |
|
|
|
|
String adding = StringPool.BLANK; |
|
|
|
|
if (FineLavori.class.getName().equals(className)) { |
|
|
|
|
if (isFineLavori) { |
|
|
|
|
FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(docPratica.getClassPk()); |
|
|
|
|
if (fineLavori != null) { |
|
|
|
|
adding = fineLavori.getFullDescription(); |
|
|
|
|
out.print(fineLavori.getFullDescription()); |
|
|
|
|
} |
|
|
|
|
} else if (Collaudo.class.getName().equalsIgnoreCase(className)) { |
|
|
|
|
} else if (isCollaudo) { |
|
|
|
|
Collaudo collaudo = CollaudoLocalServiceUtil.fetchCollaudo(docPratica.getClassPk()); |
|
|
|
|
if (collaudo != null) { |
|
|
|
|
adding = collaudo.getFullDescription(); |
|
|
|
|
out.print(collaudo.getFullDescription()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
long pk = docPratica.getClassPk(); |
|
|
|
@ -337,10 +345,9 @@ for (String codiceDoc:tipologiaAllegati) {
|
|
|
|
|
} |
|
|
|
|
DettPratica dettPratica = dettPraticas.get(pk); |
|
|
|
|
if (Validator.isNotNull(dettPratica)) { |
|
|
|
|
adding = dettPratica.getFullDescription(); |
|
|
|
|
out.print(dettPratica.getFullDescription()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
out.print(adding); |
|
|
|
|
%> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -360,11 +367,11 @@ for (String codiceDoc:tipologiaAllegati) {
|
|
|
|
|
%> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<c:if test='<%= inBO && "page_geologica".equals(comingFrom) %>'> |
|
|
|
|
<c:if test='<%= inBO && comingFromGeologica %>'> |
|
|
|
|
<div class="col-xs-2 col-sm-2 col-md-2 col-lg-2"> |
|
|
|
|
<span> |
|
|
|
|
<% |
|
|
|
|
if (className.equals(DettPratica.class.getName())) { |
|
|
|
|
if (isDettPratica) { |
|
|
|
|
pk = docPratica.getClassPk(); |
|
|
|
|
if (!dettPraticas.containsKey(pk)) { |
|
|
|
|
dettPraticas.put(pk, DettPraticaLocalServiceUtil.fetchDettPratica(pk)); |
|
|
|
@ -389,7 +396,7 @@ for (String codiceDoc:tipologiaAllegati) {
|
|
|
|
|
|
|
|
|
|
<c:if test='<%= inBO %>'> |
|
|
|
|
<c:choose> |
|
|
|
|
<c:when test='<%= "page_geologica".equals(comingFrom) %>'> |
|
|
|
|
<c:when test='<%= comingFromGeologica %>'> |
|
|
|
|
<div class="col-xs-2 col-sm-2 col-md-2 col-lg-2 asserazioni-body-title text-center"> |
|
|
|
|
</c:when> |
|
|
|
|
<c:otherwise> |
|
|
|
@ -432,9 +439,9 @@ for (String codiceDoc:tipologiaAllegati) {
|
|
|
|
|
</liferay-util:include> |
|
|
|
|
</c:when> |
|
|
|
|
<c:otherwise> |
|
|
|
|
<c:if test="<%= !inBO %>"> |
|
|
|
|
<c:if test="<%= !disabledInput || canSignGeoDocs %>"> |
|
|
|
|
<liferay-util:include page="/html/allegatipratica/allegati_action.jsp" |
|
|
|
|
<c:if test="<%= !inBO && !disabledInput || canSignGeoDocs %>"> |
|
|
|
|
<%@ include file="/html/allegatipratica/allegati_action.jspf" %> |
|
|
|
|
<%-- <liferay-util:include page="/html/allegatipratica/allegati_action.jsp" |
|
|
|
|
servletContext="<%= application %>"> |
|
|
|
|
<liferay-util:param name="backUrl" value="<%= currentURL %>" /> |
|
|
|
|
<liferay-util:param name="comingFrom" value="<%= comingFrom %>" /> |
|
|
|
@ -442,8 +449,7 @@ for (String codiceDoc:tipologiaAllegati) {
|
|
|
|
|
<liferay-util:param name="className" value="<%= className %>" /> |
|
|
|
|
<liferay-util:param name="docPraticaId" value="<%= String.valueOf(docPratica.getDocPraticaId()) %>" /> |
|
|
|
|
<liferay-util:param name="disabledInput" value="<%= String.valueOf(disabledInput) %>" /> |
|
|
|
|
</liferay-util:include> |
|
|
|
|
</c:if> |
|
|
|
|
</liferay-util:include> --%> |
|
|
|
|
</c:if> |
|
|
|
|
<c:if test="<%= inBO %>"> |
|
|
|
|
<liferay-portlet:renderURL var="previewURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> |
|
|
|
|