Sfoglia il codice sorgente

Riassegnazione a altro istruttore tenendo conto delle unità operative di competenza per l'assegnatore

master
Salvatore La Manna 3 anni fa
parent
commit
75a9a2ea34
  1. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties
  2. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java
  3. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java
  4. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java
  5. 42
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaIstruttorePortlet.java
  6. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java
  7. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
  8. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
  9. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  10. 25
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_cambio_istruttore.jsp
  11. 73
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_actions.jsp
  12. 15
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp
  13. 8
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/mwg/sismica/bo/shared/util/UnitaOperativeUtil.java
  14. 2
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java

5
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties

@ -11,12 +11,13 @@ licenses=LGPL
liferay-versions=6.2.0+ liferay-versions=6.2.0+
portal-dependency-jars=\ portal-dependency-jars=\
axis.jar,\ axis.jar,\
commons-collections4.jar,\
commons-io.jar,\
jaxrpc.jar,\ jaxrpc.jar,\
jstl-api.jar,\ jstl-api.jar,\
jstl-impl.jar,\ jstl-impl.jar,\
wsdl4j.jar,\ wsdl4j.jar,\
xml-apis.jar,\ xml-apis.jar
commons-io.jar
portal-dependency-tlds=\ portal-dependency-tlds=\
c.tld c.tld
required-deployment-contexts=\ required-deployment-contexts=\

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

