Sfoglia il codice sorgente

fixes vari a workflow fine lavori

feature/pannello-pratiche
marcoalderighi 2 anni fa
parent
commit
784f63a862
  1. BIN
      liferay-plugins-sdk-6.2/dist/portos-bo-shared-6.2.0.1.jar
  2. BIN
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar
  3. BIN
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar
  4. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java
  5. 26
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java
  6. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  7. BIN
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar
  8. BIN
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar
  9. 11
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_first-step-fine-lavori.jsp
  10. 39
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/fascicolo_action.jsp

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

File binario non mostrato.

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

File binario non mostrato.

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

File binario non mostrato.

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

@ -147,6 +147,8 @@ public class AsseverazioniUtil {
// Fine Lavori // Fine Lavori
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_GIORNALE_LAVORI, put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_GIORNALE_LAVORI,
Arrays.asList(TipoSoggettoUtil.DIRETTORE_LAVORI)); Arrays.asList(TipoSoggettoUtil.DIRETTORE_LAVORI));
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_DICHIARAZIONE_DIRETTORE_LAVORI,
Arrays.asList(TipoSoggettoUtil.DIRETTORE_LAVORI));
// Collaudo // Collaudo
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_RELAZIONE_COLLAUDO, put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_RELAZIONE_COLLAUDO,
Arrays.asList(TipoSoggettoUtil.COLLAUDATORE)); Arrays.asList(TipoSoggettoUtil.COLLAUDATORE));

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

