Sfoglia il codice sorgente

Inizio preassegnazione

master
Salvatore La Manna 4 anni fa
parent
commit
943a1823e7
  1. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml
  2. 42
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java
  3. 14
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java
  4. 10
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java
  5. 27
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java
  6. 422
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java
  7. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java
  8. 9
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java
  9. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql
  10. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
  11. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml
  12. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml
  13. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Language.properties
  14. 40
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java
  15. 14
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java
  16. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/ControlloPraticaIndexer.java
  17. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java
  18. 36
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java
  19. 46
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
  20. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java
  21. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  22. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/miei_task.jsp
  23. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf
  24. 232
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/Constants.java
  25. 18
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/UnitaOperativeUtil.java
  26. 4
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.classpath
  27. 11
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp
  28. 1
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java
  29. 4
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/RenderFormTaskPortletAction.java
  30. 8
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/util/WorkflowUtil.java
  31. 4
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml

@ -986,6 +986,7 @@
<column name="dtAnnullamento" type="Date" /> <column name="dtAnnullamento" type="Date" />
<column name="docPraticaAnnullamentoId" type="long" /> <column name="docPraticaAnnullamentoId" type="long" />
<!-- Other fields --> <!-- Other fields -->
<column name="unitaOperativa" type="int" />
<column name="dtSorteggio" type="Date" /> <column name="dtSorteggio" type="Date" />
<column name="statoPratica" type="String" /> <column name="statoPratica" type="String" />
<column name="numeroProgetto" type="String" /> <column name="numeroProgetto" type="String" />

42
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java