@ -1,9 +1,9 @@
package it.tref.liferay.portos.bo.search; package it.tref.liferay.portos.bo.search;
import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil;
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.PortosIndexField;
import it.tref.liferay.portos.bo.util.WorkflowConstants; import it.tref.liferay.portos.bo.util.WorkflowConstants;
@ -49,6 +49,7 @@ import com.liferay.portal.model.Role;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.service.OrganizationLocalServiceUtil; import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil;
import com.liferay.portal.service.RoleLocalServiceUtil;
public class ControlloPraticaAdvancedSearch { public class ControlloPraticaAdvancedSearch {

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

@ -3,6 +3,7 @@
*/ */
package it.mwg.sismica.bo.util; package it.mwg.sismica.bo.util;
import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.Asseverazione; import it.tref.liferay.portos.bo.model.Asseverazione;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
@ -38,7 +39,6 @@ import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.StoricoSoggettoPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.StoricoSoggettoPraticaLocalServiceUtil;
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;

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

@ -1,5 +1,6 @@
package it.tref.liferay.portos.bo.portlet; package it.tref.liferay.portos.bo.portlet;
import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.DocPratica;
@ -24,7 +25,6 @@ import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.bean.IstruttoreBean; import it.tref.liferay.portos.bo.shared.bean.IstruttoreBean;
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.TipoSoggettoUtil; import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.util.DocumentiPraticaUtil; import it.tref.liferay.portos.bo.util.DocumentiPraticaUtil;
import it.tref.liferay.portos.bo.util.PraticaUtil; import it.tref.liferay.portos.bo.util.PraticaUtil;
import it.tref.liferay.portos.bo.util.ValidazionePraticaUtil; import it.tref.liferay.portos.bo.util.ValidazionePraticaUtil;

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

@ -1,5 +1,6 @@
package it.tref.liferay.portos.bo.portlet; package it.tref.liferay.portos.bo.portlet;
import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.FineLavori;
@ -17,7 +18,6 @@ import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.bean.IstruttoreBean; import it.tref.liferay.portos.bo.shared.bean.IstruttoreBean;
import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil; import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
@ -264,7 +264,7 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet {
} }
// ADT BUG-ID=16 Sezione Pratiche Assegnate // ADT BUG-ID=16 Sezione Pratiche Assegnate
User user = themeDisplay.getUser(); User user = themeDisplay.getUser();
try{ try {
if ("comuniForUfficio".equals(resourceId)) { if ("comuniForUfficio".equals(resourceId)) {
String ufficio = ParamUtil.getString(resourceRequest, "ufficioId"); String ufficio = ParamUtil.getString(resourceRequest, "ufficioId");
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
@ -296,21 +296,22 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet {
e.printStackTrace(); e.printStackTrace();
} }
} }
}else if ("province".equals(resourceId)) { } else if ("province".equals(resourceId)) {
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
List<String> province = TerritorioLocalServiceUtil.getActiveProvince(); List<String> province = TerritorioLocalServiceUtil.getActiveProvince();
for (String codiceProvincia : province) { for (String codiceProvincia : province) {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(themeDisplay.getCompanyId(), codiceProvincia); Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(themeDisplay.getCompanyId(),
codiceProvincia);
jsonObject.put("provinciaId", provincia.getCodiceProvincia()); jsonObject.put("provinciaId", provincia.getCodiceProvincia());
jsonObject.put("descLong", provincia.getSigla() + " - " + provincia.getProvincia()); jsonObject.put("descLong", provincia.getSigla() + " - " + provincia.getProvincia());
jsonArray.put(jsonObject); jsonArray.put(jsonObject);
} }
writeJSON(resourceRequest, resourceResponse, jsonArray); writeJSON(resourceRequest, resourceResponse, jsonArray);
}else if ("unitaOperative".equals(resourceId)) { } else if ("unitaOperative".equals(resourceId)) {
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
for(int i=1; i<11; i++) { for (int i = 1; i < 11; i++) {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
jsonObject.put("uoId", i); jsonObject.put("uoId", i);
jsonObject.put("descLong", i); jsonObject.put("descLong", i);
@ -318,7 +319,7 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet {
} }
writeJSON(resourceRequest, resourceResponse, jsonArray); writeJSON(resourceRequest, resourceResponse, jsonArray);
}else if ("comuni".equals(resourceId)) { } else if ("comuni".equals(resourceId)) {
String provinciaId = ParamUtil.getString(resourceRequest, "provinciaId"); String provinciaId = ParamUtil.getString(resourceRequest, "provinciaId");
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
if (Validator.isNotNull(provinciaId) && !provinciaId.equals("0")) { if (Validator.isNotNull(provinciaId) && !provinciaId.equals("0")) {
@ -342,32 +343,33 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet {
} }
} }
writeJSON(resourceRequest, resourceResponse, jsonArray); writeJSON(resourceRequest, resourceResponse, jsonArray);
}else if ("istruttore".equals(resourceId)) { } else if ("istruttore".equals(resourceId)) {
Integer uoId = ParamUtil.getInteger(resourceRequest, "uoId"); Integer uoId = ParamUtil.getInteger(resourceRequest, "uoId");
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
if (Validator.isNotNull(uoId) && !uoId.equals("-1")) { if (Validator.isNotNull(uoId) && !uoId.equals("-1")) {
List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId()); List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user
.getUserId());
List<UserGroupRole> tecniciIstruttori = new ArrayList<UserGroupRole>(); List<UserGroupRole> tecniciIstruttori = new ArrayList<UserGroupRole>();
for(Organization org : organizationList) { for (Organization org : organizationList) {
Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_istruttore"); Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_istruttore");
List<UserGroupRole> istruttori = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole( List<UserGroupRole> istruttori = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole(
org.getGroupId(), role.getRoleId()); org.getGroupId(), role.getRoleId());
for (UserGroupRole userGroupRole : istruttori) { for (UserGroupRole userGroupRole : istruttori) {
User istruttore = userGroupRole.getUser(); User istruttore = userGroupRole.getUser();
List<Integer> unitaOperativeIstruttore = UnitaOperativeUtil.getUnitaOperative(istruttore); List<Integer> unitaOperativeIstruttore = UnitaOperativeUtil.getUnitaOperative(istruttore);
if(unitaOperativeIstruttore.contains(uoId)){ if (unitaOperativeIstruttore.contains(uoId)) {
if (tecniciIstruttori.isEmpty()) { if (tecniciIstruttori.isEmpty()) {
tecniciIstruttori.add(userGroupRole); tecniciIstruttori.add(userGroupRole);
} else { } else {
boolean isPresent = false; boolean isPresent = false;
for(UserGroupRole tecnico : tecniciIstruttori) { for (UserGroupRole tecnico : tecniciIstruttori) {
if (tecnico.getUserId() == userGroupRole.getUserId()) { if (tecnico.getUserId() == userGroupRole.getUserId()) {
isPresent = true; isPresent = true;
break; break;
} }
} }
if(!isPresent){ if (!isPresent) {
tecniciIstruttori.add(userGroupRole); tecniciIstruttori.add(userGroupRole);
} }
} }
@ -395,12 +397,13 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet {
writeJSON(resourceRequest, resourceResponse, jsonArray); writeJSON(resourceRequest, resourceResponse, jsonArray);
}else if ("geologo".equals(resourceId)) { } else if ("geologo".equals(resourceId)) {
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId()); List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user
.getUserId());
List<User> geologi = new ArrayList<User>(); List<User> geologi = new ArrayList<User>();
for(Organization org : organizationList) { for (Organization org : organizationList) {
Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_geologo"); Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_geologo");
List<User> geologiUsers = UserLocalServiceUtil.getRoleUsers(role.getRoleId()); List<User> geologiUsers = UserLocalServiceUtil.getRoleUsers(role.getRoleId());
@ -409,13 +412,13 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet {
geologi.add(userGroupRole); geologi.add(userGroupRole);
} else { } else {
boolean isPresent = false; boolean isPresent = false;
for(User geo : geologi) { for (User geo : geologi) {
if (geo.getUserId() == userGroupRole.getUserId()) { if (geo.getUserId() == userGroupRole.getUserId()) {
isPresent = true; isPresent = true;
break; break;
} }
} }
if(!isPresent){ if (!isPresent) {
geologi.add(userGroupRole); geologi.add(userGroupRole);
} }
} }
@ -429,11 +432,10 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet {
jsonArray.put(jsonObject); jsonArray.put(jsonObject);
} }
writeJSON(resourceRequest, resourceResponse, jsonArray); writeJSON(resourceRequest, resourceResponse, jsonArray);
} }
}catch (Exception e) { } catch (Exception e) {
_log.error(e, e); _log.error(e, e);
throw new IOException(e); throw new IOException(e);
} }

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

@ -1,5 +1,6 @@
package it.tref.liferay.portos.bo.portlet; package it.tref.liferay.portos.bo.portlet;
import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
@ -19,7 +20,6 @@ import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission;
import it.tref.liferay.portos.bo.shared.bean.IstruttoreBean; import it.tref.liferay.portos.bo.shared.bean.IstruttoreBean;
import it.tref.liferay.portos.bo.shared.util.ActionKeys; import it.tref.liferay.portos.bo.shared.util.ActionKeys;
import it.tref.liferay.portos.bo.shared.util.Constants; import it.tref.liferay.portos.bo.shared.util.Constants;
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.MailUtil; import it.tref.liferay.portos.bo.util.MailUtil;
import it.tref.liferay.portos.bo.util.WorkflowUtil; import it.tref.liferay.portos.bo.util.WorkflowUtil;

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

@ -9,6 +9,7 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.mwg.sismica.bo.shared.bean.CarichiLavoroBean; import it.mwg.sismica.bo.shared.bean.CarichiLavoroBean;
import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil;
import it.mwg.sismica.bo.util.CarichiLavoroUtil; import it.mwg.sismica.bo.util.CarichiLavoroUtil;
import it.mwg.sismica.bo.util.SismicaUtil; import it.mwg.sismica.bo.util.SismicaUtil;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
@ -19,7 +20,6 @@ import it.tref.liferay.portos.bo.service.base.ControlloPraticaLocalServiceBaseIm
import it.tref.liferay.portos.bo.shared.util.Constants; import it.tref.liferay.portos.bo.shared.util.Constants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.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.GestioneFirmeUtil; import it.tref.liferay.portos.bo.util.GestioneFirmeUtil;

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

@ -8,6 +8,7 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.NoSuchIntPraticaException; import it.tref.liferay.portos.bo.NoSuchIntPraticaException;
import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
@ -30,7 +31,6 @@ import it.tref.liferay.portos.bo.shared.bean.FirmeBean;
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.FirmeUtil; import it.tref.liferay.portos.bo.shared.util.FirmeUtil;
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.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;

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=3359 build.number=3360
build.date=1631691092406 build.date=1631698031653
build.auto.upgrade=true build.auto.upgrade=true
## ##

25
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_cambio_istruttore.jsp

@ -1,16 +1,11 @@
<%@page import="org.apache.commons.lang.StringUtils"%> <%@page import="org.apache.commons.collections4.CollectionUtils"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil"%>
<%@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.model.User"%>
<%@page import="com.liferay.portal.model.UserGroupRole"%> <%@page import="com.liferay.portal.model.UserGroupRole"%>
<%@page import="com.liferay.portal.model.UserGroup"%>
<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.Constants"%>
<%@page import="com.liferay.portal.service.RoleLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> <%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="java.util.ArrayList"%> <%@page import="it.mwg.sismica.bo.shared.util.UnitaOperativeUtil"%>
<%@page import="com.liferay.portal.model.User"%> <%@page import="it.tref.liferay.portos.bo.shared.util.Constants"%>
<%@page import="com.liferay.portal.model.Role"%> <%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="javax.portlet.PortletURL"%>
<%@include file="/html/gestioneattivita/init.jsp"%> <%@include file="/html/gestioneattivita/init.jsp"%>
<% <%
long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
@ -42,19 +37,21 @@ List<UserGroupRole> userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupR
<aui:select name="istruttoreId" label=""> <aui:select name="istruttoreId" label="">
<aui:option label="" value="0" /> <aui:option label="" value="0" />
<% <%
List<Integer> uoUser = UnitaOperativeUtil.getUnitaOperative(user);
for (UserGroupRole userGroupRole: userGroupRoles) { for (UserGroupRole userGroupRole: userGroupRoles) {
if (userGroupRole.getUserId() != istruttore.getUserId()) { if (userGroupRole.getUserId() != istruttore.getUserId()) {
User istruttoreTmp = UserLocalServiceUtil.getUser(userGroupRole.getUserId()); User istruttoreTmp = UserLocalServiceUtil.getUser(userGroupRole.getUserId());
String nominativo = istruttoreTmp.getFullName() List<Integer> uoIstruttore = UnitaOperativeUtil.getUnitaOperative(istruttoreTmp);
+ " - U.O. " if (CollectionUtils.containsAny(uoUser, uoIstruttore)) {
+ StringUtils.join(UnitaOperativeUtil.getUnitaOperative(istruttoreTmp), String nominativo = istruttoreTmp.getFullName() + " - U.O. "
StringPool.COMMA_AND_SPACE) + " - " + StringUtils.join(uoIstruttore, StringPool.COMMA_AND_SPACE) + " - "
+ istruttoreTmp.getScreenName(); + istruttoreTmp.getScreenName();
%> %>
<aui:option label="<%= nominativo %>" value="<%= istruttoreTmp.getUserId() %>" /> <aui:option label="<%= nominativo %>" value="<%= istruttoreTmp.getUserId() %>" />
<% <%
} }
} }
}
%> %>
</aui:select> </aui:select>
</div> </div>

73
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_actions.jsp

@ -1,76 +1,57 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil"%> <%@page import="it.mwg.sismica.bo.shared.util.UnitaOperativeUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.FascicoloURLUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.util.FascicoloURLUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.GestioneFirmeUtil"%> <%@page import="it.tref.liferay.portos.bo.util.GestioneFirmeUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.Constants"%>
<%@page import="it.tref.liferay.portos.bo.util.GenioCivileBaseUtil"%>
<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.WorkflowUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants"%>
<%@page import="com.liferay.portal.kernel.util.ListUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.PraticaUtil"%> <%@page import="it.tref.liferay.portos.bo.util.PraticaUtil"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.liferay.portal.security.permission.ActionKeys"%>
<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.kernel.dao.search.SearchContainer"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.HashMap"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil"%>
<%@include file="/html/gestionefirme/init.jsp"%> <%@include file="/html/gestionefirme/init.jsp"%>
<% <%
SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer"); SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer");
String redirect = ParamUtil.getString(request, "backUrl"); String redirect = ParamUtil.getString(request, "backUrl");
Avviso avviso = null; Avviso avviso = null;
redirect = searchContainer.getIteratorURL().toString(); redirect = searchContainer.getIteratorURL().toString();
ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
avviso = (Avviso) row.getObject(); avviso = (Avviso) row.getObject();
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
List<Integer> unitaOperativeUtente = UnitaOperativeUtil.getUnitaOperative(user); List<Integer> unitaOperativeUtente = UnitaOperativeUtil.getUnitaOperative(user);
boolean inUnitaOperativa = unitaOperativeUtente.contains(intPratica.getUnitaOperativa()) || unitaOperativeUtente.contains(0); boolean inUnitaOperativa = unitaOperativeUtente.contains(intPratica.getUnitaOperativa()) ||
unitaOperativeUtente.contains(0);
%> %>
<portlet:actionURL name="assignaFirma" var="assignaFirmaURL"> <portlet:actionURL name="assignaFirma" var="assignaFirmaURL">
<portlet:param name="mvcPath" value="/html/gestionefirme/view.jsp" /> <portlet:param name="mvcPath" value="/html/gestionefirme/view.jsp" />
<portlet:param name="avvisoId" value="<%=String.valueOf(avviso.getAvvisoId())%>" /> <portlet:param name="avvisoId" value="<%= String.valueOf(avviso.getAvvisoId()) %>" />
<portlet:param name="backURL" value="<%=redirect%>" /> <portlet:param name="backURL" value="<%= redirect %>" />
<portlet:param name="tabs1" value="<%=tabs1%>" /> <portlet:param name="tabs1" value="<%= tabs1 %>" />
</portlet:actionURL> </portlet:actionURL>
<portlet:actionURL name="rilasciaFirma" var="rilasciaFirmaURL"> <portlet:actionURL name="rilasciaFirma" var="rilasciaFirmaURL">
<portlet:param name="mvcPath" value="/html/gestionefirme/view.jsp" /> <portlet:param name="mvcPath" value="/html/gestionefirme/view.jsp" />
<portlet:param name="avvisoId" value="<%=String.valueOf(avviso.getAvvisoId())%>" /> <portlet:param name="avvisoId" value="<%= String.valueOf(avviso.getAvvisoId()) %>" />
<portlet:param name="backURL" value="<%=redirect%>" /> <portlet:param name="backURL" value="<%= redirect %>" />
<portlet:param name="tabs1" value="<%=tabs1%>" /> <portlet:param name="tabs1" value="<%= tabs1 %>" />
</portlet:actionURL> </portlet:actionURL>
<c:if test="<%= avviso.getUserCodiceFiscalePrimaFirma().equalsIgnoreCase(user.getScreenName()) %>">
<c:if test="<%=avviso.getUserCodiceFiscalePrimaFirma().equalsIgnoreCase(user.getScreenName()) %>">
<span class="tooltip-info" title="Assegna al Ruolo"> <span class="tooltip-info" title="Assegna al Ruolo">
<liferay-ui:icon iconCssClass="fa fa-user-times" url="<%=rilasciaFirmaURL%>" linkCssClass="btn btn-action"/> <liferay-ui:icon iconCssClass="fa fa-user-times" url="<%= rilasciaFirmaURL %>" linkCssClass="btn btn-action"/>
</span> </span>
<span class="tooltip-info" title="Apri App di Firma"> <span class="tooltip-info" title="Apri App di Firma">
<liferay-ui:icon iconCssClass="fa fa-pencil" url="portos2://applicazione_firma.exe" linkCssClass="btn btn-action"/> <liferay-ui:icon iconCssClass="fa fa-pencil" url="portos2://applicazione_firma.exe"
linkCssClass="btn btn-action"/>
</span> </span>
</c:if> </c:if>
<c:if test="<%=!avviso.getUserCodiceFiscalePrimaFirma().equalsIgnoreCase(user.getScreenName()) && GestioneFirmeUtil.userCanSignAvviso(user.getUserId(), avviso.getGroupId(), avviso.getAvvisoId()) && inUnitaOperativa %>"> <c:if test="<%= !avviso.getUserCodiceFiscalePrimaFirma().equalsIgnoreCase(user.getScreenName())
<c:if test="<%= Validator.isNotNull(avviso.getTipoDocumento()) %>"> && GestioneFirmeUtil.userCanSignAvviso(user.getUserId(), avviso.getGroupId(), avviso.getAvvisoId())
&& inUnitaOperativa
&& Validator.isNotNull(avviso.getTipoDocumento()) %>">
<span class="tooltip-info" title="Assegna a Me"> <span class="tooltip-info" title="Assegna a Me">
<liferay-ui:icon iconCssClass="fa fa-user-plus" url="<%=assignaFirmaURL %>" linkCssClass="btn btn-action"/> <liferay-ui:icon iconCssClass="fa fa-user-plus" url="<%= assignaFirmaURL %>" linkCssClass="btn btn-action"/>
</span> </span>
</c:if> </c:if>
</c:if> <%
String urlDettaglioPratica = FascicoloURLUtil.getFascicoloViewURL(avviso.getCompanyId(), avviso.getIntPraticaId());
<% %>
String urlDettaglioPratica = FascicoloURLUtil.getFascicoloViewURL(avviso.getCompanyId(), avviso.getIntPraticaId()); <span class="tooltip-info" title="Apri Pratica">
%>
<span class="tooltip-info" title="Apri Pratica">
<% <%
String link_visualizza = "javascript:window.open('" + urlDettaglioPratica + "','_blank')"; String link_visualizza = "javascript:window.open('" + urlDettaglioPratica + "','_blank')";
%> %>
<aui:button value="" id='<%=renderResponse.getNamespace()+"visualizza"%>' icon="fa fa-clipboard" type="button" onclick="<%=link_visualizza %>" cssClass="btn btn-action"/> <aui:button value="" id='<%= renderResponse.getNamespace() + "visualizza" %>' icon="fa fa-clipboard" type="button"
</span> onclick="<%= link_visualizza %>" cssClass="btn btn-action"/>
</span>

