Sfoglia il codice sorgente

Conformità mancanti

master
Salvatore La Manna 4 anni fa
parent
commit
2405a1505d
  1. 13
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java
  2. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties
  3. 41
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java
  4. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/SorteggioPraticaUtil.java
  5. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  6. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp
  7. 9
      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/ValidazionePraticaUtil.java

@ -918,8 +918,8 @@ public class ValidazionePraticaUtil {
return true;
}
List<String> infrastrutture = Arrays.asList("A4A", "A4B", "A4C", "A4D", "A4E", "A4F", "A5A",
"B4A", "B4B", "B4C", "B5A");
List<String> infrastrutture = Arrays.asList("1A", "2A", "A4A", "A4B", "A4C", "A4D", "A4E", "A4F",
"A5A", "B4A", "B4B", "B4C", "B5A");
// se infrastruttura controllo solo DATI INFRASTRUTTURA
boolean infrastruttura = infrastrutture.contains(dettPratica.getDestinazione());
if (infrastruttura) {
@ -1019,8 +1019,8 @@ public class ValidazionePraticaUtil {
List<String> notCompleted = new ArrayList<>();
List<String> infrastrutture = Arrays.asList("A4A", "A4B", "A4C", "A4D", "A4E", "A4F", "A5A",
"B4A", "B4B", "B4C", "B5A");
List<String> infrastrutture = Arrays.asList("1A", "2A", "A4A", "A4B", "A4C", "A4D", "A4E", "A4F",
"A5A", "B4A", "B4B", "B4C", "B5A");
// se infrastruttura controllo solo DATI INFRASTRUTTURA
boolean infrastruttura = infrastrutture.contains(dettPratica.getDestinazione());
if (infrastruttura) {
@ -1150,9 +1150,8 @@ public class ValidazionePraticaUtil {
}
// List<String> infrastrutture =
// Arrays.asList("A4A", "A4B", "A4C", "A4D", "A4E", "A4F", "A5A",
// "B4A", "B4B", "B4C",
// "B5A");
// Arrays.asList("1A", "2A", "A4A", "A4B", "A4C", "A4D", "A4E", "A4F",
// "A5A", "B4A", "B4B", "B4C", "B5A");
// boolean infrastruttura =
// !infrastrutture.contains(dettPratica.getDestinazione())
// || (dettPratica.getDeInfStradaleStrada() ||

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

@ -286,10 +286,10 @@ interv-fin-pub-desc = Descrizione intervento oggetto di Finanziamento Pubblico
### DESTINAZIONE (RIFERIMENTO AL REGOLAMENTO N.36/R DEL 9/7/2009, ALL.A)
destinazione = Destinazione
#destinazione-1 = EDIFICI IN CLASSE D'USO II<small> (anche classe d'uso I per progetti presentati prima del 18/05/2020)</small>
destinazione-1 = EDIFICI, INFRASTRUTTURE O ALTRO IN CLASSE D'USO I
#destinazione-2 = INFRASTRUTTURE ORDINARIE
destinazione-2 = EDIFICI, INFRASTRUTTURE O ALTRO IN CLASSE D'USO II<small> (anche classe d'uso I per progetti presentati prima del 20/05/2020)</small>
destinazione-1 = EDIFICI IN CLASSE D'USO I
destinazione-2 = EDIFICI IN CLASSE D'USO II<small> (anche classe d'uso I per progetti presentati prima del 20/05/2020)</small>
destinazione-1A = INFRASTRUTTURE O ALTRO IN CLASSE D'USO I
destinazione-2A = INFRASTRUTTURE O ALTRO IN CLASSE D'USO II<small> (anche classe d'uso I per progetti presentati prima del 20/05/2020)</small>
destinazione-uso-1 = EDIFICIO ORDINARIO
destinazione-uso-2 = INFRASTRUTTURA O ALTRO ORDINARIO

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

