|
|
@ -88,7 +88,7 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
String statoPratica = ParamUtil.getString(actionRequest, "statoPratica"); |
|
|
|
String statoPratica = ParamUtil.getString(actionRequest, "statoPratica"); |
|
|
|
String committente = ParamUtil.getString(actionRequest, "committente"); |
|
|
|
String committente = ParamUtil.getString(actionRequest, "committente"); |
|
|
|
String soggettiInterconnessi = ParamUtil.getString(actionRequest, "soggettiInterconnessi"); |
|
|
|
String soggettiInterconnessi = ParamUtil.getString(actionRequest, "soggettiInterconnessi"); |
|
|
|
//ADT BUG BO ID = 8
|
|
|
|
// ADT BUG BO ID = 8
|
|
|
|
String istruttore = ParamUtil.getString(actionRequest, "istruttore"); |
|
|
|
String istruttore = ParamUtil.getString(actionRequest, "istruttore"); |
|
|
|
String dataRichiestaInizio = ParamUtil.getString(actionRequest, "dataRichiestaInizio"); |
|
|
|
String dataRichiestaInizio = ParamUtil.getString(actionRequest, "dataRichiestaInizio"); |
|
|
|
String dataRichiestaFine = ParamUtil.getString(actionRequest, "dataRichiestaFine"); |
|
|
|
String dataRichiestaFine = ParamUtil.getString(actionRequest, "dataRichiestaFine"); |
|
|
@ -103,12 +103,12 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
actionResponse.setRenderParameter("numeroProgetto", numeroProgetto); |
|
|
|
actionResponse.setRenderParameter("numeroProgetto", numeroProgetto); |
|
|
|
actionResponse.setRenderParameter("protocollo", protocollo); |
|
|
|
actionResponse.setRenderParameter("protocollo", protocollo); |
|
|
|
|
|
|
|
|
|
|
|
//ADT - BUG-11 Aggiunta filtro ricerca
|
|
|
|
// ADT - BUG-11 Aggiunta filtro ricerca
|
|
|
|
if(Validator.isNotNull(tipoPratica)){ |
|
|
|
if (Validator.isNotNull(tipoPratica)) { |
|
|
|
if("co".equalsIgnoreCase(tipoPratica)){ |
|
|
|
if ("co".equalsIgnoreCase(tipoPratica)) { |
|
|
|
tipoPratica = Constants.TIPO_PRATICA_DEPOSITO; |
|
|
|
tipoPratica = Constants.TIPO_PRATICA_DEPOSITO; |
|
|
|
actionResponse.setRenderParameter("controlloObbligatorio", Boolean.TRUE.toString()); |
|
|
|
actionResponse.setRenderParameter("controlloObbligatorio", Boolean.TRUE.toString()); |
|
|
|
} else if("sorteggio".equalsIgnoreCase(tipoPratica)){ |
|
|
|
} else if ("sorteggio".equalsIgnoreCase(tipoPratica)) { |
|
|
|
tipoPratica = Constants.TIPO_PRATICA_DEPOSITO; |
|
|
|
tipoPratica = Constants.TIPO_PRATICA_DEPOSITO; |
|
|
|
actionResponse.setRenderParameter("sorteggiata", Boolean.TRUE.toString()); |
|
|
|
actionResponse.setRenderParameter("sorteggiata", Boolean.TRUE.toString()); |
|
|
|
} |
|
|
|
} |
|
|
@ -126,20 +126,20 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
if (dataRichiestaInizio != null && !dataRichiestaInizio.equals("")) { |
|
|
|
if (dataRichiestaInizio != null && !dataRichiestaInizio.equals("")) { |
|
|
|
String[] dataRichiestaInizioSplitted = dataRichiestaInizio.split("/"); |
|
|
|
String[] dataRichiestaInizioSplitted = dataRichiestaInizio.split("/"); |
|
|
|
|
|
|
|
|
|
|
|
int mounth = Integer.valueOf(dataRichiestaInizioSplitted[1]) -1; |
|
|
|
int mounth = Integer.valueOf(dataRichiestaInizioSplitted[1]) - 1; |
|
|
|
|
|
|
|
|
|
|
|
actionResponse.setRenderParameter("dataRichiestaInizioDay", dataRichiestaInizioSplitted[0]); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaInizioDay", dataRichiestaInizioSplitted[0]); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaInizioMonth", mounth+""); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaInizioMonth", mounth + ""); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaInizioYear", dataRichiestaInizioSplitted[2]); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaInizioYear", dataRichiestaInizioSplitted[2]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (dataRichiestaFine != null && !dataRichiestaFine.equals("")) { |
|
|
|
if (dataRichiestaFine != null && !dataRichiestaFine.equals("")) { |
|
|
|
String[] dataRichiestaFineSplitted = dataRichiestaFine.split("/"); |
|
|
|
String[] dataRichiestaFineSplitted = dataRichiestaFine.split("/"); |
|
|
|
|
|
|
|
|
|
|
|
int mounth = Integer.valueOf(dataRichiestaFineSplitted[1]) -1; |
|
|
|
int mounth = Integer.valueOf(dataRichiestaFineSplitted[1]) - 1; |
|
|
|
|
|
|
|
|
|
|
|
actionResponse.setRenderParameter("dataRichiestaFineDay", dataRichiestaFineSplitted[0]); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaFineDay", dataRichiestaFineSplitted[0]); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaFineMonth", mounth+""); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaFineMonth", mounth + ""); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaFineYear", dataRichiestaFineSplitted[2]); |
|
|
|
actionResponse.setRenderParameter("dataRichiestaFineYear", dataRichiestaFineSplitted[2]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -158,7 +158,8 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
long istruttoreId = ParamUtil.getLong(actionRequest, "istruttoreId"); |
|
|
|
long istruttoreId = ParamUtil.getLong(actionRequest, "istruttoreId"); |
|
|
|
try { |
|
|
|
try { |
|
|
|
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId); |
|
|
|
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId); |
|
|
|
if (Validator.isNotNull(intPratica.getStatusByUserId()) && intPratica.getStatusByUserId() != istruttoreId) { |
|
|
|
if (Validator.isNotNull(intPratica.getStatusByUserId()) |
|
|
|
|
|
|
|
&& intPratica.getStatusByUserId() != istruttoreId) { |
|
|
|
IntPraticaServiceUtil.cambiaIstruttore(intPraticaId, controlloPraticaId, istruttoreId); |
|
|
|
IntPraticaServiceUtil.cambiaIstruttore(intPraticaId, controlloPraticaId, istruttoreId); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
throw new SystemException("cambio istruttore non possibile"); |
|
|
|
throw new SystemException("cambio istruttore non possibile"); |
|
|
@ -169,35 +170,45 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// public void assegnamiTask(ActionRequest actionRequest, ActionResponse actionResponse) {
|
|
|
|
// public void assegnamiTask(ActionRequest actionRequest, ActionResponse
|
|
|
|
|
|
|
|
// actionResponse) {
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// long controlloPraticaId = ParamUtil.getLong(actionRequest, "controlloPraticaId");
|
|
|
|
// long controlloPraticaId = ParamUtil.getLong(actionRequest,
|
|
|
|
|
|
|
|
// "controlloPraticaId");
|
|
|
|
// long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
|
|
|
|
// long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// try {
|
|
|
|
// try {
|
|
|
|
// ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
|
|
|
|
// ServiceContext serviceContext =
|
|
|
|
|
|
|
|
// ServiceContextFactory.getInstance(actionRequest);
|
|
|
|
// ControlloPratica controlloPratica =
|
|
|
|
// ControlloPratica controlloPratica =
|
|
|
|
// ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
|
|
|
|
// ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// IntPratica intPratica =
|
|
|
|
// IntPratica intPratica =
|
|
|
|
// IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId());
|
|
|
|
// IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId());
|
|
|
|
// Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
|
|
|
|
// Territorio territorio =
|
|
|
|
|
|
|
|
// TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
|
|
|
|
// IntPraticaPermission.check(PermissionThreadLocal.getPermissionChecker(),
|
|
|
|
// IntPraticaPermission.check(PermissionThreadLocal.getPermissionChecker(),
|
|
|
|
// territorio.getGroupId(),
|
|
|
|
// territorio.getGroupId(),
|
|
|
|
// ActionKeys.ASSEGNA_A_ME);
|
|
|
|
// ActionKeys.ASSEGNA_A_ME);
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// WorkflowTask lastWorkflowTask =
|
|
|
|
// WorkflowTask lastWorkflowTask =
|
|
|
|
// WorkflowUtil.getLastTask(controlloPratica.getCompanyId(), controlloPratica.getGroupId(), null,
|
|
|
|
// WorkflowUtil.getLastTask(controlloPratica.getCompanyId(),
|
|
|
|
|
|
|
|
// controlloPratica.getGroupId(), null,
|
|
|
|
// controlloPratica);
|
|
|
|
// controlloPratica);
|
|
|
|
// if (lastWorkflowTask != null && lastWorkflowTask.getWorkflowTaskId() == workflowTaskId
|
|
|
|
// if (lastWorkflowTask != null && lastWorkflowTask.getWorkflowTaskId() ==
|
|
|
|
|
|
|
|
// workflowTaskId
|
|
|
|
// && !lastWorkflowTask.getWorkflowTaskAssignees().isEmpty()) {
|
|
|
|
// && !lastWorkflowTask.getWorkflowTaskAssignees().isEmpty()) {
|
|
|
|
// boolean assegnazionePossibile = false;
|
|
|
|
// boolean assegnazionePossibile = false;
|
|
|
|
// for (WorkflowTaskAssignee workflowTaskAssignee : lastWorkflowTask.getWorkflowTaskAssignees()) {
|
|
|
|
// for (WorkflowTaskAssignee workflowTaskAssignee :
|
|
|
|
// if (workflowTaskAssignee.getAssigneeClassName().equalsIgnoreCase(Role.class.getName())
|
|
|
|
// lastWorkflowTask.getWorkflowTaskAssignees()) {
|
|
|
|
// && UserGroupRoleLocalServiceUtil.hasUserGroupRole(serviceContext.getUserId(),
|
|
|
|
// if
|
|
|
|
// controlloPratica.getGroupId(), workflowTaskAssignee.getAssigneeClassPK(), true)) {
|
|
|
|
// (workflowTaskAssignee.getAssigneeClassName().equalsIgnoreCase(Role.class.getName())
|
|
|
|
|
|
|
|
// &&
|
|
|
|
|
|
|
|
// UserGroupRoleLocalServiceUtil.hasUserGroupRole(serviceContext.getUserId(),
|
|
|
|
|
|
|
|
// controlloPratica.getGroupId(), workflowTaskAssignee.getAssigneeClassPK(),
|
|
|
|
|
|
|
|
// true)) {
|
|
|
|
// assegnazionePossibile = true;
|
|
|
|
// assegnazionePossibile = true;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
@ -207,7 +218,8 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
// workflowTaskId, serviceContext.getUserId(), StringPool.BLANK, null,
|
|
|
|
// workflowTaskId, serviceContext.getUserId(), StringPool.BLANK, null,
|
|
|
|
// WorkflowUtil.getWorkflowContext(controlloPratica));
|
|
|
|
// WorkflowUtil.getWorkflowContext(controlloPratica));
|
|
|
|
// } else {
|
|
|
|
// } else {
|
|
|
|
// throw new SystemException("assegnazione task non possibile per il ruolo");
|
|
|
|
// throw new
|
|
|
|
|
|
|
|
// SystemException("assegnazione task non possibile per il ruolo");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// } else {
|
|
|
|
// throw new SystemException("assegnazione task non possibile");
|
|
|
|
// throw new SystemException("assegnazione task non possibile");
|
|
|
@ -225,14 +237,15 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); |
|
|
|
ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); |
|
|
|
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); |
|
|
|
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil |
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId()); |
|
|
|
.getControlloPratica(controlloPraticaId); |
|
|
|
|
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica |
|
|
|
|
|
|
|
.getIntPraticaId()); |
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); |
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); |
|
|
|
IntPraticaPermission.check(PermissionThreadLocal.getPermissionChecker(), territorio.getGroupId(), |
|
|
|
IntPraticaPermission.check(PermissionThreadLocal.getPermissionChecker(), territorio.getGroupId(), |
|
|
|
ActionKeys.ASSEGNA_AL_RUOLO); |
|
|
|
ActionKeys.ASSEGNA_AL_RUOLO); |
|
|
|
WorkflowTask lastWorkflowTask = |
|
|
|
WorkflowTask lastWorkflowTask = WorkflowUtil.getLastTask(controlloPratica.getCompanyId(), |
|
|
|
WorkflowUtil.getLastTask(controlloPratica.getCompanyId(), controlloPratica.getGroupId(), null, |
|
|
|
controlloPratica.getGroupId(), null, controlloPratica); |
|
|
|
controlloPratica); |
|
|
|
|
|
|
|
if (lastWorkflowTask != null && lastWorkflowTask.getWorkflowTaskId() == workflowTaskId |
|
|
|
if (lastWorkflowTask != null && lastWorkflowTask.getWorkflowTaskId() == workflowTaskId |
|
|
|
&& !lastWorkflowTask.getWorkflowTaskAssignees().isEmpty()) { |
|
|
|
&& !lastWorkflowTask.getWorkflowTaskAssignees().isEmpty()) { |
|
|
|
Role role = null; |
|
|
|
Role role = null; |
|
|
@ -251,8 +264,9 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WorkflowTaskManagerUtil.assignWorkflowTaskToRole(controlloPratica.getCompanyId(), serviceContext.getUserId(), |
|
|
|
WorkflowTaskManagerUtil.assignWorkflowTaskToRole(controlloPratica.getCompanyId(), |
|
|
|
workflowTaskId, role.getRoleId(), StringPool.BLANK, null, WorkflowUtil.getWorkflowContext(controlloPratica)); |
|
|
|
serviceContext.getUserId(), workflowTaskId, role.getRoleId(), StringPool.BLANK, null, |
|
|
|
|
|
|
|
WorkflowUtil.getWorkflowContext(controlloPratica)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
throw new SystemException("riassegnare al ruolo non possibile"); |
|
|
|
throw new SystemException("riassegnare al ruolo non possibile"); |
|
|
|
} |
|
|
|
} |
|
|
@ -293,8 +307,9 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
serviceContext.setCreateDate(new Date()); |
|
|
|
serviceContext.setCreateDate(new Date()); |
|
|
|
serviceContext.setModifiedDate(new Date()); |
|
|
|
serviceContext.setModifiedDate(new Date()); |
|
|
|
if (ParereGeologoLocalServiceUtil.countByIntPraticaIdParereVuoto(intPraticaId) == 0) { |
|
|
|
if (ParereGeologoLocalServiceUtil.countByIntPraticaIdParereVuoto(intPraticaId) == 0) { |
|
|
|
ParereGeologo parereGeologo=ParereGeologoServiceUtil.addParereGeologo(geologoId, intPraticaId, dettPraticaId, serviceContext); |
|
|
|
ParereGeologo parereGeologo = ParereGeologoServiceUtil.addParereGeologo(geologoId, |
|
|
|
//ADT: aggiunta notifica geologo
|
|
|
|
intPraticaId, dettPraticaId, serviceContext); |
|
|
|
|
|
|
|
// ADT: aggiunta notifica geologo
|
|
|
|
MailUtil.invioNotificaGeologo(parereGeologo, serviceContext); |
|
|
|
MailUtil.invioNotificaGeologo(parereGeologo, serviceContext); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
throw new PortalException("parere geologo gia presente"); |
|
|
|
throw new PortalException("parere geologo gia presente"); |
|
|
@ -312,20 +327,22 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId"); |
|
|
|
long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId"); |
|
|
|
long controlloPraticaId = ParamUtil.getLong(actionRequest, "controlloPraticaId"); |
|
|
|
long controlloPraticaId = ParamUtil.getLong(actionRequest, "controlloPraticaId"); |
|
|
|
long lastDettPraticaId = ParamUtil.getLong(actionRequest, "lastDettPraticaId"); |
|
|
|
long lastDettPraticaId = ParamUtil.getLong(actionRequest, "lastDettPraticaId"); |
|
|
|
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); |
|
|
|
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil |
|
|
|
|
|
|
|
.getControlloPratica(controlloPraticaId); |
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); |
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); |
|
|
|
if (lastDettPraticaId != controlloPratica.getDettPraticaId() |
|
|
|
if (lastDettPraticaId != controlloPratica.getDettPraticaId() |
|
|
|
&& intPratica.getStatusByUserId() == serviceContext.getUserId()) { |
|
|
|
&& intPratica.getStatusByUserId() == serviceContext.getUserId()) { |
|
|
|
//ADT: BUG ID=5
|
|
|
|
// ADT: BUG ID=5
|
|
|
|
ControlloPraticaLocalServiceUtil.addPraticheAlControlloVarianti(controlloPraticaId, lastDettPraticaId,serviceContext); |
|
|
|
ControlloPraticaLocalServiceUtil.addPraticheAlControlloVarianti(controlloPraticaId, |
|
|
|
|
|
|
|
lastDettPraticaId, serviceContext); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
SessionErrors.add(actionRequest, "error-aggiunta-pratiche-al-controllo"); |
|
|
|
SessionErrors.add(actionRequest, "error-aggiunta-pratiche-al-controllo"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, |
|
|
|
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) |
|
|
|
PortletException { |
|
|
|
throws IOException, PortletException { |
|
|
|
|
|
|
|
|
|
|
|
ThemeDisplay themeDisplay = (ThemeDisplay) resourceRequest.getAttribute(WebKeys.THEME_DISPLAY); |
|
|
|
ThemeDisplay themeDisplay = (ThemeDisplay) resourceRequest.getAttribute(WebKeys.THEME_DISPLAY); |
|
|
|
Locale locale = themeDisplay.getLocale(); |
|
|
|
Locale locale = themeDisplay.getLocale(); |
|
|
@ -344,19 +361,21 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
csv = exportToCSV(locale, resourceRequest, true, user); |
|
|
|
csv = exportToCSV(locale, resourceRequest, true, user); |
|
|
|
} else if (cmd.equals("po")) { |
|
|
|
} else if (cmd.equals("po")) { |
|
|
|
csv = exportToCSV(locale, resourceRequest, false, user); |
|
|
|
csv = exportToCSV(locale, resourceRequest, false, user); |
|
|
|
} else if (cmd.equals("exportRicercaMieAttivita") || cmd.equals("exportRicercaMieiRuoli") || cmd.equals("exportRicercaAltreAttivita") || cmd.equals("exportRicercaAttivitaConcluse")) { |
|
|
|
} else if (cmd.equals("exportRicercaMieAttivita") || cmd.equals("exportRicercaMieiRuoli") |
|
|
|
|
|
|
|
|| cmd.equals("exportRicercaAltreAttivita") || cmd.equals("exportRicercaAttivitaConcluse")) { |
|
|
|
csv = exportSearch(locale, resourceRequest, user, cmd); |
|
|
|
csv = exportSearch(locale, resourceRequest, user, cmd); |
|
|
|
} |
|
|
|
} |
|
|
|
//ADT BUG BO ID= 1 SEZIONE ATTIVIT<EFBFBD>
|
|
|
|
// ADT BUG BO ID= 1 SEZIONE ATTIVIT<EFBFBD>
|
|
|
|
if ("comuniForUfficio".equals(id)) { |
|
|
|
if ("comuniForUfficio".equals(id)) { |
|
|
|
String ufficio = ParamUtil.getString(resourceRequest, "ufficioId"); |
|
|
|
String ufficio = ParamUtil.getString(resourceRequest, "ufficioId"); |
|
|
|
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); |
|
|
|
JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); |
|
|
|
List<Comune> comuni; |
|
|
|
List<Comune> comuni; |
|
|
|
if (Validator.isNotNull(ufficio) && !ufficio.equals("0")) { |
|
|
|
if (Validator.isNotNull(ufficio) && !ufficio.equals("0")) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
if(!ufficio.equals("-1")){ |
|
|
|
if (!ufficio.equals("-1")) { |
|
|
|
long ufficioId = Long.parseLong(ufficio); |
|
|
|
long ufficioId = Long.parseLong(ufficio); |
|
|
|
comuni = ComuneLocalServiceUtil.getComuniForOrganizationByUserIdUfficioId(user.getUserId(), ufficioId); |
|
|
|
comuni = ComuneLocalServiceUtil.getComuniForOrganizationByUserIdUfficioId( |
|
|
|
|
|
|
|
user.getUserId(), ufficioId); |
|
|
|
for (Comune comune : comuni) { |
|
|
|
for (Comune comune : comuni) { |
|
|
|
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); |
|
|
|
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); |
|
|
|
jsonObject.put("comuneId", comune.getComuneId()); |
|
|
|
jsonObject.put("comuneId", comune.getComuneId()); |
|
|
@ -379,7 +398,6 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
catch (Exception e) { |
|
|
|
catch (Exception e) { |
|
|
|
// TODO Auto-generated catch block
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
@ -394,7 +412,6 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
// super.serveResource(resourceRequest, resourceResponse);
|
|
|
|
// super.serveResource(resourceRequest, resourceResponse);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String exportSearch(Locale locale, ResourceRequest resourceRequest, User user, String cmd) { |
|
|
|
private String exportSearch(Locale locale, ResourceRequest resourceRequest, User user, String cmd) { |
|
|
|
|
|
|
|
|
|
|
|
HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(resourceRequest); |
|
|
|
HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(resourceRequest); |
|
|
@ -406,14 +423,14 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
|
|
|
|
|
|
|
|
Hits hits = null; |
|
|
|
Hits hits = null; |
|
|
|
|
|
|
|
|
|
|
|
if(cmd.equals("exportRicercaMieAttivita")){ |
|
|
|
if (cmd.equals("exportRicercaMieAttivita")) { |
|
|
|
hits = ControlloPraticaAdvancedSearch.searchMieiTask(httpRequest, user, -1, -1); |
|
|
|
hits = ControlloPraticaAdvancedSearch.searchMieiTask(httpRequest, user, -1, -1); |
|
|
|
} else if(cmd.equals("exportRicercaMieiRuoli")){ |
|
|
|
} else if (cmd.equals("exportRicercaMieiRuoli")) { |
|
|
|
hits = ControlloPraticaAdvancedSearch.searchTaskMieiRuoli(httpRequest, user, -1, -1); |
|
|
|
hits = ControlloPraticaAdvancedSearch.searchTaskMieiRuoli(httpRequest, user, -1, -1); |
|
|
|
} else if(cmd.equals("exportRicercaAltreAttivita")){ |
|
|
|
} else if (cmd.equals("exportRicercaAltreAttivita")) { |
|
|
|
hits = ControlloPraticaAdvancedSearch.searchAltriTask(httpRequest, user, -1, -1); |
|
|
|
hits = ControlloPraticaAdvancedSearch.searchAltriTask(httpRequest, user, -1, -1); |
|
|
|
} else if(cmd.equals("exportRicercaAttivitaConcluse")){ |
|
|
|
} else if (cmd.equals("exportRicercaAttivitaConcluse")) { |
|
|
|
hits = ControlloPraticaAdvancedSearch.searchTaskConclusi(httpRequest, user, -1, -1); |
|
|
|
hits = ControlloPraticaAdvancedSearch.searchTaskConclusi(httpRequest, user, -1, -1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (Document doc : hits.toList()) { |
|
|
|
for (Document doc : hits.toList()) { |
|
|
@ -421,8 +438,8 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
String controlloPraticaId = doc.get("controlloPraticaId"); |
|
|
|
String controlloPraticaId = doc.get("controlloPraticaId"); |
|
|
|
if (Validator.isNotNull(controlloPraticaId)) { |
|
|
|
if (Validator.isNotNull(controlloPraticaId)) { |
|
|
|
|
|
|
|
|
|
|
|
ControlloPratica controlloPratica = |
|
|
|
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil |
|
|
|
ControlloPraticaLocalServiceUtil.fetchControlloPratica(GetterUtil.getLong(controlloPraticaId)); |
|
|
|
.fetchControlloPratica(GetterUtil.getLong(controlloPraticaId)); |
|
|
|
if (Validator.isNotNull(controlloPratica)) { |
|
|
|
if (Validator.isNotNull(controlloPratica)) { |
|
|
|
lista.add(controlloPratica); |
|
|
|
lista.add(controlloPratica); |
|
|
|
} |
|
|
|
} |
|
|
@ -430,60 +447,72 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.attivita"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.attivita"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.esito"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.esito"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
|
//ADT - BUG-13 Aggiunta colonna Data Esito
|
|
|
|
// ADT - BUG-13 Aggiunta colonna Data Esito
|
|
|
|
//Bug 33264
|
|
|
|
// Bug 33264
|
|
|
|
if(cmd.equals("exportRicercaAttivitaConcluse")){ |
|
|
|
if (cmd.equals("exportRicercaAttivitaConcluse")) { |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.dataesito"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.dataesito"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.sorteggiata"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.sorteggiata"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.pratica"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.pratica"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.istruttore"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.istruttore"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.provenienza"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.provenienza"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.avvioprocedimento"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.avvioprocedimento"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.provincia"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.provincia"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.gg"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.gg"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
|
sb.append(StringPool.NEW_LINE); |
|
|
|
sb.append(StringPool.NEW_LINE); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); |
|
|
|
|
|
|
|
|
|
|
|
for (ControlloPratica controlloPratica : lista) { |
|
|
|
for (ControlloPratica controlloPratica : lista) { |
|
|
|
|
|
|
|
|
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPratica.getIntPraticaId()); |
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPratica |
|
|
|
|
|
|
|
.getIntPraticaId()); |
|
|
|
|
|
|
|
|
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica.getTerritorioId()); |
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica |
|
|
|
|
|
|
|
.getTerritorioId()); |
|
|
|
Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId()); |
|
|
|
Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId()); |
|
|
|
|
|
|
|
|
|
|
|
Provincia provincia = |
|
|
|
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), |
|
|
|
ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia()); |
|
|
|
territorio.getCodiceProvincia()); |
|
|
|
|
|
|
|
|
|
|
|
// Informazioni relative al workflow
|
|
|
|
// Informazioni relative al workflow
|
|
|
|
WorkflowInstanceLink workflowInstanceLink = |
|
|
|
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil |
|
|
|
WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(controlloPratica.getCompanyId(), |
|
|
|
.fetchWorkflowInstanceLink(controlloPratica.getCompanyId(), |
|
|
|
controlloPratica.getGroupId(), ControlloPratica.class.getName(), controlloPratica.getPrimaryKey()); |
|
|
|
controlloPratica.getGroupId(), ControlloPratica.class.getName(), |
|
|
|
|
|
|
|
controlloPratica.getPrimaryKey()); |
|
|
|
|
|
|
|
|
|
|
|
long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId(); |
|
|
|
long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId(); |
|
|
|
WorkflowInstance workflowInstance = |
|
|
|
WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance( |
|
|
|
WorkflowInstanceManagerUtil.getWorkflowInstance(controlloPratica.getCompanyId(), workflowInstanceId); |
|
|
|
controlloPratica.getCompanyId(), workflowInstanceId); |
|
|
|
|
|
|
|
|
|
|
|
List<WorkflowTask> listaTask = |
|
|
|
List<WorkflowTask> listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance( |
|
|
|
WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null, |
|
|
|
controlloPratica.getCompanyId(), null, workflowInstance.getWorkflowInstanceId(), |
|
|
|
workflowInstance.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); |
|
|
|
false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); |
|
|
|
|
|
|
|
|
|
|
|
WorkflowTask task = null; |
|
|
|
WorkflowTask task = null; |
|
|
|
if (listaTask != null && !listaTask.isEmpty()) { |
|
|
|
if (listaTask != null && !listaTask.isEmpty()) { |
|
|
@ -493,30 +522,33 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
String taskName = StringPool.BLANK; |
|
|
|
String taskName = StringPool.BLANK; |
|
|
|
if (task != null) { |
|
|
|
if (task != null) { |
|
|
|
User userTask = UserLocalServiceUtil.fetchUser(task.getAssigneeUserId()); |
|
|
|
User userTask = UserLocalServiceUtil.fetchUser(task.getAssigneeUserId()); |
|
|
|
//Bug 33264
|
|
|
|
// Bug 33264
|
|
|
|
taskName = LanguageUtil.get(getPortletConfig(), locale, task.getName()); |
|
|
|
taskName = LanguageUtil.get(getPortletConfig(), locale, task.getName()); |
|
|
|
if (userTask != null) { |
|
|
|
if (userTask != null) { |
|
|
|
taskName += " (" + userTask.getFullName() + ")"; |
|
|
|
taskName += " (" + userTask.getFullName() + ")"; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//Bug 33264
|
|
|
|
// Bug 33264
|
|
|
|
taskName = LanguageUtil.get(getPortletConfig(), locale, workflowInstance.getState()); |
|
|
|
taskName = LanguageUtil.get(getPortletConfig(), locale, workflowInstance.getState()); |
|
|
|
} |
|
|
|
} |
|
|
|
sb.append(CSVUtil.encode(taskName)); |
|
|
|
sb.append(CSVUtil.encode(taskName)); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
|
String tipoEsito = ControlloPraticaLocalServiceUtil.getTipoEsito(controlloPratica.getControlloPraticaId()); |
|
|
|
String tipoEsito = ControlloPraticaLocalServiceUtil.getTipoEsito(controlloPratica |
|
|
|
|
|
|
|
.getControlloPraticaId()); |
|
|
|
sb.append(CSVUtil.encode(tipoEsito)); |
|
|
|
sb.append(CSVUtil.encode(tipoEsito)); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
|
//ADT - BUG-13 Aggiunta colonna Data Esito
|
|
|
|
// ADT - BUG-13 Aggiunta colonna Data Esito
|
|
|
|
//Bug 33264
|
|
|
|
// Bug 33264
|
|
|
|
if(cmd.equals("exportRicercaAttivitaConcluse")){ |
|
|
|
if (cmd.equals("exportRicercaAttivitaConcluse")) { |
|
|
|
sb.append(CSVUtil.encode(controlloPratica.getStatusDate() != null ? sdf.format(controlloPratica.getStatusDate()) : "" )); |
|
|
|
sb.append(CSVUtil.encode(controlloPratica.getStatusDate() != null ? sdf |
|
|
|
|
|
|
|
.format(controlloPratica.getStatusDate()) : "")); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
boolean sorteggiata = SorteggioLocalServiceUtil.findByIntPratica(intPratica.getIntPraticaId()) != null; |
|
|
|
boolean sorteggiata = SorteggioLocalServiceUtil |
|
|
|
|
|
|
|
.findByIntPratica(intPratica.getIntPraticaId()) != null; |
|
|
|
sb.append(CSVUtil.encode((sorteggiata) ? "Si" : "No")); |
|
|
|
sb.append(CSVUtil.encode((sorteggiata) ? "Si" : "No")); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
@ -537,9 +569,9 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
|
StringBuilder provenienzaLabel = new StringBuilder(); |
|
|
|
StringBuilder provenienzaLabel = new StringBuilder(); |
|
|
|
WorkflowTask workflowTask = |
|
|
|
WorkflowTask workflowTask = WorkflowUtil.getLastCompletedTask( |
|
|
|
WorkflowUtil.getLastCompletedTask(controlloPratica.getCompanyId(), controlloPratica.getGroupId(), null, |
|
|
|
controlloPratica.getCompanyId(), controlloPratica.getGroupId(), null, |
|
|
|
controlloPratica); |
|
|
|
controlloPratica); |
|
|
|
|
|
|
|
|
|
|
|
if (workflowTask != null) { |
|
|
|
if (workflowTask != null) { |
|
|
|
User approvatore = UserLocalServiceUtil.fetchUser(workflowTask.getAssigneeUserId()); |
|
|
|
User approvatore = UserLocalServiceUtil.fetchUser(workflowTask.getAssigneeUserId()); |
|
|
@ -597,38 +629,45 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
List<ControlloPratica> listaControlloPratica = new ArrayList<ControlloPratica>(); |
|
|
|
List<ControlloPratica> listaControlloPratica = new ArrayList<ControlloPratica>(); |
|
|
|
|
|
|
|
|
|
|
|
if (dirigente) { |
|
|
|
if (dirigente) { |
|
|
|
listaControlloPratica = |
|
|
|
listaControlloPratica = ControlloPraticaAdvancedSearch.searchTaskPerEsportazioneDirigente( |
|
|
|
ControlloPraticaAdvancedSearch.searchTaskPerEsportazioneDirigente(httpRequest, user, QueryUtil.ALL_POS, |
|
|
|
httpRequest, user, QueryUtil.ALL_POS, QueryUtil.ALL_POS); |
|
|
|
QueryUtil.ALL_POS); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
listaControlloPratica = |
|
|
|
listaControlloPratica = ControlloPraticaAdvancedSearch.searchTaskPerEsportazionePO(httpRequest, |
|
|
|
ControlloPraticaAdvancedSearch.searchTaskPerEsportazionePO(httpRequest, user, QueryUtil.ALL_POS, |
|
|
|
user, QueryUtil.ALL_POS, QueryUtil.ALL_POS); |
|
|
|
QueryUtil.ALL_POS); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.attivita"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.attivita"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.esito"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.esito"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
|
//ADT - BUG-13 Aggiunta colonna Data Esito
|
|
|
|
// ADT - BUG-13 Aggiunta colonna Data Esito
|
|
|
|
//Bug 33264
|
|
|
|
// Bug 33264
|
|
|
|
if("Tab_TaskCompletati".equals(currentTab)){ |
|
|
|
if ("Tab_TaskCompletati".equals(currentTab)) { |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.dataesito"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.dataesito"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.sorteggiata"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.sorteggiata"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.pratica"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.pratica"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.istruttore"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.istruttore"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.provenienza"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.provenienza"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.avvioprocedimento"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.avvioprocedimento"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.provincia"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, |
|
|
|
|
|
|
|
"label.scadenzegeniocivile.provincia"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.gg"))); |
|
|
|
sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.gg"))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
@ -641,26 +680,29 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
|
|
|
|
|
|
|
|
for (ControlloPratica controlloPratica : listaControlloPratica) { |
|
|
|
for (ControlloPratica controlloPratica : listaControlloPratica) { |
|
|
|
|
|
|
|
|
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPratica.getIntPraticaId()); |
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPratica |
|
|
|
|
|
|
|
.getIntPraticaId()); |
|
|
|
|
|
|
|
|
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica.getTerritorioId()); |
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica |
|
|
|
|
|
|
|
.getTerritorioId()); |
|
|
|
Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId()); |
|
|
|
Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId()); |
|
|
|
|
|
|
|
|
|
|
|
Provincia provincia = |
|
|
|
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), |
|
|
|
ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia()); |
|
|
|
territorio.getCodiceProvincia()); |
|
|
|
|
|
|
|
|
|
|
|
// Informazioni relative al workflow
|
|
|
|
// Informazioni relative al workflow
|
|
|
|
WorkflowInstanceLink workflowInstanceLink = |
|
|
|
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil |
|
|
|
WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(controlloPratica.getCompanyId(), |
|
|
|
.fetchWorkflowInstanceLink(controlloPratica.getCompanyId(), |
|
|
|
controlloPratica.getGroupId(), ControlloPratica.class.getName(), controlloPratica.getPrimaryKey()); |
|
|
|
controlloPratica.getGroupId(), ControlloPratica.class.getName(), |
|
|
|
|
|
|
|
controlloPratica.getPrimaryKey()); |
|
|
|
|
|
|
|
|
|
|
|
long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId(); |
|
|
|
long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId(); |
|
|
|
WorkflowInstance workflowInstance = |
|
|
|
WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance( |
|
|
|
WorkflowInstanceManagerUtil.getWorkflowInstance(controlloPratica.getCompanyId(), workflowInstanceId); |
|
|
|
controlloPratica.getCompanyId(), workflowInstanceId); |
|
|
|
|
|
|
|
|
|
|
|
List<WorkflowTask> listaTask = |
|
|
|
List<WorkflowTask> listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance( |
|
|
|
WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null, |
|
|
|
controlloPratica.getCompanyId(), null, workflowInstance.getWorkflowInstanceId(), |
|
|
|
workflowInstance.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); |
|
|
|
false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); |
|
|
|
|
|
|
|
|
|
|
|
WorkflowTask task = null; |
|
|
|
WorkflowTask task = null; |
|
|
|
if (listaTask != null && !listaTask.isEmpty()) { |
|
|
|
if (listaTask != null && !listaTask.isEmpty()) { |
|
|
@ -680,18 +722,20 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
sb.append(CSVUtil.encode(taskName)); |
|
|
|
sb.append(CSVUtil.encode(taskName)); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
|
String tipoEsito = ControlloPraticaLocalServiceUtil.getTipoEsito(controlloPratica.getControlloPraticaId()); |
|
|
|
String tipoEsito = ControlloPraticaLocalServiceUtil.getTipoEsito(controlloPratica |
|
|
|
|
|
|
|
.getControlloPraticaId()); |
|
|
|
sb.append(CSVUtil.encode(tipoEsito)); |
|
|
|
sb.append(CSVUtil.encode(tipoEsito)); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
|
//ADT - BUG-13 Aggiunta colonna Data Esito
|
|
|
|
// ADT - BUG-13 Aggiunta colonna Data Esito
|
|
|
|
//Bug 33264
|
|
|
|
// Bug 33264
|
|
|
|
if("Tab_TaskCompletati".equals(currentTab)){ |
|
|
|
if ("Tab_TaskCompletati".equals(currentTab)) { |
|
|
|
sb.append(CSVUtil.encode(sdf.format(controlloPratica.getStatusDate()))); |
|
|
|
sb.append(CSVUtil.encode(sdf.format(controlloPratica.getStatusDate()))); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
boolean sorteggiata = SorteggioLocalServiceUtil.findByIntPratica(intPratica.getIntPraticaId()) != null; |
|
|
|
boolean sorteggiata = SorteggioLocalServiceUtil |
|
|
|
|
|
|
|
.findByIntPratica(intPratica.getIntPraticaId()) != null; |
|
|
|
sb.append(CSVUtil.encode((sorteggiata) ? "Si" : "No")); |
|
|
|
sb.append(CSVUtil.encode((sorteggiata) ? "Si" : "No")); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
@ -712,9 +756,9 @@ public class GestioneAttivitaPortlet extends MVCPortlet { |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
sb.append(StringPool.SEMICOLON); |
|
|
|
|
|
|
|
|
|
|
|
StringBuilder provenienzaLabel = new StringBuilder(); |
|
|
|
StringBuilder provenienzaLabel = new StringBuilder(); |
|
|
|
WorkflowTask workflowTask = |
|
|
|
WorkflowTask workflowTask = WorkflowUtil.getLastCompletedTask( |
|
|
|
WorkflowUtil.getLastCompletedTask(controlloPratica.getCompanyId(), controlloPratica.getGroupId(), null, |
|
|
|
controlloPratica.getCompanyId(), controlloPratica.getGroupId(), null, |
|
|
|
controlloPratica); |
|
|
|
controlloPratica); |
|
|
|
|
|
|
|
|
|
|
|
if (workflowTask != null) { |
|
|
|
if (workflowTask != null) { |
|
|
|
User approvatore = UserLocalServiceUtil.fetchUser(workflowTask.getAssigneeUserId()); |
|
|
|
User approvatore = UserLocalServiceUtil.fetchUser(workflowTask.getAssigneeUserId()); |
|
|
|