15
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp

@ -1,16 +1,13 @@
<%@page import="java.util.Iterator"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.dao.orm.OrderFactoryUtil"%> <%@page import="com.liferay.portal.model.Organization"%>
<%@page import="com.liferay.portal.model.UserGroupRole"%> <%@page import="com.liferay.portal.model.UserGroupRole"%>
<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%> <%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.Role"%> <%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="it.mwg.sismica.bo.shared.util.UnitaOperativeUtil"%>
<%@page import="java.util.Iterator"%>
<%@page import="javax.portlet.PortletURL"%> <%@page import="javax.portlet.PortletURL"%>
<%@page import="org.apache.commons.lang.StringUtils"%> <%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil"%>
<%@page import="com.liferay.portal.model.User"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.Organization"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/html/init.jsp"%> <%@include file="/html/init.jsp"%>
<% <%
PortletURL iteratorURL = liferayPortletResponse.createRenderURL(); PortletURL iteratorURL = liferayPortletResponse.createRenderURL();

8
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/UnitaOperativeUtil.java → liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/mwg/sismica/bo/shared/util/UnitaOperativeUtil.java

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

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

@ -1,11 +1,11 @@
package it.tref.liferay.portos.kaleo.hook.struts; package it.tref.liferay.portos.kaleo.hook.struts;
import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
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.PraticaUtil; import it.tref.liferay.portos.bo.util.PraticaUtil;
import it.tref.liferay.portos.kaleo.model.FormLog; import it.tref.liferay.portos.kaleo.model.FormLog;
import it.tref.liferay.portos.kaleo.service.ClpSerializer; import it.tref.liferay.portos.kaleo.service.ClpSerializer;

Caricamento…
Annulla
Salva