Sfoglia il codice sorgente

Fix per pratiche con molti allegati

master
Salvatore La Manna 4 anni fa
parent
commit
8e86eb57d5
  1. 13
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DelegheUtil.java
  2. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  3. 59
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/allegati_action.jspf
  4. 188
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp
  5. 1
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_fascicolo.jsp
  6. 1
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp

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

@ -51,13 +51,24 @@ public class DelegheUtil {
private final static Log _log = LogFactoryUtil.getLog(DelegheUtil.class); private final static Log _log = LogFactoryUtil.getLog(DelegheUtil.class);
private static int cntPraticaIsEditable = 0;
public static boolean hasDelegaFirma(long userId, long docPraticaId, boolean sezioneGeologica) public static boolean hasDelegaFirma(long userId, long docPraticaId, boolean sezioneGeologica)
throws PortalException, SystemException { throws PortalException, SystemException {
return hasDelegaFirma(userId, docPraticaId, sezioneGeologica, null);
}
public static boolean hasDelegaFirma(long userId, long docPraticaId, boolean sezioneGeologica,
Boolean praticaIsEditable) throws PortalException, SystemException {
DocPratica docPratica = DocPraticaLocalServiceUtil.getDocPratica(docPraticaId); DocPratica docPratica = DocPraticaLocalServiceUtil.getDocPratica(docPraticaId);
boolean controllo = true; boolean controllo = true;
if (DettPratica.class.getName().equals(docPratica.getClassName())) { if (DettPratica.class.getName().equals(docPratica.getClassName())) {
controllo = ValidazionePraticaUtil.praticaIsEditable(docPratica.getClassPk()); if (null == praticaIsEditable) {
controllo = ValidazionePraticaUtil.praticaIsEditable(docPratica.getClassPk());
} else {
controllo = praticaIsEditable;
}
} }
if (controllo) { if (controllo) {
User user = UserLocalServiceUtil.getUser(userId); User user = UserLocalServiceUtil.getUser(userId);

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_bo build.namespace=portos_bo
build.number=2533 build.number=2537
build.date=1608199554355 build.date=1610976073338
build.auto.upgrade=true build.auto.upgrade=true
## ##

59
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/allegati_action.jsp → liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/allegati_action.jspf

@ -1,45 +1,16 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@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="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.util.DelegheUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.FirmeUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.bean.FirmeBean"%>
<%@page import="it.tref.liferay.portos.bo.model.DocPratica"%>
<%@page import="it.tref.liferay.portos.bo.service.DocPraticaServiceUtil"%>
<%@page import="com.liferay.portal.security.permission.ActionKeys"%>
<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.kernel.dao.search.SearchContainer"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.HashMap"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil"%>
<%@include file="/html/allegatipratica/init.jsp"%>
<% <%
String redirect = ParamUtil.getString(request, "backUrl"); boolean hasDelegaFirma = DelegheUtil.hasDelegaFirma(
String comingFrom = ParamUtil.getString(request, "comingFrom"); user.getUserId(),
long classPk = ParamUtil.getLong(request, "classPk"); docPratica.getDocPraticaId(),
String className = ParamUtil.getString(request, "className"); comingFromGeologica,
praticaIsEditable
String refresh="Liferay.fire('allegati-"+comingFrom+"-open');Liferay.Portlet.refresh('#p_p_id_"+PortletKeys.ALLEGATI+"_INSTANCE_page_allegati_');Liferay.Portlet.refresh('#p_p_id_"+PortletKeys.ALLEGATI+"_INSTANCE_page_geologica_');"; );
String refreshAll = "Liferay.fire('allegati-"+comingFrom+"-open');Liferay.Portlet.refresh('#p_p_id_"+PortletKeys.ALLEGATI+"_INSTANCE_page_allegati_');Liferay.Portlet.refresh('#p_p_id_"+PortletKeys.ALLEGATI+"_INSTANCE_page_geologica_');";
long docPraticaId = ParamUtil.getLong(request, "docPraticaId"); long docPraticaId = docPratica.getDocPraticaId();
DocPratica docPratica = DocPraticaServiceUtil.getDocPratica(docPraticaId); boolean canSignGeoDocsAll = comingFromGeologica && hasDelegaFirma;
FirmeBean firme = FirmeUtil.deserialize(docPratica.getJsonFirmatari());
boolean disabledInput = ParamUtil.getBoolean(request,"disabledInput", false);
boolean hasDelegaFirma = DelegheUtil.hasDelegaFirma(user.getUserId(), docPraticaId, "page_geologica".equalsIgnoreCase(comingFrom));
boolean canSignGeoDocs = "page_geologica".equalsIgnoreCase(comingFrom) && hasDelegaFirma;
%> %>
<liferay-ui:icon-menu icon="" showExpanded="<%=true %>" showWhenSingleIcon="<%=true%>"> <liferay-ui:icon-menu icon="" showExpanded="<%=true %>" showWhenSingleIcon="<%=true%>">
<c:if test="<%= docPratica.getClassPk()==classPk && hasDelegaFirma && (!disabledInput || canSignGeoDocsAll)%>">
<c:if test="<%= docPratica.getClassPk()==classPk && hasDelegaFirma && (!disabledInput || canSignGeoDocs)%>">
<% <%
if (firme.firmaIsPresent(user.getScreenName())) { if (firme.firmaIsPresent(user.getScreenName())) {
if (firme.firmaIsAnnullabile(user.getScreenName())) { if (firme.firmaIsAnnullabile(user.getScreenName())) {
@ -69,7 +40,7 @@ boolean canSignGeoDocs = "page_geologica".equalsIgnoreCase(comingFrom) && hasDel
success: function(event, id, obj) { success: function(event, id, obj) {
window.parent.Liferay.fire('allegati-<%=comingFrom%>-open'); window.parent.Liferay.fire('allegati-<%=comingFrom%>-open');
if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){ if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){
<%=refresh%> <%=refreshAll%>
}else{ }else{
Liferay.fire('allegati-"+comingFrom+"-open'); Liferay.fire('allegati-"+comingFrom+"-open');
Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>"); Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>");
@ -114,7 +85,7 @@ boolean canSignGeoDocs = "page_geologica".equalsIgnoreCase(comingFrom) && hasDel
success: function(event, id, obj) { success: function(event, id, obj) {
window.parent.Liferay.fire('allegati-<%=comingFrom%>-open'); window.parent.Liferay.fire('allegati-<%=comingFrom%>-open');
if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){ if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){
<%=refresh%> <%=refreshAll%>
}else{ }else{
Liferay.fire('allegati-"+comingFrom+"-open'); Liferay.fire('allegati-"+comingFrom+"-open');
Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>"); Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>");
@ -178,7 +149,7 @@ boolean canSignGeoDocs = "page_geologica".equalsIgnoreCase(comingFrom) && hasDel
success: function(event, id, obj) { success: function(event, id, obj) {
window.parent.Liferay.fire('allegati-<%=comingFrom%>-open'); window.parent.Liferay.fire('allegati-<%=comingFrom%>-open');
if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){ if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){
<%=refresh%> <%=refreshAll%>
}else{ }else{
Liferay.fire('allegati-"+comingFrom+"-open'); Liferay.fire('allegati-"+comingFrom+"-open');
Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>"); Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>");
@ -227,7 +198,7 @@ boolean canSignGeoDocs = "page_geologica".equalsIgnoreCase(comingFrom) && hasDel
success: function(event, id, obj) { success: function(event, id, obj) {
window.parent.Liferay.fire('allegati-<%=comingFrom%>-open'); window.parent.Liferay.fire('allegati-<%=comingFrom%>-open');
if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){ if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){
<%=refresh%> <%=refreshAll%>
}else{ }else{
Liferay.fire('allegati-"+comingFrom+"-open'); Liferay.fire('allegati-"+comingFrom+"-open');
Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>"); Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>");
@ -273,7 +244,7 @@ boolean canSignGeoDocs = "page_geologica".equalsIgnoreCase(comingFrom) && hasDel
success: function(event, id, obj) { success: function(event, id, obj) {
window.parent.Liferay.fire('allegati-<%=comingFrom%>-open'); window.parent.Liferay.fire('allegati-<%=comingFrom%>-open');
if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){ if( "<%= comingFrom %>" == "page_allegati" || "<%= comingFrom %>" == "page_geologica"){
<%=refresh%> <%=refreshAll%>
}else{ }else{
Liferay.fire('allegati-"+comingFrom+"-open'); Liferay.fire('allegati-"+comingFrom+"-open');
Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>"); Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>");

188
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp

@ -1,4 +1,5 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@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="it.tref.liferay.portos.bo.shared.util.SessionUtil"%>
<%@page import="java.util.HashMap"%> <%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%> <%@page import="java.util.Map"%>
@ -41,19 +42,27 @@ String comingFrom = ParamUtil.getString(
"comingFrom", "comingFrom",
GetterUtil.getString(PortalUtil.getOriginalServletRequest(request).getParameter("comingFrom"), "page_allegati") 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"); long classPk = ParamUtil.getLong(request, "classPk");
String className = ParamUtil.getString(request, "className"); 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"); long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
if (FineLavori.class.getName().equalsIgnoreCase(className)) { boolean praticaIsEditable = false;
if (isFineLavori) {
FineLavori fineLavori = FineLavoriServiceUtil.getFineLavori(classPk); FineLavori fineLavori = FineLavoriServiceUtil.getFineLavori(classPk);
intPraticaId = fineLavori.getIntPraticaId(); intPraticaId = fineLavori.getIntPraticaId();
} else if (Collaudo.class.getName().equalsIgnoreCase(className)) { } else if (isCollaudo) {
Collaudo collaudo = CollaudoServiceUtil.getCollaudo(classPk); Collaudo collaudo = CollaudoServiceUtil.getCollaudo(classPk);
intPraticaId = collaudo.getIntPraticaId(); intPraticaId = collaudo.getIntPraticaId();
} else { } else {
DettPratica dettPratica = (DettPratica)request.getAttribute("bean.dettPratica"); DettPratica dettPratica = (DettPratica) request.getAttribute("bean.dettPratica");
HttpServletRequest httpServletRequest = PortalUtil.getOriginalServletRequest(request); HttpServletRequest httpServletRequest = PortalUtil.getOriginalServletRequest(request);
if (dettPratica == null) { if (dettPratica == null) {
long dettPraticaIdParam = ParamUtil.getLong(request, "classPk"); long dettPraticaIdParam = ParamUtil.getLong(request, "classPk");
@ -65,7 +74,7 @@ if (FineLavori.class.getName().equalsIgnoreCase(className)) {
if (dettPratica == null) { if (dettPratica == null) {
dettPratica = DettPraticaServiceUtil.getDettPratica(classPk); dettPratica = DettPraticaServiceUtil.getDettPratica(classPk);
} }
praticaIsEditable = ValidazionePraticaUtil.praticaIsEditable(dettPratica.getDettPraticaId());
request.setAttribute("bean.dettPratica", dettPratica); request.setAttribute("bean.dettPratica", dettPratica);
classPk = dettPratica.getDettPraticaId(); classPk = dettPratica.getDettPraticaId();
intPraticaId = dettPratica.getIntPraticaId(); intPraticaId = dettPratica.getIntPraticaId();
@ -86,7 +95,7 @@ boolean disabledInput = true;
boolean canSignGeoDocs = false; boolean canSignGeoDocs = false;
if (Validator.isNotNull(request.getParameter("disabled"))) { if (Validator.isNotNull(request.getParameter("disabled"))) {
disabledInput = disabled; disabledInput = disabled;
} else if ("page_allegati".equalsIgnoreCase(comingFrom)) { } else if (comingFromAllegati) {
Boolean hasDelegaCompilazioneDomanda = (Boolean) SessionUtil.getDettPraticaObject(request, classPk, "hasDelegaCompilazioneDomanda"); Boolean hasDelegaCompilazioneDomanda = (Boolean) SessionUtil.getDettPraticaObject(request, classPk, "hasDelegaCompilazioneDomanda");
if (null == hasDelegaCompilazioneDomanda) { if (null == hasDelegaCompilazioneDomanda) {
hasDelegaCompilazioneDomanda = DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(),classPk); hasDelegaCompilazioneDomanda = DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(),classPk);
@ -94,18 +103,18 @@ if (Validator.isNotNull(request.getParameter("disabled"))) {
disabledInput = !hasDelegaCompilazioneDomanda disabledInput = !hasDelegaCompilazioneDomanda
&& !DelegheUtil.hasDelegaFirmaAllegati(user.getUserId(),classPk); && !DelegheUtil.hasDelegaFirmaAllegati(user.getUserId(),classPk);
soggettoDelegato = DelegheUtil.getPersonaDelegaCompilazioneDomanda(classPk); soggettoDelegato = DelegheUtil.getPersonaDelegaCompilazioneDomanda(classPk);
} else if ("page_geologica".equalsIgnoreCase(comingFrom)) { } else if (comingFromGeologica) {
disabledInput = !DelegheUtil.hasDelegaCompilazioneSezioneGeologica(user.getUserId(),classPk); disabledInput = !DelegheUtil.hasDelegaCompilazioneSezioneGeologica(user.getUserId(),classPk);
soggettoDelegato = DelegheUtil.getPersonaDelegaCompilazioneSezioneGeologica(classPk); soggettoDelegato = DelegheUtil.getPersonaDelegaCompilazioneSezioneGeologica(classPk);
canSignGeoDocs = true; canSignGeoDocs = true;
} else if ("page_fine_lavori".equalsIgnoreCase(comingFrom)) { } else if (comingFromFineLavori) {
disabledInput = disabled; disabledInput = disabled;
} else if ("page_collaudo".equalsIgnoreCase(comingFrom)) { } else if (comingFromCollaudo) {
disabledInput = disabled; 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:include page="/html/fascicolofe/navigator/header.jsp" servletContext="<%=application%>">
<liferay-util:param name="disabledInput" value="<%= String.valueOf(disabledInput) %>" /> <liferay-util:param name="disabledInput" value="<%= String.valueOf(disabledInput) %>" />
<c:if test="<%=soggettoDelegato!=null%>"> <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"> <div class="navbar-container header_allegati_table">
<c:if test="<%= !inBO %>"> <c:if test="<%= !inBO %>">
<c:choose> <c:choose>
<c:when test='<%= comingFrom.equals("page_geologica") %>'> <c:when test='<%= comingFromGeologica %>'>
<h3 class="title-table">Allegati Geologici</h3> <h3 class="title-table">Allegati Geologici</h3>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
@ -165,13 +174,13 @@ String refresh = "Liferay.fire('allegati-" + comingFrom + "-open');Liferay.Portl
<% <%
List<String> tipologiaAllegati = new ArrayList<String>(); List<String> tipologiaAllegati = new ArrayList<String>();
if ("page_geologica".equals(comingFrom)) { if (comingFromGeologica) {
tipologiaAllegati = DocumentiPraticaUtil.getDocGeologo(); tipologiaAllegati = DocumentiPraticaUtil.getDocGeologo();
}else if ("page_allegati".equals(comingFrom)) { } else if (comingFromAllegati) {
tipologiaAllegati = DocumentiPraticaUtil.getDocDomanda(); tipologiaAllegati = DocumentiPraticaUtil.getDocDomanda();
}else if ("page_fine_lavori".equals(comingFrom)) { } else if (comingFromFineLavori) {
tipologiaAllegati = DocumentiPraticaUtil.getDocFineLavori(); tipologiaAllegati = DocumentiPraticaUtil.getDocFineLavori();
}else if ("page_collaudo".equals(comingFrom)) { } else if (comingFromCollaudo) {
tipologiaAllegati = DocumentiPraticaUtil.getDocCollaudo(); tipologiaAllegati = DocumentiPraticaUtil.getDocCollaudo();
} }
%> %>
@ -198,14 +207,14 @@ if ("page_geologica".equals(comingFrom)) {
</div> </div>
</c:if> </c:if>
<c:if test="<%=inBO%>"> <c:if test="<%=inBO%>">
<c:if test='<%= !"page_geologica".equals(comingFrom) %>'> <c:if test='<%= !comingFromGeologica %>'>
<div class='row asseverazioni-header'> <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-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-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 class="col-xs-2 col-sm-2 col-md-2 col-lg-2">Azioni</div>
</div> </div>
</c:if> </c:if>
<c:if test='<%=" page_geologica".equals(comingFrom) %>'> <c:if test='<%= comingFromGeologica %>'>
<div class='row asseverazioni-header'> <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-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> <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> </c:if>
<% <%
for (String codiceDoc:tipologiaAllegati) { for (String codiceDoc : tipologiaAllegati) {
List<DocPratica> docPraticas = new ArrayList<DocPratica>(); 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); docPraticas = DocPraticaServiceUtil.findByClassPk_Tipologia(classPk, codiceDoc, QueryUtil.ALL_POS,QueryUtil.ALL_POS);
} else { } else {
docPraticas = DocPraticaServiceUtil.findByIntPratica_ClassPk_Tipologia(intPraticaId, classPk, codiceDoc, QueryUtil.ALL_POS,QueryUtil.ALL_POS); docPraticas = DocPraticaServiceUtil.findByIntPratica_ClassPk_Tipologia(intPraticaId, classPk, codiceDoc, QueryUtil.ALL_POS,QueryUtil.ALL_POS);
@ -242,63 +251,63 @@ for (String codiceDoc:tipologiaAllegati) {
<% <%
} else { } else {
for (DocPratica docPratica : docPraticas) { for (DocPratica docPratica : docPraticas) {
FirmeBean firme = FirmeUtil.deserialize(docPratica.getJsonFirmatari()); FirmeBean firme = FirmeUtil.deserialize(docPratica.getJsonFirmatari());
StringBuilder title = new StringBuilder(); StringBuilder title = new StringBuilder();
String cssIcon = StringPool.BLANK; String cssIcon = StringPool.BLANK;
String cssColor= StringPool.BLANK; String cssColor = StringPool.BLANK;
String testoFirme = "Non ci sono firme sul file"; String testoFirme = "Non ci sono firme sul file";
if (firme.getFirmeDigitali().size() > 0) { if (firme.getFirmeDigitali().size() > 0) {
cssIcon = "fa-check"; cssIcon = "fa-check";
cssColor= "txt-green"; cssColor = "txt-green";
testoFirme = StringPool.BLANK; testoFirme = StringPool.BLANK;
} else if (docPratica.getStatus() == 1) { } else if (docPratica.getStatus() == 1) {
cssIcon= "fa-cog fa-spin"; cssIcon= "fa-cog fa-spin";
cssColor= "txt-orange"; cssColor = "txt-orange";
testoFirme = "Estrazione firme in corso"; testoFirme = "Estrazione firme in corso";
} else if (docPratica.getStatus() == 4) { } else if (docPratica.getStatus() == 4) {
cssIcon= "fa-alert"; cssIcon= "fa-alert";
cssColor= "txt-red"; cssColor = "txt-red";
testoFirme = "Errore nell'estrazione delle firme"; testoFirme = "Errore nell'estrazione delle firme";
} else { } else {
cssIcon = "fa-close"; cssIcon = "fa-close";
testoFirme = "Nessuna firma digitale rilevata"; testoFirme = "Nessuna firma digitale rilevata";
if (firme.numeroFirme() > 0) {
cssColor= "txt-green";
}
}
if (firme.numeroFirme() > 0) { if (firme.numeroFirme() > 0) {
cssIcon = "fa-check"; cssColor= "txt-green";
} }
title.append("Firma sul file:<ul>"); }
title.append("<li>" + testoFirme + "</li>"); if (firme.numeroFirme() > 0) {
if (!firme.getFirmeDigitali().isEmpty()) { cssIcon = "fa-check";
for (FirmeDetail firma: firme.getFirmeDigitali()) { }
if (cfNome.containsKey(firma.getCfFirmatario())) { title.append("Firma sul file:<ul>");
title.append("<li>" + cfNome.get(firma.getCfFirmatario()) + "</li>"); title.append("<li>" + testoFirme + "</li>");
} if (!firme.getFirmeDigitali().isEmpty()) {
title.append("<li>" + firma.getCfFirmatario()); for (FirmeDetail firma: firme.getFirmeDigitali()) {
if (Validator.isNotNull(firma.getDtFirma())) { if (cfNome.containsKey(firma.getCfFirmatario())) {
title.append(" del " + dateFormatDate.format(firma.getDtFirma())); title.append("<li>" + cfNome.get(firma.getCfFirmatario()) + "</li>");
} }
title.append("</li>"); title.append("<li>" + firma.getCfFirmatario());
if (Validator.isNotNull(firma.getDtFirma())) {
title.append(" del " + dateFormatDate.format(firma.getDtFirma()));
} }
title.append("</li>");
} }
title.append("</ul>"); }
if (!firme.getFirmeApplicativo().isEmpty()) { title.append("</ul>");
title.append("Firme da applicativo:<ul>"); if (!firme.getFirmeApplicativo().isEmpty()) {
for (FirmeDetail firma: firme.getFirmeApplicativo()) { title.append("Firme da applicativo:<ul>");
if (cfNome.containsKey(firma.getCfFirmatario())) { for (FirmeDetail firma: firme.getFirmeApplicativo()) {
title.append("<li>" + cfNome.get(firma.getCfFirmatario()) + "</li>"); if (cfNome.containsKey(firma.getCfFirmatario())) {
} title.append("<li>" + cfNome.get(firma.getCfFirmatario()) + "</li>");
title.append("<li>"+firma.getCfFirmatario()); }
if (Validator.isNotNull(firma.getDtFirma())) { title.append("<li>"+firma.getCfFirmatario());
title.append(" del "+dateFormatDate.format(firma.getDtFirma())); if (Validator.isNotNull(firma.getDtFirma())) {
} title.append(" del "+dateFormatDate.format(firma.getDtFirma()));
title.append("</li>");
} }
title.append("</ul>"); title.append("</li>");
} }
title.append("</ul>");
}
%> %>
<div class="nome_file"> <div class="nome_file">
<c:if test="<%=!inBO%>"> <c:if test="<%=!inBO%>">
@ -309,7 +318,7 @@ for (String codiceDoc:tipologiaAllegati) {
</c:if> </c:if>
<% <%
String color = "txt-red"; String color = "txt-red";
if (Validator.isNull(docPratica.getDettPraticaIdRimozione())) { if (Validator.isNull(docPratica.getDettPraticaIdRimozione())) {
color = "txt-green"; color = "txt-green";
} }
%> %>
@ -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'> <div class='col-xs-2 col-sm-2 col-md-2 col-lg-2 <%=inBO ? "hidden" : ""%> asserazioni-body-title'>
<% <%
String adding = StringPool.BLANK; if (isFineLavori) {
if (FineLavori.class.getName().equals(className)) {
FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(docPratica.getClassPk()); FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(docPratica.getClassPk());
if (fineLavori != null) { 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()); Collaudo collaudo = CollaudoLocalServiceUtil.fetchCollaudo(docPratica.getClassPk());
if (collaudo != null) { if (collaudo != null) {
adding = collaudo.getFullDescription(); out.print(collaudo.getFullDescription());
} }
} else { } else {
long pk = docPratica.getClassPk(); long pk = docPratica.getClassPk();
@ -337,17 +345,16 @@ for (String codiceDoc:tipologiaAllegati) {
} }
DettPratica dettPratica = dettPraticas.get(pk); DettPratica dettPratica = dettPraticas.get(pk);
if (Validator.isNotNull(dettPratica)) { if (Validator.isNotNull(dettPratica)) {
adding = dettPratica.getFullDescription(); out.print(dettPratica.getFullDescription());
} }
} }
out.print(adding);
%> %>
</div> </div>
<div class='col-xs-2 col-sm-2 col-md-2 col-lg-2 <%= inBO ? "hidden" : "" %> asserazioni-body-title'> <div class='col-xs-2 col-sm-2 col-md-2 col-lg-2 <%= inBO ? "hidden" : "" %> asserazioni-body-title'>
<% <%
//Lasciato solo dettpratica perche' fine lavori e collaudo non possono rimuovere gli allegati //Lasciato solo dettpratica perche' fine lavori e collaudo non possono rimuovere gli allegati
long pk = docPratica.getDettPraticaIdRimozione(); long pk = docPratica.getDettPraticaIdRimozione();
if (0 != pk) { if (0 != pk) {
if (!dettPraticas.containsKey(pk)) { if (!dettPraticas.containsKey(pk)) {
dettPraticas.put(pk, DettPraticaLocalServiceUtil.fetchDettPratica(pk)); dettPraticas.put(pk, DettPraticaLocalServiceUtil.fetchDettPratica(pk));
@ -360,11 +367,11 @@ for (String codiceDoc:tipologiaAllegati) {
%> %>
</div> </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"> <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
<span> <span>
<% <%
if (className.equals(DettPratica.class.getName())) { if (isDettPratica) {
pk = docPratica.getClassPk(); pk = docPratica.getClassPk();
if (!dettPraticas.containsKey(pk)) { if (!dettPraticas.containsKey(pk)) {
dettPraticas.put(pk, DettPraticaLocalServiceUtil.fetchDettPratica(pk)); dettPraticas.put(pk, DettPraticaLocalServiceUtil.fetchDettPratica(pk));
@ -389,7 +396,7 @@ for (String codiceDoc:tipologiaAllegati) {
<c:if test='<%= inBO %>'> <c:if test='<%= inBO %>'>
<c:choose> <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"> <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2 asserazioni-body-title text-center">
</c:when> </c:when>
<c:otherwise> <c:otherwise>
@ -403,14 +410,14 @@ for (String codiceDoc:tipologiaAllegati) {
</c:if> </c:if>
<div class='<%= inBO ? "col-xs-12 col-sm-12 col-md-12 col-lg-12" : "col-xs-6 col-sm-6 col-md-6 col-lg-6" %>'> <div class='<%= inBO ? "col-xs-12 col-sm-12 col-md-12 col-lg-12" : "col-xs-6 col-sm-6 col-md-6 col-lg-6" %>'>
<span class='<%="fa "+cssIcon+" asseverazioni-icon tooltip-info "+cssColor%>' title="<%=title%>"> <span class='<%="fa "+cssIcon+" asseverazioni-icon tooltip-info "+cssColor%>' title="<%=title%>">
<c:if test="<%= firme.numeroFirme() > 0 %>"> <c:if test="<%= firme.numeroFirme() > 0 %>">
<sub class="txt-bold"><%= firme.numeroFirme() %></sub> <sub class="txt-bold"><%= firme.numeroFirme() %></sub>
</c:if> </c:if>
</span> </span>
</div> </div>
<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 <%=inBO ? "hidden" : ""%>'> <div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 <%=inBO ? "hidden" : ""%>'>
<c:choose> <c:choose>
<c:when test="<%= (firme.firmaIsPresent(user.getScreenName())) %>"> <c:when test="<%= (firme.firmaIsPresent(user.getScreenName())) %>">
<span class="fa fa-check asseverazioni-icon tooltip-info txt-green" title="La tua firma è presente"></span> <span class="fa fa-check asseverazioni-icon tooltip-info txt-green" title="La tua firma è presente"></span>
</c:when> </c:when>
@ -421,7 +428,7 @@ for (String codiceDoc:tipologiaAllegati) {
</div> </div>
</div> </div>
<div class='col-xs-2 col-sm-2 col-md-2 col-lg-2 asserazioni-btn text-center'> <div class='col-xs-2 col-sm-2 col-md-2 col-lg-2 asserazioni-btn text-center'>
<c:choose> <c:choose>
<c:when <c:when
test="<%= Validator.isNull(docPratica.getDlFileEntryId()) && Validator.isNotNull(docPratica.getOldDlFileEntryId()) %>"> test="<%= Validator.isNull(docPratica.getDlFileEntryId()) && Validator.isNotNull(docPratica.getOldDlFileEntryId()) %>">
<liferay-util:include page="/html/common/import_window.jsp" servletContext="<%= application %>" <liferay-util:include page="/html/common/import_window.jsp" servletContext="<%= application %>"
@ -432,18 +439,17 @@ for (String codiceDoc:tipologiaAllegati) {
</liferay-util:include> </liferay-util:include>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<c:if test="<%= !inBO %>"> <c:if test="<%= !inBO && !disabledInput || canSignGeoDocs %>">
<c:if test="<%= !disabledInput || canSignGeoDocs %>"> <%@ include file="/html/allegatipratica/allegati_action.jspf" %>
<liferay-util:include page="/html/allegatipratica/allegati_action.jsp" <%-- <liferay-util:include page="/html/allegatipratica/allegati_action.jsp"
servletContext="<%= application %>"> servletContext="<%= application %>">
<liferay-util:param name="backUrl" value="<%= currentURL %>" /> <liferay-util:param name="backUrl" value="<%= currentURL %>" />
<liferay-util:param name="comingFrom" value="<%= comingFrom %>" /> <liferay-util:param name="comingFrom" value="<%= comingFrom %>" />
<liferay-util:param name="classPk" value="<%= String.valueOf(classPk) %>" /> <liferay-util:param name="classPk" value="<%= String.valueOf(classPk) %>" />
<liferay-util:param name="className" value="<%= className %>" /> <liferay-util:param name="className" value="<%= className %>" />
<liferay-util:param name="docPraticaId" value="<%= String.valueOf(docPratica.getDocPraticaId()) %>" /> <liferay-util:param name="docPraticaId" value="<%= String.valueOf(docPratica.getDocPraticaId()) %>" />
<liferay-util:param name="disabledInput" value="<%= String.valueOf(disabledInput) %>" /> <liferay-util:param name="disabledInput" value="<%= String.valueOf(disabledInput) %>" />
</liferay-util:include> </liferay-util:include> --%>
</c:if>
</c:if> </c:if>
<c:if test="<%= inBO %>"> <c:if test="<%= inBO %>">
<liferay-portlet:renderURL var="previewURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> <liferay-portlet:renderURL var="previewURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">

1
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_fascicolo.jsp

@ -15,7 +15,6 @@
<%@ include file="/html/fascicolofe/init.jsp" %> <%@ include file="/html/fascicolofe/init.jsp" %>
<% <%
String backURL = ParamUtil.getString(request, "backURL"); String backURL = ParamUtil.getString(request, "backURL");
long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId", 0l); long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId", 0l);
long intPraticaId = ParamUtil.getLong(request, "intPraticaId", 0l); long intPraticaId = ParamUtil.getLong(request, "intPraticaId", 0l);

1
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp

@ -26,7 +26,6 @@
<%@ include file="/html/fascicolofe/init.jsp"%> <%@ include file="/html/fascicolofe/init.jsp"%>
<% <%
DettPratica dettPratica = (DettPratica) request.getAttribute("bean.dettPratica"); DettPratica dettPratica = (DettPratica) request.getAttribute("bean.dettPratica");
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());

Caricamento…
Annulla
Salva