@ -89,6 +89,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
attributes.put("tipoProcedura", getTipoProcedura()); attributes.put("tipoProcedura", getTipoProcedura());
attributes.put("dtAnnullamento", getDtAnnullamento()); attributes.put("dtAnnullamento", getDtAnnullamento());
attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId()); attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId());
attributes.put("unitaOperativa", getUnitaOperativa());
attributes.put("dtSorteggio", getDtSorteggio()); attributes.put("dtSorteggio", getDtSorteggio());
attributes.put("statoPratica", getStatoPratica()); attributes.put("statoPratica", getStatoPratica());
attributes.put("numeroProgetto", getNumeroProgetto()); attributes.put("numeroProgetto", getNumeroProgetto());
@ -195,6 +196,12 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
setDocPraticaAnnullamentoId(docPraticaAnnullamentoId); setDocPraticaAnnullamentoId(docPraticaAnnullamentoId);
} }
Integer unitaOperativa = (Integer)attributes.get("unitaOperativa");
if (unitaOperativa != null) {
setUnitaOperativa(unitaOperativa);
}
Date dtSorteggio = (Date)attributes.get("dtSorteggio"); Date dtSorteggio = (Date)attributes.get("dtSorteggio");
if (dtSorteggio != null) { if (dtSorteggio != null) {
@ -624,6 +631,29 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
} }
} }
@Override
public int getUnitaOperativa() {
return _unitaOperativa;
}
@Override
public void setUnitaOperativa(int unitaOperativa) {
_unitaOperativa = unitaOperativa;
if (_intPraticaRemoteModel != null) {
try {
Class<?> clazz = _intPraticaRemoteModel.getClass();
Method method = clazz.getMethod("setUnitaOperativa", int.class);
method.invoke(_intPraticaRemoteModel, unitaOperativa);
}
catch (Exception e) {
throw new UnsupportedOperationException(e);
}
}
}
@Override @Override
public Date getDtSorteggio() { public Date getDtSorteggio() {
return _dtSorteggio; return _dtSorteggio;
@ -1285,6 +1315,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
clone.setTipoProcedura(getTipoProcedura()); clone.setTipoProcedura(getTipoProcedura());
clone.setDtAnnullamento(getDtAnnullamento()); clone.setDtAnnullamento(getDtAnnullamento());
clone.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId()); clone.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId());
clone.setUnitaOperativa(getUnitaOperativa());
clone.setDtSorteggio(getDtSorteggio()); clone.setDtSorteggio(getDtSorteggio());
clone.setStatoPratica(getStatoPratica()); clone.setStatoPratica(getStatoPratica());
clone.setNumeroProgetto(getNumeroProgetto()); clone.setNumeroProgetto(getNumeroProgetto());
@ -1356,7 +1387,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(65); StringBundler sb = new StringBundler(67);
sb.append("{uuid="); sb.append("{uuid=");
sb.append(getUuid()); sb.append(getUuid());
@ -1384,6 +1415,8 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
sb.append(getDtAnnullamento()); sb.append(getDtAnnullamento());
sb.append(", docPraticaAnnullamentoId="); sb.append(", docPraticaAnnullamentoId=");
sb.append(getDocPraticaAnnullamentoId()); sb.append(getDocPraticaAnnullamentoId());
sb.append(", unitaOperativa=");
sb.append(getUnitaOperativa());
sb.append(", dtSorteggio="); sb.append(", dtSorteggio=");
sb.append(getDtSorteggio()); sb.append(getDtSorteggio());
sb.append(", statoPratica="); sb.append(", statoPratica=");
@ -1429,7 +1462,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
@Override @Override
public String toXmlString() { public String toXmlString() {
StringBundler sb = new StringBundler(100); StringBundler sb = new StringBundler(103);
sb.append("<model><model-name>"); sb.append("<model><model-name>");
sb.append("it.tref.liferay.portos.bo.model.IntPratica"); sb.append("it.tref.liferay.portos.bo.model.IntPratica");
@ -1487,6 +1520,10 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
"<column><column-name>docPraticaAnnullamentoId</column-name><column-value><![CDATA["); "<column><column-name>docPraticaAnnullamentoId</column-name><column-value><![CDATA[");
sb.append(getDocPraticaAnnullamentoId()); sb.append(getDocPraticaAnnullamentoId());
sb.append("]]></column-value></column>"); sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>unitaOperativa</column-name><column-value><![CDATA[");
sb.append(getUnitaOperativa());
sb.append("]]></column-value></column>");
sb.append( sb.append(
"<column><column-name>dtSorteggio</column-name><column-value><![CDATA["); "<column><column-name>dtSorteggio</column-name><column-value><![CDATA[");
sb.append(getDtSorteggio()); sb.append(getDtSorteggio());
@ -1583,6 +1620,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
private String _tipoProcedura; private String _tipoProcedura;
private Date _dtAnnullamento; private Date _dtAnnullamento;
private long _docPraticaAnnullamentoId; private long _docPraticaAnnullamentoId;
private int _unitaOperativa;
private Date _dtSorteggio; private Date _dtSorteggio;
private String _statoPratica; private String _statoPratica;
private String _numeroProgetto; private String _numeroProgetto;

14
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java

@ -279,6 +279,20 @@ public interface IntPraticaModel extends BaseModel<IntPratica>,
*/ */
public void setDocPraticaAnnullamentoId(long docPraticaAnnullamentoId); public void setDocPraticaAnnullamentoId(long docPraticaAnnullamentoId);
/**
* Returns the unita operativa of this int pratica.
*
* @return the unita operativa of this int pratica
*/
public int getUnitaOperativa();
/**
* Sets the unita operativa of this int pratica.
*
* @param unitaOperativa the unita operativa of this int pratica
*/
public void setUnitaOperativa(int unitaOperativa);
/** /**
* Returns the dt sorteggio of this int pratica. * Returns the dt sorteggio of this int pratica.
* *

10
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java

@ -44,6 +44,7 @@ public class IntPraticaSoap implements Serializable {
soapModel.setTipoProcedura(model.getTipoProcedura()); soapModel.setTipoProcedura(model.getTipoProcedura());
soapModel.setDtAnnullamento(model.getDtAnnullamento()); soapModel.setDtAnnullamento(model.getDtAnnullamento());
soapModel.setDocPraticaAnnullamentoId(model.getDocPraticaAnnullamentoId()); soapModel.setDocPraticaAnnullamentoId(model.getDocPraticaAnnullamentoId());
soapModel.setUnitaOperativa(model.getUnitaOperativa());
soapModel.setDtSorteggio(model.getDtSorteggio()); soapModel.setDtSorteggio(model.getDtSorteggio());
soapModel.setStatoPratica(model.getStatoPratica()); soapModel.setStatoPratica(model.getStatoPratica());
soapModel.setNumeroProgetto(model.getNumeroProgetto()); soapModel.setNumeroProgetto(model.getNumeroProgetto());
@ -219,6 +220,14 @@ public class IntPraticaSoap implements Serializable {
_docPraticaAnnullamentoId = docPraticaAnnullamentoId; _docPraticaAnnullamentoId = docPraticaAnnullamentoId;
} }
public int getUnitaOperativa() {
return _unitaOperativa;
}
public void setUnitaOperativa(int unitaOperativa) {
_unitaOperativa = unitaOperativa;
}
public Date getDtSorteggio() { public Date getDtSorteggio() {
return _dtSorteggio; return _dtSorteggio;
} }
@ -414,6 +423,7 @@ public class IntPraticaSoap implements Serializable {
private String _tipoProcedura; private String _tipoProcedura;
private Date _dtAnnullamento; private Date _dtAnnullamento;
private long _docPraticaAnnullamentoId; private long _docPraticaAnnullamentoId;
private int _unitaOperativa;
private Date _dtSorteggio; private Date _dtSorteggio;
private String _statoPratica; private String _statoPratica;
private String _numeroProgetto; private String _numeroProgetto;

27
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java

@ -63,6 +63,7 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper<IntPratica> {
attributes.put("tipoProcedura", getTipoProcedura()); attributes.put("tipoProcedura", getTipoProcedura());
attributes.put("dtAnnullamento", getDtAnnullamento()); attributes.put("dtAnnullamento", getDtAnnullamento());
attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId()); attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId());
attributes.put("unitaOperativa", getUnitaOperativa());
attributes.put("dtSorteggio", getDtSorteggio()); attributes.put("dtSorteggio", getDtSorteggio());
attributes.put("statoPratica", getStatoPratica()); attributes.put("statoPratica", getStatoPratica());
attributes.put("numeroProgetto", getNumeroProgetto()); attributes.put("numeroProgetto", getNumeroProgetto());
@ -169,6 +170,12 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper<IntPratica> {
setDocPraticaAnnullamentoId(docPraticaAnnullamentoId); setDocPraticaAnnullamentoId(docPraticaAnnullamentoId);
} }
Integer unitaOperativa = (Integer)attributes.get("unitaOperativa");
if (unitaOperativa != null) {
setUnitaOperativa(unitaOperativa);
}
Date dtSorteggio = (Date)attributes.get("dtSorteggio"); Date dtSorteggio = (Date)attributes.get("dtSorteggio");
if (dtSorteggio != null) { if (dtSorteggio != null) {
@ -590,6 +597,26 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper<IntPratica> {
_intPratica.setDocPraticaAnnullamentoId(docPraticaAnnullamentoId); _intPratica.setDocPraticaAnnullamentoId(docPraticaAnnullamentoId);
} }
/**
* Returns the unita operativa of this int pratica.
*
* @return the unita operativa of this int pratica
*/
@Override
public int getUnitaOperativa() {
return _intPratica.getUnitaOperativa();
}
/**
* Sets the unita operativa of this int pratica.
*
* @param unitaOperativa the unita operativa of this int pratica
*/
@Override
public void setUnitaOperativa(int unitaOperativa) {
_intPratica.setUnitaOperativa(unitaOperativa);
}
/** /**
* Returns the dt sorteggio of this int pratica. * Returns the dt sorteggio of this int pratica.
* *

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

@ -3,6 +3,8 @@ 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;
import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.util.PortosIndexField;
import it.tref.liferay.portos.bo.util.WorkflowConstants; import it.tref.liferay.portos.bo.util.WorkflowConstants;
import java.text.DateFormat; import java.text.DateFormat;
@ -11,7 +13,6 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map.Entry;
import java.util.Properties; import java.util.Properties;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -59,24 +60,13 @@ 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) {
// Parametro proveniente dalla ricerca
int ufficioSearch = ParamUtil.getInteger(request, "ufficio");
boolean searchForExport = ParamUtil.getBoolean(request, "searchForExport", false);
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 (searchForExport) {
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);
searchContext.setAttribute("paginationType", "none"); searchContext.setAttribute("paginationType", "none");
} else { } else {
searchContext.setAttribute("paginationType", "more"); searchContext.setAttribute("paginationType", "more");
searchContext.setStart(start); searchContext.setStart(start);
@ -85,7 +75,6 @@ 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 :
@ -104,50 +93,36 @@ public class ControlloPraticaAdvancedSearch {
// Ricavo i groupId relativi all utente che effettua la ricerca per // Ricavo i groupId relativi all utente che effettua la ricerca per
// filtrare // filtrare
long ufficio = ParamUtil.getLong(request, "ufficio");
if (ufficioSearch != 0 && ufficioSearch != -1) { if (ufficio != 0 && ufficio != -1) {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", ufficio);
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId",
ufficioSearch);
booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST);
} else { } else {
List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user
.getUserId()); .getUserId());
BooleanQuery groupIdsQuery = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery groupIdsQuery = BooleanQueryFactoryUtil.create(searchContext);
if (Validator.isNotNull(organizationList) && !organizationList.isEmpty()) { if (Validator.isNotNull(organizationList) && !organizationList.isEmpty()) {
for (Organization org : organizationList) { for (Organization org : organizationList) {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId",
org.getGroupId()); org.getGroupId());
groupIdsQuery.add(singleGroupIdQuery, BooleanClauseOccur.SHOULD); groupIdsQuery.add(singleGroupIdQuery, BooleanClauseOccur.SHOULD);
} }
booleanQuery.add(groupIdsQuery, BooleanClauseOccur.MUST); booleanQuery.add(groupIdsQuery, BooleanClauseOccur.MUST);
} else { } else {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", 0L); TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", 0L);
booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST);
} }
} }
// 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.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString());
} }
hits = SearchEngineUtil.search(searchContext, booleanQuery); hits = SearchEngineUtil.search(searchContext, booleanQuery);
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("Number of hint find : " + hits.getLength()); _log.debug("Number of hint find : " + hits.getLength());
} }
} catch (ParseException | SearchException | SystemException e) { } catch (ParseException | SearchException | SystemException e) {
_log.error(e, e); _log.error(e, e);
} }
@ -156,24 +131,13 @@ 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) {
// Parametro proveniente dalla ricerca
int ufficioSearch = ParamUtil.getInteger(request, "ufficio");
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)) {
boolean searchForExport = ParamUtil.getBoolean(request, "searchForExport", false);
if (searchForExport) {
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);
searchContext.setAttribute("paginationType", "none"); searchContext.setAttribute("paginationType", "none");
} else { } else {
searchContext.setAttribute("paginationType", "more"); searchContext.setAttribute("paginationType", "more");
searchContext.setStart(start); searchContext.setStart(start);
@ -184,29 +148,24 @@ public class ControlloPraticaAdvancedSearch {
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 :
// entryClassName=ControlloPratica & roleIds tra i taskAssigneeIds // entryClassName=ControlloPratica & roleIds tra i taskAssigneeIds
TermQuery entryClassNameTermQuery = TermQueryFactoryUtil.create(searchContext, "entryClassName", TermQuery entryClassNameTermQuery = TermQueryFactoryUtil.create(searchContext, "entryClassName",
ControlloPratica.class.getName()); ControlloPratica.class.getName());
TermQuery statusTermQuery = TermQueryFactoryUtil.create(searchContext, "status", TermQuery statusTermQuery = TermQueryFactoryUtil.create(searchContext, "status",
WorkflowConstants.STATUS_PENDING); WorkflowConstants.STATUS_PENDING);
BooleanQuery booleanQueryRoleIds = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery booleanQueryRoleIds = BooleanQueryFactoryUtil.create(searchContext);
List<Organization> organizationUserList = OrganizationLocalServiceUtil.getUserOrganizations(user List<Organization> organizationUserList = OrganizationLocalServiceUtil.getUserOrganizations(user
.getUserId()); .getUserId());
List<Role> organizationRoleList = null; List<Role> organizationRoleList = null;
for (Organization org : organizationUserList) { for (Organization org : organizationUserList) {
organizationRoleList = RoleLocalServiceUtil.getUserGroupRoles(user.getUserId(), organizationRoleList = RoleLocalServiceUtil.getUserGroupRoles(user.getUserId(),
org.getGroupId()); org.getGroupId());
for (Role role : organizationRoleList) { for (Role role : organizationRoleList) {
TermQuery roleIdTerm = TermQueryFactoryUtil.create(searchContext, "taskAssigneeRoleIds", TermQuery roleIdTerm = TermQueryFactoryUtil.create(searchContext, "taskAssigneeRoleIds",
("R" + role.getRoleId() + "G" + org.getGroupId())); ("R" + role.getRoleId() + "G" + org.getGroupId()));
booleanQueryRoleIds.add(roleIdTerm, BooleanClauseOccur.SHOULD); booleanQueryRoleIds.add(roleIdTerm, BooleanClauseOccur.SHOULD);
} }
} }
BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext);
@ -226,42 +185,45 @@ public class ControlloPraticaAdvancedSearch {
// Ricavo i groupId relativi all utente che effettua la ricerca per // Ricavo i groupId relativi all utente che effettua la ricerca per
// filtrare // filtrare
long ufficio = ParamUtil.getLong(request, "ufficio");
if (ufficioSearch != 0 && ufficioSearch != -1) { if (ufficio != 0 && ufficio != -1) {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", ufficio);
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId",
ufficioSearch);
booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST);
} else { } else {
List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user
.getUserId()); .getUserId());
BooleanQuery groupIdsQuery = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery groupIdsQuery = BooleanQueryFactoryUtil.create(searchContext);
if (Validator.isNotNull(organizationList) && !organizationList.isEmpty()) { if (Validator.isNotNull(organizationList) && !organizationList.isEmpty()) {
for (Organization org : organizationList) { for (Organization org : organizationList) {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId",
org.getGroupId()); org.getGroupId());
groupIdsQuery.add(singleGroupIdQuery, BooleanClauseOccur.SHOULD); groupIdsQuery.add(singleGroupIdQuery, BooleanClauseOccur.SHOULD);
} }
booleanQuery.add(groupIdsQuery, BooleanClauseOccur.MUST); booleanQuery.add(groupIdsQuery, BooleanClauseOccur.MUST);
} else { } else {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", 0L); TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", 0L);
booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST);
} }
} }
List<Integer> uos = UnitaOperativeUtil.getUnitaOperative(user);
if ((uos.size() > 0) && !uos.contains(0)) {
BooleanQuery uoQuery = BooleanQueryFactoryUtil.create(searchContext);
for (int uo : uos) {
TermQuery tq = TermQueryFactoryUtil.create(searchContext,
PortosIndexField.UNITA_OPERATIVA, uo);
uoQuery.add(tq, BooleanClauseOccur.SHOULD);
}
booleanQuery.add(uoQuery, BooleanClauseOccur.MUST);
}
// 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.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString());
} }
_log.info("User " + user.getScreenName() + " Request query : " + booleanQuery.toString());
hits = SearchEngineUtil.search(searchContext, booleanQuery); hits = SearchEngineUtil.search(searchContext, booleanQuery);
@ -276,26 +238,14 @@ public class ControlloPraticaAdvancedSearch {
} }
public static Hits searchAltriTask(HttpServletRequest request, User user, int start, int end) { public static Hits searchAltriTask(HttpServletRequest request, User user, int start, int end) {
// List<ControlloPratica> lista = new ArrayList<ControlloPratica>();
// Parametro proveniente dalla ricerca
int ufficioSearch = ParamUtil.getInteger(request, "ufficio");
SearchContext searchContext = SearchContextFactory.getInstance(request); SearchContext searchContext = SearchContextFactory.getInstance(request);
searchContext.setKeywords(OVERRIDE_KEYWORDS.toString()); searchContext.setKeywords(OVERRIDE_KEYWORDS.toString());
boolean searchForExport = ParamUtil.getBoolean(request, "searchForExport", false); boolean searchForExport = ParamUtil.getBoolean(request, "searchForExport", false);
if (searchForExport) { if (searchForExport) {
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);
searchContext.setAttribute("paginationType", "none"); searchContext.setAttribute("paginationType", "none");
} else { } else {
searchContext.setAttribute("paginationType", "more"); searchContext.setAttribute("paginationType", "more");
searchContext.setStart(start); searchContext.setStart(start);
@ -306,7 +256,6 @@ public class ControlloPraticaAdvancedSearch {
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 :
// entryClassName=ControlloPratica & // entryClassName=ControlloPratica &
// roleIds non e tra i taskAssigneeIds // roleIds non e tra i taskAssigneeIds
@ -323,7 +272,6 @@ public class ControlloPraticaAdvancedSearch {
for (Organization org : organizationUserList) { for (Organization org : organizationUserList) {
organizationRoleList = RoleLocalServiceUtil.getUserGroupRoles(user.getUserId(), organizationRoleList = RoleLocalServiceUtil.getUserGroupRoles(user.getUserId(),
org.getGroupId()); org.getGroupId());
for (Role role : organizationRoleList) { for (Role role : organizationRoleList) {
TermQuery roleIdTerm = TermQueryFactoryUtil.create(searchContext, "taskAssigneeRoleIds", TermQuery roleIdTerm = TermQueryFactoryUtil.create(searchContext, "taskAssigneeRoleIds",
(role.getRoleId() + "-" + org.getGroupId())); (role.getRoleId() + "-" + org.getGroupId()));
@ -348,72 +296,39 @@ public class ControlloPraticaAdvancedSearch {
// Ricavo i groupId relativi all utente che effettua la ricerca per // Ricavo i groupId relativi all utente che effettua la ricerca per
// filtrare // filtrare
long ufficio = ParamUtil.getLong(request, "ufficio");
if (ufficioSearch != 0 && ufficioSearch != -1) { if (ufficio != 0 && ufficio != -1) {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", ufficio);
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId",
ufficioSearch);
booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST);
} else { } else {
List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user
.getUserId()); .getUserId());
BooleanQuery groupIdsQuery = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery groupIdsQuery = BooleanQueryFactoryUtil.create(searchContext);
if (Validator.isNotNull(organizationList) && !organizationList.isEmpty()) { if (Validator.isNotNull(organizationList) && !organizationList.isEmpty()) {
for (Organization org : organizationList) { for (Organization org : organizationList) {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId",
org.getGroupId()); org.getGroupId());
groupIdsQuery.add(singleGroupIdQuery, BooleanClauseOccur.SHOULD); groupIdsQuery.add(singleGroupIdQuery, BooleanClauseOccur.SHOULD);
} }
booleanQuery.add(groupIdsQuery, BooleanClauseOccur.MUST); booleanQuery.add(groupIdsQuery, BooleanClauseOccur.MUST);
} else { } else {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", 0L); TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", 0L);
booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST);
} }
} }
// 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.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString());
} }
hits = SearchEngineUtil.search(searchContext, booleanQuery); hits = SearchEngineUtil.search(searchContext, booleanQuery);
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("Number of hint find : " + hits.getLength()); _log.debug("Number of hint find : " + hits.getLength());
} }
} catch (ParseException | SearchException | SystemException e) {
// for (Document doc : hits.toList()) {
//
// String controlloPraticaId = doc.get("controlloPraticaId");
// if (Validator.isNotNull(controlloPraticaId)) {
//
// ControlloPratica controlloPratica =
// ControlloPraticaLocalServiceUtil.fetchControlloPratica(GetterUtil.getLong(controlloPraticaId));
// if (Validator.isNotNull(controlloPratica)) {
// lista.add(controlloPratica);
// }
// }
//
// }
} catch (ParseException e) {
_log.error(e, e);
} catch (SearchException e) {
_log.error(e, e);
} catch (SystemException e) {
_log.error(e, e); _log.error(e, e);
} }
return hits; return hits;
} }
@ -421,119 +336,62 @@ public class ControlloPraticaAdvancedSearch {
User user, int start, int end) { User user, int start, int end) {
List<ControlloPratica> lista = new ArrayList<ControlloPratica>(); List<ControlloPratica> lista = new ArrayList<ControlloPratica>();
SearchContext searchContext = SearchContextFactory.getInstance(request); SearchContext searchContext = SearchContextFactory.getInstance(request);
searchContext.setKeywords(OVERRIDE_KEYWORDS.toString()); searchContext.setKeywords(OVERRIDE_KEYWORDS.toString());
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);
searchContext.setAttribute("paginationType", "none"); searchContext.setAttribute("paginationType", "none");
// Gestione Ordinamento // Gestione Ordinamento
searchContext.setSorts(getOrderedQuery(request)); searchContext.setSorts(getOrderedQuery(request));
Hits hits = null; Hits hits = null;
try { try {
TermQuery entryClassNameTermQuery = TermQueryFactoryUtil.create(searchContext, "entryClassName", TermQuery entryClassNameTermQuery = TermQueryFactoryUtil.create(searchContext, "entryClassName",
ControlloPratica.class.getName()); ControlloPratica.class.getName());
TermQuery statusTermQuery = TermQueryFactoryUtil.create(searchContext, "status", TermQuery statusTermQuery = TermQueryFactoryUtil.create(searchContext, "status",
WorkflowConstants.STATUS_PENDING); WorkflowConstants.STATUS_PENDING);
BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext);
booleanQuery.add(entryClassNameTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(entryClassNameTermQuery, BooleanClauseOccur.MUST);
booleanQuery.add(statusTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(statusTermQuery, BooleanClauseOccur.MUST);
// BooleanQuery booleanQueryAttivita = String dataDa = ParamUtil.getString(request, "dataRichiestaInizio");
// BooleanQueryFactoryUtil.create(searchContext); String dataAl = ParamUtil.getString(request, "dataRichiestaFine");
// TermQuery assegnazioneTerm = if (Validator.isNotNull(dataDa) || Validator.isNotNull(dataAl)) {
// TermQueryFactoryUtil.create(searchContext, "workflowState", if (Validator.isNull(dataDa)) {
// " Assegnazione"); dataDa = "00000000";
// TermQuery approvazioneTerm = } else {
// TermQueryFactoryUtil.create(searchContext, "workflowState", dataDa = DATE_FORMAT_LUCENE.format(DATE_FORMAT_STRING.parse(dataDa));
// "Approvazione"); }
// if (Validator.isNull(dataAl)) {
// booleanQueryAttivita.add(assegnazioneTerm, dataAl = DATE_FORMAT_LUCENE.format(new Date());
// BooleanClauseOccur.SHOULD); } else {
// booleanQueryAttivita.add(approvazioneTerm, dataAl = DATE_FORMAT_LUCENE.format(DATE_FORMAT_STRING.parse(dataAl));
// BooleanClauseOccur.SHOULD); }
//
// booleanQuery.add(booleanQueryAttivita, BooleanClauseOccur.MUST);
String dataDaSearch = ParamUtil.getString(request, "dataRichiestaInizio");
String dataAlSearch = ParamUtil.getString(request, "dataRichiestaFine");
if ((dataDaSearch != null && !dataDaSearch.equals(""))
&& (dataAlSearch != null && !dataAlSearch.equals(""))) {
Date dataDaApp = DATE_FORMAT_STRING.parse(dataDaSearch);
Date dataAlApp = DATE_FORMAT_STRING.parse(dataAlSearch);
TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext,
"dataInizioProcedimento", DATE_FORMAT_LUCENE.format(dataDaApp),
DATE_FORMAT_LUCENE.format(dataAlApp), true, true);
booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST);
}
if ((dataDaSearch == null || dataDaSearch.equals(""))
&& (dataAlSearch != null && !dataDaSearch.equals(""))) {
Date dataAlApp = DATE_FORMAT_STRING.parse(dataAlSearch);
TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext,
"dataInizioProcedimento", "00000000", DATE_FORMAT_LUCENE.format(dataAlApp), true,
true);
booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST);
}
if ((dataDaSearch != null && !dataDaSearch.equals(""))
&& (dataAlSearch == null || dataAlSearch.equals(""))) {
Date dataDaApp = DATE_FORMAT_STRING.parse(dataDaSearch);
TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext, TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext,
"dataInizioProcedimento", DATE_FORMAT_LUCENE.format(dataDaApp), "dataInizioProcedimento", dataDa, dataAl, true, true);
DATE_FORMAT_LUCENE.format(new Date()), true, true);
booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST); booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST);
} }
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); _log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString());
} }
hits = SearchEngineUtil.search(searchContext, booleanQuery); hits = SearchEngineUtil.search(searchContext, booleanQuery);
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("Number of hint find : " + hits.getLength()); _log.debug("Number of hints found : " + hits.getLength());
} }
for (Document doc : hits.toList()) { for (Document doc : hits.toList()) {
String controlloPraticaId = doc.get("controlloPraticaId"); String controlloPraticaId = doc.get("controlloPraticaId");
if (Validator.isNotNull(controlloPraticaId)) { if (Validator.isNotNull(controlloPraticaId)) {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.fetchControlloPratica(GetterUtil.getLong(controlloPraticaId)); .fetchControlloPratica(GetterUtil.getLong(controlloPraticaId));
if (Validator.isNotNull(controlloPratica)) { if (Validator.isNotNull(controlloPratica)) {
lista.add(controlloPratica); lista.add(controlloPratica);
} }
} }
} }
} catch (ParseException e) { } catch (ParseException | SearchException | SystemException | java.text.ParseException e) {
_log.error(e, e);
} catch (SearchException e) {
_log.error(e, e);
} catch (SystemException e) {
_log.error(e, e);
} catch (java.text.ParseException e) {
_log.error(e, e); _log.error(e, e);
} }
@ -542,19 +400,13 @@ public class ControlloPraticaAdvancedSearch {
public static List<ControlloPratica> searchTaskPerEsportazionePO(HttpServletRequest request, User user, public static List<ControlloPratica> searchTaskPerEsportazionePO(HttpServletRequest request, User user,
int start, int end) { int start, int end) {
List<ControlloPratica> lista = new ArrayList<ControlloPratica>(); List<ControlloPratica> lista = new ArrayList<ControlloPratica>();
SearchContext searchContext = SearchContextFactory.getInstance(request); SearchContext searchContext = SearchContextFactory.getInstance(request);
searchContext.setKeywords(OVERRIDE_KEYWORDS.toString()); searchContext.setKeywords(OVERRIDE_KEYWORDS.toString());
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);
searchContext.setAttribute("paginationType", "none"); searchContext.setAttribute("paginationType", "none");
// Gestione Ordinamento // Gestione Ordinamento
searchContext.setSorts(getOrderedQuery(request)); searchContext.setSorts(getOrderedQuery(request));
Hits hits = null; Hits hits = null;
@ -562,128 +414,63 @@ public class ControlloPraticaAdvancedSearch {
TermQuery entryClassNameTermQuery = TermQueryFactoryUtil.create(searchContext, "entryClassName", TermQuery entryClassNameTermQuery = TermQueryFactoryUtil.create(searchContext, "entryClassName",
ControlloPratica.class.getName()); ControlloPratica.class.getName());
TermQuery userIdTermQuery = TermQueryFactoryUtil.create(searchContext, "taskAssigneeUserId", TermQuery userIdTermQuery = TermQueryFactoryUtil.create(searchContext, "taskAssigneeUserId",
user.getUserId()); user.getUserId());
TermQuery statusTermQuery = TermQueryFactoryUtil.create(searchContext, "status", TermQuery statusTermQuery = TermQueryFactoryUtil.create(searchContext, "status",
WorkflowConstants.STATUS_PENDING); WorkflowConstants.STATUS_PENDING);
BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext);
booleanQuery.add(entryClassNameTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(entryClassNameTermQuery, BooleanClauseOccur.MUST);
booleanQuery.add(userIdTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(userIdTermQuery, BooleanClauseOccur.MUST);
booleanQuery.add(statusTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(statusTermQuery, BooleanClauseOccur.MUST);
// BooleanQuery booleanQueryAttivita = String dataDa = ParamUtil.getString(request, "dataRichiestaInizio");
// BooleanQueryFactoryUtil.create(searchContext); String dataAl = ParamUtil.getString(request, "dataRichiestaFine");
// TermQuery assegnazioneTerm = if (Validator.isNotNull(dataDa) || Validator.isNotNull(dataAl)) {
// TermQueryFactoryUtil.create(searchContext, "workflowState", if (Validator.isNull(dataDa)) {
// " Assegnazione"); dataDa = "00000000";
// TermQuery approvazioneTerm = } else {
// TermQueryFactoryUtil.create(searchContext, "workflowState", dataDa = DATE_FORMAT_LUCENE.format(DATE_FORMAT_STRING.parse(dataDa));
// "Approvazione"); }
// if (Validator.isNull(dataAl)) {
// booleanQueryAttivita.add(assegnazioneTerm, dataAl = DATE_FORMAT_LUCENE.format(new Date());
// BooleanClauseOccur.SHOULD); } else {
// booleanQueryAttivita.add(approvazioneTerm, dataAl = DATE_FORMAT_LUCENE.format(DATE_FORMAT_STRING.parse(dataAl));
// BooleanClauseOccur.SHOULD); }
//
// booleanQuery.add(booleanQueryAttivita, BooleanClauseOccur.MUST);
String dataDaSearch = ParamUtil.getString(request, "dataRichiestaInizio");
String dataAlSearch = ParamUtil.getString(request, "dataRichiestaFine");
if ((dataDaSearch != null && !dataDaSearch.equals(""))
&& (dataAlSearch != null && !dataAlSearch.equals(""))) {
Date dataDaApp = DATE_FORMAT_STRING.parse(dataDaSearch);
Date dataAlApp = DATE_FORMAT_STRING.parse(dataAlSearch);
TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext,
"dataInizioProcedimento", DATE_FORMAT_LUCENE.format(dataDaApp),
DATE_FORMAT_LUCENE.format(dataAlApp), true, true);
booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST);
}
if ((dataDaSearch == null || dataDaSearch.equals(""))
&& (dataAlSearch != null && !dataDaSearch.equals(""))) {
Date dataAlApp = DATE_FORMAT_STRING.parse(dataAlSearch);
TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext,
"dataInizioProcedimento", "00000000", DATE_FORMAT_LUCENE.format(dataAlApp), true,
true);
booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST);
}
if ((dataDaSearch != null && !dataDaSearch.equals(""))
&& (dataAlSearch == null || dataAlSearch.equals(""))) {
Date dataDaApp = DATE_FORMAT_STRING.parse(dataDaSearch);
TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext, TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext,
"dataInizioProcedimento", DATE_FORMAT_LUCENE.format(dataDaApp), "dataInizioProcedimento", dataDa, dataAl, true, true);
DATE_FORMAT_LUCENE.format(new Date()), true, true);
booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST); booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST);
} }
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); _log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString());
} }
hits = SearchEngineUtil.search(searchContext, booleanQuery); hits = SearchEngineUtil.search(searchContext, booleanQuery);
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("Number of hint find : " + hits.getLength()); _log.debug("Number of hint find : " + hits.getLength());
} }
for (Document doc : hits.toList()) { for (Document doc : hits.toList()) {
String controlloPraticaId = doc.get("controlloPraticaId"); String controlloPraticaId = doc.get("controlloPraticaId");
if (Validator.isNotNull(controlloPraticaId)) { if (Validator.isNotNull(controlloPraticaId)) {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.fetchControlloPratica(GetterUtil.getLong(controlloPraticaId)); .fetchControlloPratica(GetterUtil.getLong(controlloPraticaId));
if (Validator.isNotNull(controlloPratica)) { if (Validator.isNotNull(controlloPratica)) {
lista.add(controlloPratica); lista.add(controlloPratica);
} }
} }
} }
} catch (ParseException | SearchException | SystemException | java.text.ParseException e) {
} catch (ParseException e) {
_log.error(e, e);
} catch (SearchException e) {
_log.error(e, e);
} catch (SystemException e) {
_log.error(e, e);
} catch (java.text.ParseException e) {
_log.error(e, e); _log.error(e, e);
} }
return lista; return lista;
} }
public static Hits searchTaskConclusi(HttpServletRequest request, User user, int start, int end) { public static Hits searchTaskConclusi(HttpServletRequest request, User user, int start, int end) {
// List<ControlloPratica> lista = new ArrayList<ControlloPratica>();
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)) {
boolean searchForExport = ParamUtil.getBoolean(request, "searchForExport", false);
if (searchForExport) {
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);
searchContext.setAttribute("paginationType", "none"); searchContext.setAttribute("paginationType", "none");
} else { } else {
searchContext.setAttribute("paginationType", "more"); searchContext.setAttribute("paginationType", "more");
searchContext.setStart(start); searchContext.setStart(start);
@ -709,17 +496,13 @@ public class ControlloPraticaAdvancedSearch {
for (Organization org : organizationUserList) { for (Organization org : organizationUserList) {
organizationRoleList = RoleLocalServiceUtil.getUserGroupRoles(user.getUserId(), organizationRoleList = RoleLocalServiceUtil.getUserGroupRoles(user.getUserId(),
org.getGroupId()); org.getGroupId());
for (Role role : organizationRoleList) { for (Role role : organizationRoleList) {
TermQuery roleIdTerm = TermQueryFactoryUtil.create(searchContext, "taskAssigneeRoleIds", TermQuery roleIdTerm = TermQueryFactoryUtil.create(searchContext, "taskAssigneeRoleIds",
(role.getRoleId() + "-" + org.getGroupId())); (role.getRoleId() + "-" + org.getGroupId()));
booleanQueryRoleIds.add(roleIdTerm, BooleanClauseOccur.SHOULD); booleanQueryRoleIds.add(roleIdTerm, BooleanClauseOccur.SHOULD);
} }
} }
BooleanQuery booleanQueryStatus = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery booleanQueryStatus = BooleanQueryFactoryUtil.create(searchContext);
TermQuery statusDenied = TermQueryFactoryUtil.create(searchContext, "status", TermQuery statusDenied = TermQueryFactoryUtil.create(searchContext, "status",
WorkflowConstants.STATUS_DENIED); WorkflowConstants.STATUS_DENIED);
booleanQueryStatus.add(statusDenied, BooleanClauseOccur.SHOULD); booleanQueryStatus.add(statusDenied, BooleanClauseOccur.SHOULD);
@ -729,10 +512,8 @@ public class ControlloPraticaAdvancedSearch {
TermQuery statusIncomplete = TermQueryFactoryUtil.create(searchContext, "status", TermQuery statusIncomplete = TermQueryFactoryUtil.create(searchContext, "status",
WorkflowConstants.STATUS_INCOMPLETE); WorkflowConstants.STATUS_INCOMPLETE);
booleanQueryStatus.add(statusIncomplete, BooleanClauseOccur.SHOULD); booleanQueryStatus.add(statusIncomplete, BooleanClauseOccur.SHOULD);
BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext);
booleanQuery.add(entryClassNameTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(entryClassNameTermQuery, BooleanClauseOccur.MUST);
if (organizationUserList != null && !organizationUserList.isEmpty() if (organizationUserList != null && !organizationUserList.isEmpty()
&& organizationRoleList != null && !organizationRoleList.isEmpty()) { && organizationRoleList != null && !organizationRoleList.isEmpty()) {
booleanQuery.add(booleanQueryRoleIds, BooleanClauseOccur.MUST_NOT); booleanQuery.add(booleanQueryRoleIds, BooleanClauseOccur.MUST_NOT);
@ -744,19 +525,14 @@ public class ControlloPraticaAdvancedSearch {
// filtrare // filtrare
List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user
.getUserId()); .getUserId());
BooleanQuery groupIdsQuery = BooleanQueryFactoryUtil.create(searchContext); BooleanQuery groupIdsQuery = BooleanQueryFactoryUtil.create(searchContext);
if (Validator.isNotNull(organizationList) && !organizationList.isEmpty()) { if (Validator.isNotNull(organizationList) && !organizationList.isEmpty()) {
for (Organization org : organizationList) { for (Organization org : organizationList) {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId",
org.getGroupId()); org.getGroupId());
groupIdsQuery.add(singleGroupIdQuery, BooleanClauseOccur.SHOULD); groupIdsQuery.add(singleGroupIdQuery, BooleanClauseOccur.SHOULD);
} }
booleanQuery.add(groupIdsQuery, BooleanClauseOccur.MUST); booleanQuery.add(groupIdsQuery, BooleanClauseOccur.MUST);
} else { } else {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", 0L); TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "groupId", 0L);
booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST);
@ -768,18 +544,11 @@ public class ControlloPraticaAdvancedSearch {
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString()); _log.debug("User " + user.getScreenName() + " Request query : " + booleanQuery.toString());
} }
hits = SearchEngineUtil.search(searchContext, booleanQuery); hits = SearchEngineUtil.search(searchContext, booleanQuery);
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("Number of hint find : " + hits.getLength()); _log.debug("Number of hint find : " + hits.getLength());
} }
} catch (ParseException | SearchException | SystemException e) {
} catch (ParseException e) {
_log.error(e, e);
} catch (SearchException e) {
_log.error(e, e);
} catch (SystemException e) {
_log.error(e, e); _log.error(e, e);
} }
@ -799,8 +568,8 @@ public class ControlloPraticaAdvancedSearch {
// ADT ADT BUG BO ID = 8 // ADT ADT BUG BO ID = 8
String istruttoreId = ParamUtil.getString(request, "istruttore"); String istruttoreId = ParamUtil.getString(request, "istruttore");
String dataDaSearch = ParamUtil.getString(request, "dataRichiestaInizio"); String dataDa = ParamUtil.getString(request, "dataRichiestaInizio");
String dataAlSearch = ParamUtil.getString(request, "dataRichiestaFine"); String dataAl = ParamUtil.getString(request, "dataRichiestaFine");
String comune = ParamUtil.getString(request, "comune"); String comune = ParamUtil.getString(request, "comune");
String tipoProcedura = ParamUtil.getString(request, "tipoProcedura"); String tipoProcedura = ParamUtil.getString(request, "tipoProcedura");
String tipoAttivita = ParamUtil.getString(request, "tipoAttivita"); String tipoAttivita = ParamUtil.getString(request, "tipoAttivita");
@ -808,28 +577,22 @@ 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");
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",
tipoAttivita); tipoAttivita);
booleanQuery.add(tipoAttivitaTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(tipoAttivitaTermQuery, BooleanClauseOccur.MUST);
} }
if (numeroProgettoSearch != null && !numeroProgettoSearch.equals("")) { if (numeroProgettoSearch != null && !numeroProgettoSearch.equals("")) {
TermQuery numeroProgettoTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery numeroProgettoTermQuery = TermQueryFactoryUtil.create(searchContext,
"numeroProgetto", numeroProgettoSearch); "numeroProgetto", numeroProgettoSearch);
booleanQuery.add(numeroProgettoTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(numeroProgettoTermQuery, BooleanClauseOccur.MUST);
} }
if (protocolloSearch != null && !protocolloSearch.equals("")) { if (protocolloSearch != null && !protocolloSearch.equals("")) {
TermQuery protocolloSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery protocolloSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"protocollo", protocolloSearch); "protocollo", protocolloSearch);
booleanQuery.add(protocolloSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(protocolloSearchTermQuery, BooleanClauseOccur.MUST);
} }
if (tipoPraticaSearch != null && !tipoPraticaSearch.equals("") && !tipoPraticaSearch.equals("-1")) { if (tipoPraticaSearch != null && !tipoPraticaSearch.equals("") && !tipoPraticaSearch.equals("-1")) {
TermQuery tipoPraticaSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery tipoPraticaSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"tipoPratica", tipoPraticaSearch); "tipoPratica", tipoPraticaSearch);
@ -839,118 +602,84 @@ public class ControlloPraticaAdvancedSearch {
// Gestione StatoPratica // Gestione StatoPratica
if (statoPraticaSearch != null && !statoPraticaSearch.equals("") if (statoPraticaSearch != null && !statoPraticaSearch.equals("")
&& !statoPraticaSearch.equals("-1")) { && !statoPraticaSearch.equals("-1")) {
if (statoPraticaSearch.equals(StatoPraticaConstants.COLLAUDO_PARZIALE)) { if (statoPraticaSearch.equals(StatoPraticaConstants.COLLAUDO_PARZIALE)) {
TermQuery collaudoParzialeSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery collaudoParzialeSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"collaudoParziale", "true"); "collaudoParziale", "true");
booleanQuery.add(collaudoParzialeSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(collaudoParzialeSearchTermQuery, BooleanClauseOccur.MUST);
} else if (statoPraticaSearch.equals(StatoPraticaConstants.COLLAUDO)) { } else if (statoPraticaSearch.equals(StatoPraticaConstants.COLLAUDO)) {
TermQuery collaudoSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery collaudoSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"collaudoCompletato", "true"); "collaudoCompletato", "true");
booleanQuery.add(collaudoSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(collaudoSearchTermQuery, BooleanClauseOccur.MUST);
} else if (statoPraticaSearch.equals(StatoPraticaConstants.FINE_LAVORI)) { } else if (statoPraticaSearch.equals(StatoPraticaConstants.FINE_LAVORI)) {
TermQuery fineLavoriSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery fineLavoriSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"fineLavoriCompletati", "true"); "fineLavoriCompletati", "true");
booleanQuery.add(fineLavoriSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(fineLavoriSearchTermQuery, BooleanClauseOccur.MUST);
} else if (statoPraticaSearch.equals(StatoPraticaConstants.FINE_LAVORI_PARZIALE)) { } else if (statoPraticaSearch.equals(StatoPraticaConstants.FINE_LAVORI_PARZIALE)) {
TermQuery fineLavoriParzialiSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery fineLavoriParzialiSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"fineLavoriParziali", "true"); "fineLavoriParziali", "true");
booleanQuery.add(fineLavoriParzialiSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(fineLavoriParzialiSearchTermQuery, BooleanClauseOccur.MUST);
} else if (statoPraticaSearch.equals(StatoPraticaConstants.SORTEGGIATA)) { } else if (statoPraticaSearch.equals(StatoPraticaConstants.SORTEGGIATA)) {
TermQuery sorteggiataSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery sorteggiataSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"lavorazioneSorteggiata", "true"); "lavorazioneSorteggiata", "true");
booleanQuery.add(sorteggiataSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(sorteggiataSearchTermQuery, BooleanClauseOccur.MUST);
} else if (statoPraticaSearch.equals(StatoPraticaConstants.SOTTOPOSTA_A_PARERE)) { } else if (statoPraticaSearch.equals(StatoPraticaConstants.SOTTOPOSTA_A_PARERE)) {
TermQuery sottopostaParereSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery sottopostaParereSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"sottopostoAParere", "true"); "sottopostoAParere", "true");
booleanQuery.add(sottopostaParereSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(sottopostaParereSearchTermQuery, BooleanClauseOccur.MUST);
} else if (statoPraticaSearch.equals(StatoPraticaConstants.VARIATA)) { } else if (statoPraticaSearch.equals(StatoPraticaConstants.VARIATA)) {
TermQuery sottopostaParereSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery sottopostaParereSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"variata", "true"); "variata", "true");
booleanQuery.add(sottopostaParereSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(sottopostaParereSearchTermQuery, BooleanClauseOccur.MUST);
} else { } else {
TermQuery statoPraticaSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery statoPraticaSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"statoPratica", statoPraticaSearch); "statoPratica", statoPraticaSearch);
booleanQuery.add(statoPraticaSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(statoPraticaSearchTermQuery, BooleanClauseOccur.MUST);
} }
} }
if (committenteSearch != null && !committenteSearch.equals("")) { if (committenteSearch != null && !committenteSearch.equals("")) {
TermQuery committenteSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery committenteSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"committenti", committenteSearch.toUpperCase()); "committenti", committenteSearch.toUpperCase());
booleanQuery.add(committenteSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(committenteSearchTermQuery, BooleanClauseOccur.MUST);
} }
if (soggettiInterconnessiSearch != null && !soggettiInterconnessiSearch.equals("")) { if (soggettiInterconnessiSearch != null && !soggettiInterconnessiSearch.equals("")) {
TermQuery soggettiInterconnessiSearchTermQuery = TermQueryFactoryUtil.create(searchContext, TermQuery soggettiInterconnessiSearchTermQuery = TermQueryFactoryUtil.create(searchContext,
"soggettiInterconnessi", soggettiInterconnessiSearch.toUpperCase()); "soggettiInterconnessi", soggettiInterconnessiSearch.toUpperCase());
booleanQuery.add(soggettiInterconnessiSearchTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(soggettiInterconnessiSearchTermQuery, BooleanClauseOccur.MUST);
} }
if (istruttoreId != null && !istruttoreId.equals("") && !istruttoreId.equals("-1")) { if (istruttoreId != null && !istruttoreId.equals("") && !istruttoreId.equals("-1")) {
TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "istruttoreUserId", TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "istruttoreUserId",
istruttoreId); istruttoreId);
booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST);
} }
if ((dataDa != null && !dataDa.equals("")) && (dataAl != null && !dataAl.equals(""))) {
if ((dataDaSearch != null && !dataDaSearch.equals("")) Date dataDaApp = DATE_FORMAT_STRING.parse(dataDa);
&& (dataAlSearch != null && !dataAlSearch.equals(""))) { Date dataAlApp = DATE_FORMAT_STRING.parse(dataAl);
Date dataDaApp = DATE_FORMAT_STRING.parse(dataDaSearch);
Date dataAlApp = DATE_FORMAT_STRING.parse(dataAlSearch);
TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext, TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext,
"dataInizioProcedimento", DATE_FORMAT_LUCENE.format(dataDaApp), "dataInizioProcedimento", DATE_FORMAT_LUCENE.format(dataDaApp),
DATE_FORMAT_LUCENE.format(dataAlApp), true, true); DATE_FORMAT_LUCENE.format(dataAlApp), true, true);
booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST); booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST);
} }
if ((dataDa == null || dataDa.equals("")) && (dataAl != null && !dataDa.equals(""))) {
if ((dataDaSearch == null || dataDaSearch.equals("")) Date dataAlApp = DATE_FORMAT_STRING.parse(dataAl);
&& (dataAlSearch != null && !dataDaSearch.equals(""))) {
Date dataAlApp = DATE_FORMAT_STRING.parse(dataAlSearch);
TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext, TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext,
"dataInizioProcedimento", "00000000", DATE_FORMAT_LUCENE.format(dataAlApp), true, "dataInizioProcedimento", "00000000", DATE_FORMAT_LUCENE.format(dataAlApp), true,
true); true);
booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST); booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST);
} }
if ((dataDa != null && !dataDa.equals("")) && (dataAl == null || dataAl.equals(""))) {
if ((dataDaSearch != null && !dataDaSearch.equals("")) Date dataDaApp = DATE_FORMAT_STRING.parse(dataDa);
&& (dataAlSearch == null || dataAlSearch.equals(""))) {
Date dataDaApp = DATE_FORMAT_STRING.parse(dataDaSearch);
TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext, TermRangeQuery dateSearchTermRangeQuery = TermRangeQueryFactoryUtil.create(searchContext,
"dataInizioProcedimento", DATE_FORMAT_LUCENE.format(dataDaApp), "dataInizioProcedimento", DATE_FORMAT_LUCENE.format(dataDaApp),
DATE_FORMAT_LUCENE.format(new Date()), true, true); DATE_FORMAT_LUCENE.format(new Date()), true, true);
booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST); booleanQuery.add(dateSearchTermRangeQuery, BooleanClauseOccur.MUST);
} }
if (comune != null && !comune.equals("") && !comune.equals("-1")) { if (comune != null && !comune.equals("") && !comune.equals("-1")) {
TermQuery comuneTermQuery = TermQueryFactoryUtil.create(searchContext, "comuneId", comune); TermQuery comuneTermQuery = TermQueryFactoryUtil.create(searchContext, "comuneId", comune);
booleanQuery.add(comuneTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(comuneTermQuery, BooleanClauseOccur.MUST);
} }
if (Validator.isNotNull(tipoProcedura)) { if (Validator.isNotNull(tipoProcedura)) {
TermQuery termQuery = TermQueryFactoryUtil.create(searchContext, "tipoProcedura", TermQuery termQuery = TermQueryFactoryUtil.create(searchContext, "tipoProcedura",
tipoProcedura); tipoProcedura);
@ -970,33 +699,24 @@ public class ControlloPraticaAdvancedSearch {
sorteggiataSearch); sorteggiataSearch);
booleanQuery.add(sorteggiataTermQuery, BooleanClauseOccur.MUST); booleanQuery.add(sorteggiataTermQuery, BooleanClauseOccur.MUST);
} }
} catch (ParseException | java.text.ParseException e) {
} catch (ParseException e) {
_log.error(e, e);
} catch (java.text.ParseException e) {
_log.error(e, e); _log.error(e, e);
} }
} }
private static Sort[] getOrderedQuery(HttpServletRequest request) { private static Sort[] getOrderedQuery(HttpServletRequest request) {
Properties properties = PropsUtil.getProperties("elasticsearch.", true); Properties properties = PropsUtil.getProperties("elasticsearch.", true);
String orderField = ParamUtil.getString(request, "ordinaPer", "numeroProgetto"); String orderField = ParamUtil.getString(request, "ordinaPer", "numeroProgetto");
String orderType = ParamUtil.getString(request, "ordinaTipo", "desc"); String orderType = ParamUtil.getString(request, "ordinaTipo", "desc");
List<Sort> sortes = new ArrayList<Sort>(); List<Sort> sortes = new ArrayList<Sort>();
Sort sort = new Sort(); Sort sort = new Sort();
if (orderField != null && !orderField.equals("") && !orderField.equals("-1")) { if (orderField != null && !orderField.equals("") && !orderField.equals("-1")) {
if (properties.size() > 0) { if (properties.size() > 0) {
sort.setFieldName(orderField + "_sortable"); sort.setFieldName(orderField + "_sortable");
} else { } else {
sort.setFieldName(orderField); sort.setFieldName(orderField);
} }
if (orderField.equals("numeroProgetto")) { if (orderField.equals("numeroProgetto")) {
sort.setType(Sort.INT_TYPE); sort.setType(Sort.INT_TYPE);
} else if (orderField.equals("protocollo")) { } else if (orderField.equals("protocollo")) {
@ -1008,9 +728,7 @@ public class ControlloPraticaAdvancedSearch {
} else if (orderField.equals("tipoPratica")) { } else if (orderField.equals("tipoPratica")) {
sort.setType(Sort.INT_TYPE); sort.setType(Sort.INT_TYPE);
} }
} }
if (orderType != null && !orderType.equals("") && !orderType.equals("-1")) { if (orderType != null && !orderType.equals("") && !orderType.equals("-1")) {
if (orderType.equals("desc")) { if (orderType.equals("desc")) {
sort.setReverse(false); sort.setReverse(false);
@ -1018,9 +736,7 @@ public class ControlloPraticaAdvancedSearch {
sort.setReverse(true); sort.setReverse(true);
} }
} }
sortes.add(sort); sortes.add(sort);
return sortes.toArray(new Sort[0]); return sortes.toArray(new Sort[0]);
} }
} }

6
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java

@ -28,7 +28,7 @@ public class PortosIndexField implements Serializable {
public static final String STATO_PRATICA = "statoPratica"; public static final String STATO_PRATICA = "statoPratica";
public static final String DESC_INTERVENTO = "descIntervento"; public static final String DESC_INTERVENTO = "descIntervento";
public static final String COMMITTENTE = "committente"; public static final String COMMITTENTE = "committente";
public static final String COMMITTENTI = "committenti"; public static final String COMMITTENTI = "committenti";
@ -126,7 +126,9 @@ public class PortosIndexField implements Serializable {
public static final String PROVINCIA = "provincia"; public static final String PROVINCIA = "provincia";
public static final String COMUNE = "comune"; public static final String COMUNE = "comune";
public static final String TIPO_PROCEDURA = "tipoProcedura"; public static final String TIPO_PROCEDURA = "tipoProcedura";
public static final String UNITA_OPERATIVA = "unitaOperativa";
} }

9
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/WorkflowUtil.java

@ -16,15 +16,12 @@ import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.liferay.portal.NoSuchWorkflowInstanceLinkException; import com.liferay.portal.NoSuchWorkflowInstanceLinkException;
import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.json.JSONDeserializer; import com.liferay.portal.kernel.json.JSONDeserializer;
import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowException; import com.liferay.portal.kernel.workflow.WorkflowException;
@ -41,8 +38,6 @@ import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil;
public class WorkflowUtil { public class WorkflowUtil {
private static final Log _log = LogFactoryUtil.getLog(WorkflowUtil.class);
public static WorkflowTask getLastTask(long companyId, long groupId, Long userId, ControlloPratica bean) public static WorkflowTask getLastTask(long companyId, long groupId, Long userId, ControlloPratica bean)
throws PortalException, SystemException { throws PortalException, SystemException {
@ -246,6 +241,7 @@ public class WorkflowUtil {
/* /*
* Verificare corretta corrispondenza con AvvisoUtil.getAllTipoDocumento() * Verificare corretta corrispondenza con AvvisoUtil.getAllTipoDocumento()
*/ */
@SuppressWarnings("serial")
private final static Map<String, String> tipoDocumentoToSignal = new HashMap<String, String>() { private final static Map<String, String> tipoDocumentoToSignal = new HashMap<String, String>() {
{ {
put(StatoPraticaConstants.SOTTOPOSTA_A_PARERE, WorkflowConstants.WORKFLOW_SIGNAL_ASSEGNAZIONE); put(StatoPraticaConstants.SOTTOPOSTA_A_PARERE, WorkflowConstants.WORKFLOW_SIGNAL_ASSEGNAZIONE);
@ -326,7 +322,7 @@ public class WorkflowUtil {
// if (workflowInstanceLink == null) { // if (workflowInstanceLink == null) {
// throw new NoSuchWorkflowInstanceLinkException(); // throw new NoSuchWorkflowInstanceLinkException();
// } // }
Map<String, Serializable> parameters = new HashMap<String, Serializable>(); Map<String, Serializable> parameters = new HashMap<>();
; ;
if (workflowInstanceLink != null) { if (workflowInstanceLink != null) {
long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId(); long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId();
@ -349,7 +345,6 @@ public class WorkflowUtil {
public static void valutaEffettiInvioVariante(DettPratica dettPratica) throws Exception { public static void valutaEffettiInvioVariante(DettPratica dettPratica) throws Exception {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
boolean isDeposito = AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId());
if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione()) if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())
&& needToStartWorkflow(dettPratica)) { && needToStartWorkflow(dettPratica)) {
ServiceContext serviceContext = new ServiceContext(); ServiceContext serviceContext = new ServiceContext();

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql

@ -601,6 +601,7 @@ create table portos_bo_IntPratica (
tipoProcedura VARCHAR(75) null, tipoProcedura VARCHAR(75) null,
dtAnnullamento DATE null, dtAnnullamento DATE null,
docPraticaAnnullamentoId LONG, docPraticaAnnullamentoId LONG,
unitaOperativa INTEGER,
dtSorteggio DATE null, dtSorteggio DATE null,
statoPratica VARCHAR(10) null, statoPratica VARCHAR(10) null,
numeroProgetto VARCHAR(75) null, numeroProgetto VARCHAR(75) null,

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml

@ -648,6 +648,7 @@
<property name="tipoProcedura" type="com.liferay.portal.dao.orm.hibernate.StringType" /> <property name="tipoProcedura" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="dtAnnullamento" type="org.hibernate.type.TimestampType" /> <property name="dtAnnullamento" type="org.hibernate.type.TimestampType" />
<property name="docPraticaAnnullamentoId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> <property name="docPraticaAnnullamentoId" type="com.liferay.portal.dao.orm.hibernate.LongType" />
<property name="unitaOperativa" type="com.liferay.portal.dao.orm.hibernate.IntegerType" />
<property name="dtSorteggio" type="org.hibernate.type.TimestampType" /> <property name="dtSorteggio" type="org.hibernate.type.TimestampType" />
<property name="statoPratica" type="com.liferay.portal.dao.orm.hibernate.StringType" /> <property name="statoPratica" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="numeroProgetto" type="com.liferay.portal.dao.orm.hibernate.StringType" /> <property name="numeroProgetto" type="com.liferay.portal.dao.orm.hibernate.StringType" />

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml

@ -687,6 +687,7 @@
</field> </field>
<field name="dtAnnullamento" type="Date" /> <field name="dtAnnullamento" type="Date" />
<field name="docPraticaAnnullamentoId" type="long" /> <field name="docPraticaAnnullamentoId" type="long" />
<field name="unitaOperativa" type="int" />
<field name="dtSorteggio" type="Date" /> <field name="dtSorteggio" type="Date" />
<field name="statoPratica" type="String"> <field name="statoPratica" type="String">
<hint name="max-length">10</hint> <hint name="max-length">10</hint>

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml

@ -822,6 +822,7 @@
<temporal>TIMESTAMP</temporal> <temporal>TIMESTAMP</temporal>
</basic> </basic>
<basic name="docPraticaAnnullamentoId" /> <basic name="docPraticaAnnullamentoId" />
<basic name="unitaOperativa" />
<basic name="dtSorteggio"> <basic name="dtSorteggio">
<temporal>TIMESTAMP</temporal> <temporal>TIMESTAMP</temporal>
</basic> </basic>

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

@ -271,6 +271,7 @@ Tab_TaskMieiRuoli = Attività dei miei ruoli
Tab_AtriTask = Altre attività Tab_AtriTask = Altre attività
Tab_TaskCompletati = Attività completate Tab_TaskCompletati = Attività completate
data-inizio-procedimento = Avvio procedimento data-inizio-procedimento = Avvio procedimento
unita-operativa = U.O.
tipoPratica = Tipo tipoPratica = Tipo
numeroProgetto = Progetto numeroProgetto = Progetto
taskName = Attivitá taskName = Attivitá

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

@ -42,6 +42,7 @@ import it.tref.liferay.portos.bo.service.StoricoSoggettoPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TempisticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.TempisticaLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants; import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.util.AvvisoUtil; import it.tref.liferay.portos.bo.util.AvvisoUtil;
import it.tref.liferay.portos.bo.util.Constants; import it.tref.liferay.portos.bo.util.Constants;
import it.tref.liferay.portos.mailmanager.model.Email; import it.tref.liferay.portos.mailmanager.model.Email;
@ -152,6 +153,11 @@ public class ManutenzioneDatabase {
PortalException { PortalException {
List<String> esito = new ArrayList<>(); List<String> esito = new ArrayList<>();
long companyId = serviceContext.getCompanyId(); long companyId = serviceContext.getCompanyId();
if (mode.contains("!UnitaOperative!")) {
esito.addAll(fixUnitaOperative());
}
if (mode.contains("!Pulisci!")) { if (mode.contains("!Pulisci!")) {
esito.addAll(puliziaDocumentLibrary(companyId)); esito.addAll(puliziaDocumentLibrary(companyId));
esitoLog( esitoLog(
@ -196,6 +202,40 @@ public class ManutenzioneDatabase {
} }
} }
private static List<String> fixUnitaOperative() throws SystemException {
List<String> esito = new ArrayList<>();
esitoLog(esito, "fixUnitaOperative");
int start = 0;
List<IntPratica> pratiche = null;
do {
pratiche = IntPraticaLocalServiceUtil.getIntPraticas(start, start + SLICE);
if (pratiche.size() > 0) {
for (IntPratica pratica : pratiche) {
int destinazione = 0;
try {
User user = UserLocalServiceUtil.getUser(pratica.getStatusByUserId());
List<Integer> uos = UnitaOperativeUtil.getUnitaOperative(user);
for (int uo : uos) {
if (uo > destinazione) {
destinazione = uo;
}
}
} catch (PortalException e) {
}
if (destinazione != pratica.getUnitaOperativa()) {
esitoLog(esito,
"Pratica " + pratica.getIntPraticaId() + ", " + pratica.getUnitaOperativa()
+ " -> " + destinazione);
pratica.setUnitaOperativa(destinazione);
IntPraticaLocalServiceUtil.updateIntPratica(pratica);
}
}
start += pratiche.size();
}
} while (pratiche.size() > 0);
return esito;
}
private static List<String> svuotaDatabase(long companyId) throws SystemException, PortalException { private static List<String> svuotaDatabase(long companyId) throws SystemException, PortalException {
List<String> esito = new ArrayList<>(); List<String> esito = new ArrayList<>();

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

@ -153,7 +153,6 @@ public class SismicaUtil {
List<String> esito = new ArrayList<>(); List<String> esito = new ArrayList<>();
int start = 0; int start = 0;
int totale = 0;
List<IntPratica> pratiche = null; List<IntPratica> pratiche = null;
do { do {
try { try {
@ -161,14 +160,15 @@ public class SismicaUtil {
} catch (SystemException e) { } catch (SystemException e) {
pratiche = new ArrayList<>(); pratiche = new ArrayList<>();
} }
for (IntPratica pratica : pratiche) { if (pratiche.size() > 0) {
IntPraticaLocalServiceUtil.reIndexFascicolo(pratica, companyId); for (IntPratica pratica : pratiche) {
IntPraticaLocalServiceUtil.reIndexFascicolo(pratica, companyId);
}
start += pratiche.size();
_log.info("Reindicizzate " + start + " pratiche");
} }
totale += pratiche.size();
start += SLICE;
_log.info("Reindicizzate " + start + " pratiche");
} while (pratiche.size() > 0); } while (pratiche.size() > 0);
esito.add("<b>" + totale + "</b> pratiche reindicizzate."); esito.add("<b>" + start + "</b> pratiche reindicizzate.");
return esito; return esito;
} }

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

@ -208,6 +208,7 @@ public class ControlloPraticaIndexer extends BaseIndexer {
if (Validator.isNotNull(intPratica.getTipoProcedura())) { if (Validator.isNotNull(intPratica.getTipoProcedura())) {
document.addKeyword(PortosIndexField.TIPO_PROCEDURA, intPratica.getTipoProcedura()); document.addKeyword(PortosIndexField.TIPO_PROCEDURA, intPratica.getTipoProcedura());
} }
document.addKeyword(PortosIndexField.UNITA_OPERATIVA, intPratica.getUnitaOperativa());
// Prendo l ultimo DettPratica legato a IntPratica // Prendo l ultimo DettPratica legato a IntPratica
DettPratica lastDettPratica = DettPraticaLocalServiceUtil DettPratica lastDettPratica = DettPraticaLocalServiceUtil

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

@ -38,7 +38,7 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
Externalizable { Externalizable {
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(65); StringBundler sb = new StringBundler(67);
sb.append("{uuid="); sb.append("{uuid=");
sb.append(uuid); sb.append(uuid);
@ -66,6 +66,8 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
sb.append(dtAnnullamento); sb.append(dtAnnullamento);
sb.append(", docPraticaAnnullamentoId="); sb.append(", docPraticaAnnullamentoId=");
sb.append(docPraticaAnnullamentoId); sb.append(docPraticaAnnullamentoId);
sb.append(", unitaOperativa=");
sb.append(unitaOperativa);
sb.append(", dtSorteggio="); sb.append(", dtSorteggio=");
sb.append(dtSorteggio); sb.append(dtSorteggio);
sb.append(", statoPratica="); sb.append(", statoPratica=");
@ -171,6 +173,7 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
} }
intPraticaImpl.setDocPraticaAnnullamentoId(docPraticaAnnullamentoId); intPraticaImpl.setDocPraticaAnnullamentoId(docPraticaAnnullamentoId);
intPraticaImpl.setUnitaOperativa(unitaOperativa);
if (dtSorteggio == Long.MIN_VALUE) { if (dtSorteggio == Long.MIN_VALUE) {
intPraticaImpl.setDtSorteggio(null); intPraticaImpl.setDtSorteggio(null);
@ -263,6 +266,7 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
tipoProcedura = objectInput.readUTF(); tipoProcedura = objectInput.readUTF();
dtAnnullamento = objectInput.readLong(); dtAnnullamento = objectInput.readLong();
docPraticaAnnullamentoId = objectInput.readLong(); docPraticaAnnullamentoId = objectInput.readLong();
unitaOperativa = objectInput.readInt();
dtSorteggio = objectInput.readLong(); dtSorteggio = objectInput.readLong();
statoPratica = objectInput.readUTF(); statoPratica = objectInput.readUTF();
numeroProgetto = objectInput.readUTF(); numeroProgetto = objectInput.readUTF();
@ -327,6 +331,7 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
objectOutput.writeLong(dtAnnullamento); objectOutput.writeLong(dtAnnullamento);
objectOutput.writeLong(docPraticaAnnullamentoId); objectOutput.writeLong(docPraticaAnnullamentoId);
objectOutput.writeInt(unitaOperativa);
objectOutput.writeLong(dtSorteggio); objectOutput.writeLong(dtSorteggio);
if (statoPratica == null) { if (statoPratica == null) {
@ -387,6 +392,7 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
public String tipoProcedura; public String tipoProcedura;
public long dtAnnullamento; public long dtAnnullamento;
public long docPraticaAnnullamentoId; public long docPraticaAnnullamentoId;
public int unitaOperativa;
public long dtSorteggio; public long dtSorteggio;
public String statoPratica; public String statoPratica;
public String numeroProgetto; public String numeroProgetto;

36
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java

@ -80,6 +80,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
{ "tipoProcedura", Types.VARCHAR }, { "tipoProcedura", Types.VARCHAR },
{ "dtAnnullamento", Types.TIMESTAMP }, { "dtAnnullamento", Types.TIMESTAMP },
{ "docPraticaAnnullamentoId", Types.BIGINT }, { "docPraticaAnnullamentoId", Types.BIGINT },
{ "unitaOperativa", Types.INTEGER },
{ "dtSorteggio", Types.TIMESTAMP }, { "dtSorteggio", Types.TIMESTAMP },
{ "statoPratica", Types.VARCHAR }, { "statoPratica", Types.VARCHAR },
{ "numeroProgetto", Types.VARCHAR }, { "numeroProgetto", Types.VARCHAR },
@ -100,7 +101,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
{ "collaudoTotale", Types.BOOLEAN }, { "collaudoTotale", Types.BOOLEAN },
{ "controlloObbligatorio", Types.BOOLEAN } { "controlloObbligatorio", Types.BOOLEAN }
}; };
public static final String TABLE_SQL_CREATE = "create table portos_bo_IntPratica (uuid_ VARCHAR(75) null,intPraticaId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,tipoPratica VARCHAR(75) null,territorioId LONG,tipoProcedura VARCHAR(75) null,dtAnnullamento DATE null,docPraticaAnnullamentoId LONG,dtSorteggio DATE null,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,oldIntPraticaId LONG,sospesa BOOLEAN,dtSospensione DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio BOOLEAN)"; public static final String TABLE_SQL_CREATE = "create table portos_bo_IntPratica (uuid_ VARCHAR(75) null,intPraticaId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,tipoPratica VARCHAR(75) null,territorioId LONG,tipoProcedura VARCHAR(75) null,dtAnnullamento DATE null,docPraticaAnnullamentoId LONG,unitaOperativa INTEGER,dtSorteggio DATE null,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,oldIntPraticaId LONG,sospesa BOOLEAN,dtSospensione DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio BOOLEAN)";
public static final String TABLE_SQL_DROP = "drop table portos_bo_IntPratica"; public static final String TABLE_SQL_DROP = "drop table portos_bo_IntPratica";
public static final String ORDER_BY_JPQL = " ORDER BY intPratica.intPraticaId ASC"; public static final String ORDER_BY_JPQL = " ORDER BY intPratica.intPraticaId ASC";
public static final String ORDER_BY_SQL = " ORDER BY portos_bo_IntPratica.intPraticaId ASC"; public static final String ORDER_BY_SQL = " ORDER BY portos_bo_IntPratica.intPraticaId ASC";
@ -152,6 +153,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
model.setTipoProcedura(soapModel.getTipoProcedura()); model.setTipoProcedura(soapModel.getTipoProcedura());
model.setDtAnnullamento(soapModel.getDtAnnullamento()); model.setDtAnnullamento(soapModel.getDtAnnullamento());
model.setDocPraticaAnnullamentoId(soapModel.getDocPraticaAnnullamentoId()); model.setDocPraticaAnnullamentoId(soapModel.getDocPraticaAnnullamentoId());
model.setUnitaOperativa(soapModel.getUnitaOperativa());
model.setDtSorteggio(soapModel.getDtSorteggio()); model.setDtSorteggio(soapModel.getDtSorteggio());
model.setStatoPratica(soapModel.getStatoPratica()); model.setStatoPratica(soapModel.getStatoPratica());
model.setNumeroProgetto(soapModel.getNumeroProgetto()); model.setNumeroProgetto(soapModel.getNumeroProgetto());
@ -248,6 +250,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
attributes.put("tipoProcedura", getTipoProcedura()); attributes.put("tipoProcedura", getTipoProcedura());
attributes.put("dtAnnullamento", getDtAnnullamento()); attributes.put("dtAnnullamento", getDtAnnullamento());
attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId()); attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId());
attributes.put("unitaOperativa", getUnitaOperativa());
attributes.put("dtSorteggio", getDtSorteggio()); attributes.put("dtSorteggio", getDtSorteggio());
attributes.put("statoPratica", getStatoPratica()); attributes.put("statoPratica", getStatoPratica());
attributes.put("numeroProgetto", getNumeroProgetto()); attributes.put("numeroProgetto", getNumeroProgetto());
@ -354,6 +357,12 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
setDocPraticaAnnullamentoId(docPraticaAnnullamentoId); setDocPraticaAnnullamentoId(docPraticaAnnullamentoId);
} }
Integer unitaOperativa = (Integer)attributes.get("unitaOperativa");
if (unitaOperativa != null) {
setUnitaOperativa(unitaOperativa);
}
Date dtSorteggio = (Date)attributes.get("dtSorteggio"); Date dtSorteggio = (Date)attributes.get("dtSorteggio");
if (dtSorteggio != null) { if (dtSorteggio != null) {
@ -702,6 +711,17 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
_docPraticaAnnullamentoId = docPraticaAnnullamentoId; _docPraticaAnnullamentoId = docPraticaAnnullamentoId;
} }
@JSON
@Override
public int getUnitaOperativa() {
return _unitaOperativa;
}
@Override
public void setUnitaOperativa(int unitaOperativa) {
_unitaOperativa = unitaOperativa;
}
@JSON @JSON
@Override @Override
public Date getDtSorteggio() { public Date getDtSorteggio() {
@ -1063,6 +1083,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
intPraticaImpl.setTipoProcedura(getTipoProcedura()); intPraticaImpl.setTipoProcedura(getTipoProcedura());
intPraticaImpl.setDtAnnullamento(getDtAnnullamento()); intPraticaImpl.setDtAnnullamento(getDtAnnullamento());
intPraticaImpl.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId()); intPraticaImpl.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId());
intPraticaImpl.setUnitaOperativa(getUnitaOperativa());
intPraticaImpl.setDtSorteggio(getDtSorteggio()); intPraticaImpl.setDtSorteggio(getDtSorteggio());
intPraticaImpl.setStatoPratica(getStatoPratica()); intPraticaImpl.setStatoPratica(getStatoPratica());
intPraticaImpl.setNumeroProgetto(getNumeroProgetto()); intPraticaImpl.setNumeroProgetto(getNumeroProgetto());
@ -1240,6 +1261,8 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
intPraticaCacheModel.docPraticaAnnullamentoId = getDocPraticaAnnullamentoId(); intPraticaCacheModel.docPraticaAnnullamentoId = getDocPraticaAnnullamentoId();
intPraticaCacheModel.unitaOperativa = getUnitaOperativa();
Date dtSorteggio = getDtSorteggio(); Date dtSorteggio = getDtSorteggio();
if (dtSorteggio != null) { if (dtSorteggio != null) {
@ -1337,7 +1360,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(65); StringBundler sb = new StringBundler(67);
sb.append("{uuid="); sb.append("{uuid=");
sb.append(getUuid()); sb.append(getUuid());
@ -1365,6 +1388,8 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
sb.append(getDtAnnullamento()); sb.append(getDtAnnullamento());
sb.append(", docPraticaAnnullamentoId="); sb.append(", docPraticaAnnullamentoId=");
sb.append(getDocPraticaAnnullamentoId()); sb.append(getDocPraticaAnnullamentoId());
sb.append(", unitaOperativa=");
sb.append(getUnitaOperativa());
sb.append(", dtSorteggio="); sb.append(", dtSorteggio=");
sb.append(getDtSorteggio()); sb.append(getDtSorteggio());
sb.append(", statoPratica="); sb.append(", statoPratica=");
@ -1410,7 +1435,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
@Override @Override
public String toXmlString() { public String toXmlString() {
StringBundler sb = new StringBundler(100); StringBundler sb = new StringBundler(103);
sb.append("<model><model-name>"); sb.append("<model><model-name>");
sb.append("it.tref.liferay.portos.bo.model.IntPratica"); sb.append("it.tref.liferay.portos.bo.model.IntPratica");
@ -1468,6 +1493,10 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
"<column><column-name>docPraticaAnnullamentoId</column-name><column-value><![CDATA["); "<column><column-name>docPraticaAnnullamentoId</column-name><column-value><![CDATA[");
sb.append(getDocPraticaAnnullamentoId()); sb.append(getDocPraticaAnnullamentoId());
sb.append("]]></column-value></column>"); sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>unitaOperativa</column-name><column-value><![CDATA[");
sb.append(getUnitaOperativa());
sb.append("]]></column-value></column>");
sb.append( sb.append(
"<column><column-name>dtSorteggio</column-name><column-value><![CDATA["); "<column><column-name>dtSorteggio</column-name><column-value><![CDATA[");
sb.append(getDtSorteggio()); sb.append(getDtSorteggio());
@ -1577,6 +1606,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
private String _tipoProcedura; private String _tipoProcedura;
private Date _dtAnnullamento; private Date _dtAnnullamento;
private long _docPraticaAnnullamentoId; private long _docPraticaAnnullamentoId;
private int _unitaOperativa;
private Date _dtSorteggio; private Date _dtSorteggio;
private String _statoPratica; private String _statoPratica;
private String _numeroProgetto; private String _numeroProgetto;

46
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java

@ -25,6 +25,7 @@ import it.tref.liferay.portos.bo.service.TempisticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ControlloPraticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ControlloPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.util.AvvisoUtil; import it.tref.liferay.portos.bo.util.AvvisoUtil;
import it.tref.liferay.portos.bo.util.AzioniPraticheUtil; import it.tref.liferay.portos.bo.util.AzioniPraticheUtil;
import it.tref.liferay.portos.bo.util.Constants; import it.tref.liferay.portos.bo.util.Constants;
@ -36,12 +37,11 @@ import it.tref.liferay.portos.kaleo.model.FormLog;
import it.tref.liferay.portos.kaleo.service.FormLogLocalServiceUtil; import it.tref.liferay.portos.kaleo.service.FormLogLocalServiceUtil;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap; import java.util.TreeMap;
import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
@ -389,6 +389,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
ControlloPratica controlloPratica = controlloPraticaLocalService ControlloPratica controlloPratica = controlloPraticaLocalService
.getControlloPratica(controlloPraticaId); .getControlloPratica(controlloPraticaId);
@SuppressWarnings("unchecked")
Map<String, String> parametri = (Map<String, String>) workflowContext Map<String, String> parametri = (Map<String, String>) workflowContext
.get("CONTEXT_TASK_FORM_PARAMETERS"); .get("CONTEXT_TASK_FORM_PARAMETERS");
IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId());
@ -499,25 +500,44 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.getControlloPratica(controlloPraticaId); .getControlloPratica(controlloPraticaId);
boolean preassegnazione = (0 == IntPraticaLocalServiceUtil.getIntPratica(
controlloPratica.getIntPraticaId()).getUnitaOperativa());
long companyId = controlloPratica.getCompanyId();
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); long role = RoleLocalServiceUtil.getRole(companyId,
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); preassegnazione ? "portos_assegnatore" : "portos_istruttore").getRoleId();
jsonObject.put("istruttore", jsonArray);
Role role = RoleLocalServiceUtil.getRole(controlloPratica.getCompanyId(), "portos_istruttore");
List<UserGroupRole> userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole( List<UserGroupRole> userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole(
controlloPratica.getGroupId(), role.getRoleId()); controlloPratica.getGroupId(), role);
_log.info("preassegnazione=" + preassegnazione + ", roleid=" + role);
Map<String, JSONObject> sorted = new TreeMap<>(); Map<String, JSONObject> sorted = new TreeMap<>();
for (UserGroupRole userGroupRole : userGroupRoles) { for (UserGroupRole userGroupRole : userGroupRoles) {
User user = userGroupRole.getUser(); User user = userGroupRole.getUser();
JSONObject istruttore = JSONFactoryUtil.createJSONObject(); long userId = user.getUserId();
istruttore.put("label", user.getFullName());
istruttore.put("value", user.getUserId()); if (preassegnazione) {
istruttore.put("default", false); for (int uo : UnitaOperativeUtil.getUnitaOperative(user)) {
sorted.put((user.getLastName() + user.getFirstName()).toUpperCase(), istruttore); String label = ("U.O. " + uo + ": " + user.getFullName()).toUpperCase();
JSONObject istruttore = JSONFactoryUtil.createJSONObject();
istruttore.put("label", label);
istruttore.put("value", userId);
istruttore.put("default", false);
sorted.put(label, istruttore);
}
} else {
String label = user.getFullName().toUpperCase();
JSONObject istruttore = JSONFactoryUtil.createJSONObject();
istruttore.put("label", label);
istruttore.put("value", userId);
istruttore.put("default", false);
sorted.put(label, istruttore);
}
} }
JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
jsonObject.put("istruttore", jsonArray);
for (JSONObject istruttore : sorted.values()) { for (JSONObject istruttore : sorted.values()) {
jsonArray.put(istruttore); jsonArray.put(istruttore);
} }

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java

@ -4655,6 +4655,7 @@ public class IntPraticaPersistenceImpl extends BasePersistenceImpl<IntPratica>
intPraticaImpl.setTipoProcedura(intPratica.getTipoProcedura()); intPraticaImpl.setTipoProcedura(intPratica.getTipoProcedura());
intPraticaImpl.setDtAnnullamento(intPratica.getDtAnnullamento()); intPraticaImpl.setDtAnnullamento(intPratica.getDtAnnullamento());
intPraticaImpl.setDocPraticaAnnullamentoId(intPratica.getDocPraticaAnnullamentoId()); intPraticaImpl.setDocPraticaAnnullamentoId(intPratica.getDocPraticaAnnullamentoId());
intPraticaImpl.setUnitaOperativa(intPratica.getUnitaOperativa());
intPraticaImpl.setDtSorteggio(intPratica.getDtSorteggio()); intPraticaImpl.setDtSorteggio(intPratica.getDtSorteggio());
intPraticaImpl.setStatoPratica(intPratica.getStatoPratica()); intPraticaImpl.setStatoPratica(intPratica.getStatoPratica());
intPraticaImpl.setNumeroProgetto(intPratica.getNumeroProgetto()); intPraticaImpl.setNumeroProgetto(intPratica.getNumeroProgetto());

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.namespace=portos_bo
build.number=2805 build.number=2833
build.date=1608631312513 build.date=1610446715034
build.auto.upgrade=true build.auto.upgrade=true
## ##

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/miei_task.jsp

@ -1,5 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.search.IndexerRegistryUtil"%> <%@page import="com.liferay.portal.kernel.search.IndexerRegistryUtil"%>
<%@page import="com.liferay.portal.kernel.search.Indexer"%> <%@page import="com.liferay.portal.kernel.search.Indexer"%>
<%@page import="com.liferay.portal.kernel.search.Hits"%> <%@page import="com.liferay.portal.kernel.search.Hits"%>
@ -92,7 +91,7 @@ request.setAttribute("tabs1", "Tab_MieiTask");
> >
<% <%
List<ControlloPratica> listaControlloPratica = new ArrayList<ControlloPratica>(); List<ControlloPratica> listaControlloPratica = new ArrayList<ControlloPratica>();
Hits hits = ControlloPraticaAdvancedSearch.searchMieiTask(request, user, searchContainer.getStart(), searchContainer.getEnd()); Hits hits = ControlloPraticaAdvancedSearch.searchMieiTask(request, user, searchContainer.getStart(), searchContainer.getEnd());
for (Document doc : hits.toList()) { for (Document doc : hits.toList()) {

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf

@ -182,6 +182,10 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP
</c:if> </c:if>
</liferay-ui:search-container-column-text> </liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="unita-operativa">
<%= intPratica.getUnitaOperativa() > 0 ? String.valueOf(intPratica.getUnitaOperativa()) : StringPool.BLANK %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="provenienza"> <liferay-ui:search-container-column-text name="provenienza">
<% <%
WorkflowTask workflowTask = WorkflowUtil.getLastCompletedTask(controlloPratica.getCompanyId(),controlloPratica.getGroupId(), null, controlloPratica); WorkflowTask workflowTask = WorkflowUtil.getLastCompletedTask(controlloPratica.getCompanyId(),controlloPratica.getGroupId(), null, controlloPratica);

232
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/Constants.java

@ -1,128 +1,118 @@
package it.tref.liferay.portos.bo.shared.util; package it.tref.liferay.portos.bo.shared.util;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;
public class Constants implements com.liferay.portal.kernel.util.Constants { public class Constants implements com.liferay.portal.kernel.util.Constants {
public static final String ZONA_1 = "1"; public static final String ZONA_1 = "1";
public static final String ZONA_2 = "2"; public static final String ZONA_2 = "2";
public static final String ZONA_3 = "3"; public static final String ZONA_3 = "3";
public static final String ZONA_4 = "4"; public static final String ZONA_4 = "4";
public static final String FASCIA_A = "A"; public static final String FASCIA_A = "A";
public static final String FASCIA_B = "B"; public static final String FASCIA_B = "B";
public static final String FASCIA_C = "C"; public static final String FASCIA_C = "C";
public static final String PROCEDURA_P0 = "P0"; public static final String PROCEDURA_P0 = "P0";
public static final String PROCEDURA_P1 = "P1"; public static final String PROCEDURA_P1 = "P1";
public static final String PROCEDURA_P2 = "P2"; public static final String PROCEDURA_P2 = "P2";
public static final String PROCEDURA_P3 = "P3"; public static final String PROCEDURA_P3 = "P3";
public static final String PROCEDURA_P4 = "P4"; public static final String PROCEDURA_P4 = "P4";
public static final String PROCEDURA_P5 = "P5"; public static final String PROCEDURA_P5 = "P5";
public static final String PROCEDURA_P6 = "P6"; public static final String PROCEDURA_P6 = "P6";
public static final String PROCEDURA_P7 = "P7"; public static final String PROCEDURA_P7 = "P7";
public static final String PROCEDURA_P8 = "P8"; public static final String PROCEDURA_P8 = "P8";
public static final String PROCEDURA_P9 = "P9"; public static final String PROCEDURA_P9 = "P9";
public static final String PROCEDURA_P10 = "P10"; public static final String PROCEDURA_P10 = "P10";
public static final String TIPO_PRATICA_DEPOSITO = "01"; public static final String TIPO_PRATICA_DEPOSITO = "01";
public static final String TIPO_PRATICA_AUTORIZZAZIONE = "02"; public static final String TIPO_PRATICA_AUTORIZZAZIONE = "02";
public static final String TIPO_PRATICA_SANATORIA = "03"; public static final String TIPO_PRATICA_SANATORIA = "03";
//Bug 33461 @SuppressWarnings("serial")
// public static final String TIPO_PRATICA_OPERE_MINORE_IMPORTANZA = "05"; public static final Map<String, String> PRATICA_ZONE = new HashMap<String, String>() {
{
public static final HashMap<String, String> PRATICA_ZONE = new HashMap<String, String>() { put(ZONA_3, TIPO_PRATICA_DEPOSITO);
{ put(ZONA_4, TIPO_PRATICA_DEPOSITO);
put(ZONA_3, TIPO_PRATICA_DEPOSITO); put(ZONA_2, TIPO_PRATICA_AUTORIZZAZIONE);
put(ZONA_4, TIPO_PRATICA_DEPOSITO); put(ZONA_1, TIPO_PRATICA_AUTORIZZAZIONE);
put(ZONA_2, TIPO_PRATICA_AUTORIZZAZIONE);
put(ZONA_1, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P0, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P1, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P0, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P2, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P1, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P3, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P2, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P4, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P3, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P5, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P4, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P6, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P5, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P7, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P6, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P8, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P7, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P9, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P8, TIPO_PRATICA_AUTORIZZAZIONE); put(PROCEDURA_P10, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P9, TIPO_PRATICA_AUTORIZZAZIONE);
put(PROCEDURA_P10, TIPO_PRATICA_AUTORIZZAZIONE); }
};
}
}; // public static final String TIPO_PRATICA_DEPOSITO_CO =
// TIPO_PRATICA_DEPOSITO + "_CO";
// public static final String TIPO_PRATICA_DEPOSITO_CO = TIPO_PRATICA_DEPOSITO + "_CO";
public static final String FIRMA = "FIRMA";
public static final String FIRMA = "FIRMA";
public static final String[] AMMINISTRAZIONE_CSV_HEADERS_COMUNI = { "Codice Regione",
public static final String[] AMMINISTRAZIONE_CSV_HEADERS_COMUNI = {"Codice Regione", "Codice Città Metropolitana", "Codice Città Metropolitana", "Codice Provincia (1)", "Progressivo del Comune (2)",
"Codice Provincia (1)", "Progressivo del Comune (2)", "Codice Comune formato alfanumerico", "Codice Comune formato alfanumerico", "Denominazione in italiano", "Denominazione in tedesco",
"Denominazione in italiano", "Denominazione in tedesco", "Codice Ripartizione Geografica", "Codice Ripartizione Geografica", "Ripartizione geografica", "Denominazione regione",
"Ripartizione geografica", "Denominazione regione", "Denominazione Città metropolitana", "Denominazione Città metropolitana", "Denominazione provincia",
"Denominazione provincia", "Flag Comune capoluogo di provincia", "Sigla automobilistica", "Flag Comune capoluogo di provincia", "Sigla automobilistica", "Codice Comune formato numerico",
"Codice Comune formato numerico", "Codice Comune numerico con 110 province (dal 2010 al 2016)", "Codice Comune numerico con 110 province (dal 2010 al 2016)",
"Codice Comune numerico con 107 province (dal 2006 al 2009)", "Codice Comune numerico con 107 province (dal 2006 al 2009)",
"Codice Comune numerico con 103 province (dal 1995 al 2005)", "Codice Catastale del comune", "Codice Comune numerico con 103 province (dal 1995 al 2005)", "Codice Catastale del comune",
"Popolazione legale 2011 (09/10/2011)", "Codice NUTS1 2010", "Codice NUTS2 2010 (3) ", "Codice NUTS3 2010", "Popolazione legale 2011 (09/10/2011)", "Codice NUTS1 2010", "Codice NUTS2 2010 (3) ",
"Codice NUTS1 2006", "Codice NUTS2 2006 (3)", "Codice NUTS3 2006"}; "Codice NUTS3 2010", "Codice NUTS1 2006", "Codice NUTS2 2006 (3)", "Codice NUTS3 2006" };
public static final String[] AMMINISTRAZIONE_CSV_HEADERS_PROVINCE = {"codice_provincia", "provincia", "regione", public static final String[] AMMINISTRAZIONE_CSV_HEADERS_PROVINCE = { "codice_provincia", "provincia",
"sigla"}; "regione", "sigla" };
// public static final String CHECK_FIRMA = "checkFirma";
// public static final String ASSOCIATE_WITH_WORKFLOW = "associateWithWorkflow"; public static final String ROLE_NAME_GEOLOGO = "portos_geologo";
// public static final String ADD_UPLOAD_FILE_AVVISO = "addUploadFileAvviso"; public static final String ROLE_NAME_FIRMA = "portos_firma";
// public static final String ROLE_NAME_FIRMA_DIRIGENTE = "portos_firma_dirigente";
// public static final String PROTOCOLLO_KEY_DB = "protocollo.key.db"; public static final String ROLE_NAME_FIRMA_PO = "portos_firma_po";
// public static final String PROTOCOLLO_AVVISO_KEY_DB = "protocollo.avviso.key.db"; public static final String ROLE_NAME_ASSEGNATORE = "portos_assegnatore";
public static final String ROLE_NAME_APPROVATORE = "portos_approvatore";
// public static final String NOME_VOCABOLARIO = "Genio Civile"; public static final String ROLE_NAME_ISTRUTTORE = "portos_istruttore";
// public static final String NOME_VOCABOLARIO_STATO = "Stato Attuale";
// public static final String COMPANY_CUSTOM_FIELD_VERSIONING_CHANGES = "VERSIONING CHANGES URL";
// public static final String CUSTOM_FIELD_TABLE_NAME = ExpandoTableConstants.DEFAULT_TABLE_NAME; public static final String COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS = "VERSIONING SNAPSHOT URL";
// public static final String CUSTOM_FIELD_GC_USERID = "GC_USERID"; public static final String COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS_COUNT = "VERSIONING SNAPSHOT COUNT URL";
public static final String COMPANY_CUSTOM_FIELD_VERSIONING_COMMIT = "VERSIONING COMMIT URL";
public static final String ROLE_NAME_GEOLOGO = "portos_geologo"; public static final String COMPANY_CUSTOM_FIELD_VERSIONING_CHANGES_URL = "http://172.16.20.148:8080/portos-versioning/v1/fascicolo/changes/";
public static final String ROLE_NAME_FIRMA = "portos_firma"; public static final String COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS_URL = "http://172.16.20.148:8080/portos-versioning/v1/fascicolo/snapshots/";
public static final String ROLE_NAME_FIRMA_DIRIGENTE = "portos_firma_dirigente"; public static final String COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS_COUNT_URL = "http://172.16.20.148:8080/portos-versioning/v1/fascicolo/snapshots/count/";
public static final String ROLE_NAME_FIRMA_PO = "portos_firma_po"; public static final String COMPANY_CUSTOM_FIELD_VERSIONING_COMMIT_URL = "http://172.16.20.148:8080/portos-versioning/v1/fascicolo/commit/";
public static final String ROLE_NAME_ASSEGNATORE = "portos_assegnatore";
public static final String ROLE_NAME_APPROVATORE = "portos_approvatore"; // Manifattura Web Group, mofidica per rendere la dimensione massima degli
public static final String ROLE_NAME_ISTRUTTORE = "portos_istruttore"; // allegati configurabile da pannello di controllo. In origine era hardcoded
// a 20971520 byte.
public static final String COMPANY_CUSTOM_FIELD_DIMENSIONE_MASSIMA_ALLEGATI_IN_MIB = "DIMENSIONE MASSIMA ALLEGATI IN MIB";
public static final String COMPANY_CUSTOM_FIELD_VERSIONING_CHANGES = "VERSIONING CHANGES URL"; public static final String COMPANY_CUSTOM_FIELD_DIMENSIONE_MASSIMA_ALLEGATI_DEFAULT = "100";
public static final String COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS = "VERSIONING SNAPSHOT URL";
public static final String COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS_COUNT = "VERSIONING SNAPSHOT COUNT URL"; public static final String COMPANY_CUSTOM_FIELD_LINK_SEED = "SEED PER LINK DINAMICI";
public static final String COMPANY_CUSTOM_FIELD_VERSIONING_COMMIT = "VERSIONING COMMIT URL";
public static final String COMPANY_CUSTOM_FIELD_VERSIONING_CHANGES_URL = "http://172.16.20.148:8080/portos-versioning/v1/fascicolo/changes/"; public static final int DETTPRATICA_VERSION_IMPL = 1;
public static final String COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS_URL = "http://172.16.20.148:8080/portos-versioning/v1/fascicolo/snapshots/";
public static final String COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS_COUNT_URL = "http://172.16.20.148:8080/portos-versioning/v1/fascicolo/snapshots/count/"; public static final String COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_INIZIALE_LABEL = "CODICE PROTOCOLLAZIONE INZIALE";
public static final String COMPANY_CUSTOM_FIELD_VERSIONING_COMMIT_URL = "http://172.16.20.148:8080/portos-versioning/v1/fascicolo/commit/"; public static final String COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_SEGUENTE_LABEL = "CODICE PROTOCOLLAZIONE SEGUENTE";
// Manifattura Web Group, mofidica per rendere la dimensione massima degli allegati configurabile public static final String COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_INIZIALE_VALUE = "AOOGRT/SISMICA";
// da pannello di controllo. In origine era hardcoded a 20971520 byte.
public static final String COMPANY_CUSTOM_FIELD_DIMENSIONE_MASSIMA_ALLEGATI_IN_MIB = "DIMENSIONE MASSIMA ALLEGATI IN MIB"; public static final String COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_SEGUENTE_VALUE = "N.060.100";
public static final String COMPANY_CUSTOM_FIELD_DIMENSIONE_MASSIMA_ALLEGATI_DEFAULT = "100";
public static final String ORG_CUSTOM_FIELD_PO = "nome_cognome_po";
public static final String COMPANY_CUSTOM_FIELD_LINK_SEED = "SEED PER LINK DINAMICI";
public static final String CF_ORGANIZATION_MEMBERSHIP = "cf_organization_membership";
public static final int DETTPRATICA_VERSION_IMPL = 1;
public static final String GESTIONE_PRATICA_URL_FE = "url-fe-gestione-pratica";
public static final String COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_INIZIALE_LABEL = "CODICE PROTOCOLLAZIONE INZIALE"; public static final String GESTIONE_PRATICA_URL_BO = "url-bo-gestione-pratica";
public static final String COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_SEGUENTE_LABEL = "CODICE PROTOCOLLAZIONE SEGUENTE";
public static final String USER_CUSTOM_FIELD_UNITA_OPERATIVE = "unita_operative";
public static final String COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_INIZIALE_VALUE = "AOOGRT/SISMICA";
public static final String COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_SEGUENTE_VALUE = "N.060.100";
public static final String ORG_CUSTOM_FIELD_PO = "nome_cognome_po";
public static final String CF_ORGANIZATION_MEMBERSHIP = "cf_organization_membership";
public static final String GESTIONE_PRATICA_URL_FE = "url-fe-gestione-pratica";
public static final String GESTIONE_PRATICA_URL_BO = "url-bo-gestione-pratica";
} }

18
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/UnitaOperativeUtil.java

@ -0,0 +1,18 @@
package it.tref.liferay.portos.bo.shared.util;
import java.util.ArrayList;
import java.util.List;
import com.liferay.portal.model.User;
public class UnitaOperativeUtil {
public static List<Integer> getUnitaOperative(User user) {
List<Integer> ret = new ArrayList<>();
short uo[] = (short[]) user.getExpandoBridge().getAttribute(
Constants.USER_CUSTOM_FIELD_UNITA_OPERATIVE);
for (int i = 0; i < uo.length; i++) {
ret.add((int) uo[i]);
}
return ret;
}
}

4
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.classpath

@ -22,7 +22,7 @@
<classpathentry kind="lib" path="docroot/WEB-INF/lib/portal-compat-shared.jar"/> <classpathentry kind="lib" path="docroot/WEB-INF/lib/portal-compat-shared.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/util-java.jar"/> <classpathentry kind="lib" path="docroot/WEB-INF/lib/util-java.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/portos-bo-portlet-service.jar"/> <classpathentry kind="lib" path="docroot/WEB-INF/lib/portos-bo-portlet-service.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/portos-kaleo-shared.jar"/> <classpathentry kind="lib" path="/home/portos/sources/portos-src/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/portos-kaleo-shared.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/portos-bo-shared.jar"/> <classpathentry kind="lib" path="/home/portos/sources/portos-src/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/portos-bo-shared.jar"/>
<classpathentry kind="output" path="docroot/WEB-INF/classes"/> <classpathentry kind="output" path="docroot/WEB-INF/classes"/>
</classpath> </classpath>

11
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp

@ -1,12 +1,7 @@
<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%>
<%@page import="java.io.Serializable"%>
<%@page import="java.nio.file.Files"%>
<%@page import="java.nio.file.Path"%>
<%@page import="java.io.File"%>
<%@page import="com.liferay.portal.kernel.log.LogFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.log.Log"%>
<%@page import="java.nio.file.Paths"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.io.Serializable"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Map"%>
<%@page import="com.liferay.portal.kernel.util.MapUtil"%> <%@page import="com.liferay.portal.kernel.util.MapUtil"%>
<%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%> <%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%>
<%@page import="java.util.Map.Entry"%> <%@page import="java.util.Map.Entry"%>

1
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java

@ -170,6 +170,7 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
.getParameter("kaleo--esito--").trim() : ""; .getParameter("kaleo--esito--").trim() : "";
String testoDocumento = httpServletRequest.getParameter("kaleo--testo_del_documento--") != null ? httpServletRequest String testoDocumento = httpServletRequest.getParameter("kaleo--testo_del_documento--") != null ? httpServletRequest
.getParameter("kaleo--testo_del_documento--") : ""; .getParameter("kaleo--testo_del_documento--") : "";
if (!valoriAmmessi.contains(esito) if (!valoriAmmessi.contains(esito)
|| ((esito.equalsIgnoreCase(StatoPraticaConstants.INTEGRAZIONE) || esito || ((esito.equalsIgnoreCase(StatoPraticaConstants.INTEGRAZIONE) || esito
.equalsIgnoreCase(StatoPraticaConstants.PREAVVISO_CONTRARIO)) && testoDocumento .equalsIgnoreCase(StatoPraticaConstants.PREAVVISO_CONTRARIO)) && testoDocumento

4
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/RenderFormTaskPortletAction.java

@ -53,8 +53,6 @@ import com.liferay.portlet.dynamicdatamapping.util.DDMXSDUtil;
public class RenderFormTaskPortletAction extends BaseStrutsPortletAction { public class RenderFormTaskPortletAction extends BaseStrutsPortletAction {
private static Log _log = LogFactoryUtil.getLog(RenderFormTaskPortletAction.class);
@Override @Override
public String render(PortletConfig portletConfig, RenderRequest renderRequest, public String render(PortletConfig portletConfig, RenderRequest renderRequest,
RenderResponse renderResponse) throws Exception { RenderResponse renderResponse) throws Exception {
@ -115,7 +113,6 @@ public class RenderFormTaskPortletAction extends BaseStrutsPortletAction {
// ADT BUG BO id = 27 // ADT BUG BO id = 27
String classPkForCarichiLavoro = ParamUtil.getString(renderRequest, "classPkForCarichiLavoro"); String classPkForCarichiLavoro = ParamUtil.getString(renderRequest, "classPkForCarichiLavoro");
_log.info("classPkForCarichiLavoro = " + classPkForCarichiLavoro);
boolean checkVisualizzaCarichiLavoro = (ddmTemplateId == 21699 || ddmTemplateId == 21705); boolean checkVisualizzaCarichiLavoro = (ddmTemplateId == 21699 || ddmTemplateId == 21705);
if (checkVisualizzaCarichiLavoro) { if (checkVisualizzaCarichiLavoro) {
renderRequest.setAttribute("classPkForCarichiLavoro", classPkForCarichiLavoro); renderRequest.setAttribute("classPkForCarichiLavoro", classPkForCarichiLavoro);
@ -125,7 +122,6 @@ public class RenderFormTaskPortletAction extends BaseStrutsPortletAction {
parameters.remove("esito"); parameters.remove("esito");
parameters.remove("testo_del_documento"); parameters.remove("testo_del_documento");
} }
// ///////////////
return "/portlet/workflow_tasks/render_form_task.jsp"; return "/portlet/workflow_tasks/render_form_task.jsp";
} }

8
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/util/WorkflowUtil.java

@ -21,6 +21,8 @@ import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.json.JSONDeserializer; import com.liferay.portal.kernel.json.JSONDeserializer;
import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.ParamUtil; import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.kernel.util.StringUtil;
@ -40,6 +42,7 @@ import com.liferay.portal.workflow.kaleo.runtime.action.ActionExecutorUtil;
import com.liferay.portal.workflow.kaleo.service.KaleoTaskInstanceTokenLocalServiceUtil; import com.liferay.portal.workflow.kaleo.service.KaleoTaskInstanceTokenLocalServiceUtil;
public class WorkflowUtil { public class WorkflowUtil {
private static Log _log = LogFactoryUtil.getLog(WorkflowUtil.class);
public static Map<String, Serializable> executeOnOpenForm(long companyId, long workflowTaskId, public static Map<String, Serializable> executeOnOpenForm(long companyId, long workflowTaskId,
long assigneeUserId, String transitionName) throws PortalException, SystemException { long assigneeUserId, String transitionName) throws PortalException, SystemException {
@ -202,7 +205,12 @@ public class WorkflowUtil {
String parameterName = name.substring(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM.length(), String parameterName = name.substring(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM.length(),
name.length() - WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM.length()); name.length() - WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM.length());
String[] values = ParamUtil.getParameterValues(portletRequest, name);
for (int i = 0; i < values.length; i++) {
_log.info(name + "[" + i + "] = \"" + values[i] + "\"");
}
String value = StringUtil.merge(ParamUtil.getParameterValues(portletRequest, name)); String value = StringUtil.merge(ParamUtil.getParameterValues(portletRequest, name));
_log.info("Finale \"" + value + "\"");
formParameters.put(parameterName, value); formParameters.put(parameterName, value);
} }

4
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=Kaleo build.namespace=Kaleo
build.number=14 build.number=15
build.date=1607618436751 build.date=1610444335225
build.auto.upgrade=true build.auto.upgrade=true
## ##

Caricamento…
Annulla
Salva