Sfoglia il codice sorgente

filtri tipo pratica

master
Mattia Gosetto 3 anni fa
parent
commit
d22339cfd7
  1. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java
  2. 11
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/IntPraticaAdvancedSearch.java
  3. 7
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/IntPraticaIndexer.java
  4. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java
  5. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  6. 13
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/advanced_search.jsp
  7. 24
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp

5
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java

@ -48,7 +48,7 @@ import com.liferay.portal.service.RoleLocalServiceUtil;
public class ControlloPraticaAdvancedSearch {
public static final String[] OVERRIDE_KEYWORDS = { "controlloPraticaId", "numeroProgetto", "tipoPratica",
"statoPratica", "dataRichiesta", "committente", "soggettiInteressati", "status", "entryClassName",
"userId", "descIntervento" };
"userId", "descIntervento", "tipoProcedura" };
public static final Format DATE_FORMAT_LUCENE = FastDateFormatFactoryUtil.getSimpleDateFormat("yyyyMMdd");
public static final DateFormat DATE_FORMAT_STRING = new SimpleDateFormat("dd/MM/yyyy");
@ -518,6 +518,9 @@ public class ControlloPraticaAdvancedSearch {
String tipoAttivita = ParamUtil.getString(request, "tipoAttivita");
String controlloObbligatorioSearch = ParamUtil.getString(request, "controlloObbligatorio");
String sorteggiataSearch = ParamUtil.getString(request, "sorteggiata");
_log.info(tipoProcedura);
try {
if (Validator.isNotNull(tipoAttivita) && !tipoAttivita.equals("-1")) {
TermQuery tipoAttivitaTermQuery = TermQueryFactoryUtil.create(searchContext, "workflowState",

11
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/IntPraticaAdvancedSearch.java

@ -376,6 +376,7 @@ public class IntPraticaAdvancedSearch {
}
queryStatoPratica(request, booleanQuery, searchContext);
queryTipoProcedura(request, booleanQuery, searchContext);
addRequiredTerms(booleanQuery, PortosIndexField.COMMITTENTI,
ParamUtil.getString(request, "committente"));
@ -615,6 +616,16 @@ public class IntPraticaAdvancedSearch {
booleanQuery.add(termQuery, BooleanClauseOccur.MUST);
}
}
private static void queryTipoProcedura(HttpServletRequest request, BooleanQuery booleanQuery,
SearchContext searchContext) throws ParseException {
String tipoProcedura = ParamUtil.getString(request, PortosIndexField.TIPO_PROCEDURA);
if (Validator.isNotNull(tipoProcedura)) {
TermQuery termQuery = TermQueryFactoryUtil.create(searchContext, PortosIndexField.TIPO_PROCEDURA, tipoProcedura);
if (Validator.isNotNull(termQuery))
booleanQuery.add(termQuery, BooleanClauseOccur.MUST);
}
}
private static void logResults(User user, BooleanQuery booleanQuery, Hits hits) {
if (_log.isDebugEnabled()) {

7
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/IntPraticaIndexer.java

@ -16,6 +16,7 @@ import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.persistence.IntPraticaActionableDynamicQuery;
import it.tref.liferay.portos.bo.shared.util.Constants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import it.tref.liferay.portos.bo.util.PortosIndexField;
@ -162,6 +163,12 @@ public class IntPraticaIndexer extends BaseIndexer {
boolean sorteggiata = SorteggioLocalServiceUtil.findByIntPratica(intPraticaFromDB.getIntPraticaId()) != null;
document.addKeyword("sorteggiata", sorteggiata);
document.addKeyword("controlloObbligatorio", intPraticaFromDB.isControlloObbligatorio());
String tipoProcedura = intPratica.getTipoProcedura();
if (Validator.isNotNull(tipoProcedura)) {
if (tipoProcedura.equalsIgnoreCase(Constants.PROCEDURA_B1))
tipoProcedura = Constants.PROCEDURA_B;
document.addKeyword(PortosIndexField.TIPO_PROCEDURA, tipoProcedura);
}
// Gestione pratica aperta/chiusa fine lavori
if (intPraticaFromDB.getCollaudoTotale()) {
document.addKeyword(PortosIndexField.PRATICA_APERTA, false);

8
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java

@ -236,10 +236,10 @@ public class FascicoloPortlet extends MVCPortlet {
}
public void searchURL(ActionRequest actionRequest, ActionResponse actionResponse) {
String numeroProgetto = actionRequest.getParameter("numeroProgetto");
String protocollo = actionRequest.getParameter("protocollo");
String tipoPratica = actionRequest.getParameter("tipoPratica");
//String tipoPratica = actionRequest.getParameter("tipoPratica");
String tipoProcedura = actionRequest.getParameter("tipoProcedura");
String statoPratica = actionRequest.getParameter("statoPratica");
String committente = actionRequest.getParameter("committente");
String descInterventoSearch = actionRequest.getParameter("descIntervento");
@ -277,8 +277,8 @@ public class FascicoloPortlet extends MVCPortlet {
actionResponse.setRenderParameter("praticaAperta", praticaAperta);
actionResponse.setRenderParameter("descIntervento", descInterventoSearch);
actionResponse.setRenderParameter("protocollo", protocollo);
actionResponse.setRenderParameter("tipoPratica", tipoPratica);
actionResponse.setRenderParameter("tipoPratica", tipoPratica);
//actionResponse.setRenderParameter("tipoPratica", tipoPratica);
actionResponse.setRenderParameter("tipoProcedura", tipoProcedura);
actionResponse.setRenderParameter("statoPratica", statoPratica);
actionResponse.setRenderParameter("committente", committente);
if (Validator.isNotNull(provincia)) {

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=2661
build.date=1624456745283
build.number=2668
build.date=1624463936907
build.auto.upgrade=true
##

13
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/advanced_search.jsp

@ -34,12 +34,11 @@
<aui:input type="text" name="protocollo" label="Protocollo"/>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:select name="tipoPratica" label="Tipo Pratica">
<aui:option value="-1">Seleziona il tipo di pratica</aui:option>
<aui:option value="01"><liferay-ui:message key="deposito"/></aui:option>
<aui:option value="02"><liferay-ui:message key="autorizzazione"/></aui:option>
<aui:option value="03"><liferay-ui:message key="sanatoria"/></aui:option>
<aui:option value="sorteggio"><liferay-ui:message key="sorteggiata"/></aui:option>
<aui:select name="tipoProcedura" label="tipo-procedura">
<aui:option value="">Tutte</aui:option>
<aui:option value="A">INTERVENTO A (Autorizzazione)</aui:option>
<aui:option value="B">INTERVENTO B (Deposito)</aui:option>
<aui:option value="C">INTERVENTO C (Privo di rilevanza)</aui:option>
</aui:select>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
@ -57,7 +56,7 @@
<aui:option value="IN"><liferay-ui:message key="integrazione in corso"/></aui:option>
<aui:option value="sospesa"><liferay-ui:message key="sospesa"/></aui:option>
<aui:option value="SP"><liferay-ui:message key="sottoposta a parere"/></aui:option>
<aui:option value="VA"><liferay-ui:message key="variata"/></aui:option>
<aui:option value="VA"><liferay-ui:message key="variante"/></aui:option>
</aui:select>
</div>
</div>

24
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp

@ -23,13 +23,11 @@ List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrgani
<aui:input type="text" name="protocollo" label="Protocollo" />
</div>
<div class="col-xs-12 col-md-3">
<aui:select name="tipoPratica" label="Tipo Pratica">
<aui:option value="-1">Seleziona il tipo di pratica</aui:option>
<aui:option value="01"><liferay-ui:message key="deposito" /></aui:option>
<aui:option value="02"><liferay-ui:message key="autorizzazione" /></aui:option>
<aui:option value="03"><liferay-ui:message key="sanatoria" /></aui:option>
<!-- ADT - BUG-11 Aggiunta filtro ricerca -->
<aui:option value="sorteggio"><liferay-ui:message key="sorteggiata"/></aui:option>
<aui:select name="tipoProcedura" label="tipo-procedura">
<aui:option value="">Tutte</aui:option>
<aui:option value="A">INTERVENTO A (Autorizzazione)</aui:option>
<aui:option value="B">INTERVENTO B (Deposito)</aui:option>
<aui:option value="C">INTERVENTO C (Privo di rilevanza)</aui:option>
</aui:select>
</div>
<div class="col-xs-12 col-md-3">
@ -43,7 +41,7 @@ List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrgani
<aui:option value="FL"><liferay-ui:message key="fine lavori" /></aui:option>
<aui:option value="CP"><liferay-ui:message key="collaudo parziale" /></aui:option>
<aui:option value="FP"><liferay-ui:message key="fine lavori parziali" /></aui:option>
<aui:option value="VA"><liferay-ui:message key="variata" /></aui:option>
<aui:option value="VA"><liferay-ui:message key="variante" /></aui:option>
<aui:option value="VI"><liferay-ui:message key="vidimata" /></aui:option>
<aui:option value="NC"><liferay-ui:message key="non conforme" /></aui:option>
<aui:option value="IN"><liferay-ui:message key="integrazione in corso" /></aui:option>
@ -140,16 +138,6 @@ List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrgani
<aui:select name="comune" label="Comune" />
</div>
<div class="col-sm-12 col-md-2">
<aui:select name="tipoProcedura" label="tipo-procedura">
<aui:option value="">Tutte</aui:option>
<aui:option value="A">Procedura A</aui:option>
<aui:option value="B">Procedura B</aui:option>
<aui:option value="C">Procedura C</aui:option>
</aui:select>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-4">
<aui:select name="tipoAttivita" label="Tipo Attività">
<aui:option value="-1">Tutte</aui:option>
<aui:option value="Assegnazione">Assegnazione</aui:option>

Caricamento…
Annulla
Salva