diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java index f4870983..a78efcc7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java @@ -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.service.ControlloPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; +<<<<<<< HEAD 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.WorkflowConstants; @@ -60,9 +63,23 @@ public class ControlloPraticaAdvancedSearch { public static final DateFormat DATE_FORMAT_STRING = new SimpleDateFormat("dd/MM/yyyy"); 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.setKeywords(OVERRIDE_KEYWORDS.toString()); +<<<<<<< HEAD if (ParamUtil.getBoolean(request, "searchForExport", false)) { +======= + + if (searchForExport) { +>>>>>>> beca506dc04949dcfcbcce426fb94af22cd41bfb int maxEnd = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_FILTER_SEARCH_LIMIT)); searchContext.setStart(0); searchContext.setEnd(maxEnd); @@ -131,6 +148,12 @@ public class ControlloPraticaAdvancedSearch { } 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.setKeywords(OVERRIDE_KEYWORDS.toString()); if (ParamUtil.getBoolean(request, "searchForExport", false)) { @@ -146,6 +169,7 @@ public class ControlloPraticaAdvancedSearch { // Gestione Ordinamento searchContext.setSorts(getOrderedQuery(request)); + Hits hits = null; try { // Condizioni necessarie per questa ricerca : @@ -219,9 +243,11 @@ public class ControlloPraticaAdvancedSearch { // Condizioni aggiuntive retrieveQuery(request, user, booleanQuery, searchContext); + + 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()); @@ -577,6 +603,12 @@ public class ControlloPraticaAdvancedSearch { // ADT - BUG-11 Aggiunta filtro ricerca String controlloObbligatorioSearch = ParamUtil.getString(request, "controlloObbligatorio"); String sorteggiataSearch = ParamUtil.getString(request, "sorteggiata"); +<<<<<<< HEAD +======= + + Integer deltaSearch = ParamUtil.getInteger(request, "delta"); + +>>>>>>> beca506dc04949dcfcbcce426fb94af22cd41bfb try { if (tipoAttivita != null && !tipoAttivita.equals("") && !tipoAttivita.equals("-1")) { TermQuery tipoAttivitaTermQuery = TermQueryFactoryUtil.create(searchContext, "workflowState", @@ -717,20 +749,21 @@ public class ControlloPraticaAdvancedSearch { } else { sort.setFieldName(orderField); } +<<<<<<< HEAD if (orderField.equals("numeroProgetto")) { +======= + + if (orderField.equals(PortosIndexField.NUMERO_PROGETTO)) { +>>>>>>> beca506dc04949dcfcbcce426fb94af22cd41bfb 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);