@ -19,6 +19,7 @@ import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.impl.ControlloPraticaLocalServiceImpl;
import it.tref.liferay.portos.bo.shared.protocollo.model.Protocollo.TipoProtocollo;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.util.AvvisoUtil;
@ -183,6 +184,9 @@ public class SismicaUtil {
public static List<String> riparaWorkflow(long companyId, long userId) {
List<String> esito = new ArrayList<>();
esito.addAll(riparaConformita(companyId));
if (esito.size() > 0)
return esito;
esito.addAll(riparaAssegnazioniAlRuolo(companyId, userId));
esito.addAll(riparaNonValidate(companyId));
esito.addAll(creaWorkflowMancanti(companyId));
@ -356,6 +360,41 @@ public class SismicaUtil {
return esito;
}
private static List<String> riparaConformita(long companyId) {
List<String> esito = new ArrayList<>();
esito.add("<hr><b>Riparazione avvisi di conformità</b>");
List<IntPratica> pratiche = null;
int start = 0;
do {
try {
pratiche = IntPraticaLocalServiceUtil.getIntPraticas(start, start + SLICE);
} catch (SystemException e) {
esito.add("Errore caricamento intPratiche: " + e.getMessage());
}
start += SLICE;
List<Avviso> avvisi = null;
for (IntPratica pratica : pratiche) {
String stato = pratica.getStatoPratica();
if (Validator.isNotNull(stato) && Validator.isNotNull(pratica.getTipoProcedura())
&& pratica.getTipoPratica().equalsIgnoreCase(Constants.TIPO_PRATICA_DEPOSITO)
&& stato.equals(StatoPraticaConstants.VIDIMATA)) {
try {
avvisi = AvvisoLocalServiceUtil.findByIntPraticaId_tipoDocumento(
pratica.getIntPraticaId(), StatoPraticaConstants.CONFORME);
} catch (SystemException e) {
esito.add("Errore caricamento avvisi: " + e.getMessage());
}
if (avvisi.size() == 0) {
esito.add("Progetto: " + pratica.getNumeroProgetto() + " ("
+ pratica.getIntPraticaId() + "), procedura=" + pratica.getTipoProcedura());
}
}
}
} while (pratiche.size() > 0);
return esito;
}
private static List<String> riparaContextWorkflow(long companyId) {
List<String> esito = new ArrayList<>();
esito.add("<hr><b>Riparazione context workflow</b>");
@ -575,7 +614,7 @@ public class SismicaUtil {
private static Map<String, Long> templateIdByKey;
private static final Date inizio = SismicaUtil.stringToDate("2019-12-31");
public static List<String> riparaDocumenti(long companyId) throws SystemException, PortalException {
private static List<String> riparaDocumenti(long companyId) throws SystemException, PortalException {
List<String> esito = new ArrayList<String>();
esito.add("<hr><b>Riparazione generazione documenti</b>");

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

@ -240,7 +240,7 @@ public class SorteggioPraticaUtil {
List<IntPratica> elenco = s.getValue();
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(companyId, codiceProvincia);
long numeroSorteggiate = 0; // (long) Math.ceil(0.2 * elenco.size());
long numeroSorteggiate = (long) Math.ceil(0.2 * elenco.size());
esito.add("<b>Provincia " + provincia.getProvincia() + " " + elenco.size()
+ " pratiche, vanno a sorteggio " + numeroSorteggiate + "</b>");

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.number=2265
build.date=1590077289969
build.number=2273
build.date=1590160130915
build.auto.upgrade=true
##

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp

@ -401,7 +401,8 @@
String uso = "";
String title = "";
if(label.length() > 1){
String pref = label.substring(0, 1);
if (!(pref.equals("1") || pref.equals("2"))) {
title = label.substring(0, label.length()-1);
uso = title.substring(title.length()-1);
out.print(LanguageUtil.get(pageContext, "destinazione-uso-"+uso)+":");

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

@ -465,6 +465,10 @@
label="destinazione-1"/>
<aui:input disabled="<%= disabledInput && !enabledByIntegrazione %>" type="radio" checked='<%=BeanParamUtil.getString(dettPratica, request, "destinazione").equalsIgnoreCase("2") %>' name="destinazione" bean="<%=dettPratica %>" value="2"
label="destinazione-2"/>
<aui:input disabled="<%= disabledInput && !enabledByIntegrazione %>" type="radio" checked='<%=BeanParamUtil.getString(dettPratica, request, "destinazione").equalsIgnoreCase("1A") %>' name="destinazione" bean="<%=dettPratica %>" value="1A"
label="destinazione-1A"/>
<aui:input disabled="<%= disabledInput && !enabledByIntegrazione %>" type="radio" checked='<%=BeanParamUtil.getString(dettPratica, request, "destinazione").equalsIgnoreCase("2A") %>' name="destinazione" bean="<%=dettPratica %>" value="2A"
label="destinazione-2A"/>
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
@ -814,7 +818,7 @@ $('#sistemi_costruttivi input').on('change', function(){
function checkIfDisableInfrastrutture(){
var destinazione = AUI().one("#destinazioneinazione input:checked"),
allowedValues = ["A4A","A4B","A4C","A4D","A4E","A4F","A5A","B4A","B4B","B4C","B5A"];
allowedValues = ["1A", "2A", "A4A", "A4B", "A4C", "A4D", "A4E", "A4F", "A5A", "B4A", "B4B", "B4C", "B5A"];
if( destinazione!=null && allowedValues.indexOf(destinazione.val()) != -1 ){
disableInput('#dati_metrici');
@ -823,8 +827,7 @@ function checkIfDisableInfrastrutture(){
} else {
enableInput('#dati_metrici');
enableInput('#descrizione_componenti_costruttiveContent');
enableInput('#dati_infrastruttre_altro');
// disableInput('#dati_infrastruttre_altro');
disableInput('#dati_infrastruttre_altro');
}
}

Caricamento…
Annulla
Salva