Mattia Gosetto 4 anni fa
parent
commit
d540c937c5
  1. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties
  2. 236
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp
  3. 8
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties

@ -1030,6 +1030,7 @@ label.admingeniocivile.statopratica.attesafirma = Attesa di Firma
label.admingeniocivile.statopratica.approvazione = Approvazione
label.admingeniocivile.statopratica.finelavorianomalia = Anomalia Fine Lavori
label.admingeniocivile.statopratica.variante = Variante
label.admingeniocivile.statopratica.sospesa = Sospesa
label.firma-doc = Dichiaro di aver preso visione del documento, e di sottoscriverne il contenuto ai sensi del D.Lgs. 82/2005
label.cambio-soggetti-ok = Cambio Soggetti #{0} completato con successo

236
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp

@ -1,193 +1,131 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.json.JSONFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.json.JSONObject"%>
<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.Organization"%>
<%@page import="com.liferay.portal.model.Role"%>
<%@page import="com.liferay.portal.model.UserGroupRole"%>
<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.RoleLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.Role"%>
<%@page import="java.util.Collections"%>
<%@page import="java.util.Comparator"%>
<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.liferay.portal.model.Organization"%>
<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%>
<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
<%@page import="java.util.Collections"%>
<%@include file="/html/fascicolo/init.jsp"%>
<%
List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId());
%>
<liferay-ui:panel title="filters" defaultState="closed"
id='<%= renderResponse.getNamespace() + scopeGroupId + "ricercaSaiPanel" %>'
collapsible="<%= true %>" extended="<%= false %>"
persistState="<%= true %>">
<div class="container-fluid" style="padding: 15px;">
id='<%= renderResponse.getNamespace() + scopeGroupId + "ricercaSaiPanel" %>' collapsible="true" extended="false"
persistState="true">
<div class="container-fluid" style="padding: 15px">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-md-3">
<aui:input type="text" name="numeroProgetto" label="Numero Progetto" />
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-md-3">
<aui:input type="text" name="protocollo" label="Protocollo" />
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-md-3">
<aui:select name="tipoPratica" label="Tipo Pratica">
<aui:option value="-1">Seleziona il tipo di pratica</aui:option>
<aui:option value="01">
<liferay-ui:message key="deposito" />
</aui:option>
<aui:option value="02">
<liferay-ui:message key="autorizzazione" />
</aui:option>
<aui:option value="03">
<liferay-ui:message key="sanatoria" />
</aui:option>
<aui:option value="01"><liferay-ui:message key="deposito" /></aui:option>
<aui:option value="02"><liferay-ui:message key="autorizzazione" /></aui:option>
<aui:option value="03"><liferay-ui:message key="sanatoria" /></aui:option>
<!-- ADT - BUG-11 Aggiunta filtro ricerca -->
<aui:option value="sorteggio"><liferay-ui:message key="sorteggiata"/></aui:option>
</aui:select>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-md-3">
<aui:select name="statoPratica" label="Stato Pratica">
<aui:option value="-1">Stato Pratica</aui:option>
<aui:option value="AL">
<liferay-ui:message key="annullata" />
</aui:option>
<aui:option value="AU">
<liferay-ui:message key="autorizzata" />
</aui:option>
<aui:option value="AN">
<liferay-ui:message key="non autorizzata" />
</aui:option>
<aui:option value="CL">
<liferay-ui:message key="collaudo" />
</aui:option>
<aui:option value="CO">
<liferay-ui:message key="conforme" />
</aui:option>
<aui:option value="FL">
<liferay-ui:message key="fine lavori" />
</aui:option>
<aui:option value="CP">
<liferay-ui:message key="collaudo parziale" />
</aui:option>
<aui:option value="FP">
<liferay-ui:message key="fine lavori parziali" />
</aui:option>
<aui:option value="VA">
<liferay-ui:message key="variata" />
</aui:option>
<aui:option value="VI">
<liferay-ui:message key="vidimata" />
</aui:option>
<aui:option value="NC">
<liferay-ui:message key="nonConforme" />
</aui:option>
<aui:option value="IN">
<liferay-ui:message key="integrazione in corso" />
</aui:option>
<aui:option value="SO">
<liferay-ui:message key="sorteggiata" />
</aui:option>
<aui:option value="SP">
<liferay-ui:message key="sottoposta a parere" />
</aui:option>
<aui:option value="sospesa">
<liferay-ui:message key="sospesa"/>
</aui:option>
<aui:option value="AL"><liferay-ui:message key="annullata" /></aui:option>
<aui:option value="AU"><liferay-ui:message key="autorizzata" /></aui:option>
<aui:option value="AN"><liferay-ui:message key="non autorizzata" /></aui:option>
<aui:option value="CL"><liferay-ui:message key="collaudo" /></aui:option>
<aui:option value="CO"><liferay-ui:message key="conforme" /></aui:option>
<aui:option value="FL"><liferay-ui:message key="fine lavori" /></aui:option>
<aui:option value="CP"><liferay-ui:message key="collaudo parziale" /></aui:option>
<aui:option value="FP"><liferay-ui:message key="fine lavori parziali" /></aui:option>
<aui:option value="VA"><liferay-ui:message key="variata" /></aui:option>
<aui:option value="VI"><liferay-ui:message key="vidimata" /></aui:option>
<aui:option value="NC"><liferay-ui:message key="non conforme" /></aui:option>
<aui:option value="IN"><liferay-ui:message key="integrazione in corso" /></aui:option>
<aui:option value="SO"><liferay-ui:message key="sorteggiata" /></aui:option>
<aui:option value="SP"><liferay-ui:message key="sottoposta a parere" /></aui:option>
<aui:option value="sospesa"><liferay-ui:message key="sospesa"/></aui:option>
</aui:select>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="col-xs-12 col-md-4">
<aui:input type="text" name="committente" label="Committente" />
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<aui:input type="text" name="soggettiInterconnessi"
label="Soggetti Interconnessi" />
<div class="col-xs-12 col-md-4">
<aui:input type="text" name="soggettiInterconnessi" label="Soggetti Interconnessi" />
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<%--ADT BUG BO ID = 8 SEZIONE ATTIVITà --%>
<c:if test="<%=organizationList != null && !organizationList.isEmpty() && organizationList.size() > 1 %>">
<div class="col-xs-12 col-md-4">
<%--ADT BUG BO ID = 8 SEZIONE ATTIVITÀ --%>
<c:if test="<%= organizationList != null && organizationList.size() > 1 %>">
<aui:select name="istruttore" label="Tecnico Istruttore">
<aui:option value="-1">Tutti</aui:option>
<%
List<UserGroupRole> tecniciIstruttori = new ArrayList<UserGroupRole>();
for(Organization org : organizationList){
for (Organization org : organizationList) {
Role role = RoleLocalServiceUtil.getRole(org.getCompanyId(), "portos_istruttore");
List<UserGroupRole> istruttori = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole(org.getGroupId(), role.getRoleId());
List<UserGroupRole> istruttori = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole(
org.getGroupId(), role.getRoleId());
for (UserGroupRole userGroupRole : istruttori) {
if(tecniciIstruttori.isEmpty()){
tecniciIstruttori.add(userGroupRole);
} else {
boolean isPresent = false;
for(UserGroupRole tecnico : tecniciIstruttori){
if(tecnico.getUserId() == userGroupRole.getUserId()){
for (UserGroupRole tecnico : tecniciIstruttori) {
if (tecnico.getUserId() == userGroupRole.getUserId()) {
isPresent = true;
break;
}
}
if(!isPresent){
if (!isPresent) {
tecniciIstruttori.add(userGroupRole);
}
}}}
}
}
List<IstruttoreBean> tecniciIstruttoriSorted = new ArrayList<IstruttoreBean>();
for(UserGroupRole tecnico : tecniciIstruttori){
for (UserGroupRole tecnico : tecniciIstruttori) {
IstruttoreBean istruttore = new IstruttoreBean();
istruttore.setIdIstruttore(tecnico.getUserId());
istruttore.setDenominazione(tecnico.getUser().getFullName());
tecniciIstruttoriSorted.add(istruttore);
}
Collections.sort(tecniciIstruttoriSorted);
for(IstruttoreBean istruttore : tecniciIstruttoriSorted){
for (IstruttoreBean istruttore : tecniciIstruttoriSorted) {
%>
<aui:option value="<%=istruttore.getIdIstruttore() %>"><%=istruttore.getDenominazione() %></aui:option>
<aui:option value="<%= istruttore.getIdIstruttore() %>">
<%= istruttore.getDenominazione() %>
</aui:option>
<%
}
%>
</aui:select>
</c:if>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<aui:field-wrapper label="Data richiesta da"
inlineField="<%= true %>">
<liferay-util:include page="/html/common/input_date_time.jsp"
servletContext="<%= application %>">
<div class="col-xs-12 col-md-4">
<aui:field-wrapper label="Data richiesta da" inlineField="true">
<liferay-util:include page="/html/common/input_date_time.jsp" servletContext="<%= application %>">
<liferay-util:param name="field" value="dataRichiestaInizio" />
</liferay-util:include>
</aui:field-wrapper>
<aui:field-wrapper label="a" inlineField="<%= true %>">
<liferay-util:include page="/html/common/input_date_time.jsp"
servletContext="<%= application %>">
<aui:field-wrapper label="a" inlineField="true">
<liferay-util:include page="/html/common/input_date_time.jsp" servletContext="<%= application %>">
<liferay-util:param name="field" value="dataRichiestaFine" />
</liferay-util:include>
</aui:field-wrapper>
</div>
<div
class="col-sm-12 col-md-3 add-new-project__ufficio">
<c:if
test="<%=organizationList != null && !organizationList.isEmpty() && organizationList.size() > 1 %>">
<div class="col-sm-12 col-md-3 add-new-project__ufficio">
<c:if test="<%= organizationList != null && organizationList.size() > 1 %>">
<aui:select name="ufficio" label="Ufficio">
<aui:option value="-1">Tutte</aui:option>
<%
for(Organization org : organizationList){
if(org.getParentOrganizationId()!= 0){
for (Organization org : organizationList) {
if (org.getParentOrganizationId() != 0) {
%>
<aui:option value="<%=org.getGroupId() %>"><%=org.getName() %></aui:option>
<aui:option value="<%= org.getGroupId() %>"><%= org.getName() %></aui:option>
<%
}
}
@ -199,8 +137,7 @@ List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrgani
<%
String comuneSelect = ParamUtil.getString(renderRequest, "comune");
%>
<aui:select name="comune" label="Comune">
</aui:select>
<aui:select name="comune" label="Comune" />
</div>
<div class="col-sm-12 col-md-2">
<aui:select name="tipoProcedura" label="tipo-procedura">
@ -212,7 +149,7 @@ List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrgani
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="col-xs-12 col-md-4">
<aui:select name="tipoAttivita" label="Tipo Attività">
<aui:option value="-1">Tutte</aui:option>
<aui:option value="Assegnazione">Assegnazione</aui:option>
@ -226,80 +163,67 @@ List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrgani
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="col-xs-12 col-md-4">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<div class="col-xs-12 col-md-6">
<aui:select name="ordinaPer" label="Ordina Per">
<aui:option value="taskName">Nome Task</aui:option>
<aui:option selected="true" value="numeroProgetto">Numero Progetto</aui:option>
<aui:option value="protocollo">Protocollo</aui:option>
<aui:option value="createDate">Data Invio</aui:option>
<aui:option value="tipoPratica">Tipo Pratica</aui:option>
</aui:select>
</div>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<div class="col-xs-12 col-md-6">
<aui:select name="ordinaTipo" label="Tipo Ordine">
<aui:option selected="true" value="dec">Dec</aui:option>
<aui:option value="asc">Asc</aui:option>
</aui:select>
</div>
</div>
</div>
</div>
<aui:button type="submit" value="search" />
</div>
</liferay-ui:panel>
<%--ADT BUG BO ID = 1 SEZIONE ATTIVITà --%>
<%--ADT BUG BO ID = 1 SEZIONE ATTIVITÀ --%>
<liferay-portlet:resourceURL id="comuniForUfficio" var="getComuniURL" />
<aui:script use="aui-io-request">
$(".add-new-project__ufficio select").change(function(){
$(".add-new-project__ufficio select").change(function() {
var comuni = '';
var val = $(this).val();
$(".add-new-project__comune select").empty();
A.io.request(
'<%= getComuniURL %>',
{
data: {
<portlet:namespace />ufficioId: val
},dataType: 'json',
A.io.request('<%= getComuniURL %>', {
data: { <portlet:namespace />ufficioId: val },
dataType: 'json',
on: {
success: function() {
$(".add-new-project__comune select").empty();
$(".add-new-project__comune select").append($('<option>').val('-1').text('Tutti'));
var response = this.get('responseData');
<% String csParam = ParamUtil.getString(renderRequest, "comune");
<%
String csParam = ParamUtil.getString(renderRequest, "comune");
String cs = "null";
if(csParam != null && !csParam.equals("")){
if (Validator.isNotNull(csParam)){
cs = csParam;
}
%>
var cs = <%= cs %>;
var checkIfExists = false;
for( index in response ){
$(".add-new-project__comune select").append($('<option>').val(response[index].comuneId).text(response[index].descLong));
if(cs != 'null'){
if(response[index].comuneId == cs){
for (index in response) {
$(".add-new-project__comune select").append($('<option>').val(response[index].comuneId)
.text(response[index].descLong));
if (cs != 'null') {
if (response[index].comuneId == cs) {
checkIfExists = true;
}
}
}
if(checkIfExists){
if (checkIfExists) {
$(".add-new-project__comune select").val(cs);
}
}
}
}
);
}).trigger("change");
});
}).trigger("change");
</aui:script>

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

@ -190,12 +190,8 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
if (Validator.isNotNull(controllo)) {
IntPratica pratica = IntPraticaLocalServiceUtil.getIntPratica(controllo.getIntPraticaId());
// Correzione stato per pratiche prelevate manualmente dalle attività completate
if ((WorkflowConstants.STATUS_APPROVED == controllo.getStatus() && StatoPraticaConstants.CONFORME
.equalsIgnoreCase(pratica.getStatoPratica()))) {
_log.info("Pratica " + pratica.getNumeroProgetto() + ", stato pratica "
+ pratica.getStatoPratica() + " -> "
+ StatoPraticaConstants.SOTTOPOSTA_A_PARERE + ", status controllo "
+ controllo.getStatus() + " -> " + WorkflowConstants.STATUS_PENDING);
if ((WorkflowConstants.STATUS_APPROVED == controllo.getStatus())
&& StatoPraticaConstants.CONFORME.equalsIgnoreCase(pratica.getStatoPratica())) {
controllo.setStatus(WorkflowConstants.STATUS_PENDING);
ControlloPraticaLocalServiceUtil.updateControlloPratica(controllo);
pratica.setStatoPratica(StatoPraticaConstants.SOTTOPOSTA_A_PARERE);

Caricamento…
Annulla
Salva