@ -233,6 +233,15 @@ public class ValidazionePraticaUtil {
&& !praticaHasIntegrazioneInProgress(intPraticaId); && !praticaHasIntegrazioneInProgress(intPraticaId);
} }
public static boolean praticaCanAddFineLavoriDate(long intPraticaId, String userScreenName) throws SystemException,
PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
return Validator.isNotNull(dettPratica)
&& userScreenName.equalsIgnoreCase(dettPratica.getCodiceFiscaleDelegatoFineLavori())
&& praticaHasFineLavoriDateToSet(intPraticaId);
}
public static boolean praticaCanEditFineLavori(long intPraticaId, String userScreenName) throws SystemException, public static boolean praticaCanEditFineLavori(long intPraticaId, String userScreenName) throws SystemException,
PortalException { PortalException {
@ -251,6 +260,15 @@ public class ValidazionePraticaUtil {
&& praticaHasFineLavoriPaymentPending(intPraticaId); && praticaHasFineLavoriPaymentPending(intPraticaId);
} }
public static boolean praticaHasFineLavoriDateToSet(long intPraticaId) throws SystemException, PortalException {
FineLavori fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaId);
if(Validator.isNotNull(fineLavori)){
return Validator.isNull(fineLavori.getDataFineLavori());
}
return false;
}
public static boolean praticaHasFineLavoriInProgress(long intPraticaId) throws SystemException, PortalException { public static boolean praticaHasFineLavoriInProgress(long intPraticaId) throws SystemException, PortalException {
FineLavori fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaId); FineLavori fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaId);
@ -1226,10 +1244,10 @@ public class ValidazionePraticaUtil {
if (Validator.isNull(fineLavori.getParziale())) { if (Validator.isNull(fineLavori.getParziale())) {
notCompleted.add("fl-tipo"); notCompleted.add("fl-tipo");
} }
if (fineLavori.getParziale() // if (fineLavori.getParziale()
&& FineLavoriLocalServiceUtil.countByIntPraticaId_Parziale(fineLavori.getIntPraticaId(), false) > 0) { // && FineLavoriLocalServiceUtil.countByIntPraticaId_Parziale(fineLavori.getIntPraticaId(), false) > 0) {
notCompleted.add("fl-parziale-not-possibile"); // notCompleted.add("fl-parziale-not-possibile");
} // }
if (Validator.isNull(fineLavori.getDataFineLavori())) { if (Validator.isNull(fineLavori.getDataFineLavori())) {
notCompleted.add("fl-data-fine"); notCompleted.add("fl-data-fine");
} }

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=2860 build.number=2870
build.date=1678457427172 build.date=1678981829109
build.auto.upgrade=true build.auto.upgrade=true
## ##

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

File binario non mostrato.

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

File binario non mostrato.

11
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_first-step-fine-lavori.jsp

@ -1,3 +1,4 @@
<%@page import="it.tref.liferay.portos.bo.service.FineLavoriServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%>
<%@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.service.FineLavoriLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil"%>
@ -10,7 +11,13 @@
String backURL = ParamUtil.getString(request, "backURL"); String backURL = ParamUtil.getString(request, "backURL");
long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId", 0L); long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId", 0L);
FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(fineLavoriId); FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(fineLavoriId);
long intPraticaId = fineLavori.getIntPraticaId(); long intPraticaId = 0L;
if(Validator.isNull(fineLavori)){
intPraticaId = ParamUtil.getLong(request, "intPraticaId", 0L);
fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaId);
} else {
intPraticaId = fineLavori.getIntPraticaId();
}
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId); DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
if (dettPratica == null) { if (dettPratica == null) {
@ -23,7 +30,7 @@ String fmName = "fmFirstStepFineLavori";
<liferay-portlet:param name="backURL" value="<%= currentURL %>" /> <liferay-portlet:param name="backURL" value="<%= currentURL %>" />
</liferay-portlet:renderURL> </liferay-portlet:renderURL>
<liferay-portlet:actionURL name="salvaFirstStepFineLavori" var="salvaFirstStepFineLavoriURL" > <liferay-portlet:actionURL name="salvaFirstStepFineLavori" var="salvaFirstStepFineLavoriURL" >
<liferay-portlet:param name="fineLavoriId" value="<%= String.valueOf(fineLavoriId) %>"/> <liferay-portlet:param name="fineLavoriId" value="<%= String.valueOf(fineLavori.getFineLavoriId()) %>"/>
<liferay-portlet:param name="backURL" value="<%= backURL %>"/> <liferay-portlet:param name="backURL" value="<%= backURL %>"/>
<liferay-portlet:param name="successURL" value="<%= successURL %>"/> <liferay-portlet:param name="successURL" value="<%= successURL %>"/>
</liferay-portlet:actionURL> </liferay-portlet:actionURL>

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

@ -1,3 +1,4 @@
<%@page import="it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants"%>
<%@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.model.Asseverazione"%> <%@page import="it.tref.liferay.portos.bo.model.Asseverazione"%>
<%@page import="it.tref.liferay.portos.bo.model.Delega"%> <%@page import="it.tref.liferay.portos.bo.model.Delega"%>
@ -222,7 +223,8 @@ String randomId = StringUtil.randomId() + StringPool.UNDERLINE + intPraticaIdStr
<c:if test="<%= isProgetti || isAltriProgetti || isDeleghe %>"> <c:if test="<%= isProgetti || isAltriProgetti || isDeleghe %>">
<c:if test="<%= ValidazionePraticaUtil.praticaCanAddFineLavori(intPraticaId,user.getScreenName()) <c:if test="<%= ValidazionePraticaUtil.praticaCanAddFineLavori(intPraticaId,user.getScreenName())
|| ValidazionePraticaUtil.praticaCanEditFineLavori(intPraticaId, user.getScreenName()) %>"> || ValidazionePraticaUtil.praticaCanEditFineLavori(intPraticaId, user.getScreenName()) %>">
<c:if test="<%= !intPratica.getSospesa() %>"> <c:if test="<%= !intPratica.getSospesa() &&
!StatoPraticaConstants.SOTTOPOSTA_A_PARERE.equals(intPratica.getStatoPratica()) %>">
<div class="separator"></div> <div class="separator"></div>
<% <%
DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId); DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId);
@ -240,10 +242,10 @@ String randomId = StringUtil.randomId() + StringPool.UNDERLINE + intPraticaIdStr
url="<%= addInizioLavoriURL %>" /> url="<%= addInizioLavoriURL %>" />
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<c:if test="<%= (AzioniPraticheUtil.isAllowedAction(intPraticaId, <c:choose>
AzioniPraticheUtil.ACTION_FL_PARZIALE) <c:when test="<%= (AzioniPraticheUtil.isAllowedAction(intPraticaId, AzioniPraticheUtil.ACTION_FL_PARZIALE)
|| AzioniPraticheUtil.isAllowedAction(intPraticaId, AzioniPraticheUtil.ACTION_FL_TOTALE)) || AzioniPraticheUtil.isAllowedAction(intPraticaId, AzioniPraticheUtil.ACTION_FL_TOTALE)) &&
&& ValidazionePraticaUtil.praticaCanAddFineLavori(intPraticaId, user.getScreenName()) %>"> ValidazionePraticaUtil.praticaCanAddFineLavori(intPraticaId, user.getScreenName()) %>">
<liferay-portlet:renderURL var="editUrl" > <liferay-portlet:renderURL var="editUrl" >
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/edit_first-step-fine-lavori.jsp"/> <liferay-portlet:param name="mvcPath" value="/html/fascicolofe/edit_first-step-fine-lavori.jsp"/>
<liferay-portlet:param name="backURL" value="<%= redirect %>" /> <liferay-portlet:param name="backURL" value="<%= redirect %>" />
@ -254,11 +256,35 @@ String randomId = StringUtil.randomId() + StringPool.UNDERLINE + intPraticaIdStr
</liferay-portlet:actionURL> </liferay-portlet:actionURL>
<liferay-ui:icon iconCssClass="fa fa-plus" message="add-fine-lavori-key" <liferay-ui:icon iconCssClass="fa fa-plus" message="add-fine-lavori-key"
url="<%= addFineLavoriURL %>" /> url="<%= addFineLavoriURL %>" />
</c:when>
<c:otherwise>
<c:if test="<%= ValidazionePraticaUtil.praticaCanEditFineLavori(intPraticaId, user.getScreenName()) %>">
<c:if test="<%= ValidazionePraticaUtil.praticaCanAddFineLavoriDate(intPraticaId, user.getScreenName()) %>">
<liferay-portlet:renderURL var="editUrl" >
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/edit_first-step-fine-lavori.jsp"/>
<liferay-portlet:param name="intPraticaId" value="<%= intPraticaIdString %>" />
<liferay-portlet:param name="backURL" value="<%= redirect %>" />
</liferay-portlet:renderURL>
<liferay-ui:icon iconCssClass="fa fa-plus" message="add-fine-lavori-key"
url="<%= editUrl %>" />
</c:if>
<c:if test="<%= !ValidazionePraticaUtil.praticaCanAddFineLavoriDate(intPraticaId, user.getScreenName()) %>">
<liferay-portlet:renderURL var="editFineLavoriURL" >
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/edit_fine-lavori.jsp"/>
<liferay-portlet:param name="intPraticaId" value="<%= intPraticaIdString %>" />
<liferay-portlet:param name="backURL" value="<%= redirect %>" />
</liferay-portlet:renderURL>
<liferay-ui:icon iconCssClass="fa fa-edit" message="edit-fine-lavori-key" url="<%= editFineLavoriURL %>" />
</c:if> </c:if>
</c:if>
</c:otherwise>
</c:choose>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</c:if> </c:if>
<c:if test="<%= ValidazionePraticaUtil.praticaCanEditFineLavori(intPraticaId, user.getScreenName()) %>"> <%--
<c:if test="<%= ValidazionePraticaUtil.praticaCanEditFineLavori(intPraticaId, user.getScreenName()) &&
!ValidazionePraticaUtil.praticaCanAddFineLavoriDate(intPraticaId, user.getScreenName()) %>">
<liferay-portlet:renderURL var="editFineLavoriURL" > <liferay-portlet:renderURL var="editFineLavoriURL" >
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/edit_fine-lavori.jsp"/> <liferay-portlet:param name="mvcPath" value="/html/fascicolofe/edit_fine-lavori.jsp"/>
<liferay-portlet:param name="intPraticaId" value="<%= intPraticaIdString %>" /> <liferay-portlet:param name="intPraticaId" value="<%= intPraticaIdString %>" />
@ -266,7 +292,6 @@ String randomId = StringUtil.randomId() + StringPool.UNDERLINE + intPraticaIdStr
</liferay-portlet:renderURL> </liferay-portlet:renderURL>
<liferay-ui:icon iconCssClass="fa fa-edit" message="edit-fine-lavori-key" url="<%= editFineLavoriURL %>" /> <liferay-ui:icon iconCssClass="fa fa-edit" message="edit-fine-lavori-key" url="<%= editFineLavoriURL %>" />
</c:if> </c:if>
<%--
<c:if test="<%= ValidazionePraticaUtil.praticaCanDeleteFineLavori(intPraticaId, user.getScreenName()) %>"> <c:if test="<%= ValidazionePraticaUtil.praticaCanDeleteFineLavori(intPraticaId, user.getScreenName()) %>">
<liferay-portlet:actionURL name="deleteFineLavori" var="deleteFineLavoriURL"> <liferay-portlet:actionURL name="deleteFineLavori" var="deleteFineLavoriURL">
<liferay-portlet:param name="intPraticaId" value="<%= intPraticaIdString %>" /> <liferay-portlet:param name="intPraticaId" value="<%= intPraticaIdString %>" />

Caricamento…
Annulla
Salva