|
|
@ -3,7 +3,10 @@ package it.tref.liferay.portos.bo.search; |
|
|
|
import it.tref.liferay.portos.bo.model.ControlloPratica; |
|
|
|
import it.tref.liferay.portos.bo.model.ControlloPratica; |
|
|
|
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil; |
|
|
|
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil; |
|
|
|
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; |
|
|
|
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil; |
|
|
|
import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil; |
|
|
|
|
|
|
|
======= |
|
|
|
|
|
|
|
>>>>>>> beca506dc04949dcfcbcce426fb94af22cd41bfb |
|
|
|
import it.tref.liferay.portos.bo.util.PortosIndexField; |
|
|
|
import it.tref.liferay.portos.bo.util.PortosIndexField; |
|
|
|
import it.tref.liferay.portos.bo.util.WorkflowConstants; |
|
|
|
import it.tref.liferay.portos.bo.util.WorkflowConstants; |
|
|
|
|
|
|
|
|
|
|
@ -60,9 +63,23 @@ public class ControlloPraticaAdvancedSearch { |
|
|
|
public static final DateFormat DATE_FORMAT_STRING = new SimpleDateFormat("dd/MM/yyyy"); |
|
|
|
public static final DateFormat DATE_FORMAT_STRING = new SimpleDateFormat("dd/MM/yyyy"); |
|
|
|
|
|
|
|
|
|
|
|
public static Hits searchMieiTask(HttpServletRequest request, User user, int start, int end) { |
|
|
|
public static Hits searchMieiTask(HttpServletRequest request, User user, int start, int end) { |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
|
|
|
|
======= |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Parametro proveniente dalla ricerca
|
|
|
|
|
|
|
|
int ufficioSearch = ParamUtil.getInteger(request, "ufficio"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean searchForExport = ParamUtil.getBoolean(request, "searchForExport", false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>>>>>>> beca506dc04949dcfcbcce426fb94af22cd41bfb |
|
|
|
SearchContext searchContext = SearchContextFactory.getInstance(request); |
|
|
|
SearchContext searchContext = SearchContextFactory.getInstance(request); |
|
|
|
searchContext.setKeywords(OVERRIDE_KEYWORDS.toString()); |
|
|
|
searchContext.setKeywords(OVERRIDE_KEYWORDS.toString()); |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
if (ParamUtil.getBoolean(request, "searchForExport", false)) { |
|
|
|
if (ParamUtil.getBoolean(request, "searchForExport", false)) { |
|
|
|
|
|
|
|
======= |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (searchForExport) { |
|
|
|
|
|
|
|
>>>>>>> beca506dc04949dcfcbcce426fb94af22cd41bfb |
|
|
|
int maxEnd = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_FILTER_SEARCH_LIMIT)); |
|
|
|
int maxEnd = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_FILTER_SEARCH_LIMIT)); |
|
|
|
searchContext.setStart(0); |
|
|
|
searchContext.setStart(0); |
|
|
|
searchContext.setEnd(maxEnd); |
|
|
|
searchContext.setEnd(maxEnd); |
|
|
@ -131,6 +148,12 @@ public class ControlloPraticaAdvancedSearch { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static Hits searchTaskMieiRuoli(HttpServletRequest request, User user, int start, int end) { |
|
|
|
public static Hits searchTaskMieiRuoli(HttpServletRequest request, User user, int start, int end) { |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
|
|
|
|
======= |
|
|
|
|
|
|
|
// Parametro proveniente dalla ricerca
|
|
|
|
|
|
|
|
int ufficioSearch = ParamUtil.getInteger(request, "ufficio"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>>>>>>> beca506dc04949dcfcbcce426fb94af22cd41bfb |
|
|
|
SearchContext searchContext = SearchContextFactory.getInstance(request); |
|
|
|
SearchContext searchContext = SearchContextFactory.getInstance(request); |
|
|
|
searchContext.setKeywords(OVERRIDE_KEYWORDS.toString()); |
|
|
|
searchContext.setKeywords(OVERRIDE_KEYWORDS.toString()); |
|
|
|
if (ParamUtil.getBoolean(request, "searchForExport", false)) { |
|
|
|
if (ParamUtil.getBoolean(request, "searchForExport", false)) { |
|
|
@ -146,6 +169,7 @@ public class ControlloPraticaAdvancedSearch { |
|
|
|
|
|
|
|
|
|
|
|
// Gestione Ordinamento
|
|
|
|
// Gestione Ordinamento
|
|
|
|
searchContext.setSorts(getOrderedQuery(request)); |
|
|
|
searchContext.setSorts(getOrderedQuery(request)); |
|
|
|
|
|
|
|
|
|
|
|
Hits hits = null; |
|
|
|
Hits hits = null; |
|
|
|
try { |
|
|
|
try { |
|
|
|
// Condizioni necessarie per questa ricerca :
|
|
|
|
// Condizioni necessarie per questa ricerca :
|
|
|
@ -220,8 +244,10 @@ public class ControlloPraticaAdvancedSearch { |
|
|
|
// Condizioni aggiuntive
|
|
|
|
// Condizioni aggiuntive
|
|
|
|
retrieveQuery(request, user, booleanQuery, searchContext); |
|
|
|
retrieveQuery(request, user, booleanQuery, searchContext); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_log.isDebugEnabled()) { |
|
|
|
if (_log.isDebugEnabled()) { |
|
|
|
_log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); |
|
|
|
_log.info("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
_log.info("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); |
|
|
|
_log.info("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); |
|
|
|
|
|
|
|
|
|
|
@ -577,6 +603,12 @@ public class ControlloPraticaAdvancedSearch { |
|
|
|
// ADT - BUG-11 Aggiunta filtro ricerca
|
|
|
|
// ADT - BUG-11 Aggiunta filtro ricerca
|
|
|
|
String controlloObbligatorioSearch = ParamUtil.getString(request, "controlloObbligatorio"); |
|
|
|
String controlloObbligatorioSearch = ParamUtil.getString(request, "controlloObbligatorio"); |
|
|
|
String sorteggiataSearch = ParamUtil.getString(request, "sorteggiata"); |
|
|
|
String sorteggiataSearch = ParamUtil.getString(request, "sorteggiata"); |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
|
|
|
|
======= |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer deltaSearch = ParamUtil.getInteger(request, "delta"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>>>>>>> beca506dc04949dcfcbcce426fb94af22cd41bfb |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (tipoAttivita != null && !tipoAttivita.equals("") && !tipoAttivita.equals("-1")) { |
|
|
|
if (tipoAttivita != null && !tipoAttivita.equals("") && !tipoAttivita.equals("-1")) { |
|
|
|
TermQuery tipoAttivitaTermQuery = TermQueryFactoryUtil.create(searchContext, "workflowState", |
|
|
|
TermQuery tipoAttivitaTermQuery = TermQueryFactoryUtil.create(searchContext, "workflowState", |
|
|
@ -717,20 +749,21 @@ public class ControlloPraticaAdvancedSearch { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
sort.setFieldName(orderField); |
|
|
|
sort.setFieldName(orderField); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
if (orderField.equals("numeroProgetto")) { |
|
|
|
if (orderField.equals("numeroProgetto")) { |
|
|
|
|
|
|
|
======= |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (orderField.equals(PortosIndexField.NUMERO_PROGETTO)) { |
|
|
|
|
|
|
|
>>>>>>> beca506dc04949dcfcbcce426fb94af22cd41bfb |
|
|
|
sort.setType(Sort.INT_TYPE); |
|
|
|
sort.setType(Sort.INT_TYPE); |
|
|
|
} else if (orderField.equals("protocollo")) { |
|
|
|
} else if (orderField.equals(PortosIndexField.PROTOCOLLO)) { |
|
|
|
sort.setType(Sort.LONG_TYPE); |
|
|
|
|
|
|
|
} else if (orderField.equals("dataInizioProcedimento")) { |
|
|
|
|
|
|
|
sort.setType(Sort.LONG_TYPE); |
|
|
|
|
|
|
|
} else if (orderField.equals("taskName")) { |
|
|
|
|
|
|
|
sort.setType(Sort.STRING_TYPE); |
|
|
|
|
|
|
|
} else if (orderField.equals("tipoPratica")) { |
|
|
|
|
|
|
|
sort.setType(Sort.INT_TYPE); |
|
|
|
sort.setType(Sort.INT_TYPE); |
|
|
|
|
|
|
|
} else if (orderField.equals("dataCreazione")) { |
|
|
|
|
|
|
|
sort.setType(Sort.LONG_TYPE); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (orderType != null && !orderType.equals("") && !orderType.equals("-1")) { |
|
|
|
if (orderType != null && !orderType.equals("") && !orderType.equals("-1")) { |
|
|
|
if (orderType.equals("desc")) { |
|
|
|
if (orderType.equals("asc")) { |
|
|
|
sort.setReverse(false); |
|
|
|
sort.setReverse(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
sort.setReverse(true); |
|
|
|
sort.setReverse(true); |
|
|
|