|
|
@ -84,7 +84,6 @@ import com.liferay.portal.kernel.workflow.WorkflowInstance; |
|
|
|
import com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil; |
|
|
|
import com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil; |
|
|
|
import com.liferay.portal.kernel.workflow.WorkflowTask; |
|
|
|
import com.liferay.portal.kernel.workflow.WorkflowTask; |
|
|
|
import com.liferay.portal.kernel.workflow.WorkflowTaskManagerUtil; |
|
|
|
import com.liferay.portal.kernel.workflow.WorkflowTaskManagerUtil; |
|
|
|
import com.liferay.portal.model.Group; |
|
|
|
|
|
|
|
import com.liferay.portal.model.Organization; |
|
|
|
import com.liferay.portal.model.Organization; |
|
|
|
import com.liferay.portal.model.ResourceAction; |
|
|
|
import com.liferay.portal.model.ResourceAction; |
|
|
|
import com.liferay.portal.model.ResourceConstants; |
|
|
|
import com.liferay.portal.model.ResourceConstants; |
|
|
@ -96,7 +95,6 @@ import com.liferay.portal.model.WorkflowInstanceLink; |
|
|
|
import com.liferay.portal.security.permission.ActionKeys; |
|
|
|
import com.liferay.portal.security.permission.ActionKeys; |
|
|
|
import com.liferay.portal.security.permission.PermissionChecker; |
|
|
|
import com.liferay.portal.security.permission.PermissionChecker; |
|
|
|
import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil; |
|
|
|
import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil; |
|
|
|
import com.liferay.portal.service.GroupLocalServiceUtil; |
|
|
|
|
|
|
|
import com.liferay.portal.service.OrganizationLocalServiceUtil; |
|
|
|
import com.liferay.portal.service.OrganizationLocalServiceUtil; |
|
|
|
import com.liferay.portal.service.ResourceActionLocalServiceUtil; |
|
|
|
import com.liferay.portal.service.ResourceActionLocalServiceUtil; |
|
|
|
import com.liferay.portal.service.ResourcePermissionLocalServiceUtil; |
|
|
|
import com.liferay.portal.service.ResourcePermissionLocalServiceUtil; |
|
|
@ -181,7 +179,7 @@ public class SismicaUtil { |
|
|
|
|
|
|
|
|
|
|
|
List<String> esito = new ArrayList<>(); |
|
|
|
List<String> esito = new ArrayList<>(); |
|
|
|
esitoLog(esito, "Controllo integrazioni/preavvisi scaduti"); |
|
|
|
esitoLog(esito, "Controllo integrazioni/preavvisi scaduti"); |
|
|
|
final int giorniIntegrazione = 40; |
|
|
|
final int giorniIntegrazione = 30; |
|
|
|
final long taskId = 21642; |
|
|
|
final long taskId = 21642; |
|
|
|
final String taskName = "Esito"; |
|
|
|
final String taskName = "Esito"; |
|
|
|
final long nodeId = 21639; |
|
|
|
final long nodeId = 21639; |
|
|
@ -194,7 +192,6 @@ public class SismicaUtil { |
|
|
|
calendar.set(Calendar.SECOND, 0); |
|
|
|
calendar.set(Calendar.SECOND, 0); |
|
|
|
calendar.add(Calendar.DAY_OF_YEAR, -giorniIntegrazione); |
|
|
|
calendar.add(Calendar.DAY_OF_YEAR, -giorniIntegrazione); |
|
|
|
Date inizio = calendar.getTime(); |
|
|
|
Date inizio = calendar.getTime(); |
|
|
|
int scadute = 0; |
|
|
|
|
|
|
|
DynamicQuery query = IntPraticaLocalServiceUtil.dynamicQuery(); |
|
|
|
DynamicQuery query = IntPraticaLocalServiceUtil.dynamicQuery(); |
|
|
|
query.add(RestrictionsFactoryUtil.eq("statoPratica", StatoPraticaConstants.INTEGRAZIONE)); |
|
|
|
query.add(RestrictionsFactoryUtil.eq("statoPratica", StatoPraticaConstants.INTEGRAZIONE)); |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@SuppressWarnings("unchecked") |
|
|
@ -212,16 +209,8 @@ public class SismicaUtil { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (Validator.isNotNull(dtUltimoAvviso) && dtUltimoAvviso.before(inizio)) { |
|
|
|
if (Validator.isNotNull(dtUltimoAvviso) && dtUltimoAvviso.before(inizio)) { |
|
|
|
scadute++; |
|
|
|
esito.addAll(riassegnaAlTecnico(pratica, commento, validCurrentNodeName, taskId, taskName, nodeId, |
|
|
|
User user = UserLocalServiceUtil.getUser(pratica.getStatusByUserId()); |
|
|
|
nodeName)); |
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); |
|
|
|
|
|
|
|
Group group = GroupLocalServiceUtil.getGroup(territorio.getGroupId()); |
|
|
|
|
|
|
|
Organization organization = OrganizationLocalServiceUtil.getOrganization(group.getOrganizationId()); |
|
|
|
|
|
|
|
esitoLog(esito, |
|
|
|
|
|
|
|
"Pratica " + pratica.getNumeroProgetto() + " integrazione " + dfmt.format(dtUltimoAvviso) + " " |
|
|
|
|
|
|
|
+ organization.getName() + " tecnico " + user.getFullName()); |
|
|
|
|
|
|
|
// esito.addAll(riassegnaAlTecnico(pratica, commento, validCurrentNodeName, taskId, taskName, nodeId,
|
|
|
|
|
|
|
|
// nodeName));
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return esito; |
|
|
|
return esito; |
|
|
|