|
|
|
@ -3,6 +3,7 @@ package it.tref.liferay.portos.bo.search;
|
|
|
|
|
import it.tref.liferay.portos.bo.model.ControlloPratica; |
|
|
|
|
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil; |
|
|
|
|
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; |
|
|
|
|
import it.tref.liferay.portos.bo.util.PortosIndexField; |
|
|
|
|
import it.tref.liferay.portos.bo.util.WorkflowConstants; |
|
|
|
|
|
|
|
|
|
import java.text.DateFormat; |
|
|
|
@ -70,7 +71,6 @@ public class ControlloPraticaAdvancedSearch {
|
|
|
|
|
searchContext.setKeywords(OVERRIDE_KEYWORDS.toString()); |
|
|
|
|
|
|
|
|
|
if (searchForExport) { |
|
|
|
|
|
|
|
|
|
int maxEnd = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_FILTER_SEARCH_LIMIT)); |
|
|
|
|
|
|
|
|
|
searchContext.setStart(0); |
|
|
|
@ -156,6 +156,7 @@ public class ControlloPraticaAdvancedSearch {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Hits searchTaskMieiRuoli(HttpServletRequest request, User user, int start, int end) { |
|
|
|
|
_log.info("Start "+ start + " End " + end); |
|
|
|
|
|
|
|
|
|
// Parametro proveniente dalla ricerca
|
|
|
|
|
int ufficioSearch = ParamUtil.getInteger(request, "ufficio"); |
|
|
|
@ -182,6 +183,7 @@ public class ControlloPraticaAdvancedSearch {
|
|
|
|
|
|
|
|
|
|
// Gestione Ordinamento
|
|
|
|
|
searchContext.setSorts(getOrderedQuery(request)); |
|
|
|
|
|
|
|
|
|
Hits hits = null; |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
@ -259,9 +261,13 @@ public class ControlloPraticaAdvancedSearch {
|
|
|
|
|
// Condizioni aggiuntive
|
|
|
|
|
retrieveQuery(request, user, booleanQuery, searchContext); |
|
|
|
|
|
|
|
|
|
if (_log.isDebugEnabled()) { |
|
|
|
|
_log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//if (_log.isDebugEnabled()) {
|
|
|
|
|
//_log.info("User " + user.getScreenName() + " Request query : " + booleanQuery.toString());
|
|
|
|
|
_log.info("Request " + ParamUtil.getString(request, "ordinaPer")); |
|
|
|
|
_log.info("Request " + ParamUtil.getString(request, "ordinaTipo")); |
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
hits = SearchEngineUtil.search(searchContext, booleanQuery); |
|
|
|
|
|
|
|
|
@ -809,6 +815,8 @@ public class ControlloPraticaAdvancedSearch {
|
|
|
|
|
String controlloObbligatorioSearch = ParamUtil.getString(request, "controlloObbligatorio"); |
|
|
|
|
String sorteggiataSearch = ParamUtil.getString(request, "sorteggiata"); |
|
|
|
|
|
|
|
|
|
Integer deltaSearch = ParamUtil.getInteger(request, "delta"); |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
if (tipoAttivita != null && !tipoAttivita.equals("") && !tipoAttivita.equals("-1")) { |
|
|
|
@ -997,22 +1005,17 @@ public class ControlloPraticaAdvancedSearch {
|
|
|
|
|
sort.setFieldName(orderField); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (orderField.equals("numeroProgetto")) { |
|
|
|
|
if (orderField.equals(PortosIndexField.NUMERO_PROGETTO)) { |
|
|
|
|
sort.setType(Sort.INT_TYPE); |
|
|
|
|
} else if (orderField.equals("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")) { |
|
|
|
|
} else if (orderField.equals(PortosIndexField.PROTOCOLLO)) { |
|
|
|
|
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.equals("desc")) { |
|
|
|
|
if (orderType.equals("asc")) { |
|
|
|
|
sort.setReverse(false); |
|
|
|
|
} else { |
|
|
|
|
sort.setReverse(true); |
|
|
|
|