Sfoglia il codice sorgente

Fix preview file entry

master
Salvatore La Manna 4 anni fa
parent
commit
700848637a
  1. 1725
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java
  2. 11
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java
  3. 265
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java
  4. 296
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java
  5. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  6. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/common/preview_file_entry.jsp
  7. 2
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/common/preview_file_entry.jsp

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

File diff soppresso perché troppo grande Load Diff

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

@ -191,10 +191,13 @@ public class ManutenzioneDatabase {
}
clearCache();
_log.info("Elaborazione completata correttamente.");
} else if (mode.contains("!Integrazioni!")) {
}
if (mode.contains("!Integrazioni!")) {
SismicaUtil.integrazioniScadute();
} else {
esitoLog(esito, "Nessun comando");
}
if (mode.startsWith("!Workflow!")) {
String[] pezzi = StringUtil.split(mode, '!');
esito.addAll(SismicaUtil.aggiungiWorkflow(pezzi[2], pezzi[3]));
}
return esito;
}
@ -346,7 +349,7 @@ public class ManutenzioneDatabase {
int rimossi = 0;
fileEntries = DLAppServiceUtil.getFileEntries(repositoryId, folderId, start, start + SLICE);
for (FileEntry fileEntry : fileEntries) {
String[] parti = StringUtil.split(fileEntry.getTitle(), StringPool.UNDERLINE);
String[] parti = StringUtil.split(fileEntry.getTitle(), '_');
String strId1 = parti[0];
String tipo = StringPool.BLANK;
String strId2 = StringPool.BLANK;

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

@ -175,8 +175,10 @@ public class SismicaUtil {
return null;
}
public static void integrazioniScadute() throws SystemException, PortalException {
final int giorniScadenza = 120;
public static List<String> integrazioniScadute() throws SystemException, PortalException {
List<String> esito = new ArrayList<>();
final int giorniScadenza = 30;
final long taskId = 21642;
final String taskName = "Esito";
final long nodeId = 21639;
@ -210,121 +212,158 @@ public class SismicaUtil {
}
if (Validator.isNotNull(dtUltimoAvviso) && dtUltimoAvviso.before(inizio)) {
scadute++;
List<ControlloPratica> controlli = ControlloPraticaLocalServiceUtil
.findByIntPraticaId_Status(pratica.getIntPraticaId(),
WorkflowConstants.STATUS_TASK_APPROVAZIONE_ESITO_ISTRUTTORIA);
if (1 == controlli.size()) {
ControlloPratica controllo = controlli.get(0);
long companyId = controllo.getCompanyId();
long groupId = controllo.getGroupId();
long tecnicoUserId = pratica.getStatusByUserId();
WorkflowInstanceLink instanceLink = WorkflowInstanceLinkLocalServiceUtil
.getWorkflowInstanceLink(companyId, groupId, ControlloPratica.class.getName(),
controllo.getPrimaryKey());
KaleoInstance instance = KaleoInstanceLocalServiceUtil.getKaleoInstance(instanceLink
.getWorkflowInstanceId());
KaleoInstanceToken instanceToken = KaleoInstanceTokenLocalServiceUtil
.getKaleoInstanceToken(instance.getRootKaleoInstanceTokenId());
if (validCurrentNodeName.equals(instanceToken.getCurrentKaleoNodeName())) {
Role adminRole = RoleLocalServiceUtil.getRole(companyId, RoleConstants.ADMINISTRATOR);
User adminUser = UserLocalServiceUtil.getRoleUsers(adminRole.getRoleId(), 0, 1)
.get(0);
ServiceContext scAdmin = new ServiceContext();
scAdmin.setCompanyId(companyId);
scAdmin.setScopeGroupId(groupId);
scAdmin.setUserId(adminUser.getUserId());
ServiceContext scTecnico = new ServiceContext();
scTecnico.setCompanyId(companyId);
scTecnico.setScopeGroupId(groupId);
scTecnico.setUserId(tecnicoUserId);
List<KaleoTaskInstanceToken> taskInstanceTokens = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceTokens(instance.getKaleoInstanceId(), true, 0, 1,
OrderByComparatorFactoryUtil.create("KaleoTaskInstanceToken",
"kaleoTaskInstanceTokenId", false), scTecnico);
if (taskInstanceTokens.size() > 0) {
@SuppressWarnings("unchecked")
Map<String, Serializable> workflowContext = (Map<String, Serializable>) JSONFactoryUtil
.deserialize(taskInstanceTokens.get(0).getWorkflowContext());
long definitionId = taskInstanceTokens.get(0).getKaleoDefinitionId();
User tecnicoUser = UserLocalServiceUtil.getUser(tecnicoUserId);
KaleoTaskInstanceToken taskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.createKaleoTaskInstanceToken(CounterLocalServiceUtil.increment());
taskInstanceToken.setGroupId(groupId);
taskInstanceToken.setCompanyId(companyId);
taskInstanceToken.setUserId(adminUser.getUserId());
taskInstanceToken.setUserName(adminUser.getFullName());
taskInstanceToken.setCreateDate(adesso);
taskInstanceToken.setModifiedDate(adesso);
taskInstanceToken.setKaleoDefinitionId(definitionId);
taskInstanceToken.setKaleoInstanceId(instance.getKaleoInstanceId());
taskInstanceToken
.setKaleoInstanceTokenId(instanceToken.getKaleoInstanceTokenId());
taskInstanceToken.setKaleoTaskId(taskId);
taskInstanceToken.setKaleoTaskName(taskName);
taskInstanceToken.setClassName(ControlloPratica.class.getName());
taskInstanceToken.setClassPK(controllo.getPrimaryKey());
taskInstanceToken.setWorkflowContext(JSONFactoryUtil.serialize(workflowContext));
KaleoTaskAssignmentInstanceLocalServiceUtil.addKaleoTaskAssignmentInstance(
groupId, taskInstanceToken, User.class.getName(), tecnicoUserId, scAdmin);
KaleoTaskInstanceTokenLocalServiceUtil
.updateKaleoTaskInstanceToken(taskInstanceToken);
KaleoLog log = KaleoLogLocalServiceUtil.createKaleoLog(CounterLocalServiceUtil
.increment());
log.setUserId(adminUser.getUserId());
log.setUserName(adminUser.getFullName());
log.setCompanyId(companyId);
log.setCreateDate(adesso);
log.setModifiedDate(adesso);
log.setKaleoClassName(KaleoNode.class.getName());
log.setKaleoClassPK(nodeId);
log.setKaleoDefinitionId(definitionId);
log.setKaleoInstanceId(instance.getKaleoInstanceId());
log.setKaleoInstanceTokenId(instanceToken.getKaleoInstanceTokenId());
log.setKaleoTaskInstanceTokenId(taskInstanceToken.getKaleoTaskInstanceTokenId());
log.setKaleoNodeName(nodeName);
log.setCurrentAssigneeClassName(User.class.getName());
log.setCurrentAssigneeClassPK(tecnicoUserId);
log.setType(LogType.TASK_ASSIGNMENT.name());
log.setComment(comment);
log.setStartDate(adesso);
log.setWorkflowContext(JSONFactoryUtil.serialize(workflowContext));
KaleoLogLocalServiceUtil.updateKaleoLog(log);
instanceToken.setCurrentKaleoNodeId(nodeId);
instanceToken.setCurrentKaleoNodeName(nodeName);
KaleoInstanceTokenLocalServiceUtil.updateKaleoInstanceToken(instanceToken);
_log.info("Integrazione scaduta da "
+ (daysBetween(dtUltimoAvviso, adesso) - giorniScadenza)
+ " giorni. Workflow instance " + instance.getKaleoInstanceId()
esito.addAll(riassegnaAlTecnico(pratica, comment, validCurrentNodeName, taskId, taskName,
nodeId, nodeName));
}
}
esitoLog(esito, "Pratiche con richiesta di integrazione " + pratiche.size() + ", scadute " + scadute);
return esito;
}
private static List<String> riassegnaAlTecnico(IntPratica pratica, String comment,
String validCurrentNodeName, long taskId, String taskName, long nodeId, String nodeName)
throws SystemException, PortalException {
List<String> esito = new ArrayList<>();
List<ControlloPratica> controlli = ControlloPraticaLocalServiceUtil.findByIntPraticaId_Status(
pratica.getIntPraticaId(), WorkflowConstants.STATUS_TASK_APPROVAZIONE_ESITO_ISTRUTTORIA);
if (1 == controlli.size()) {
ControlloPratica controllo = controlli.get(0);
long companyId = controllo.getCompanyId();
long groupId = controllo.getGroupId();
long tecnicoUserId = pratica.getStatusByUserId();
WorkflowInstanceLink instanceLink = WorkflowInstanceLinkLocalServiceUtil.getWorkflowInstanceLink(
companyId, groupId, ControlloPratica.class.getName(), controllo.getPrimaryKey());
KaleoInstance instance = KaleoInstanceLocalServiceUtil.getKaleoInstance(instanceLink
.getWorkflowInstanceId());
KaleoInstanceToken instanceToken = KaleoInstanceTokenLocalServiceUtil
.getKaleoInstanceToken(instance.getRootKaleoInstanceTokenId());
if (Validator.isNull(validCurrentNodeName)
|| validCurrentNodeName.equals(instanceToken.getCurrentKaleoNodeName())) {
Date adesso = new Date();
Role adminRole = RoleLocalServiceUtil.getRole(companyId, RoleConstants.ADMINISTRATOR);
User adminUser = UserLocalServiceUtil.getRoleUsers(adminRole.getRoleId(), 0, 1).get(0);
ServiceContext scAdmin = new ServiceContext();
scAdmin.setCompanyId(companyId);
scAdmin.setScopeGroupId(groupId);
scAdmin.setUserId(adminUser.getUserId());
ServiceContext scTecnico = new ServiceContext();
scTecnico.setCompanyId(companyId);
scTecnico.setScopeGroupId(groupId);
scTecnico.setUserId(tecnicoUserId);
List<KaleoTaskInstanceToken> taskInstanceTokens = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceTokens(instance.getKaleoInstanceId(), true, 0, 1,
OrderByComparatorFactoryUtil.create("KaleoTaskInstanceToken",
"kaleoTaskInstanceTokenId", false), scTecnico);
if (taskInstanceTokens.size() > 0) {
@SuppressWarnings("unchecked")
Map<String, Serializable> workflowContext = (Map<String, Serializable>) JSONFactoryUtil
.deserialize(taskInstanceTokens.get(0).getWorkflowContext());
long definitionId = taskInstanceTokens.get(0).getKaleoDefinitionId();
User tecnicoUser = UserLocalServiceUtil.getUser(tecnicoUserId);
KaleoTaskInstanceToken taskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.createKaleoTaskInstanceToken(CounterLocalServiceUtil.increment());
taskInstanceToken.setGroupId(groupId);
taskInstanceToken.setCompanyId(companyId);
taskInstanceToken.setUserId(adminUser.getUserId());
taskInstanceToken.setUserName(adminUser.getFullName());
taskInstanceToken.setCreateDate(adesso);
taskInstanceToken.setModifiedDate(adesso);
taskInstanceToken.setKaleoDefinitionId(definitionId);
taskInstanceToken.setKaleoInstanceId(instance.getKaleoInstanceId());
taskInstanceToken.setKaleoInstanceTokenId(instanceToken.getKaleoInstanceTokenId());
taskInstanceToken.setKaleoTaskId(taskId);
taskInstanceToken.setKaleoTaskName(taskName);
taskInstanceToken.setClassName(ControlloPratica.class.getName());
taskInstanceToken.setClassPK(controllo.getPrimaryKey());
taskInstanceToken.setWorkflowContext(JSONFactoryUtil.serialize(workflowContext));
KaleoTaskAssignmentInstanceLocalServiceUtil.addKaleoTaskAssignmentInstance(groupId,
taskInstanceToken, User.class.getName(), tecnicoUserId, scAdmin);
KaleoTaskInstanceTokenLocalServiceUtil.updateKaleoTaskInstanceToken(taskInstanceToken);
KaleoLog log = KaleoLogLocalServiceUtil.createKaleoLog(CounterLocalServiceUtil
.increment());
log.setUserId(adminUser.getUserId());
log.setUserName(adminUser.getFullName());
log.setCompanyId(companyId);
log.setCreateDate(adesso);
log.setModifiedDate(adesso);
log.setKaleoClassName(KaleoNode.class.getName());
log.setKaleoClassPK(nodeId);
log.setKaleoDefinitionId(definitionId);
log.setKaleoInstanceId(instance.getKaleoInstanceId());
log.setKaleoInstanceTokenId(instanceToken.getKaleoInstanceTokenId());
log.setKaleoTaskInstanceTokenId(taskInstanceToken.getKaleoTaskInstanceTokenId());
log.setKaleoNodeName(nodeName);
log.setCurrentAssigneeClassName(User.class.getName());
log.setCurrentAssigneeClassPK(tecnicoUserId);
log.setType(LogType.TASK_ASSIGNMENT.name());
log.setComment(comment);
log.setStartDate(adesso);
log.setWorkflowContext(JSONFactoryUtil.serialize(workflowContext));
KaleoLogLocalServiceUtil.updateKaleoLog(log);
instanceToken.setCurrentKaleoNodeId(nodeId);
instanceToken.setCurrentKaleoNodeName(nodeName);
KaleoInstanceTokenLocalServiceUtil.updateKaleoInstanceToken(instanceToken);
esitoLog(
esito,
"Riassegnato workflow instance " + instance.getKaleoInstanceId()
+ " per pratica " + pratica.getNumeroProgetto() + " ("
+ pratica.getIntPraticaId() + "), istruttore "
+ tecnicoUser.getFullName());
} else {
_log.info("Errore su integrazione. Pratica " + pratica.getNumeroProgetto() + " ("
+ pratica.getIntPraticaId() + "), controllo "
+ controllo.getControlloPraticaId() + ", taskInstanceToken = "
+ taskInstanceTokens.size());
}
}
} else {
_log.info("Errore su integrazione. Pratica " + pratica.getNumeroProgetto() + " ("
+ pratica.getIntPraticaId() + ") l'integrazione è scaduta da "
+ (daysBetween(dtUltimoAvviso, adesso) - giorniScadenza) + ", controlli "
+ controlli.size());
esitoLog(esito, "Errore su integrazione. Pratica " + pratica.getNumeroProgetto() + " ("
+ pratica.getIntPraticaId() + "), controllo " + controllo.getControlloPraticaId()
+ ", taskInstanceToken = " + taskInstanceTokens.size());
}
} else {
esitoLog(esito, "Nome nodo corrente non valido: " + instanceToken.getCurrentKaleoNodeName());
}
} else {
esitoLog(
esito,
"Errore su integrazione. Pratica " + pratica.getNumeroProgetto() + " ("
+ pratica.getIntPraticaId() + "), numero di controlli = " + controlli.size());
}
return esito;
}
public static List<String> aggiungiWorkflow(String numeroProgetto, String mode) throws SystemException,
PortalException {
List<String> esito = new ArrayList<>();
IntPratica pratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto);
if (Validator.isNull(pratica)) {
esitoLog(esito, "Progetto " + numeroProgetto + " non trovato");
} else {
String comment = "Workflow riassegnato dal sistema";
long taskId;
String taskName;
long nodeId;
String nodeName;
switch (mode) {
case "Esito":
taskId = 21642;
taskName = "Esito";
nodeId = 21639;
nodeName = "Esito";
break;
default:
return esitoLog(esito, "Nome nodo non corretto: " + mode);
}
esito.addAll(riassegnaAlTecnico(pratica, comment, null, taskId, taskName, nodeId, nodeName));
}
_log.info("Pratiche con richiesta di integrazione " + pratiche.size() + ", scadute " + scadute);
return esito;
}
public static long daysBetween(String start, String end) throws ParseException {
@ -1697,4 +1736,10 @@ public class SismicaUtil {
serviceContext.setUserId(intPratica.getUserId());
return serviceContext;
}
private static List<String> esitoLog(List<String> esito, String msg) {
esito.add(msg);
_log.info(msg);
return esito;
}
}

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

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

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.number=2520
build.date=1605540160967
build.number=2523
build.date=1605800527040
build.auto.upgrade=true
##

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/common/preview_file_entry.jsp

@ -216,6 +216,8 @@ boolean enableCommentRatings = false;
<div class="alert alert-info">
<liferay-ui:message key="generating-preview-will-take-a-few-minutes" />
</div>
<div class="loading-animation"></div>
<script>setTimeout(function() { window.location.reload(1)}, 1500);</script>
</c:when>
<c:otherwise>
<div class="alert alert-info">

2
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/common/preview_file_entry.jsp

@ -215,6 +215,8 @@ boolean enableCommentRatings = false;
<div class="alert alert-info">
<liferay-ui:message key="generating-preview-will-take-a-few-minutes" />
</div>
<div class="loading-animation"></div>
<script>setTimeout(function() { window.location.reload(1)}, 1500);</script>
</c:when>
<c:otherwise>
<div class="alert alert-info">

Caricamento…
Annulla
Salva