diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties index de86844b..d452a6ce 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties +++ b/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+ portal-dependency-jars=\ axis.jar,\ + commons-collections4.jar,\ + commons-io.jar,\ jaxrpc.jar,\ jstl-api.jar,\ jstl-impl.jar,\ wsdl4j.jar,\ - xml-apis.jar,\ - commons-io.jar + xml-apis.jar portal-dependency-tlds=\ c.tld required-deployment-contexts=\ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java index 1b951492..a7b07a9d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/ControlloPraticaAdvancedSearch.java @@ -1,9 +1,9 @@ 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.service.ControlloPraticaLocalServiceUtil; 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; @@ -49,6 +49,7 @@ import com.liferay.portal.model.Role; import com.liferay.portal.model.User; import com.liferay.portal.service.OrganizationLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil; +import com.liferay.portal.service.RoleLocalServiceUtil; public class ControlloPraticaAdvancedSearch { @@ -579,9 +580,9 @@ public class ControlloPraticaAdvancedSearch { booleanQuery.add(statoPraticaSearchTermQuery, BooleanClauseOccur.MUST); } } - + queryTipoProcedura(request, booleanQuery, searchContext); - + if (Validator.isNotNull(committenteSearch)) { TermQuery committenteSearchTermQuery = TermQueryFactoryUtil.create(searchContext, "committenti", committenteSearch.toUpperCase()); @@ -597,25 +598,25 @@ public class ControlloPraticaAdvancedSearch { istruttoreId); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); } - + if (Validator.isNotNull(geologi) && !geologi.equals(-1L) && !geologi.equals(0L)) { TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "geologi", geologi); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); } - - if (Validator.isNotNull(parereGeologo) && !parereGeologo.equals(-1L)) { + + if (Validator.isNotNull(parereGeologo) && !parereGeologo.equals(-1L)) { TermQuery singleGroupIdQuery = TermQueryFactoryUtil.create(searchContext, "parereGeologo", parereGeologo); booleanQuery.add(singleGroupIdQuery, BooleanClauseOccur.MUST); } - + if (Validator.isNotNull(unitaOperativa) && !unitaOperativa.equals("-1")) { TermQuery uoQuery = TermQueryFactoryUtil.create(searchContext, "unitaOperativa", unitaOperativa); booleanQuery.add(uoQuery, BooleanClauseOccur.MUST); } - + if (Validator.isNotNull(dataDa) && Validator.isNotNull(dataAl)) { Date dataDaApp = DATE_FORMAT_STRING.parse(dataDa); Date dataAlApp = DATE_FORMAT_STRING.parse(dataAl); @@ -646,12 +647,12 @@ public class ControlloPraticaAdvancedSearch { "controlloObbligatorio", controlloObbligatorioSearch); booleanQuery.add(controlloObbligatorioTermQuery, BooleanClauseOccur.MUST); } - + } catch (ParseException | java.text.ParseException e) { _log.error(e, e); } } - + private static void queryTipoProcedura(HttpServletRequest request, BooleanQuery booleanQuery, SearchContext searchContext) throws ParseException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java index d03b03f5..a25c016c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java +++ b/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; +import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil; import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.Asseverazione; 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.shared.util.ConfigurazioneConstants; 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.Constants; import it.tref.liferay.portos.mailmanager.model.Email; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java index e8c440ed..777a5792 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java +++ b/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; +import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil; import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.DettPratica; 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.util.StatoPraticaConstants; 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.PraticaUtil; import it.tref.liferay.portos.bo.util.ValidazionePraticaUtil; @@ -263,7 +263,7 @@ public class FascicoloPortlet extends MVCPortlet { String geologi = ParamUtil.getString(actionRequest, "geologi"); String parereGeologo = ParamUtil.getString(actionRequest, "parereGeologo"); String istruttore = ParamUtil.getString(actionRequest, "istruttore"); - + if (Validator.isNotNull(dataRichiestaInizio)) { String[] dataRichiestaInizioSplitted = dataRichiestaInizio.split(StringPool.FORWARD_SLASH); actionResponse.setRenderParameter("dataRichiestaInizioDay", dataRichiestaInizioSplitted[0]); @@ -314,7 +314,7 @@ public class FascicoloPortlet extends MVCPortlet { } actionResponse.setRenderParameter("ordinaPer", ordinaPer); actionResponse.setRenderParameter("ordinaTipo", ordinaTipo); - + actionResponse.setRenderParameter("tipoProcedura", tipoProcedura); actionResponse.setRenderParameter("unitaOperativa", unitaOperativa); actionResponse.setRenderParameter("geologi", geologi); @@ -325,9 +325,9 @@ public class FascicoloPortlet extends MVCPortlet { @Override public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, PortletException { - + ThemeDisplay themeDisplay = (ThemeDisplay) resourceRequest.getAttribute(WebKeys.THEME_DISPLAY); - + Locale locale = themeDisplay.getLocale(); User user = themeDisplay.getUser(); @@ -396,14 +396,14 @@ public class FascicoloPortlet extends MVCPortlet { writeJSON(resourceRequest, resourceResponse, jsonArray); }else if ("unitaOperative".equals(id)) { JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); - + for(int i=1; i<11; i++) { JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); jsonObject.put("uoId", i); jsonObject.put("descLong", i); jsonArray.put(jsonObject); } - + writeJSON(resourceRequest, resourceResponse, jsonArray); }else if ("comuni".equals(id)) { String provinciaId = ParamUtil.getString(resourceRequest, "provinciaId"); @@ -435,7 +435,7 @@ public class FascicoloPortlet extends MVCPortlet { if (Validator.isNotNull(uoId) && !uoId.equals("-1")) { List organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId()); List tecniciIstruttori = new ArrayList(); - + for(Organization org : organizationList) { Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_istruttore"); List istruttori = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole( @@ -461,7 +461,7 @@ public class FascicoloPortlet extends MVCPortlet { } } } - + List tecniciIstruttoriSorted = new ArrayList(); for (UserGroupRole tecnico : tecniciIstruttori) { IstruttoreBean istruttore = new IstruttoreBean(); @@ -469,9 +469,9 @@ public class FascicoloPortlet extends MVCPortlet { istruttore.setDenominazione(tecnico.getUser().getFullName()); tecniciIstruttoriSorted.add(istruttore); } - + Collections.sort(tecniciIstruttoriSorted); - + for (IstruttoreBean istruttore : tecniciIstruttoriSorted) { JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); jsonObject.put("istruttoreId", istruttore.getIdIstruttore()); @@ -479,19 +479,19 @@ public class FascicoloPortlet extends MVCPortlet { jsonArray.put(jsonObject); } } - + writeJSON(resourceRequest, resourceResponse, jsonArray); - + }else if ("geologo".equals(id)) { JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); List organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId()); List geologi = new ArrayList(); - + for(Organization org : organizationList) { - Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_geologo"); + Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_geologo"); List geologiUsers = UserLocalServiceUtil.getRoleUsers(role.getRoleId()); - - for (User userGroupRole : geologiUsers) { + + for (User userGroupRole : geologiUsers) { if (geologi.isEmpty()) { geologi.add(userGroupRole); } else { @@ -508,17 +508,17 @@ public class FascicoloPortlet extends MVCPortlet { } } } - + for (User geo : geologi) { JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); jsonObject.put("geologoId", geo.getUserId()); jsonObject.put("descLong", geo.getFullName()); jsonArray.put(jsonObject); } - - + + writeJSON(resourceRequest, resourceResponse, jsonArray); - + } else if ("exportRicerca".equals(id)) { String csv = StringPool.BLANK; HttpServletRequest request = PortalUtil.getHttpServletRequest(resourceRequest); @@ -642,10 +642,10 @@ public class FascicoloPortlet extends MVCPortlet { } return sb.toString(); } - + public void setBollettinoImposta(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException, SystemException { - + try { long idPagamento = ParamUtil.getLong(actionRequest, "idPagamento"); String numeroBollettino = ParamUtil.getString(actionRequest, "numeroBollettino"); @@ -665,5 +665,5 @@ public class FascicoloPortlet extends MVCPortlet { throw new SystemException(e); } } - + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaIstruttorePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaIstruttorePortlet.java index 795b3ae6..a668f8f6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaIstruttorePortlet.java +++ b/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; +import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil; import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.DettPratica; 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.shared.bean.IstruttoreBean; 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.IOException; @@ -105,7 +105,7 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet { String geologi = ParamUtil.getString(actionRequest, "geologi"); String parereGeologo = ParamUtil.getString(actionRequest, "parereGeologo"); String istruttore = ParamUtil.getString(actionRequest, "istruttore"); - + actionResponse.setRenderParameter("numeroProgetto", numeroProgetto); actionResponse.setRenderParameter("tipoPratica", tipoPratica); actionResponse.setRenderParameter("statoPratica", statoPratica); @@ -264,7 +264,7 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet { } // ADT BUG-ID=16 Sezione Pratiche Assegnate User user = themeDisplay.getUser(); - try{ + try { if ("comuniForUfficio".equals(resourceId)) { String ufficio = ParamUtil.getString(resourceRequest, "ufficioId"); JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); @@ -296,29 +296,30 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet { e.printStackTrace(); } } - }else if ("province".equals(resourceId)) { + } else if ("province".equals(resourceId)) { JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); List province = TerritorioLocalServiceUtil.getActiveProvince(); for (String codiceProvincia : province) { 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("descLong", provincia.getSigla() + " - " + provincia.getProvincia()); jsonArray.put(jsonObject); } writeJSON(resourceRequest, resourceResponse, jsonArray); - }else if ("unitaOperative".equals(resourceId)) { + } else if ("unitaOperative".equals(resourceId)) { JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); - - for(int i=1; i<11; i++) { + + for (int i = 1; i < 11; i++) { JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); jsonObject.put("uoId", i); jsonObject.put("descLong", i); jsonArray.put(jsonObject); } - + writeJSON(resourceRequest, resourceResponse, jsonArray); - }else if ("comuni".equals(resourceId)) { + } else if ("comuni".equals(resourceId)) { String provinciaId = ParamUtil.getString(resourceRequest, "provinciaId"); JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); if (Validator.isNotNull(provinciaId) && !provinciaId.equals("0")) { @@ -342,39 +343,40 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet { } } writeJSON(resourceRequest, resourceResponse, jsonArray); - }else if ("istruttore".equals(resourceId)) { + } else if ("istruttore".equals(resourceId)) { Integer uoId = ParamUtil.getInteger(resourceRequest, "uoId"); JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); if (Validator.isNotNull(uoId) && !uoId.equals("-1")) { - List organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId()); - List tecniciIstruttori = new ArrayList(); - - for(Organization org : organizationList) { + List organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user + .getUserId()); + List tecniciIstruttori = new ArrayList(); + + for (Organization org : organizationList) { Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_istruttore"); - List istruttori = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole( + List istruttori = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole( org.getGroupId(), role.getRoleId()); for (UserGroupRole userGroupRole : istruttori) { User istruttore = userGroupRole.getUser(); List unitaOperativeIstruttore = UnitaOperativeUtil.getUnitaOperative(istruttore); - if(unitaOperativeIstruttore.contains(uoId)){ + if (unitaOperativeIstruttore.contains(uoId)) { if (tecniciIstruttori.isEmpty()) { tecniciIstruttori.add(userGroupRole); } else { boolean isPresent = false; - for(UserGroupRole tecnico : tecniciIstruttori) { + for (UserGroupRole tecnico : tecniciIstruttori) { if (tecnico.getUserId() == userGroupRole.getUserId()) { isPresent = true; break; } } - if(!isPresent){ + if (!isPresent) { tecniciIstruttori.add(userGroupRole); } } } } } - + List tecniciIstruttoriSorted = new ArrayList(); for (UserGroupRole tecnico : tecniciIstruttori) { IstruttoreBean istruttore = new IstruttoreBean(); @@ -382,9 +384,9 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet { istruttore.setDenominazione(tecnico.getUser().getFullName()); tecniciIstruttoriSorted.add(istruttore); } - + Collections.sort(tecniciIstruttoriSorted); - + for (IstruttoreBean istruttore : tecniciIstruttoriSorted) { JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); jsonObject.put("istruttoreId", istruttore.getIdIstruttore()); @@ -392,52 +394,52 @@ public class GestioneAttivitaIstruttorePortlet extends MVCPortlet { jsonArray.put(jsonObject); } } - + writeJSON(resourceRequest, resourceResponse, jsonArray); - - }else if ("geologo".equals(resourceId)) { + + } else if ("geologo".equals(resourceId)) { JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); - List organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId()); - List geologi = new ArrayList(); - - for(Organization org : organizationList) { - Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_geologo"); + List organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user + .getUserId()); + List geologi = new ArrayList(); + + for (Organization org : organizationList) { + Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_geologo"); List geologiUsers = UserLocalServiceUtil.getRoleUsers(role.getRoleId()); - - for (User userGroupRole : geologiUsers) { + + for (User userGroupRole : geologiUsers) { if (geologi.isEmpty()) { geologi.add(userGroupRole); } else { boolean isPresent = false; - for(User geo : geologi) { + for (User geo : geologi) { if (geo.getUserId() == userGroupRole.getUserId()) { isPresent = true; break; } } - if(!isPresent){ + if (!isPresent) { geologi.add(userGroupRole); } } } } - + for (User geo : geologi) { JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); jsonObject.put("geologoId", geo.getUserId()); jsonObject.put("descLong", geo.getFullName()); jsonArray.put(jsonObject); } - - + writeJSON(resourceRequest, resourceResponse, jsonArray); - + } - }catch (Exception e) { + } catch (Exception e) { _log.error(e, e); throw new IOException(e); } - + super.serveResource(resourceRequest, resourceResponse); } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java index 63a59a20..ca0cd433 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java +++ b/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; +import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil; import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.ControlloPratica; 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.util.ActionKeys; 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.MailUtil; import it.tref.liferay.portos.bo.util.WorkflowUtil; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java index f211f16b..c3da17d7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java +++ b/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; 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.SismicaUtil; 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.StatoPraticaConstants; 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.AzioniPraticheUtil; import it.tref.liferay.portos.bo.util.GestioneFirmeUtil; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java index 69650b63..853d6eeb 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java +++ b/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; +import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil; import it.tref.liferay.portos.bo.NoSuchIntPraticaException; import it.tref.liferay.portos.bo.model.AllegatoManuale; 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.FirmeUtil; 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.AzioniPraticheUtil; import it.tref.liferay.portos.bo.util.Constants; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 532b60e9..76cf04c0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=3359 - build.date=1631691092406 + build.number=3360 + build.date=1631698031653 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_cambio_istruttore.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_cambio_istruttore.jsp index 78f21a34..af86a325 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/actions/action_cambio_istruttore.jsp +++ b/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="it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil"%> +<%@page import="org.apache.commons.collections4.CollectionUtils"%> <%@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.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="java.util.ArrayList"%> -<%@page import="com.liferay.portal.model.User"%> -<%@page import="com.liferay.portal.model.Role"%> -<%@page import="javax.portlet.PortletURL"%> +<%@page import="it.mwg.sismica.bo.shared.util.UnitaOperativeUtil"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.Constants"%> +<%@page import="org.apache.commons.lang.StringUtils"%> <%@include file="/html/gestioneattivita/init.jsp"%> <% long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); @@ -42,17 +37,19 @@ List userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupR <% + List uoUser = UnitaOperativeUtil.getUnitaOperative(user); for (UserGroupRole userGroupRole: userGroupRoles) { if (userGroupRole.getUserId() != istruttore.getUserId()) { User istruttoreTmp = UserLocalServiceUtil.getUser(userGroupRole.getUserId()); - String nominativo = istruttoreTmp.getFullName() - + " - U.O. " - + StringUtils.join(UnitaOperativeUtil.getUnitaOperative(istruttoreTmp), - StringPool.COMMA_AND_SPACE) + " - " - + istruttoreTmp.getScreenName(); + List uoIstruttore = UnitaOperativeUtil.getUnitaOperative(istruttoreTmp); + if (CollectionUtils.containsAny(uoUser, uoIstruttore)) { + String nominativo = istruttoreTmp.getFullName() + " - U.O. " + + StringUtils.join(uoIstruttore, StringPool.COMMA_AND_SPACE) + " - " + + istruttoreTmp.getScreenName(); %> - + <% + } } } %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_actions.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_actions.jsp index f99ac98b..c46865df 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_actions.jsp +++ b/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 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.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="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"%> - <% SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer"); String redirect = ParamUtil.getString(request, "backUrl"); Avviso avviso = null; - redirect = searchContainer.getIteratorURL().toString(); - ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); avviso = (Avviso) row.getObject(); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId()); List unitaOperativeUtente = UnitaOperativeUtil.getUnitaOperative(user); -boolean inUnitaOperativa = unitaOperativeUtente.contains(intPratica.getUnitaOperativa()) || unitaOperativeUtente.contains(0); +boolean inUnitaOperativa = unitaOperativeUtente.contains(intPratica.getUnitaOperativa()) || + unitaOperativeUtente.contains(0); %> - - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - <% - String urlDettaglioPratica = FascicoloURLUtil.getFascicoloViewURL(avviso.getCompanyId(), avviso.getIntPraticaId()); - %> - + + + + + + + + + + + + + +<% +String urlDettaglioPratica = FascicoloURLUtil.getFascicoloViewURL(avviso.getCompanyId(), avviso.getIntPraticaId()); +%> + <% String link_visualizza = "javascript:window.open('" + urlDettaglioPratica + "','_blank')"; %> - - - + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp index 7d1a8682..06e0c3e3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp @@ -1,16 +1,13 @@ -<%@page import="java.util.Iterator"%> -<%@page import="com.liferay.portal.kernel.dao.orm.OrderFactoryUtil"%> +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.liferay.portal.model.Organization"%> <%@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.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="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"%> <% PortletURL iteratorURL = liferayPortletResponse.createRenderURL(); diff --git a/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/UnitaOperativeUtil.java b/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/mwg/sismica/bo/shared/util/UnitaOperativeUtil.java similarity index 60% rename from liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/UnitaOperativeUtil.java rename to liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/mwg/sismica/bo/shared/util/UnitaOperativeUtil.java index 8fb04cd8..dae7ca63 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/UnitaOperativeUtil.java +++ b/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.List; @@ -7,9 +9,9 @@ import com.liferay.portal.model.User; public class UnitaOperativeUtil { public static List getUnitaOperative(User user) { + List ret = new ArrayList<>(); - short uo[] = (short[]) user.getExpandoBridge().getAttribute( - Constants.USER_CUSTOM_FIELD_UNITA_OPERATIVE); + 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]); } diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java index 799f34b4..7b642561 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java +++ b/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; +import it.mwg.sismica.bo.shared.util.UnitaOperativeUtil; import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil; 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.UnitaOperativeUtil; import it.tref.liferay.portos.bo.util.PraticaUtil; import it.tref.liferay.portos.kaleo.model.FormLog; import it.tref.liferay.portos.kaleo.service.ClpSerializer;