Salvatore La Manna 4 anni fa
parent
commit
d2153f4aab
  1. 463
      jasper/VIArch_attivazione.jrxml
  2. 463
      jasper/VIArch_conclusione.jrxml
  3. 22
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AvvisoUtil.java
  4. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Language.properties
  5. 90
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AvvisoImpl.java
  6. 47
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java
  7. 68
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java
  8. 322
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
  9. 7
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
  10. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  11. 232
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/avvisi/view.jsp
  12. 439
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/advanced_search.jsp
  13. 23
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_avvisi.jsp
  14. 24
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf
  15. 52
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns_completed.jspf
  16. BIN
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/commons-logging.jar
  17. BIN
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/log4j.jar
  18. BIN
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/util-bridges.jar
  19. BIN
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/util-java.jar
  20. BIN
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/util-taglib.jar
  21. 3
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-plugin-package.properties
  22. 349
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/scheduler/SchedulerKaleoController.java
  23. 4
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/service.properties
  24. 1
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java
  25. 336
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf
  26. 8
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp
  27. 81
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java
  28. 81
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/RenderFormTaskPortletAction.java
  29. 103
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/util/WorkflowUtil.java
  30. 4
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

463
jasper/VIArch_attivazione.jrxml

@ -0,0 +1,463 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.3.final utlizzo versione della libreria JasperReports6.4.3 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Modello A" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="afafe5d8-778e-4527-a33a-8c04000abd71">
<property name="ireport.zoom" value="1.3636363636363653"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="1180"/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<subDataset name="dataset1" whenResourceMissingType="Empty" uuid="a88aaa8a-a8ef-4d30-97a7-683ded039127">
<field name="codiceAllegato" class="java.lang.String"/>
<field name="titoloAllegato" class="java.lang.String"/>
<field name="sha256Allegato" class="java.lang.String"/>
</subDataset>
<parameter name="LOGO_REGIONE" class="java.lang.String"/>
<parameter name="motivazioni" class="java.lang.String"/>
<parameter name="testo_del_documento" class="java.lang.String"/>
<parameter name="LOGO_DIPARTIMENTO" class="java.lang.String"/>
<field name="alCollaudatore" class="java.lang.String"/>
<field name="alDirettoreLavori" class="java.lang.String"/>
<field name="alTitolareDigitale" class="java.lang.String"/>
<field name="committente" class="java.lang.String"/>
<field name="comune" class="java.lang.String"/>
<field name="lavoriDi" class="java.lang.String"/>
<field name="alCommittente" class="java.lang.String"/>
<field name="codiceUnivoco" class="java.lang.String"/>
<field name="dataAvviso" class="java.util.Date"/>
<field name="dataPratica" class="java.util.Date"/>
<field name="numeroProtocollo" class="java.lang.String"/>
<field name="numeroVariante" class="java.lang.String"/>
<field name="sedeGenioCivile" class="java.lang.String"/>
<field name="numeroProgetto" class="java.lang.String"/>
<field name="ubicazione" class="java.lang.String"/>
<field name="allegati" class="java.util.List"/>
<field name="tipoAutorizzazione" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<pageHeader>
<band height="71" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<image>
<reportElement x="0" y="0" width="224" height="68" uuid="69ba1fba-114d-4d87-afcf-2a121decda52">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<imageExpression><![CDATA[$P{LOGO_REGIONE}]]></imageExpression>
</image>
<textField>
<reportElement x="360" y="49" width="189" height="19" uuid="54537172-6b28-41f4-914e-f4fab36cd4e9">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="DejaVu Sans Bold" size="8" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Soprintendenza BB.CC.AA"+"\n"+
"di "+$F{sedeGenioCivile}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="360" y="25" width="191" height="24" uuid="1b70a5b6-ea8f-42f7-926a-6afe5791e1f8">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="DejaVu Sans Bold" size="8" isBold="false"/>
</textElement>
<text><![CDATA[Dipartimento dei beni culturali
e dell'identità siciliana]]></text>
</staticText>
<image>
<reportElement x="430" y="0" width="79" height="25" uuid="847628c6-b81f-4230-a9b0-06a8d5d7442c">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<imageExpression><![CDATA[$P{LOGO_DIPARTIMENTO}]]></imageExpression>
</image>
</band>
</pageHeader>
<detail>
<band height="98">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<line>
<reportElement x="0" y="22" width="555" height="1" uuid="9a12dff4-3c78-4e66-b1b6-13836bb2182b"/>
</line>
<staticText>
<reportElement x="1" y="30" width="56" height="13" uuid="9f68e9a8-cba6-4f14-bfd8-00b5bb45ebcb"/>
<textElement>
<font fontName="DejaVu Sans" isBold="true"/>
</textElement>
<text><![CDATA[Oggetto:]]></text>
</staticText>
<textField>
<reportElement x="59" y="4" width="100" height="12" uuid="db3d08ab-28c7-4bb7-9758-f17e9a87c303"/>
<textElement>
<font fontName="DejaVu Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format($F{dataAvviso})]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="9" y="4" width="48" height="12" uuid="91b20a71-bc61-45b2-b546-829b214db055"/>
<textElement>
<font fontName="DejaVu Sans" size="8" isBold="false" isItalic="false"/>
</textElement>
<text><![CDATA[Data Avviso]]></text>
</staticText>
<staticText>
<reportElement x="59" y="84" width="130" height="14" uuid="2c29296d-097b-4faa-b4d2-7045cef06f6d">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Descrizione]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="59" y="30" width="491" height="26" uuid="6cb9f8b8-8715-41ba-a4d4-6eabe2e85408">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{tipoAutorizzazione}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="3" y="63" width="548" height="14" uuid="8c9f5378-8e8d-4655-84b5-eccad49767d5">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center">
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[ATTIVAZIONE PROCEDURA DI VERIFICA PREVENTIVA]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="190" y="84" width="360" height="14" uuid="877d100e-606b-4eea-960e-f889359577e1">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{lavoriDi}]]></textFieldExpression>
</textField>
</band>
<band height="49">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<staticText>
<reportElement x="59" y="0" width="130" height="14" uuid="4f9a8fdf-ffa4-40e1-8243-a75cc00f8200">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Ubicazione]]></text>
</staticText>
<staticText>
<reportElement x="59" y="14" width="130" height="14" uuid="3f6043ac-d101-498c-b158-050a7240c012">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Istanza n.]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="190" y="0" width="360" height="14" uuid="ac4495b9-44cc-4024-8f86-834e44616dff">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{ubicazione} != null ? $F{ubicazione} : ""]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="190" y="14" width="360" height="14" uuid="cb433646-ff21-4c58-97d7-0cf423a63b23">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{numeroProgetto}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="190" y="28" width="360" height="14" uuid="352ff7ee-5039-4b04-8b75-755272041573">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{numeroProtocollo}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="59" y="28" width="130" height="14" uuid="65bd3291-92e6-4348-9d4c-79304aa36c0e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Protocollo]]></text>
</staticText>
</band>
<band height="197">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField isBlankWhenNull="true">
<reportElement key="" x="285" y="40" width="268" height="14" uuid="b82a2f48-cea2-4ad2-8b76-c443de8a1fe1">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{comune}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="" x="170" y="10" width="115" height="14" uuid="c0370045-7e64-47e0-9c03-d9259f814713">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="true"/>
</textElement>
<text><![CDATA[Al Committente]]></text>
</staticText>
<staticText>
<reportElement x="90" y="40" width="195" height="14" uuid="3f554448-d5dc-4075-b6ed-8e7bd10d7998">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[al Sindaco / S.U.E. del Comune di ]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement key="" x="285" y="10" width="268" height="14" uuid="f502c7f9-5ac4-43dd-bd91-cc46b395365e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{alCommittente}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement key="" x="285" y="24" width="268" height="14" uuid="03b513cf-794b-4cb8-92f4-2c81909cd825">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{alTitolareDigitale}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="" x="170" y="24" width="115" height="14" uuid="2a88b2fd-8fcf-4888-a1a1-82919fe0776a">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="true"/>
</textElement>
<text><![CDATA[c/o il suo delegato]]></text>
</staticText>
<staticText>
<reportElement x="3" y="70" width="548" height="60" uuid="e4fec3f3-6651-4474-af2b-5072d857d07e">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans" isBold="false"/>
</textElement>
<text><![CDATA[Con riferimento all’istanza in oggetto
- visto il Codice dei Beni Culturali e del Paesaggio (D.L.vo n. 42 del 22.01.2004 e ss.mm.ii.);
- visto il Piano Paesaggistico degli Ambiti 14 e 17 ricadenti nella provincia di Siracusa, approvato con D.A. n. 5040 del 20.10.2017 e pubblicato nella G.U.R.S. n. 12 del 16.03.2018;
esaminata la documentazione allegata all’istanza;]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="3" y="140" width="548" height="50" uuid="0156b4c7-6c07-4e4a-b8f6-e8ef115f5b1e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement textAlignment="Justified">
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$P{testo_del_documento}]]></textFieldExpression>
</textField>
</band>
<band height="63">
<componentElement>
<reportElement x="3" y="33" width="548" height="30" uuid="1a359757-dc45-45cb-bdf8-215e91905c39">
<property name="com.jaspersoft.studio.unit.CONTENTS.height" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="dataset1" uuid="c5c63b6d-60a1-4ab0-8a82-0ac6993df639">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{allegati})]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="30" width="548">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="20" y="0" width="519" height="14" uuid="6689d4e1-4145-4de3-9faa-7206aab84bdd">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="DejaVu Sans" size="9"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$F{codiceAllegato}+" - "+$F{titoloAllegato}]]></textFieldExpression>
</textField>
<ellipse>
<reportElement x="11" y="5" width="4" height="4" backcolor="#000000" uuid="775a480f-53f2-43e5-ac27-8384f4986c90">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</ellipse>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="20" y="14" width="519" height="14" uuid="0c265a63-dc21-413a-8a3d-8eec3b770a17">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="DejaVu Sans" size="9"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA["SHA256: "+$F{sha256Allegato}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<staticText>
<reportElement x="3" y="0" width="548" height="26" uuid="b1072570-e715-4b6f-bda4-ae4723e17f5d">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.firstLineIndent" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
<paragraph firstLineIndent="14" leftIndent="0"/>
</textElement>
<text><![CDATA[Viene di seguito riportato l’elenco dei documenti allegati all’istanza ed acquisiti dal sistema informatico “Paesaggistica” della Regione Siciliana.]]></text>
</staticText>
</band>
<band height="130">
<staticText>
<reportElement x="4" y="10" width="547" height="80" uuid="e0eafb80-b8a6-4a02-a365-dbc0fdb746da">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Justified">
<font fontName="DejaVu Sans" size="11" isBold="false"/>
</textElement>
<text><![CDATA[Contro il presente provvedimento è ammesso ricorso gerarchico all’Assessorato Regionale dei Beni Culturali ed Ambientali e dell’Identità Siciliana entro trenta giorni dall’acquisita conoscenza, o al Tribunale Amministrativo Regionale entro sessanta giorni.
L’eventuale ricorso gerarchico, debitamente sottoscritto e regolarizzato in bollo, dovrà riportare le generalità del ricorrente, comprensive di indirizzo di posta elettronica certificata, cui effettuare comunicazioni e notifiche relative al procedimento.]]></text>
</staticText>
<staticText>
<reportElement x="4" y="100" width="547" height="20" uuid="a357f0d4-8217-44d7-b424-b81c836f803a">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Right">
<font fontName="DejaVu Sans" size="12" isBold="false"/>
</textElement>
<text><![CDATA[Il soprintendente]]></text>
</staticText>
<staticText>
<reportElement x="4" y="120" width="547" height="10" uuid="e484cc67-3e66-431a-ad1f-bc7fc56c0836">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Right">
<font fontName="DejaVu Sans" size="8" isBold="false"/>
</textElement>
<text><![CDATA[Firmato digitalmente]]></text>
</staticText>
</band>
<band height="215">
<staticText>
<reportElement x="4" y="10" width="547" height="190" uuid="1b23fa15-1e45-450e-9644-b07ed159627c">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Justified">
<font fontName="DejaVu Sans" isBold="false" isItalic="true"/>
</textElement>
<text><![CDATA[Nel rispetto di quanto prescritto dalla L. 241/1990 e ss. mm. ii. e della L.R. 7/2019, si comunica che, per il presente procedimento amministrativo,
- le Unità Operative che si occupano di provvedimenti autorizzativi in materia di Beni Culturali nelle Soprintendenze dell’Isola, ognuna per le proprie competenze, rappresentano l'unità organizzativa responsabile del procedimento sotto il profilo tecnico-scientifico e di ogni atto procedimentale interlocutorio;
- responsabile dell'adozione del provvedimento finale è il Soprintendente;
- ai fini dell’eventuale richiesta di esercizio dei poteri sostitutivi, il responsabile della correttezza e della celerità è il Dirigente Generale del Dipartimento Beni Culturali e dell’Identità Siciliana.
Responsabile della piattaforma telematica è il Dott. Mario Parlavecchio (mparlavecchio@regione.sicilia.it).
Il titolare del trattamento, definito dall’articolo 4, n. 7 del GDPR - Regolamento generale sulla protezione dei dati (UE/2016/679), è il Dipartimento Beni Culturali e dell’Identità Siciliana.
Responsabili del trattamento, definito all’articolo 4, n.8 del GDPR - Regolamento generale sulla protezione dei dati (UE/2016/679), sono le Soprintendenze di Agrigento, Caltanissetta, Catania, Enna, Messina, Palermo, Ragusa, Siracusa, Trapani, e la Soprintendenza del Mare.]]></text>
</staticText>
</band>
</detail>
<pageFooter>
<band height="109" splitType="Stretch">
<staticText>
<reportElement x="4" y="86" width="301" height="23" uuid="89e43c7c-c4e3-456f-8eba-d21332502699">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[www.regione.sicilia.it
https://paesaggistica.sicilia.it]]></text>
</staticText>
<line>
<reportElement x="0" y="83" width="555" height="1" uuid="f2f3ee86-58db-4a77-937b-428b7f419b7b">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
</line>
<componentElement>
<reportElement x="183" y="10" width="188" height="50" uuid="4f9aca65-1cf3-4aae-bc48-c9a0517bf888">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<printWhenExpression><![CDATA[$F{codiceUnivoco} != null]]></printWhenExpression>
</reportElement>
<jr:PDF417 xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" moduleWidth="50.0" textPosition="bottom">
<jr:codeExpression><![CDATA[$F{codiceUnivoco}]]></jr:codeExpression>
</jr:PDF417>
</componentElement>
<textField isBlankWhenNull="true">
<reportElement x="8" y="60" width="538" height="20" uuid="17c484f8-1f60-4ac6-bf04-4b1ef031793a">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement textAlignment="Center">
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{codiceUnivoco}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
</jasperReport>

463
jasper/VIArch_conclusione.jrxml

@ -0,0 +1,463 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.3.final utlizzo versione della libreria JasperReports6.4.3 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Modello A" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="afafe5d8-778e-4527-a33a-8c04000abd71">
<property name="ireport.zoom" value="1.3636363636363653"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="1180"/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<subDataset name="dataset1" whenResourceMissingType="Empty" uuid="a88aaa8a-a8ef-4d30-97a7-683ded039127">
<field name="codiceAllegato" class="java.lang.String"/>
<field name="titoloAllegato" class="java.lang.String"/>
<field name="sha256Allegato" class="java.lang.String"/>
</subDataset>
<parameter name="LOGO_REGIONE" class="java.lang.String"/>
<parameter name="motivazioni" class="java.lang.String"/>
<parameter name="testo_del_documento" class="java.lang.String"/>
<parameter name="LOGO_DIPARTIMENTO" class="java.lang.String"/>
<field name="alCollaudatore" class="java.lang.String"/>
<field name="alDirettoreLavori" class="java.lang.String"/>
<field name="alTitolareDigitale" class="java.lang.String"/>
<field name="committente" class="java.lang.String"/>
<field name="comune" class="java.lang.String"/>
<field name="lavoriDi" class="java.lang.String"/>
<field name="alCommittente" class="java.lang.String"/>
<field name="codiceUnivoco" class="java.lang.String"/>
<field name="dataAvviso" class="java.util.Date"/>
<field name="dataPratica" class="java.util.Date"/>
<field name="numeroProtocollo" class="java.lang.String"/>
<field name="numeroVariante" class="java.lang.String"/>
<field name="sedeGenioCivile" class="java.lang.String"/>
<field name="numeroProgetto" class="java.lang.String"/>
<field name="ubicazione" class="java.lang.String"/>
<field name="allegati" class="java.util.List"/>
<field name="tipoAutorizzazione" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<pageHeader>
<band height="71" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<image>
<reportElement x="0" y="0" width="224" height="68" uuid="69ba1fba-114d-4d87-afcf-2a121decda52">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<imageExpression><![CDATA[$P{LOGO_REGIONE}]]></imageExpression>
</image>
<textField>
<reportElement x="360" y="49" width="189" height="19" uuid="54537172-6b28-41f4-914e-f4fab36cd4e9">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="DejaVu Sans Bold" size="8" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Soprintendenza BB.CC.AA"+"\n"+
"di "+$F{sedeGenioCivile}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="360" y="25" width="191" height="24" uuid="1b70a5b6-ea8f-42f7-926a-6afe5791e1f8">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="DejaVu Sans Bold" size="8" isBold="false"/>
</textElement>
<text><![CDATA[Dipartimento dei beni culturali
e dell'identità siciliana]]></text>
</staticText>
<image>
<reportElement x="430" y="0" width="79" height="25" uuid="847628c6-b81f-4230-a9b0-06a8d5d7442c">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<imageExpression><![CDATA[$P{LOGO_DIPARTIMENTO}]]></imageExpression>
</image>
</band>
</pageHeader>
<detail>
<band height="98">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<line>
<reportElement x="0" y="22" width="555" height="1" uuid="9a12dff4-3c78-4e66-b1b6-13836bb2182b"/>
</line>
<staticText>
<reportElement x="1" y="30" width="56" height="13" uuid="9f68e9a8-cba6-4f14-bfd8-00b5bb45ebcb"/>
<textElement>
<font fontName="DejaVu Sans" isBold="true"/>
</textElement>
<text><![CDATA[Oggetto:]]></text>
</staticText>
<textField>
<reportElement x="59" y="4" width="100" height="12" uuid="db3d08ab-28c7-4bb7-9758-f17e9a87c303"/>
<textElement>
<font fontName="DejaVu Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format($F{dataAvviso})]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="9" y="4" width="48" height="12" uuid="91b20a71-bc61-45b2-b546-829b214db055"/>
<textElement>
<font fontName="DejaVu Sans" size="8" isBold="false" isItalic="false"/>
</textElement>
<text><![CDATA[Data Avviso]]></text>
</staticText>
<staticText>
<reportElement x="59" y="84" width="130" height="14" uuid="2c29296d-097b-4faa-b4d2-7045cef06f6d">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Descrizione]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="59" y="30" width="491" height="26" uuid="6cb9f8b8-8715-41ba-a4d4-6eabe2e85408">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{tipoAutorizzazione}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="3" y="63" width="548" height="14" uuid="8c9f5378-8e8d-4655-84b5-eccad49767d5">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center">
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[CONCLUSIONE PROCEDURA DI VERIFICA PREVENTIVA]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="190" y="84" width="360" height="14" uuid="877d100e-606b-4eea-960e-f889359577e1">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{lavoriDi}]]></textFieldExpression>
</textField>
</band>
<band height="49">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<staticText>
<reportElement x="59" y="0" width="130" height="14" uuid="4f9a8fdf-ffa4-40e1-8243-a75cc00f8200">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Ubicazione]]></text>
</staticText>
<staticText>
<reportElement x="59" y="14" width="130" height="14" uuid="3f6043ac-d101-498c-b158-050a7240c012">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Istanza n.]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="190" y="0" width="360" height="14" uuid="ac4495b9-44cc-4024-8f86-834e44616dff">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{ubicazione} != null ? $F{ubicazione} : ""]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="190" y="14" width="360" height="14" uuid="cb433646-ff21-4c58-97d7-0cf423a63b23">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{numeroProgetto}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="190" y="28" width="360" height="14" uuid="352ff7ee-5039-4b04-8b75-755272041573">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{numeroProtocollo}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="59" y="28" width="130" height="14" uuid="65bd3291-92e6-4348-9d4c-79304aa36c0e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Protocollo]]></text>
</staticText>
</band>
<band height="197">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField isBlankWhenNull="true">
<reportElement key="" x="285" y="40" width="268" height="14" uuid="b82a2f48-cea2-4ad2-8b76-c443de8a1fe1">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{comune}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="" x="170" y="10" width="115" height="14" uuid="c0370045-7e64-47e0-9c03-d9259f814713">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="true"/>
</textElement>
<text><![CDATA[Al Committente]]></text>
</staticText>
<staticText>
<reportElement x="90" y="40" width="195" height="14" uuid="3f554448-d5dc-4075-b6ed-8e7bd10d7998">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[al Sindaco / S.U.E. del Comune di ]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement key="" x="285" y="10" width="268" height="14" uuid="f502c7f9-5ac4-43dd-bd91-cc46b395365e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{alCommittente}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement key="" x="285" y="24" width="268" height="14" uuid="03b513cf-794b-4cb8-92f4-2c81909cd825">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{alTitolareDigitale}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="" x="170" y="24" width="115" height="14" uuid="2a88b2fd-8fcf-4888-a1a1-82919fe0776a">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="true"/>
</textElement>
<text><![CDATA[c/o il suo delegato]]></text>
</staticText>
<staticText>
<reportElement x="3" y="70" width="548" height="60" uuid="e4fec3f3-6651-4474-af2b-5072d857d07e">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans" isBold="false"/>
</textElement>
<text><![CDATA[Con riferimento all’istanza in oggetto
- visto il Codice dei Beni Culturali e del Paesaggio (D.L.vo n. 42 del 22.01.2004 e ss.mm.ii.);
- visto il Piano Paesaggistico degli Ambiti 14 e 17 ricadenti nella provincia di Siracusa, approvato con D.A. n. 5040 del 20.10.2017 e pubblicato nella G.U.R.S. n. 12 del 16.03.2018;
esaminata la documentazione allegata all’istanza;]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="3" y="140" width="548" height="50" uuid="0156b4c7-6c07-4e4a-b8f6-e8ef115f5b1e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement textAlignment="Justified">
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$P{testo_del_documento}]]></textFieldExpression>
</textField>
</band>
<band height="63">
<componentElement>
<reportElement x="3" y="33" width="548" height="30" uuid="1a359757-dc45-45cb-bdf8-215e91905c39">
<property name="com.jaspersoft.studio.unit.CONTENTS.height" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="dataset1" uuid="c5c63b6d-60a1-4ab0-8a82-0ac6993df639">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{allegati})]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="30" width="548">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="20" y="0" width="519" height="14" uuid="6689d4e1-4145-4de3-9faa-7206aab84bdd">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="DejaVu Sans" size="9"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$F{codiceAllegato}+" - "+$F{titoloAllegato}]]></textFieldExpression>
</textField>
<ellipse>
<reportElement x="11" y="5" width="4" height="4" backcolor="#000000" uuid="775a480f-53f2-43e5-ac27-8384f4986c90">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</ellipse>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="20" y="14" width="519" height="14" uuid="0c265a63-dc21-413a-8a3d-8eec3b770a17">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="DejaVu Sans" size="9"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA["SHA256: "+$F{sha256Allegato}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
<staticText>
<reportElement x="3" y="0" width="548" height="26" uuid="b1072570-e715-4b6f-bda4-ae4723e17f5d">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.firstLineIndent" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
<paragraph firstLineIndent="14" leftIndent="0"/>
</textElement>
<text><![CDATA[Viene di seguito riportato l’elenco dei documenti allegati all’istanza ed acquisiti dal sistema informatico “Paesaggistica” della Regione Siciliana.]]></text>
</staticText>
</band>
<band height="130">
<staticText>
<reportElement x="4" y="10" width="547" height="80" uuid="e0eafb80-b8a6-4a02-a365-dbc0fdb746da">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Justified">
<font fontName="DejaVu Sans" size="11" isBold="false"/>
</textElement>
<text><![CDATA[Contro il presente provvedimento è ammesso ricorso gerarchico all’Assessorato Regionale dei Beni Culturali ed Ambientali e dell’Identità Siciliana entro trenta giorni dall’acquisita conoscenza, o al Tribunale Amministrativo Regionale entro sessanta giorni.
L’eventuale ricorso gerarchico, debitamente sottoscritto e regolarizzato in bollo, dovrà riportare le generalità del ricorrente, comprensive di indirizzo di posta elettronica certificata, cui effettuare comunicazioni e notifiche relative al procedimento.]]></text>
</staticText>
<staticText>
<reportElement x="4" y="100" width="547" height="20" uuid="a357f0d4-8217-44d7-b424-b81c836f803a">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Right">
<font fontName="DejaVu Sans" size="12" isBold="false"/>
</textElement>
<text><![CDATA[Il soprintendente]]></text>
</staticText>
<staticText>
<reportElement x="4" y="120" width="547" height="10" uuid="e484cc67-3e66-431a-ad1f-bc7fc56c0836">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Right">
<font fontName="DejaVu Sans" size="8" isBold="false"/>
</textElement>
<text><![CDATA[Firmato digitalmente]]></text>
</staticText>
</band>
<band height="215">
<staticText>
<reportElement x="4" y="10" width="547" height="190" uuid="1b23fa15-1e45-450e-9644-b07ed159627c">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Justified">
<font fontName="DejaVu Sans" isBold="false" isItalic="true"/>
</textElement>
<text><![CDATA[Nel rispetto di quanto prescritto dalla L. 241/1990 e ss. mm. ii. e della L.R. 7/2019, si comunica che, per il presente procedimento amministrativo,
- le Unità Operative che si occupano di provvedimenti autorizzativi in materia di Beni Culturali nelle Soprintendenze dell’Isola, ognuna per le proprie competenze, rappresentano l'unità organizzativa responsabile del procedimento sotto il profilo tecnico-scientifico e di ogni atto procedimentale interlocutorio;
- responsabile dell'adozione del provvedimento finale è il Soprintendente;
- ai fini dell’eventuale richiesta di esercizio dei poteri sostitutivi, il responsabile della correttezza e della celerità è il Dirigente Generale del Dipartimento Beni Culturali e dell’Identità Siciliana.
Responsabile della piattaforma telematica è il Dott. Mario Parlavecchio (mparlavecchio@regione.sicilia.it).
Il titolare del trattamento, definito dall’articolo 4, n. 7 del GDPR - Regolamento generale sulla protezione dei dati (UE/2016/679), è il Dipartimento Beni Culturali e dell’Identità Siciliana.
Responsabili del trattamento, definito all’articolo 4, n.8 del GDPR - Regolamento generale sulla protezione dei dati (UE/2016/679), sono le Soprintendenze di Agrigento, Caltanissetta, Catania, Enna, Messina, Palermo, Ragusa, Siracusa, Trapani, e la Soprintendenza del Mare.]]></text>
</staticText>
</band>
</detail>
<pageFooter>
<band height="109" splitType="Stretch">
<staticText>
<reportElement x="4" y="86" width="301" height="23" uuid="89e43c7c-c4e3-456f-8eba-d21332502699">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans" size="8" isBold="true"/>
</textElement>
<text><![CDATA[www.regione.sicilia.it
https://paesaggistica.sicilia.it]]></text>
</staticText>
<line>
<reportElement x="0" y="83" width="555" height="1" uuid="f2f3ee86-58db-4a77-937b-428b7f419b7b">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
</line>
<componentElement>
<reportElement x="183" y="10" width="188" height="50" uuid="4f9aca65-1cf3-4aae-bc48-c9a0517bf888">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<printWhenExpression><![CDATA[$F{codiceUnivoco} != null]]></printWhenExpression>
</reportElement>
<jr:PDF417 xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" moduleWidth="50.0" textPosition="bottom">
<jr:codeExpression><![CDATA[$F{codiceUnivoco}]]></jr:codeExpression>
</jr:PDF417>
</componentElement>
<textField isBlankWhenNull="true">
<reportElement x="8" y="60" width="538" height="20" uuid="17c484f8-1f60-4ac6-bf04-4b1ef031793a">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement textAlignment="Center">
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{codiceUnivoco}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
</jasperReport>

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

@ -151,6 +151,28 @@ public class AvvisoUtil {
return allTipoDocumentoFileTemplateProps;
}
public static String getFileTemplateProp(String statoPratica, String tipoProcedura) {
String label = statoPratica;
switch (tipoProcedura) {
// VIArch
case Constants.PROCEDURA_P3:
switch (statoPratica) {
case StatoPraticaConstants.AUTORIZZATA:
case StatoPraticaConstants.CONFORME:
label = "VIARCH2";
break;
case StatoPraticaConstants.INTEGRAZIONE:
label = "VIARCH1";
break;
}
}
switch (statoPratica) {
case StatoPraticaConstants.VIDIMATA:
label = "DP" + tipoProcedura;
}
return allTipoDocumentoFileTemplateProps.get(label);
}
public static Collection<String> getUniqueTipoDocumentoFileTemplateProps() {
Collection<String> result = new HashSet<>();
for (String value : allTipoDocumentoFileTemplateProps.values()) {

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

@ -154,6 +154,7 @@ conf.geniocivile.avviso.folder.id.manuale = Cartella Avvisi Manuali
conf.geniocivile.avviso.folder.id.doc_annullamento = Cartella File Annullamento Fascicolo
conf.geniocivile.avviso.folder.id.doc_pagamento = Cartella File Allegati MDB
conf.geniocivile.avviso.folder.id.domanda_pdf = Cartella Template Domanda
conf.geniocivile.avviso.folder.id.viarch = Cartella Avvisi VIArch
#Configurazione Templates
conf.geniocivile.template.folder.id = Cartella Template

90
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AvvisoImpl.java

@ -1,13 +1,13 @@
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.bo.model.impl;
@ -36,14 +36,12 @@ import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.portlet.documentlibrary.util.DLUtil;
/**
* The extended model implementation for the Avviso service. Represents a row in
* the &quot;portos_bo_Avviso&quot; database table, with each column mapped to a
* property of this class.
* The extended model implementation for the Avviso service. Represents a row in the &quot;portos_bo_Avviso&quot;
* database table, with each column mapped to a property of this class.
*
* <p>
* Helper methods and all application logic should be put in this class.
* Whenever methods are added, rerun ServiceBuilder to copy their definitions
* into the {@link it.tref.liferay.portos.bo.model.Avviso} interface.
* Helper methods and all application logic should be put in this class. Whenever methods are added, rerun
* ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.Avviso} interface.
* </p>
*
* @author Davide Barbagallo, 3F Consulting
@ -55,52 +53,52 @@ public class AvvisoImpl extends AvvisoBaseImpl {
private static final long serialVersionUID = -2350602144741897095L;
/*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods
* that expect a avviso model instance should use the {@link
* it.tref.liferay.portos.bo.model.Avviso} interface instead.
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a avviso model instance should
* use the {@link it.tref.liferay.portos.bo.model.Avviso} interface instead.
*/
public AvvisoImpl() {
}
@Override
public String getFullDescription() throws PortalException, SystemException {
String tipoDocumento = AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil
.getAllTipoDocumento().get(this.getTipoDocumento())
: "label.admingeniocivile.avviso.tipoDocumento.avvisomanuale";
String fullDescription = LanguageUtil.get(LocaleUtil.ITALIAN, tipoDocumento);
String fullDescription;
if (Validator.isNull(this.getDescLong())) {
String tipoDocumento = AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil
.getAllTipoDocumento().get(this.getTipoDocumento())
: "label.admingeniocivile.avviso.tipoDocumento.avvisomanuale";
fullDescription = LanguageUtil.get(LocaleUtil.ITALIAN, tipoDocumento);
} else {
fullDescription = this.getDescLong();
}
if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.VIDIMATA)) {
if (this.getClassName().equals(DettPratica.class.getName())) {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(this.getClassPk());
if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica
.getTipoIntegrazione())) {
fullDescription += " di <strong>"
+ LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-12") + "</strong>";
if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
fullDescription += " di <strong>" + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-12")
+ "</strong>";
} else if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica
.getTipoIntegrazione())) {
fullDescription += " di <strong>"
+ LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-05") + " n° "
+ dettPratica.getIntegrazione() + "</strong>";
fullDescription += " di <strong>" + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-05")
+ " n° " + dettPratica.getIntegrazione() + "</strong>";
} else if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
fullDescription += " di <strong>"
+ LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-13") + " n° "
+ dettPratica.getVarianteNumero() + "</strong>";
fullDescription += " di <strong>" + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-13")
+ " n° " + dettPratica.getVarianteNumero() + "</strong>";
}
} else if (this.getClassName().equals(FineLavori.class.getName())) {
FineLavori fineLavori = FineLavoriLocalServiceUtil.getFineLavori(this.getClassPk());
fullDescription += " di <strong>"
+ LanguageUtil.get(LocaleUtil.ITALIAN,
"label-integrazione-" + (fineLavori.getParziale() ? "09" : "07")) + " n° "
+ fineLavori.getNumero() + "</strong>";
+ LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-"
+ (fineLavori.getParziale() ? "09" : "07")) + " n° " + fineLavori.getNumero()
+ "</strong>";
} else if (this.getClassName().equals(Collaudo.class.getName())) {
Collaudo collaudo = CollaudoLocalServiceUtil.getCollaudo(this.getClassPk());
fullDescription += " di <strong>"
+ LanguageUtil.get(LocaleUtil.ITALIAN,
"label-integrazione-" + (collaudo.getParziale() ? "10" : "08")) + " n° "
+ collaudo.getNumero() + "</strong>";
+ LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-"
+ (collaudo.getParziale() ? "10" : "08")) + " n° " + collaudo.getNumero() + "</strong>";
}
} else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) {
@ -122,6 +120,7 @@ public class AvvisoImpl extends AvvisoBaseImpl {
return fullDescription;
}
@Override
public String getDescriptionOggettoProtocollo() throws PortalException, SystemException {
String tipoDocumento = AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil
@ -134,10 +133,8 @@ public class AvvisoImpl extends AvvisoBaseImpl {
if (this.getClassName().equals(DettPratica.class.getName())) {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(this.getClassPk());
if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica
.getTipoIntegrazione())) {
fullDescription += " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-12")
+ "";
if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
fullDescription += " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-12") + "";
} else if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica
.getTipoIntegrazione())) {
fullDescription += " di " + LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-05");
@ -147,14 +144,14 @@ public class AvvisoImpl extends AvvisoBaseImpl {
} else if (this.getClassName().equals(FineLavori.class.getName())) {
FineLavori fineLavori = FineLavoriLocalServiceUtil.getFineLavori(this.getClassPk());
fullDescription += " di "
+ LanguageUtil.get(LocaleUtil.ITALIAN,
"label-integrazione-" + (fineLavori.getParziale() ? "09" : "07"));
+ LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-"
+ (fineLavori.getParziale() ? "09" : "07"));
} else if (this.getClassName().equals(Collaudo.class.getName())) {
Collaudo collaudo = CollaudoLocalServiceUtil.getCollaudo(this.getClassPk());
fullDescription += " di "
+ LanguageUtil.get(LocaleUtil.ITALIAN,
"label-integrazione-" + (collaudo.getParziale() ? "10" : "08"));
+ LanguageUtil.get(LocaleUtil.ITALIAN, "label-integrazione-"
+ (collaudo.getParziale() ? "10" : "08"));
}
} else if (this.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) {
@ -176,18 +173,19 @@ public class AvvisoImpl extends AvvisoBaseImpl {
return fullDescription.replace("Avviso di ", "");
}
@Override
public String getDownloadUrl(ThemeDisplay themeDisplay) throws PortalException, SystemException {
if (Validator.isNotNull(getFileEntryIdInvio())) {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(getFileEntryIdInvio());
return DLUtil
.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, "&download=true");
return DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, "&download=true");
}
return null;
}
@Override
public String translateTipoDocumento() throws PortalException, SystemException {
String tipoDocumento = AvvisoUtil.getAllTipoDocumento().containsKey(this.getTipoDocumento()) ? AvvisoUtil

47
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java

@ -49,6 +49,7 @@ public class SchedulerGeneraDocumento implements MessageListener {
private static final int SIZE = 10;
@Override
public void receive(Message message) throws MessageListenerException {
if (lock.tryLock()) {
@ -56,10 +57,10 @@ public class SchedulerGeneraDocumento implements MessageListener {
try {
// campo abilitazione scheduler
for (Company company : CompanyLocalServiceUtil.getCompanies()) {
String condition = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(
company.getCompanyId(), ConfigurazioneConstants.SCHEDULER_GENERA_DOCUMENTO);
_log.debug("SchedulerGeneraDocumento - per company " + company.getCompanyId()
+ " attivo? " + condition);
String condition = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(company.getCompanyId(),
ConfigurazioneConstants.SCHEDULER_GENERA_DOCUMENTO);
_log.debug("SchedulerGeneraDocumento - per company " + company.getCompanyId() + " attivo? "
+ condition);
if (Boolean.parseBoolean(condition)) {
int count = AvvisoLocalServiceUtil.countAvvisiGenerazioneDocumento();
@ -68,8 +69,8 @@ public class SchedulerGeneraDocumento implements MessageListener {
for (int cursor = 0; cursor <= count; cursor += SIZE) {
List<Avviso> avvisi = AvvisoLocalServiceUtil.getAvvisiGenerazioneDocumento(
cursor, cursor + SIZE);
List<Avviso> avvisi = AvvisoLocalServiceUtil.getAvvisiGenerazioneDocumento(cursor,
cursor + SIZE);
for (Avviso avviso : avvisi) {
_log.debug("SchedulerGeneraDocumento - avviso " + avviso.getAvvisoId());
@ -82,8 +83,7 @@ public class SchedulerGeneraDocumento implements MessageListener {
// bloccato, non esiste file di
// template
_log.debug("SchedulerGeneraDocumento - non esiste file template");
AvvisoLocalServiceUtil.updateAvvisoErrore(avviso.getAvvisoId(),
true);
AvvisoLocalServiceUtil.updateAvvisoErrore(avviso.getAvvisoId(), true);
}
if (fileEntryTemplate != null && avviso.getOldFileEntryIdBase() == 0L) {
_log.debug("SchedulerGeneraDocumento - inizio genera documento");
@ -124,9 +124,10 @@ public class SchedulerGeneraDocumento implements MessageListener {
long folderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, AvvisoUtil
.getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento()));
String fileName = AvvisoLocalServiceUtil.getFileNameAvviso(avviso.getClassPk(),
avviso.getTipoDocumento(), avviso.getAvvisoId(), "B");
_log.info("tipoDocumento = " + avviso.getTipoDocumento() + ", prop = "
+ AvvisoUtil.getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento()));
String fileName = AvvisoLocalServiceUtil.getFileNameAvviso(avviso.getClassPk(), avviso.getTipoDocumento(),
avviso.getAvvisoId(), "B");
Map<String, Object> parameters = new HashMap<String, Object>();
if (Validator.isNotNull(avviso.getJsonParameters())) {
@ -141,8 +142,7 @@ public class SchedulerGeneraDocumento implements MessageListener {
if (intPratica != null && Validator.isNotNull(intPratica.getStatusByUserId())) {
User tecnico = UserLocalServiceUtil.fetchUserById(intPratica.getStatusByUserId());
if (tecnico != null) {
parameters.put(WorkflowConstants.WORKFLOW_PARAM_NAME_TECNICO,
tecnico.getFullName());
parameters.put(WorkflowConstants.WORKFLOW_PARAM_NAME_TECNICO, tecnico.getFullName());
parameters.put("delegato", tecnico.getFullName());
}
}
@ -150,25 +150,11 @@ public class SchedulerGeneraDocumento implements MessageListener {
}
bean = ReportAvvisoBeanBuilder.build(avviso, parameters);
parameters.put(ReportConstants.LOGO_REGIONE,
getClass().getResource(ReportConstants.PATH_LOGO_REGIONE).getPath());
parameters.put(ReportConstants.LOGO_REGIONE, getClass().getResource(ReportConstants.PATH_LOGO_REGIONE)
.getPath());
parameters.put(ReportConstants.LOGO_DIPARTIMENTO,
getClass().getResource(ReportConstants.PATH_LOGO_DIPARTIMENTO).getPath());
// avviso = gestioneProtocollazione(avviso, dettPratica);
/*
* Message messageReport = new Message();
* messageReport.put(ReportConstants.FILE_ENTRY_ID_TEMPLATE,
* fileEntryIdTemplate);
* messageReport.put(ReportConstants.FOLDER_ID_REPORT, folderId);
* messageReport.put(ReportConstants.REPORT_NAME, fileName);
* messageReport.put(ReportConstants.SERVICE_CONTEXT,
* serviceContext);
* messageReport.put(ReportConstants.REPORT_PARAMETERS, parameters);
* messageReport.put(ReportConstants.REPORT_DATASOURCE, bean);
*/
ReportDto reportDto = new ReportDto();
reportDto.setFileEntryIds(new long[] { fileEntryIdTemplate });
reportDto.setFolderId(folderId);
@ -181,9 +167,6 @@ public class SchedulerGeneraDocumento implements MessageListener {
_log.info("generaDocumento: generateReport: " + fileEntryIdTemplate);
ReportResultDto result = ReportUtil.generateReport(companyId, userId, reportDto, bean);
idFileEntry = result.getFileEntryIds()[0];
// idFileEntry = (Long)
// MessageBusUtil.sendSynchronousMessage(ReportDestinationNames.SYNC,
// messageReport, 1);
if (Validator.isNotNull(idFileEntry)) {
if (avviso.getTipoAvviso().equalsIgnoreCase(AvvisoUtil.TIPO_AVVISO_DIRETTO)) {

68
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java

@ -1,13 +1,13 @@
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.bo.service.impl;
@ -43,15 +43,12 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
* The implementation of the allegato manuale local service.
*
* <p>
* All custom service methods should be put in this class. Whenever methods are
* added, rerun ServiceBuilder to copy their definitions into the
* {@link it.tref.liferay.portos.bo.service.AllegatoManualeLocalService}
* interface.
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.AllegatoManualeLocalService} interface.
*
* <p>
* This is a local service. Methods of this service will not have security
* checks based on the propagated JAAS credentials because this service can only
* be accessed from within the same VM.
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
* </p>
*
* @author Davide Barbagallo, 3F Consulting
@ -63,39 +60,45 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
* NOTE FOR DEVELOPERS:
*
* Never reference this interface directly. Always use {@link
* it.tref.liferay.portos.bo.service.AllegatoManualeLocalServiceUtil} to
* access the allegato manuale local service.
* it.tref.liferay.portos.bo.service.AllegatoManualeLocalServiceUtil} to access the allegato manuale local service.
*/
@Override
public List<AllegatoManuale> findByIntPratica(long intPraticaId) throws SystemException {
return allegatoManualePersistence.findByIntPratica(intPraticaId);
}
@Override
public List<AllegatoManuale> findByIntPratica(long intPraticaId, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
return allegatoManualePersistence.findByIntPratica(intPraticaId, start, end, orderByComparator);
}
@Override
public int countByIntPratica(long intPraticaId) throws SystemException {
return allegatoManualePersistence.countByIntPratica(intPraticaId);
}
@Override
public List<AllegatoManuale> findByDettPratica(long dettPraticaId) throws SystemException {
return allegatoManualePersistence.findByIntPratica(dettPraticaId);
}
@Override
public List<AllegatoManuale> findByDettPratica(long dettPraticaId, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
return allegatoManualePersistence.findByIntPratica(dettPraticaId, start, end, orderByComparator);
}
@Override
public int countByDettPratica(long dettPraticaId) throws SystemException {
return allegatoManualePersistence.countByIntPratica(dettPraticaId);
}
public AllegatoManuale addAllegatoManuale(long userId, long intPraticaId, long dettPraticaId,
String descrizione, byte[] content, String sourceFileName, ServiceContext serviceContext)
throws SystemException, PortalException {
@Override
public AllegatoManuale addAllegatoManuale(long userId, long intPraticaId, long dettPraticaId, String descrizione,
byte[] content, String sourceFileName, ServiceContext serviceContext) throws SystemException,
PortalException {
AllegatoManuale allegatoManuale = allegatoManualePersistence.create(counterLocalService
.increment(AllegatoManuale.class.getName()));
@ -126,8 +129,8 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
defaultFolder.getFolderId(), folderName);
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(),
folderName);
} catch (NoSuchFolderException e) {
// cartella non presente -> creo cartella
folder = dlAppLocalService.addFolder(serviceContext.getUserId(), defaultFolder.getRepositoryId(),
@ -139,9 +142,9 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
String mimeType = MimeTypesUtil.getContentType(sourceFileName);
String changeLog = StringPool.BLANK;
FileEntry fileEntry = dlAppLocalService.addFileEntry(serviceContext.getUserId(),
folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_" + sourceFileName,
mimeType, title, description, changeLog, content, serviceContext);
FileEntry fileEntry = dlAppLocalService.addFileEntry(serviceContext.getUserId(), folder.getRepositoryId(),
folder.getFolderId(), now.getTime() + "_" + sourceFileName, mimeType, title, description, changeLog,
content, serviceContext);
fileEntryId = fileEntry.getFileEntryId();
allegatoManuale.setFileEntryId(fileEntryId);
@ -157,7 +160,7 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
}
Avviso avviso = avvisoLocalService.addAvviso(intPratica.getIntPraticaId(), descrizione, now,
AvvisoUtil.TIPO_AVVISO_FIRMA, StatoPraticaConstants.INVIO_AVVISO_MANUALE, 0l, dettPraticaId,
DettPratica.class.getName(), codiceFiscalePrimaFirma, fileEntryId, 0l, StringPool.BLANK, 0l,
DettPratica.class.getName(), codiceFiscalePrimaFirma, fileEntryId, 0L, StringPool.BLANK, 0L,
serviceContextAvvisi);
allegatoManuale.setAvvisoId(avviso.getAvvisoId());
@ -168,24 +171,11 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
@Override
public AllegatoManuale deleteAllegatoManuale(AllegatoManuale allegatoManuale) throws SystemException {
// Se si cancella il fileEntryid da qui, va tolto anche nell'avviso
// try {
// if (Validator.isNotNull(allegatoManuale.getFileEntryId())) {
// dlAppLocalService.deleteFileEntry(allegatoManuale.getFileEntryId());
// }
// } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e)
// {
//
// } catch (PortalException e) {
// throw new SystemException(e);
// }
return super.deleteAllegatoManuale(allegatoManuale);
}
@Override
public AllegatoManuale deleteAllegatoManuale(long allegatoManuale) throws PortalException,
SystemException {
return this.deleteAllegatoManuale(allegatoManualeLocalService.getAllegatoManuale(allegatoManuale));
public AllegatoManuale deleteAllegatoManuale(long allegatoManualeId) throws PortalException, SystemException {
return this.deleteAllegatoManuale(allegatoManualeLocalService.getAllegatoManuale(allegatoManualeId));
}
}

322
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java

@ -1,13 +1,13 @@
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.bo.service.impl;
@ -70,14 +70,12 @@ import com.liferay.util.dao.orm.CustomSQLUtil;
* The implementation of the avviso local service.
*
* <p>
* All custom service methods should be put in this class. Whenever methods are
* added, rerun ServiceBuilder to copy their definitions into the
* {@link it.tref.liferay.portos.bo.service.AvvisoLocalService} interface.
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.AvvisoLocalService} interface.
*
* <p>
* This is a local service. Methods of this service will not have security
* checks based on the propagated JAAS credentials because this service can only
* be accessed from within the same VM.
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
* </p>
*
* @author Davide Barbagallo, 3F Consulting
@ -86,13 +84,13 @@ import com.liferay.util.dao.orm.CustomSQLUtil;
*/
public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
/*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
* {@link it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil} to
* access the avviso local service.
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil} to access the avviso local service.
*/
private static final Log _log = LogFactoryUtil.getLog(AvvisoLocalServiceImpl.class.getName());
@Override
public Avviso createStandardAvvisoPratica(IntPratica intPratica, long classPk, String className,
ServiceContext serviceContext, String tipoAvviso, String userCodiceFiscalePrimaFirma,
long controlloPraticaId) throws SystemException, PortalException {
@ -101,6 +99,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
userCodiceFiscalePrimaFirma, StringPool.BLANK, controlloPraticaId);
}
@Override
public Avviso createStandardAvvisoPratica(IntPratica intPratica, long classPk, String className,
ServiceContext serviceContext, String tipoAvviso, String userCodiceFiscalePrimaFirma,
String jsonParameters, long controlloPraticaId) throws SystemException, PortalException {
@ -116,95 +115,81 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
}
}
String propertiesTemplate = null;
String tipoProcedura = intPratica.getTipoProcedura();
switch (statoPratica) {
case StatoPraticaConstants.VIDIMATA:
propertiesTemplate = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(
"DP" + tipoProcedura);
break;
default:
propertiesTemplate = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(statoPratica);
}
long fileEntryIdTemplate = configurazioneLocalService.findByC_ChiaveLong(
serviceContext.getCompanyId(), propertiesTemplate);
_log.info("statoPratica=" + statoPratica + ", tipoProcedura=" + tipoProcedura
+ ", propertiesTemplate=" + propertiesTemplate + ", fileEntryIdTemplate="
+ fileEntryIdTemplate);
String propertiesTemplate = AvvisoUtil.getFileTemplateProp(statoPratica, tipoProcedura);
long fileEntryIdTemplate = configurazioneLocalService.findByC_ChiaveLong(serviceContext.getCompanyId(),
propertiesTemplate);
if (fileEntryIdTemplate != 0) {
return addAvviso(intPratica.getIntPraticaId(), StringPool.BLANK, new Date(), tipoAvviso,
statoPratica, fileEntryIdTemplate, classPk, className, userCodiceFiscalePrimaFirma,
jsonParameters, controlloPraticaId, serviceContext);
return addAvviso(intPratica.getIntPraticaId(), StringPool.BLANK, new Date(), tipoAvviso, statoPratica,
fileEntryIdTemplate, classPk, className, userCodiceFiscalePrimaFirma, jsonParameters,
controlloPraticaId, serviceContext);
}
}
return null;
}
public Avviso createStandardAvvisoPratica(long intPraticaId, String stato, String jsonParameters,
long classPk, String className, ServiceContext serviceContext, String tipoAvviso,
String userCodiceFiscalePrimaFirma, long controlloPraticaId) throws SystemException,
PortalException {
@Override
public Avviso createStandardAvvisoPratica(long intPraticaId, String stato, String jsonParameters, long classPk,
String className, ServiceContext serviceContext, String tipoAvviso, String userCodiceFiscalePrimaFirma,
long controlloPraticaId) throws SystemException, PortalException {
IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
boolean varianteNonSostanziale = false;
if (className.equals(DettPratica.class.getName())) {
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(classPk);
varianteNonSostanziale = dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)
&& !dettPratica.getVarianteSostanziale();
}
String statoPraticaCode = varianteNonSostanziale ? "DPVNS" : PraticaUtil.getStatoPraticaCode(stato,
intPratica);
String propertiesTemplate = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(statoPraticaCode);
long fileEntryIdTemplate = configurazioneLocalService.findByC_ChiaveLong(
serviceContext.getCompanyId(), propertiesTemplate);
_log.info("debugAvviso: " + propertiesTemplate + " (" + statoPraticaCode + ")"
+ (varianteNonSostanziale ? " non sostanziale" : ""));
return addAvviso(intPraticaId, StringPool.BLANK, new Date(), tipoAvviso, stato, fileEntryIdTemplate,
classPk, className, userCodiceFiscalePrimaFirma, jsonParameters, controlloPraticaId,
serviceContext);
String statoPraticaCode = varianteNonSostanziale ? "DPVNS" : PraticaUtil.getStatoPraticaCode(stato, intPratica);
String propertiesTemplate = AvvisoUtil.getFileTemplateProp(statoPraticaCode, intPratica.getTipoProcedura());
long fileEntryIdTemplate = configurazioneLocalService.findByC_ChiaveLong(serviceContext.getCompanyId(),
propertiesTemplate);
_log.info("statoPraticaCode=" + statoPraticaCode + ", tipoProcedura=" + intPratica.getTipoProcedura()
+ ", propertiesTemplate=" + propertiesTemplate + ", fileEntryIdTemplate=" + fileEntryIdTemplate);
return addAvviso(intPraticaId, StringPool.BLANK, new Date(), tipoAvviso, stato, fileEntryIdTemplate, classPk,
className, userCodiceFiscalePrimaFirma, jsonParameters, controlloPraticaId, serviceContext);
}
public Avviso createStandardAvvisoPratica(long intPraticaId, String stato, long classPk,
String className, ServiceContext serviceContext, String tipoAvviso,
String userCodiceFiscalePrimaFirma, long controlloPraticaId) throws SystemException,
PortalException {
@Override
public Avviso createStandardAvvisoPratica(long intPraticaId, String stato, long classPk, String className,
ServiceContext serviceContext, String tipoAvviso, String userCodiceFiscalePrimaFirma,
long controlloPraticaId) throws SystemException, PortalException {
return createStandardAvvisoPratica(intPraticaId, stato, null, classPk, className, serviceContext,
tipoAvviso, userCodiceFiscalePrimaFirma, controlloPraticaId);
return createStandardAvvisoPratica(intPraticaId, stato, null, classPk, className, serviceContext, tipoAvviso,
userCodiceFiscalePrimaFirma, controlloPraticaId);
}
public Avviso addAvviso(long intPraticaId, String descLong, Date dtAvviso, String tipoAvviso,
String tipoDocumento, long fileEntryIdTemplate, long classPk, String className,
long controlloPraticaId, ServiceContext serviceContext) throws SystemException, PortalException {
@Override
public Avviso addAvviso(long intPraticaId, String descLong, Date dtAvviso, String tipoAvviso, String tipoDocumento,
long fileEntryIdTemplate, long classPk, String className, long controlloPraticaId,
ServiceContext serviceContext) throws SystemException, PortalException {
return addAvviso(intPraticaId, descLong, dtAvviso, tipoAvviso, tipoDocumento, fileEntryIdTemplate,
classPk, className, StringPool.BLANK, StringPool.BLANK, controlloPraticaId, serviceContext);
return addAvviso(intPraticaId, descLong, dtAvviso, tipoAvviso, tipoDocumento, fileEntryIdTemplate, classPk,
className, StringPool.BLANK, StringPool.BLANK, controlloPraticaId, serviceContext);
}
public Avviso addAvviso(long intPraticaId, String descLong, Date dtAvviso, String tipoAvviso,
String tipoDocumento, long fileEntryIdTemplate, long classPk, String className,
String userCodiceFiscalePrimaFirma, String jsonParameters, long controlloPraticaId,
ServiceContext serviceContext) throws SystemException, PortalException {
@Override
public Avviso addAvviso(long intPraticaId, String descLong, Date dtAvviso, String tipoAvviso, String tipoDocumento,
long fileEntryIdTemplate, long classPk, String className, String userCodiceFiscalePrimaFirma,
String jsonParameters, long controlloPraticaId, ServiceContext serviceContext) throws SystemException,
PortalException {
return addAvviso(intPraticaId, descLong, dtAvviso, tipoAvviso, tipoDocumento, fileEntryIdTemplate,
classPk, className, userCodiceFiscalePrimaFirma, null, 0L, jsonParameters,
controlloPraticaId, serviceContext);
return addAvviso(intPraticaId, descLong, dtAvviso, tipoAvviso, tipoDocumento, fileEntryIdTemplate, classPk,
className, userCodiceFiscalePrimaFirma, null, 0L, jsonParameters, controlloPraticaId, serviceContext);
}
public Avviso addAvviso(long intPraticaId, String descLong, Date dtAvviso, String tipoAvviso,
String tipoDocumento, long fileEntryIdTemplate, long classPk, String className,
String userCodiceFiscalePrimaFirma, Long fileEntryIdBase, long fileEntryIdFirma,
String jsonParameters, long controlloPraticaId, ServiceContext serviceContext)
throws SystemException, PortalException {
@Override
public Avviso addAvviso(long intPraticaId, String descLong, Date dtAvviso, String tipoAvviso, String tipoDocumento,
long fileEntryIdTemplate, long classPk, String className, String userCodiceFiscalePrimaFirma,
Long fileEntryIdBase, long fileEntryIdFirma, String jsonParameters, long controlloPraticaId,
ServiceContext serviceContext) throws SystemException, PortalException {
_log.info("addAvviso: descLong=\"" + descLong + "\", tipoAvviso=\"" + tipoAvviso
+ "\", tipoDocumento=\"" + tipoDocumento + "\", className=\"" + className
+ "\", jsonParameters=\"" + jsonParameters + "\", fileEntryIdTemplate=" + fileEntryIdTemplate);
_log.info("addAvviso: intPraticaId=" + intPraticaId + ", descLong=\"" + descLong + "\", dtAvviso=" + dtAvviso
+ ", tipoAvviso=\"" + tipoAvviso + "\", tipoDocumento=\"" + tipoDocumento + "\", fileEntryIdTemplate="
+ fileEntryIdTemplate + ", classPk=" + classPk + ", className=\"" + className
+ "\", userCodiceFiscalePrimaFirma=\"" + userCodiceFiscalePrimaFirma + "\", fileEntryIdBase="
+ fileEntryIdBase + ", fileEntryIdFirma=" + fileEntryIdFirma + ", jsonParameters=\"" + jsonParameters
+ "\", controlloPraticaId=" + controlloPraticaId + ", serviceContext=\"" + serviceContext + "\"");
if (0 == fileEntryIdTemplate) {
throw new PortalException("fileEntryIdTemplate=" + fileEntryIdTemplate);
@ -243,6 +228,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return addAvviso(avviso);
}
@Override
public Avviso addAvvisoForImport(String descLong, Date dtAvviso, String tipoAvviso, String tipoDocumento,
long fileEntryIdTemplate, long classPk, String className, String userCodiceFiscalePrimaFirma,
long fileEntryIdBase, String jsonParameters, long intPraticaId, long oldAvvisoId, String inviato,
@ -292,6 +278,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return super.addAvviso(avviso);
}
@Override
public List<Avviso> search(long[] groupIds, Long classPk, String keywords, int start, int end)
throws SystemException {
@ -300,6 +287,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public int countSearch(long[] groupIds, Long classPk, String keywords) throws SystemException {
return (int) avvisoPersistence.countWithDynamicQuery(searchDynamicQuery(groupIds, classPk, keywords));
@ -330,14 +318,15 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
public List<Avviso> getAvvisiFirmatiByCF(long companyId, String cf, int start, int end)
throws SystemException {
@Override
public List<Avviso> getAvvisiFirmatiByCF(long companyId, String cf, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = getDynamicQueryAvvisiFirmatiByCF(companyId, cf);
dynamicQuery.addOrder(OrderFactoryUtil.desc("dtAvviso"));
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public int countAvvisiFirmatiByCF(long companyId, String cf) throws SystemException {
DynamicQuery dynamicQuery = getDynamicQueryAvvisiFirmatiByCF(companyId, cf);
@ -360,6 +349,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public List<Avviso> getAvvisiDaFirmarePrimaFirmaByCF(long companyId, String cf, int start, int end)
throws SystemException {
@ -368,6 +358,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public int countAvvisiDaFirmarePrimaFirmaByCF(long companyId, String cf) throws SystemException {
DynamicQuery dynamicQuery = getDynamicQueryAvvisiDaFirmarePrimaFirmaByCF(companyId, cf);
@ -427,23 +418,23 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
public List<Avviso> getAvvisiDaFirmarePrimaFirmaByNotCF(long companyId, long[] groupIds, String cf,
int start, int end) throws SystemException {
@Override
public List<Avviso> getAvvisiDaFirmarePrimaFirmaByNotCF(long companyId, long[] groupIds, String cf, int start,
int end) throws SystemException {
DynamicQuery dynamicQuery = getDynamicQueryAvvisiDaFirmarePrimaFirmaByNotCF(companyId, groupIds, cf);
dynamicQuery.addOrder(OrderFactoryUtil.desc("dtAvviso"));
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
public int countAvvisiDaFirmarePrimaFirmaByNotCF(long companyId, long[] groupIds, String cf)
throws SystemException {
@Override
public int countAvvisiDaFirmarePrimaFirmaByNotCF(long companyId, long[] groupIds, String cf) throws SystemException {
DynamicQuery dynamicQuery = getDynamicQueryAvvisiDaFirmarePrimaFirmaByNotCF(companyId, groupIds, cf);
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
}
private DynamicQuery getDynamicQueryAvvisiDaFirmarePrimaFirmaByNotCF(long companyId, long[] groupIds,
String cf) {
private DynamicQuery getDynamicQueryAvvisiDaFirmarePrimaFirmaByNotCF(long companyId, long[] groupIds, String cf) {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId));
@ -452,8 +443,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
} else {
dynamicQuery.add(PropertyFactoryUtil.forName("groupId").eq(0l));
}
dynamicQuery.add(RestrictionsFactoryUtil.not(RestrictionsFactoryUtil.ilike(
"userCodiceFiscalePrimaFirma", cf)));
dynamicQuery.add(RestrictionsFactoryUtil.not(RestrictionsFactoryUtil.ilike("userCodiceFiscalePrimaFirma", cf)));
dynamicQuery.add(RestrictionsFactoryUtil.isNotNull("userCodiceFiscalePrimaFirma"));
dynamicQuery.add(RestrictionsFactoryUtil.ne("userCodiceFiscalePrimaFirma", StringPool.BLANK));
dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdBase").ne(0L));
@ -466,6 +456,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public List<Avviso> getAvvisiDaFirmarePrimaFirma(long companyId, long[] groupIds, int start, int end)
throws SystemException {
@ -474,6 +465,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public int countAvvisiDaFirmarePrimaFirma(long companyId, long[] groupIds) throws SystemException {
DynamicQuery dynamicQuery = getDynamicQueryAvvisiDaFirmarePrimaFirma(companyId, groupIds);
@ -505,12 +497,14 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public int countAvvisiGenerazioneDocumento() throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiGenerazioneDocumento();
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public List<Avviso> getAvvisiGenerazioneDocumento(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiGenerazioneDocumento();
@ -518,6 +512,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public DynamicQuery dynamicQueryAvvisiGenerazioneDocumento() throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -528,12 +523,14 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public int countAvvisiFirmaDocumento() throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiFirmaDocumento();
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public List<Avviso> getAvvisiFirmaDocumento(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiFirmaDocumento();
@ -541,6 +538,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public DynamicQuery dynamicQueryAvvisiFirmaDocumento() throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -558,12 +556,14 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public int countAvvisiInvioDocumento() throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioDocumento();
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public List<Avviso> getAvvisiInvioDocumento(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioDocumento();
@ -571,6 +571,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public DynamicQuery dynamicQueryAvvisiInvioDocumento() throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -582,12 +583,14 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public int countAvvisiInvioSignal() throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioSignal(null);
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public Avviso getAvvisoInvioSignal(long avvisoId) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioSignal(avvisoId);
@ -595,6 +598,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return !avviso.isEmpty() ? avviso.get(0) : null;
}
@Override
public List<Avviso> getAvvisiInvioSignal(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioSignal(null);
@ -602,6 +606,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public DynamicQuery dynamicQueryAvvisiInvioSignal(Long avvisoId) throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -621,12 +626,14 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public int countAvvisiTempistica() throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiTempistica(null);
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public Avviso getAvvisoTempistica(long avvisoId) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiTempistica(avvisoId);
@ -634,6 +641,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return !avviso.isEmpty() ? avviso.get(0) : null;
}
@Override
public List<Avviso> getAvvisiTempistica(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiTempistica(null);
@ -641,6 +649,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public DynamicQuery dynamicQueryAvvisiTempistica(Long avvisoId) throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -655,6 +664,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public Avviso updateAvvisoDlFileEntryFirma(long avvisoId, long fileEntryFirma) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -663,8 +673,8 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
public Avviso updateAvvisoPrimaFirma(long avvisoId, String transactionId) throws PortalException,
SystemException {
@Override
public Avviso updateAvvisoPrimaFirma(long avvisoId, String transactionId) throws PortalException, SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
if (Validator.isNotNull(avviso.getTransactionIdPrimaFirma())) {
@ -675,6 +685,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoRollbackPrimaFirma(long avvisoId) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -683,6 +694,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoDlFileEntryIdBase(long avvisoId, long fileEntryIdBase) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -690,16 +702,17 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
public Avviso updateAvvisoDlFileEntryIdBaseSingola(long avvisoId, long fileEntryIdBase)
throws SystemException {
@Override
public Avviso updateAvvisoDlFileEntryIdBaseSingola(long avvisoId, long fileEntryIdBase) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
avviso.setFileEntryIdBase(fileEntryIdBase);
return avvisoLocalService.updateAvviso(avviso);
}
public Avviso updateAvvisoDlFileEntryIdBaseAndInvio(long avvisoId, long fileEntryId,
Date dtCreateFileEntryInvio) throws SystemException {
@Override
public Avviso updateAvvisoDlFileEntryIdBaseAndInvio(long avvisoId, long fileEntryId, Date dtCreateFileEntryInvio)
throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
avviso.setFileEntryIdBase(fileEntryId);
@ -710,8 +723,9 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
public Avviso updateAvvisoDlFileEntryIdInvio(long avvisoId, long fileEntryIdInvio,
Date dtCreateFileEntryInvio) throws SystemException {
@Override
public Avviso updateAvvisoDlFileEntryIdInvio(long avvisoId, long fileEntryIdInvio, Date dtCreateFileEntryInvio)
throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
avviso.setFileEntryIdInvio(fileEntryIdInvio);
@ -720,6 +734,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoInvio(long avvisoId) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -728,6 +743,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoErrore(long avvisoId, boolean errore) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -735,6 +751,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoAnnullato(long avvisoId, boolean annullato) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -742,6 +759,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoSignal(long avvisoId, Date dtInvioSignal) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -749,6 +767,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoSignal(long avvisoId, boolean signal) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -756,6 +775,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoTempistica(long avvisoId, Date dtTempistica) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -763,6 +783,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoTempistica(long avvisoId, boolean tempistica) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -770,6 +791,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso updateAvvisoProtocollo(long avvisoId, String protocollo) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -785,6 +807,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso getAvvisoInvioTecnico(long avvisoId) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioTecnico(avvisoId);
@ -792,12 +815,14 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisi.isEmpty() ? null : avvisi.get(0);
}
@Override
public int countAvvisiInvioTecnico() throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioTecnico(null);
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public List<Avviso> getAvvisiInvioTecnico(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioTecnico(null);
@ -809,9 +834,8 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("inviatoTecnico").eq(false));
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento")
.in(new String[] { StatoPraticaConstants.VIDIMATA,
StatoPraticaConstants.INTEGRAZIONE_ACCETTATA }));
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in(
new String[] { StatoPraticaConstants.VIDIMATA, StatoPraticaConstants.INTEGRAZIONE_ACCETTATA }));
dynamicQuery.add(PropertyFactoryUtil.forName("errore").eq(false));
dynamicQuery.add(PropertyFactoryUtil.forName("annullato").eq(false));
if (Validator.isNotNull(avvisoId)) {
@ -820,11 +844,13 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public Avviso fetchAvvisoByOldAvvisoId(long oldAvvisoId) throws SystemException {
return avvisoPersistence.fetchByoldAvvisoId(oldAvvisoId);
}
@Override
public Avviso updateAvvisoInviatoTecnico(long avvisoId, boolean inviatoTecnico) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -832,26 +858,28 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
public List<Avviso> findByClassPk_tipoDocumento(Long classPk, String tipoDocumento)
throws SystemException {
@Override
public List<Avviso> findByClassPk_tipoDocumento(Long classPk, String tipoDocumento) throws SystemException {
return avvisoPersistence.findByClassPk_tipoDocumento(classPk, tipoDocumento);
}
@Override
public List<Avviso> findByIntPraticaId_tipoDocumento(Long intPraticaId, String tipoDocumento)
throws SystemException {
return avvisoPersistence.findByIntPraticaId_tipoDocumento(intPraticaId, tipoDocumento);
}
@Override
public List<Avviso> findByIntPraticaIds_tipoDocumento(long[] intPraticaIds, String tipoDocumento)
throws SystemException {
return avvisoPersistence.findByIntPraticaIds_tipoDocumento(intPraticaIds, tipoDocumento);
}
public List<Avviso> findByClassPk_ExcludeTipoDocumento(Long classPk, String tipoDocumento)
throws SystemException {
@Override
public List<Avviso> findByClassPk_ExcludeTipoDocumento(Long classPk, String tipoDocumento) throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.ne("tipoDocumento", tipoDocumento));
@ -859,26 +887,28 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery);
}
public List<Avviso> findByIntPratica(long intPraticaId, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
@Override
public List<Avviso> findByIntPratica(long intPraticaId, int start, int end, OrderByComparator orderByComparator)
throws SystemException {
return avvisoPersistence.findByIntPratica(intPraticaId, start, end, orderByComparator);
}
@Override
public List<Avviso> findByIntPratica_Inviato(long intPraticaId, String inviato, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
return avvisoPersistence.findByIntPratica_Inviato(intPraticaId, inviato, start, end,
orderByComparator);
return avvisoPersistence.findByIntPratica_Inviato(intPraticaId, inviato, start, end, orderByComparator);
}
@Override
public int countByIntPratica(long intPraticaId) throws SystemException {
return avvisoPersistence.countByIntPratica(intPraticaId);
}
public boolean containsFileEntry(long companyId, long[] groupIds, long fileEntryId)
throws SystemException {
@Override
public boolean containsFileEntry(long companyId, long[] groupIds, long fileEntryId) throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId));
@ -896,11 +926,13 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return count > 0;
}
@Override
public List<Avviso> findByUUID(String uuid, int start, int end) throws SystemException {
return avvisoPersistence.findByUuid(uuid, start, end);
}
@Override
public int countAvvisoByClassPk(long classPk) throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -908,6 +940,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public int countAvvisoByClassPk_ClassName(long classPk, String className) throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -916,26 +949,28 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public Avviso findByProtocollo(long companyId, long groupId, String protocollo) throws PortalException,
SystemException {
return avvisoPersistence.findByC_G_Protocollo(companyId, groupId, protocollo);
}
@Override
public Avviso fetchByProtocollo(long companyId, long groupId, String protocollo) throws PortalException,
SystemException {
return avvisoPersistence.fetchByC_G_Protocollo(companyId, groupId, protocollo);
}
@Override
public Avviso fetchByProtocollo(String protocollo) throws PortalException, SystemException {
return avvisoPersistence.fetchByProtocollo(protocollo);
}
/*
* Utilizzato nell'override di update e add per automatizzazione campo
* signal (default false)
* Utilizzato nell'override di update e add per automatizzazione campo signal (default false)
*/
private void updateSignalAndTempistica(Avviso avviso) {
@ -954,6 +989,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
avviso.setTempistica(tempistica);
}
@Override
public Avviso fetchLastAvvisoByIntPraticaPerStatoFinale(long intPraticaId) throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -965,8 +1001,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.AUTORIZZATA));
disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.NON_AUTORIZZATA));
disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.INTEGRAZIONE));
disjunction.add(RestrictionsFactoryUtil
.eq("tipoDocumento", StatoPraticaConstants.PREAVVISO_CONTRARIO));
disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.PREAVVISO_CONTRARIO));
disjunction.add(RestrictionsFactoryUtil.eq("tipoDocumento", StatoPraticaConstants.ANNULLATA));
dynamicQuery.add(disjunction);
dynamicQuery.addOrder(OrderFactoryUtil.desc("avvisoId"));
@ -979,6 +1014,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
}
@Override
public List<Avviso> getListaAvvisiPerApplet(String codFisc) throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -990,11 +1026,13 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery);
}
@Override
public Map<String, String> getAllTipoDocumentoFolderProps() {
return AvvisoUtil.getAllTipoDocumentoFolderProps();
}
@Override
public String getFileNameAvviso(long classPk, String tipoDocumento, Long idAvviso, String doc) {
// boolean docBase, boolean docFirma, boolean docControfirma
@ -1008,14 +1046,15 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
// }
String filename = StringUtils.leftPad(String.valueOf(classPk), 10, '0')
+ (Validator.isNotNull(tipoDocumento) ? StringPool.UNDERLINE + tipoDocumento
: StringPool.BLANK) + StringPool.UNDERLINE + doc + StringPool.UNDERLINE
+ (Validator.isNotNull(tipoDocumento) ? StringPool.UNDERLINE + tipoDocumento : StringPool.BLANK)
+ StringPool.UNDERLINE + doc + StringPool.UNDERLINE
+ (Validator.isNotNull(idAvviso) ? idAvviso : System.currentTimeMillis());
return filename;
}
@Override
public Avviso rilasciaFirma(long avvisoId) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -1027,6 +1066,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public Avviso assegnaFirma(long avvisoId, String cf) throws SystemException {
Avviso avviso = avvisoPersistence.fetchByPrimaryKey(avvisoId);
@ -1038,6 +1078,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.updateAvviso(avviso);
}
@Override
public List<Avviso> getAvvisiWithOldFileEntryIdInvio(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(Avviso.class);
@ -1047,6 +1088,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.dynamicQuery(dynamicQuery, start, end);
}
@Override
public List<Avviso> getAvvisiWithOldFileEntryIdBase(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(Avviso.class);
@ -1056,8 +1098,8 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.dynamicQuery(dynamicQuery, start, end);
}
public List<Avviso> getAvvisiRifiutatiByControlloPraticaId(long controlloPraticaId)
throws SystemException {
@Override
public List<Avviso> getAvvisiRifiutatiByControlloPraticaId(long controlloPraticaId) throws SystemException {
DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(Avviso.class);
dynamicQuery.add(RestrictionsFactoryUtil.eq("controlloPraticaId", controlloPraticaId));
@ -1068,6 +1110,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoLocalService.dynamicQuery(dynamicQuery);
}
@Override
public Avviso addFileFirmato(long avvisoId, long classPk, String fileToSave, ServiceContext serviceContext)
throws Exception {
@ -1075,8 +1118,8 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
// DettPratica dettPratica =
// DettPraticaLocalServiceUtil.fetchDettPratica(dettPraticaId);
long folderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(avviso.getCompanyId(),
avvisoLocalService.getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento()));
long folderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(avviso.getCompanyId(), avvisoLocalService
.getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento()));
String fileName = getFileNameAvviso(classPk, avviso.getTipoDocumento(), avviso.getAvvisoId(), "F");
@ -1086,17 +1129,15 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
if (Validator.isNotNull(folder)) {
byte[] bytes = Base64.decode(fileToSave);
FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(),
folder.getRepositoryId(), folderId, fileName,
MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m", "", "", bytes,
serviceContext);
FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(), folder.getRepositoryId(),
folderId, fileName, MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m", "", "",
bytes, serviceContext);
avviso.setFileEntryIdInvio(fileEntry.getFileEntryId());
avviso = avvisoLocalService.updateAvviso(avviso);
if (Validator.isNull(avviso.getProtocollo())) {
String protocollo = ProtocollazioneUtil.protocollaPartenza(avviso,
fileEntry.getFileEntryId());
String protocollo = ProtocollazioneUtil.protocollaPartenza(avviso, fileEntry.getFileEntryId());
avviso = avvisoLocalService.updateAvvisoProtocollo(avviso.getAvvisoId(), protocollo);
}
@ -1111,8 +1152,9 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
}
public List<Avviso> protocolliSearch(String dataDa, String dataA, String numeroProtocollo, int start,
int end) throws ParseException, SystemException {
@Override
public List<Avviso> protocolliSearch(String dataDa, String dataA, String numeroProtocollo, int start, int end)
throws ParseException, SystemException {
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
@ -1156,8 +1198,8 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
}
if ((numeroProtocollo != null && !numeroProtocollo.equals(""))
|| (dataDa != null && !dataDa.equals("")) || (dataA != null && !dataA.equals(""))) {
if ((numeroProtocollo != null && !numeroProtocollo.equals("")) || (dataDa != null && !dataDa.equals(""))
|| (dataA != null && !dataA.equals(""))) {
Order defaultOrder = OrderFactoryUtil.asc("dtProtocollo");
query.addOrder(defaultOrder);
@ -1168,8 +1210,9 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return lista;
}
public int countProtocolliSearch(String dataDa, String dataA, String numeroProtocollo)
throws SystemException, ParseException {
@Override
public int countProtocolliSearch(String dataDa, String dataA, String numeroProtocollo) throws SystemException,
ParseException {
int count = 0;
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
@ -1212,14 +1255,15 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
}
if ((numeroProtocollo != null && !numeroProtocollo.equals(""))
|| (dataDa != null && !dataDa.equals("")) || (dataA != null && !dataA.equals(""))) {
if ((numeroProtocollo != null && !numeroProtocollo.equals("")) || (dataDa != null && !dataDa.equals(""))
|| (dataA != null && !dataA.equals(""))) {
count = (int) avvisoPersistence.countWithDynamicQuery(query);
}
return count;
}
@Override
public List<Avviso> getAvvisiPerAggiuntaProtocollo(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAggiuntaProtocollo();
@ -1227,6 +1271,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return avvisoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
@Override
public DynamicQuery dynamicQueryAggiuntaProtocollo() throws SystemException {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
@ -1241,6 +1286,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public List<Avviso> findByClassPk(long classPk) throws SystemException {
return avvisoPersistence.findByClassPk(classPk);
@ -1253,6 +1299,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
/**
* ADT
*/
@Override
public int countAvvisiInvioTecnicoNew() throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioTecnicoNew(null);
return (int) avvisoPersistence.countWithDynamicQuery(dynamicQuery);
@ -1262,6 +1309,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
* ADT
*
*/
@Override
public List<Avviso> getAvvisiInvioTecnicoNew(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryAvvisiInvioTecnicoNew(null);
@ -1283,8 +1331,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
DynamicQuery dynamicQuery = avvisoLocalService.dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("inviatoTecnico").eq(false));
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in(
new String[] { StatoPraticaConstants.SOTTOPOSTA_A_PARERE,
StatoPraticaConstants.CAMBIO_ISTRUTTORE }));
new String[] { StatoPraticaConstants.SOTTOPOSTA_A_PARERE, StatoPraticaConstants.CAMBIO_ISTRUTTORE }));
dynamicQuery.add(PropertyFactoryUtil.forName("errore").eq(false));
dynamicQuery.add(PropertyFactoryUtil.forName("annullato").eq(false));
if (Validator.isNotNull(avvisoId)) {
@ -1311,6 +1358,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
* @return
* @throws SystemException
*/
@Override
public Avviso getAvvisoVidimazione(long intPraticaId, long dettPraticaID) throws SystemException {
DynamicQuery dynamicQuery = AvvisoLocalServiceUtil.dynamicQuery();
@ -1340,12 +1388,12 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
* @return
* @throws SystemException
*/
@Override
public Avviso getLastAvvisoIntegrazione(long intPraticaId) throws SystemException {
DynamicQuery dynamicQuery = AvvisoLocalServiceUtil.dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento")
.in(new String[] { StatoPraticaConstants.INTEGRAZIONE,
StatoPraticaConstants.PREAVVISO_CONTRARIO }));
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in(
new String[] { StatoPraticaConstants.INTEGRAZIONE, StatoPraticaConstants.PREAVVISO_CONTRARIO }));
dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L));
dynamicQuery.add(PropertyFactoryUtil.forName("errore").eq(false));
dynamicQuery.add(PropertyFactoryUtil.forName("annullato").eq(false));

7
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java

@ -607,7 +607,12 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
jsonObject.put("esito", jsonArray);
JSONObject etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label", "Attiva VIArch");
etichette.put("value", StatoPraticaConstants.VIARCH);
etichette.put("value", StatoPraticaConstants.INTEGRAZIONE);
etichette.put("default", false);
jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label", "Concludi VIArch");
etichette.put("value", StatoPraticaConstants.CONFORME);
etichette.put("default", false);
jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject();

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=2915
build.date=1616068476446
build.number=2932
build.date=1616496884713
build.auto.upgrade=true
##

232
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/avvisi/view.jsp

@ -1,221 +1,135 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.util.AvvisoUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
<%@page import="com.liferay.portlet.documentlibrary.util.DLUtil"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<%@page import="com.liferay.portal.kernel.repository.model.FileEntry"%>
<%@page import="com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<%@page import="com.liferay.portlet.documentlibrary.util.DLUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.AvvisoUtil"%>
<%@ include file="/html/avvisi/init.jsp" %>
<%
long intPraticaId = ParamUtil.getLong(request, "intPraticaId", 0l);
long intPraticaId = ParamUtil.getLong(request, "intPraticaId", 0L);
List<Avviso> avvisi = AvvisoLocalServiceUtil.findByIntPratica(intPraticaId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
%>
<liferay-ui:search-container
emptyResultsMessage="no-entries-were-found"
orderByType="desc" orderByCol="createDate"
>
<liferay-ui:search-container-results
results="<%=AvvisoLocalServiceUtil.findByIntPratica(intPraticaId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null) %>"
total="<%=AvvisoLocalServiceUtil.countByIntPratica(intPraticaId)%>"
>
</liferay-ui:search-container-results>
<liferay-ui:search-container-row
className="it.tref.liferay.portos.bo.model.Avviso"
modelVar="avviso"
>
<liferay-ui:search-container-column-text cssClass="text-nowrap" name="Data" value="<%= dateFormatDate.format(avviso.getDtAvviso()) %>" />
<liferay-ui:search-container emptyResultsMessage="no-entries-were-found" orderByType="desc" orderByCol="createDate">
<liferay-ui:search-container-results results="<%= avvisi %>" total="<%= avvisi.size() %>" />
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.Avviso" modelVar="avviso">
<liferay-ui:search-container-column-text cssClass="text-nowrap" name="Data"
value="<%= dateFormatDate.format(avviso.getDtAvviso()) %>" />
<liferay-ui:search-container-column-text name="Tipo Documento">
<%= avviso.getFullDescription() %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Firma In Corso" cssClass="text-nowrap">
<%= avviso.getFirmaInCorso() ? "Si" : "No" %>
<%= avviso.getFirmaInCorso() ? "Sì" : "No" %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Inviato" cssClass="text-nowrap" value='<%= avviso.getInviato().equalsIgnoreCase("S") ? "Si" : "No"%>'/>
<liferay-ui:search-container-column-text name="Data Invio" cssClass="text-nowrap" value='<%= Validator.isNotNull(avviso.getDtInvio()) ? dateFormatDate.format(avviso.getDtInvio()) : ""%>'/>
<liferay-ui:search-container-column-text name="Inviato" cssClass="text-nowrap"
value='<%= avviso.getInviato().equalsIgnoreCase(AvvisoUtil.DOCUMENTO_INVIATO) ? "Sì" : "No" %>'/>
<liferay-ui:search-container-column-text name="Data Invio" cssClass="text-nowrap"
value='<%= Validator.isNotNull(avviso.getDtInvio()) ? dateFormatDate.format(avviso.getDtInvio())
: StringPool.BLANK %>'/>
<liferay-ui:search-container-column-text name="Doc Base" cssClass="text-nowrap">
<liferay-ui:icon-menu icon="" showExpanded="<%=true%>" showWhenSingleIcon="<%=true%>" cssClass="text-center">
<liferay-ui:icon-menu icon="" showExpanded="true" showWhenSingleIcon="true" cssClass="text-center">
<%
if(Validator.isNotNull(avviso.getFileEntryIdBase())){
if (Validator.isNotNull(avviso.getFileEntryIdBase())) {
%>
<liferay-portlet:renderURL var="previewURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="fileEntryId" value="<%= String.valueOf(avviso.getFileEntryIdBase()) %>" />
<liferay-portlet:param name="fileEntryId"
value="<%= String.valueOf(avviso.getFileEntryIdBase()) %>" />
<liferay-portlet:param name="mvcPath" value="/html/common/preview_file_entry.jsp" />
</liferay-portlet:renderURL>
<div title="Visualizza" class="tooltip-info" style="display: inline-block;">
<liferay-ui:icon id='<%=renderResponse.getNamespace()+"open_base_"+avviso.getAvvisoId() %>'
linkCssClass="btn btn-action" iconCssClass="fa fa-clipboard"
url="<%=previewURL%>" useDialog="true"
/>
<liferay-ui:icon id='<%= renderResponse.getNamespace() + "open_base_" + avviso.getAvvisoId() %>'
linkCssClass="btn btn-action" iconCssClass="fa fa-clipboard" url="<%= previewURL %>"
useDialog="true" />
</div>
<%
<%
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(avviso.getFileEntryIdBase());
String downloadUrl = DLUtil.getPreviewURL(fileEntry, fileEntry.getLatestFileVersion(), themeDisplay, "&download=true");
%>
String downloadUrl = DLUtil.getPreviewURL(fileEntry, fileEntry.getLatestFileVersion(), themeDisplay,
"&download=true");
%>
<div title="Scarica" class="tooltip-info" style="display: inline-block;">
<liferay-ui:icon
id='<%=renderResponse.getNamespace()+"download_base_"+avviso.getAvvisoId() %>' linkCssClass="btn btn-action btn-primary" iconCssClass="fa fa-download" url="<%=downloadUrl%>"/>
id='<%= renderResponse.getNamespace() + "download_base_" + avviso.getAvvisoId() %>'
linkCssClass="btn btn-action btn-primary" iconCssClass="fa fa-download"
url="<%= downloadUrl %>" />
</div>
<%
} else if(Validator.isNull(avviso.getFileEntryIdInvio()) && Validator.isNotNull(avviso.getOldAvvisoId())){
String avvisoId = String.valueOf(avviso.getAvvisoId());
String className = Avviso.class.getName();
%>
<liferay-util:include page="/html/common/import_window.jsp" servletContext="<%= application %>" >
<liferay-util:param name="classPk" value="<%= avvisoId %>"></liferay-util:param>
<liferay-util:param name="className" value="<%= className %>"></liferay-util:param>
<liferay-util:param name="tooltip" value="Scarica"></liferay-util:param>
<liferay-util:param name="classButton" value="btn-primary"></liferay-util:param>
</liferay-util:include>
<%
}
}
%>
</liferay-ui:icon-menu>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Doc Protocollo" cssClass="text-nowrap">
<liferay-ui:icon-menu icon="" showExpanded="<%=true %>" showWhenSingleIcon="<%=false%>" cssClass="text-center">
<liferay-ui:icon-menu icon="" showExpanded="true" showWhenSingleIcon="false" cssClass="text-center">
<%
if(Validator.isNotNull(avviso.getFileEntryIdProtocollo())){
if (Validator.isNotNull(avviso.getFileEntryIdProtocollo())) {
%>
<liferay-portlet:renderURL var="protocolloPreviewURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="fileEntryId" value="<%= String.valueOf(avviso.getFileEntryIdProtocollo()) %>" />
<liferay-portlet:renderURL var="protocolloPreviewURL"
windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="fileEntryId"
value="<%= String.valueOf(avviso.getFileEntryIdProtocollo()) %>" />
<liferay-portlet:param name="mvcPath" value="/html/common/preview_file_entry.jsp" />
</liferay-portlet:renderURL>
<div title="Visualizza" class="tooltip-info" style="display: inline-block;">
<liferay-ui:icon id='<%=renderResponse.getNamespace()+"open_protocollo_"+avviso.getAvvisoId() %>'
linkCssClass="btn btn-action" iconCssClass="fa fa-clipboard"
url="<%= protocolloPreviewURL %>" useDialog="true"
/>
<liferay-ui:icon
id='<%= renderResponse.getNamespace() + "open_protocollo_" + avviso.getAvvisoId() %>'
linkCssClass="btn btn-action" iconCssClass="fa fa-clipboard"
url="<%= protocolloPreviewURL %>" useDialog="true" />
</div>
<%
<%
FileEntry fileEntryProtocollo = DLAppLocalServiceUtil.getFileEntry(avviso.getFileEntryIdProtocollo());
String protocolloDownloadUrl = DLUtil.getPreviewURL(fileEntryProtocollo, fileEntryProtocollo.getLatestFileVersion(), themeDisplay, "&download=true");
%>
String protocolloDownloadUrl = DLUtil.getPreviewURL(fileEntryProtocollo,
fileEntryProtocollo.getLatestFileVersion(), themeDisplay, "&download=true");
%>
<div title="Scarica" class="tooltip-info" style="display: inline-block;">
<liferay-ui:icon id='<%=renderResponse.getNamespace()+"download_protocollo_"+avviso.getAvvisoId() %>'
<liferay-ui:icon id='<%= renderResponse.getNamespace() + "download_protocollo_" + avviso.getAvvisoId() %>'
linkCssClass="btn btn-action btn-primary" iconCssClass="fa fa-download"
url="<%= protocolloDownloadUrl %>"
/>
url="<%= protocolloDownloadUrl %>" />
</div>
<%
}
}
%>
</liferay-ui:icon-menu>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Doc Inviato" cssClass="text-nowrap">
<liferay-ui:icon-menu icon="" showExpanded="<%=true %>" showWhenSingleIcon="<%=true%>" cssClass="text-center">
<liferay-ui:icon-menu icon="" showExpanded="true" showWhenSingleIcon="true" cssClass="text-center">
<%
if(Validator.isNotNull(avviso.getFileEntryIdInvio())){
if (Validator.isNotNull(avviso.getFileEntryIdInvio())) {
%>
<liferay-portlet:renderURL var="invioPreviewURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="fileEntryId" value="<%= String.valueOf(avviso.getFileEntryIdInvio()) %>" />
<liferay-portlet:param name="mvcPath" value="/html/common/preview_file_entry.jsp" />
</liferay-portlet:renderURL>
<div title="Visualizza" class="tooltip-info" style="display: inline-block;">
<liferay-ui:icon id='<%=renderResponse.getNamespace()+"open_invio_"+avviso.getAvvisoId() %>'
linkCssClass="btn btn-action" iconCssClass="fa fa-clipboard"
url="<%=invioPreviewURL%>" useDialog="true"
/>
<liferay-ui:icon id='<%= renderResponse.getNamespace() + "open_invio_" + avviso.getAvvisoId() %>'
linkCssClass="btn btn-action" iconCssClass="fa fa-clipboard" url="<%= invioPreviewURL %>"
useDialog="true" />
</div>
<%
<%
FileEntry fileEntryInvio = DLAppLocalServiceUtil.getFileEntry(avviso.getFileEntryIdInvio());
String invioDownloadUrl = DLUtil.getPreviewURL(fileEntryInvio, fileEntryInvio.getLatestFileVersion(), themeDisplay, "&download=true");
%>
String invioDownloadUrl = DLUtil.getPreviewURL(fileEntryInvio, fileEntryInvio.getLatestFileVersion(),
themeDisplay, "&download=true");
%>
<div title="Scarica" class="tooltip-info" style="display: inline-block;">
<liferay-ui:icon id='<%=renderResponse.getNamespace()+"download_invio_"+avviso.getAvvisoId() %>' linkCssClass="btn btn-action btn-primary" iconCssClass="fa fa-download" url="<%= invioDownloadUrl %>"/>
<liferay-ui:icon id='<%= renderResponse.getNamespace() + "download_invio_" + avviso.getAvvisoId() %>'
linkCssClass="btn btn-action btn-primary" iconCssClass="fa fa-download"
url="<%= invioDownloadUrl %>" />
</div>
<%
} else if(Validator.isNull(avviso.getFileEntryIdInvio()) && Validator.isNotNull(avviso.getOldAvvisoId())){
String avvisoId = String.valueOf(avviso.getAvvisoId());
String className = Avviso.class.getName();
/* String random = StringUtil.randomId();
String buttonId = "eventButton"+random;
String contentId = "contentDiv"+random;
String titleId = "Importazione File"; */
%>
<%-- <div title="Scarica" class="tooltip-info" style="display: inline-block;">
<liferay-ui:icon
id="<%= buttonId %>"
url='javascript:void(0)'
linkCssClass="btn btn-action btn-primary"
iconCssClass="fa fa-download"
message="download-del-documento"
label="true"
target="_blank"
/>
</div>
<div id="<portlet:namespace /><%= contentId %>" class="hide text-center" >
<p>File non ancora importato</p>
<p>Processo in corso...</p>
<p>Si prega di attendere qualche minuto</p>
<div class="content_loader">
<svg width="64px" height="64px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-double-ring">
<circle cx="50" cy="50" ng-attr-r="{{config.radius}}" ng-attr-stroke-width="{{config.width}}" ng-attr-stroke="{{config.c1}}" ng-attr-stroke-dasharray="{{config.dasharray}}" fill="none" stroke-linecap="round" r="40" stroke-width="4" stroke="#cd2325" stroke-dasharray="62.83185307179586 62.83185307179586" transform="rotate(68 50 50)">
<animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;360 50 50" keyTimes="0;1" dur="1.5s" begin="0s" repeatCount="indefinite"></animateTransform>
</circle>
<circle cx="50" cy="50" ng-attr-r="{{config.radius2}}" ng-attr-stroke-width="{{config.width}}" ng-attr-stroke="{{config.c2}}" ng-attr-stroke-dasharray="{{config.dasharray2}}" ng-attr-stroke-dashoffset="{{config.dashoffset2}}" fill="none" stroke-linecap="round" r="35" stroke-width="4" stroke="#241312" stroke-dasharray="54.97787143782138 54.97787143782138" stroke-dashoffset="54.97787143782138" transform="rotate(-68 50 50)">
<animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;-360 50 50" keyTimes="0;1" dur="1.5s" begin="0s" repeatCount="indefinite"></animateTransform>
</circle>
</svg>
</div>
</div>
<liferay-portlet:resourceURL id="importFile" var="importFileURL"/>
<%
String function = "A.io.request('"+importFileURL+"',{data: {"+renderResponse.getNamespace()+"classPk: "+avvisoId+", "+renderResponse.getNamespace()+"className: '"+className+"'},"+
"dataType: 'json',on: {failure: function() {alert('impossibile importare il file allegato...');},success: function(event, id, obj) {var response = this.get('responseData');content.html(response)}}});";
%>
<liferay-util:include page="/html/common/import_window.jsp" servletContext="<%= application %>" >
<liferay-util:param name="titolo" value="<%= titleId %>"></liferay-util:param>
<liferay-util:param name="buttonId" value="<%=buttonId%>"></liferay-util:param>
<liferay-util:param name="contentDiv" value="<%=contentId%>"></liferay-util:param>
<liferay-util:param name="function" value="<%= function %>"></liferay-util:param>
</liferay-util:include> --%>
<liferay-util:include page="/html/common/import_window.jsp" servletContext="<%= application %>" >
<liferay-util:param name="classPk" value="<%= avvisoId %>"></liferay-util:param>
<liferay-util:param name="className" value="<%= className %>"></liferay-util:param>
<liferay-util:param name="tooltip" value="Scarica"></liferay-util:param>
<liferay-util:param name="classButton" value="btn-primary"></liferay-util:param>
</liferay-util:include>
<%
}
}
%>
</liferay-ui:icon-menu>
</liferay-ui:search-container-column-text>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="<%= false %>" />
<liferay-ui:search-iterator paginate="false" />
</liferay-ui:search-container>
<script type="text/javascript">
YUI().use(
'aui-tooltip',
function(Y) {
new Y.TooltipDelegate(
{
trigger: '.tooltip-info',
position: 'top',
cssClass: 'tooltip-help',
html: true,
opacity: 1
}
);
}
);
YUI().use('aui-tooltip', function(Y) {
new Y.TooltipDelegate({
trigger: '.tooltip-info',
position: 'top',
cssClass: 'tooltip-help',
html: true,
opacity: 1
});
});
</script>

439
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/advanced_search.jsp

@ -1,253 +1,242 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.Comparator"%>
<%@page import="java.util.Comparator"%>
<%@page import="java.util.Collections"%>
<%@page import="com.liferay.portal.model.Organization"%>
<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%>
<%@include file="/html/fascicolo/init.jsp" %>
<%@page import="java.util.Comparator"%>
<%@include file="/html/fascicolo/init.jsp"%>
<style>
.praticaApertaContainer{
margin-top : 8%;
margin-top: 8%;
}
</style>
<%
String comune = ParamUtil.getString(request, "comune");
String provinciaJS = ParamUtil.getString(request, "provinciaJS");
%>
<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;">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-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">
<aui:input type="text" name="protocollo" label="Protocollo"/>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-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="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">
<aui:select name="statoPratica" label="Stato Procedimento">
<aui:option value="-1">Stato Pratica</aui:option>
<!-- ADT BUG-ID=15 Sezione Ricerca / Filtro Stato Pratica -->
<%-- <aui:option value="VI"><liferay-ui:message key="vidimata"/></aui:option> --%>
<%-- <aui:option value="RI"><liferay-ui:message key="rifiutata"/></aui:option> --%>
<%-- <aui:option value="SO"><liferay-ui:message key="sorteggiata"/></aui:option> --%>
<aui:option value="<%= StatoPraticaConstants.ANNULLATA %>"><liferay-ui:message key="annullata"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.AUTORIZZATA %>"><liferay-ui:message key="autorizzata"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.NON_AUTORIZZATA %>"><liferay-ui:message key="non autorizzata"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.COLLAUDO %>"><liferay-ui:message key="collaudo"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.COLLAUDO_PARZIALE %>"><liferay-ui:message key="collaudo parziale"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.CONFORME %>"><liferay-ui:message key="conforme"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.NON_CONFORME %>"><liferay-ui:message key="non conforme"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI %>"><liferay-ui:message key="fine lavori"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI_PARZIALE %>"><liferay-ui:message key="fine lavori parziali"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.INTEGRAZIONE %>"><liferay-ui:message key="integrazione in corso"/></aui:option>
<aui:option value="sospesa"><liferay-ui:message key="sospesa"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.SOTTOPOSTA_A_PARERE %>"><liferay-ui:message key="sottoposta a parere"/></aui:option>
<aui:option value="VA"><liferay-ui:message key="variata"/></aui:option>
</aui:select>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<aui:input
label="Descrizione Intervento"
name="descIntervento" type="text" placeholder="" />
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:select name="tipoIntervento" label="Tipo Intervento">
<aui:option value="-1">Tipo Intervento</aui:option>
<aui:option value="interventoLocale"><liferay-ui:message key="Intervento Locale"/></aui:option>
<aui:option value="miglioramento"><liferay-ui:message key="Miglioramento Sismico"/></aui:option>
<aui:option value="adeguamento"><liferay-ui:message key="Adeguamento Sismico"/></aui:option>
<aui:option value="nuovaCostruzione"><liferay-ui:message key="Nuova Costruzione"/></aui:option>
</aui:select>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:column cssClass="praticaApertaContainer">
<span style="font-weight: bold;">Pratica Aperta : </span>
<aui:input checked="true" inlineField="true" type="radio" name="praticaAperta" value="tutte" label="Tutte"/>
<aui:input inlineField="true" type="radio" name="praticaAperta" value="aperta" label="Si"/>
<aui:input inlineField="true" type="radio" name="praticaAperta" value="chiusa" label="No"/>
</aui:column>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:select name="provincia" label="Provincia" cssClass="provinciaSelect">
<aui:option value="000"> </aui:option>
<%
List<String> province = TerritorioLocalServiceUtil.getActiveProvince();
//ADT BUG-ID=15 Sezione Ricerca / Ordinamento Filtro
List<Provincia> provinceList = new ArrayList<Provincia>();
for (String codiceProvincia : province) {
Provincia provinciaToStamp = ProvinciaLocalServiceUtil.fetchByC_C(company.getCompanyId(), codiceProvincia);
provinceList.add(provinciaToStamp);
}
Collections.sort(provinceList, new Comparator<Provincia>(){
public int compare(Provincia o1, Provincia o2){
return o1.getProvincia().compareTo(o2.getProvincia());
}
});
for (Provincia provincia : provinceList) {
%>
<aui:option value="<%=provincia.getCodiceProvincia() %>" ><%=provincia.getProvincia() %></aui:option>
<%
}
%>
</aui:select>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:select name="comune" label="Comune" cssClass="comuneSelect">
<aui:option value="000"></aui:option>
<%
if(provinciaJS != null && !provinciaJS.equals("") && !provinciaJS.equals("000")){
List<Long> comuni = TerritorioLocalServiceUtil.getActiveComuniByCodiceProvincia(provinciaJS);
for (long comuneId : comuni) {
Comune comuneToStamp = ComuneLocalServiceUtil.getComune(comuneId);
%>
<aui:option value="<%=comuneToStamp.getComuneId()%>"><%=comuneToStamp.getDenominazione()%></aui:option>
<%
}
}
%>
</aui:select>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:input type="text" name="indirizzo" label="Indirizzo"/>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:input type="text" name="tecnicoIstruttore" label="Tecnico Istruttore"/>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:input type="text" name="titolareDigitale" label="Titolare Digitale"/>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:input type="text" name="committente" label="Committente"/>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:input type="text" name="soggettiInterconnessi" label="Soggetti Interconnessi"/>
</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 %>">
<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 %>">
<liferay-util:param name="field" value="dataRichiestaFine" />
</liferay-util:include>
</aui:field-wrapper>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<aui:select name="ordinaPer" label="Ordina Per">
<aui:option selected="true" value="numeroProgetto">Numero Progetto</aui:option>
<aui:option value="protocollo">Protocollo</aui:option>
<aui:option value="dataCreazione">Data Invio</aui:option>
</aui:select>
</div>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-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" />
<%
String comune = ParamUtil.getString(request, "comune");
String provinciaJS = ParamUtil.getString(request, "provinciaJS");
%>
<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;">
<div class="row">
<div class="col-xs-12 col-md-3">
<aui:input type="text" name="numeroProgetto" label="Numero Progetto" />
</div>
<div class="col-xs-12 col-md-3">
<aui:input type="text" name="protocollo" label="Protocollo" />
</div>
<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:select>
</div>
<div class="col-xs-12 col-md-3">
<aui:select name="statoPratica" label="Stato Procedimento">
<aui:option value="-1">Stato Pratica</aui:option>
<aui:option value="<%= StatoPraticaConstants.ANNULLATA %>">
<liferay-ui:message key="annullata"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.AUTORIZZATA %>">
<liferay-ui:message key="autorizzata"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.NON_AUTORIZZATA %>">
<liferay-ui:message key="non autorizzata"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.COLLAUDO %>">
<liferay-ui:message key="collaudo"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.COLLAUDO_PARZIALE %>">
<liferay-ui:message key="collaudo parziale"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.CONFORME %>">
<liferay-ui:message key="conforme"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.NON_CONFORME %>">
<liferay-ui:message key="non conforme"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI %>">
<liferay-ui:message key="fine lavori"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI_PARZIALE %>">
<liferay-ui:message key="fine lavori parziali"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.INTEGRAZIONE %>">
<liferay-ui:message key="integrazione in corso"/>
</aui:option>
<aui:option value="sospesa"><liferay-ui:message key="sospesa"/></aui:option>
<aui:option value="<%= StatoPraticaConstants.SOTTOPOSTA_A_PARERE %>">
<liferay-ui:message key="sottoposta a parere"/>
</aui:option>
<aui:option value="<%= StatoPraticaConstants.VARIATA %>">
<liferay-ui:message key="variata"/>
</aui:option>
</aui:select>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<aui:input label="Descrizione Intervento" name="descIntervento" type="text" placeholder="" />
</div>
<div class="col-xs-12 col-md-3">
<aui:select name="tipoIntervento" label="Tipo Intervento">
<aui:option value="-1">Tipo Intervento</aui:option>
<aui:option value="interventoLocale"><liferay-ui:message key="Intervento Locale" /></aui:option>
<aui:option value="miglioramento"><liferay-ui:message key="Miglioramento Sismico" /></aui:option>
<aui:option value="adeguamento"><liferay-ui:message key="Adeguamento Sismico" /></aui:option>
<aui:option value="nuovaCostruzione"><liferay-ui:message key="Nuova Costruzione" /></aui:option>
</aui:select>
</div>
<div class="col-xs-12 col-md-3">
<aui:column cssClass="praticaApertaContainer">
<span style="font-weight: bold;">Pratica Aperta : </span>
<aui:input checked="true" inlineField="true" type="radio" name="praticaAperta" value="tutte"
label="Tutte" />
<aui:input inlineField="true" type="radio" name="praticaAperta" value="aperta" label="Sì" />
<aui:input inlineField="true" type="radio" name="praticaAperta" value="chiusa" label="No" />
</aui:column>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-3">
<aui:select name="provincia" label="Provincia" cssClass="provinciaSelect">
<aui:option value="000"> </aui:option>
<%
List<String> province = TerritorioLocalServiceUtil.getActiveProvince();
//ADT BUG-ID=15 Sezione Ricerca / Ordinamento Filtro
List<Provincia> provinceList = new ArrayList<Provincia>();
for (String codiceProvincia : province) {
Provincia provinciaToStamp = ProvinciaLocalServiceUtil.fetchByC_C(company.getCompanyId(),
codiceProvincia);
provinceList.add(provinciaToStamp);
}
Collections.sort(provinceList, new Comparator<Provincia>() {
public int compare(Provincia o1, Provincia o2){
return o1.getProvincia().compareTo(o2.getProvincia());
}
});
for (Provincia provincia : provinceList) {
%>
<aui:option value="<%= provincia.getCodiceProvincia() %>">
<%= provincia.getProvincia() %>
</aui:option>
<%
}
%>
</aui:select>
</div>
<div class="col-xs-12 col-md-3">
<aui:select name="comune" label="Comune" cssClass="comuneSelect">
<aui:option value="000" />
<%
if (Validator.isNotNull(provinciaJS) && !provinciaJS.equals("000")) {
List<Long> comuni = TerritorioLocalServiceUtil.getActiveComuniByCodiceProvincia(provinciaJS);
for (long comuneId : comuni) {
Comune comuneToStamp = ComuneLocalServiceUtil.getComune(comuneId);
%>
<aui:option value="<%= comuneToStamp.getComuneId() %>">
<%= comuneToStamp.getDenominazione() %>
</aui:option>
<%
}
}
%>
</aui:select>
</div>
<div class="col-xs-12 col-md-3">
<aui:input type="text" name="indirizzo" label="Indirizzo" />
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-3">
<aui:input type="text" name="tecnicoIstruttore" label="Tecnico Istruttore" />
</div>
<div class="col-xs-12 col-md-3">
<aui:input type="text" name="titolareDigitale" label="Titolare Digitale" />
</div>
<div class="col-xs-12 col-md-3">
<aui:input type="text" name="committente" label="Committente" />
</div>
<div class="col-xs-12 col-md-3">
<aui:input type="text" name="soggettiInterconnessi" label="Soggetti Interconnessi" />
</div>
</div>
<div class="row">
<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 %>">
<liferay-util:param name="field" value="dataRichiestaFine" />
</liferay-util:include>
</aui:field-wrapper>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-4">
<div class="row">
<div class="col-xs-12 col-md-6">
<aui:select name="ordinaPer" label="Ordina Per">
<aui:option selected="true" value="numeroProgetto">Numero Progetto</aui:option>
<aui:option value="protocollo">Protocollo</aui:option>
<aui:option value="dataCreazione">Data Invio</aui:option>
</aui:select>
</div>
</liferay-ui:panel>
<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>
<liferay-portlet:resourceURL id="comuni" var="getComuniURL" />
<aui:script use="aui-base, aui-io-request">
var getComuni = function(provinciaId, comuneId, comuneValue) {
var comuneSelect = A.one("#"+comuneId);
if(provinciaId == "" || provinciaId == "000"){
if (provinciaId == "" || provinciaId == "000") {
comuneSelect.html("<option value='000' label=''></option>")
comuneSelect.addClass("disabled").set("disabled", true);
} else {
A.io.request(
'<%= getComuniURL %>',
{
data: {
<portlet:namespace />provinciaId: provinciaId
},dataType: 'json',
on: {
success: function() {
var response = this.get('responseData');
comuneSelect.html("<option value='000' label=''></option>")
for( index in response ){
var code ='<option value="'+response[index].comuneId+'" label="'+response[index].descLong+'" class="comuneItem" '+(comuneValue==response[index].comuneId ? "selected=\"true\"" : "")+'>'+response[index].descLong+'</option>';
comuneSelect.append(code);
}
if(provinciaId!="" && provinciaId!="000" ){
comuneSelect.removeClass("disabled").set("disabled", false);
}
A.io.request('<%= getComuniURL %>', {
data: {
<portlet:namespace />provinciaId: provinciaId
},
dataType: 'json',
on: {
success: function() {
var response = this.get('responseData');
comuneSelect.html("<option value='000' label=''></option>")
for (index in response) {
var code = '<option value="' + response[index].comuneId + '" label="' + response[index].descLong
+ '" class="comuneItem" ' + (comuneValue==response[index].comuneId ? "selected=\"true\""
: "")
+ '>' + response[index].descLong + '</option>';
comuneSelect.append(code);
}
if (provinciaId != "" && provinciaId != "000") {
comuneSelect.removeClass("disabled").set("disabled", false);
}
}
}
);
});
}
};
A.ready(function(){
A.one(".provinciaSelect").on('change', function(event){
A.ready(function() {
A.one(".provinciaSelect").on('change', function(event) {
var provinciaId = event.currentTarget.get('value'),
comuneId = event.currentTarget.attr("id").replace("provincia","comune"),
comuneValue = "000";
getComuni(provinciaId, comuneId, comuneValue)
getComuni(provinciaId, comuneId, comuneValue)
});
});
</aui:script>

23
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_avvisi.jsp

@ -1,24 +1,19 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@ include file="/html/fascicolo/init.jsp" %>
<liferay-util:include page="/html/fascicolo/navigator/header.jsp" servletContext="<%=application %>"/>
<h2 class="fasciolo_page_title"><liferay-ui:message key="page_avvisi"></liferay-ui:message></h2>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@include file="/html/fascicolo/init.jsp"%>
<liferay-util:include page="/html/fascicolo/navigator/header.jsp" servletContext="<%= application %>"/>
<h2 class="fasciolo_page_title"><liferay-ui:message key="page_avvisi" /></h2>
<%
DettPratica dettPratica = (DettPratica)request.getAttribute("bean.dettPratica.lastData");
IntPratica intPratica = (IntPratica)request.getAttribute("bean.intPratica");
DettPratica dettPratica = (DettPratica) request.getAttribute("bean.dettPratica.lastData");
IntPratica intPratica = (IntPratica) request.getAttribute("bean.intPratica");
%>
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 col-md-12 fascicolo-avvisi-tab">
<liferay-util:include page="/html/avvisi/view.jsp" servletContext="<%=application %>">
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"/>
<div class="col-sm-12 fascicolo-avvisi-tab">
<liferay-util:include page="/html/avvisi/view.jsp" servletContext="<%= application %>">
<liferay-util:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" />
</liferay-util:include>
</div>
</div>
</div>

24
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf

@ -28,9 +28,8 @@
<%@page import="it.tref.liferay.portos.bo.util.WorkflowUtil"%>
<%@page import="java.util.List"%>
<%
String rowUrl = StringPool.BLANK;
//ADT - BUG-12 Aggiunta colonna Data Esito
String currentTab = (String)request.getAttribute("tabs1");
String currentTab = (String) request.getAttribute("tabs1");
//Informazioni relative alla pratica
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPratica.getIntPraticaId());
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId());
@ -40,14 +39,11 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP
ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(controlloPratica.getControlloPraticaId());
Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica.getTerritorioId());
Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId());
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());
List<WorkflowTask> listaTask = null;
WorkflowInstance workflowInstance = null;
if (workflowInstanceLink != null) {
@ -87,10 +83,7 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP
%>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Esito">
<%
String tipoEsito = ControlloPraticaLocalServiceUtil.getTipoEsito(controlloPratica.getControlloPraticaId());
out.print(LanguageUtil.get(pageContext, tipoEsito));
%>
<%= ControlloPraticaLocalServiceUtil.getTipoEsito(controlloPratica.getControlloPraticaId()) %>
</liferay-ui:search-container-column-text>
<%-- ADT - BUG-12 Aggiunta colonna Data Esito --%>
<c:if test='<%= "Tab_TaskCompletati".equals(currentTab) %>'>
@ -131,7 +124,7 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP
if (tecnico != null) {
out.print(tecnico.getFullName());
} else {
out.print(" [" + intPratica.getStatusByUserId() + StringPool.CLOSE_BRACKET);
out.print(StringPool.OPEN_BRACKET + intPratica.getStatusByUserId() + StringPool.CLOSE_BRACKET);
}
%>
</c:if>
@ -153,11 +146,7 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP
if (approvatore!=null) {
out.print(approvatore.getFullName());
} else {
if (workflowTask.getAssigneeUserId() == -1) {
out.print( " [Portos 1]");
} else {
out.print( " [" + workflowTask.getAssigneeUserId() + StringPool.CLOSE_BRACKET);
}
out.print( " [" + workflowTask.getAssigneeUserId() + StringPool.CLOSE_BRACKET);
}
out.print(" (" + workflowTask.getName() + StringPool.CLOSE_PARENTHESIS);
%>
@ -172,10 +161,7 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP
<%= provincia.getProvincia() + " - " + comune.getDenominazione() %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="GG*" cssClass="text-center">
<%
long days = ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(controlloPratica.getControlloPraticaId());
%>
<%= days %>
<%= ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(controlloPratica.getControlloPraticaId()) %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-jsp path="/html/gestioneattivita/action_button.jsp" align="right"
cssClass="text-center"/>

52
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns_completed.jspf

@ -1,19 +1,20 @@
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.Locale"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@page import="com.liferay.portal.kernel.util.StringPool"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="com.liferay.portal.kernel.workflow.WorkflowConstants"%>
<%@page import="com.liferay.portal.model.User"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil"%>
<%@page import="com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil"%>
<%@page import="com.liferay.portal.workflow.kaleo.model.KaleoInstance"%>
<%@page import="java.text.DateFormat"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@page import="com.liferay.portal.kernel.util.StringPool"%>
<%@page import="it.tref.liferay.portos.bo.util.WorkflowUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.impl.DettPraticaLocalServiceImpl"%>
<%@page import="it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.User"%>
<%@page import="it.tref.liferay.portos.bo.util.WorkflowUtil"%>
<%@page import="java.util.concurrent.TimeUnit"%>
<%@page import="java.util.Date"%>
<%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Provincia"%>
@ -33,7 +34,13 @@
<%@page import="com.liferay.portal.model.WorkflowInstanceLink"%>
<%@page import="com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil"%>
<%
String rowUrl = StringPool.BLANK;
ControlloPratica controlloPratica = null;
Locale locale = null;
DateFormat dateFormatDate = null;
String tabs1 = null;
String tabNames = null;
String rowUrl = StringPool.BLANK;
%>
<%
@ -99,27 +106,14 @@ IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPrat
<liferay-ui:search-container-column-text name="Esito">
<%
if(workflowInstanceId != 0){
String tipoEsito = ControlloPraticaLocalServiceUtil.getTipoEsito(controlloPratica.getControlloPraticaId());
out.print(tipoEsito);
if (workflowInstanceId != 0) {
String tipoEsito = ControlloPraticaLocalServiceUtil.getTipoEsito(controlloPratica.getControlloPraticaId());
out.print(tipoEsito);
}
%>
</liferay-ui:search-container-column-text>
<%-- <liferay-ui:search-container-column-text name="Sorteggiata">
<%
/*boolean sorteggiata = SorteggioLocalServiceUtil.findByIntPratica(intPratica.getIntPraticaId())!=null;
String clazz = StringPool.BLANK;
if(sorteggiata){
out.print("<span><i class=\"relative fa fa-check-square txt-green\"></i></span>");
}*/
%>
</liferay-ui:search-container-column-text> --%>
<liferay-ui:search-container-column-text name="Pratica">
<%
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId());
if(lastDettPratica != null){
long lastDettPraticaId = lastDettPratica.getDettPraticaId();
@ -199,9 +193,9 @@ IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(controlloPrat
Date now = new Date();
long diff = now.getTime() - data.getTime();
long days = TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS);
long days = TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS);
%>
<%=days %>
<%= days %>
</liferay-ui:search-container-column-text>
<c:if test='<%= !tabs1.equals(StringUtil.split(tabNames)[3]) %>'>

BIN
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/commons-logging.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/log4j.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/util-bridges.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

3
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-plugin-package.properties

@ -10,4 +10,5 @@ author=Liferay, Inc.
licenses=LGPL
liferay-versions=6.2.0+
required-deployment-contexts=\
portos-bo-portlet
portos-bo-portlet,\
portos-kaleo-web

349
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/scheduler/SchedulerKaleoController.java

@ -3,14 +3,6 @@ package it.tref.liferay.portos.kaleo.controller.scheduler;
import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.kaleo.controller.model.KaleoInstance;
import it.tref.liferay.portos.kaleo.controller.model.KaleoInstanceToken;
import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskAssignmentInstance;
import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskInstanceToken;
import it.tref.liferay.portos.kaleo.controller.service.KaleoInstanceLocalServiceUtil;
import it.tref.liferay.portos.kaleo.controller.service.KaleoInstanceTokenLocalServiceUtil;
import it.tref.liferay.portos.kaleo.controller.service.KaleoTaskAssignmentInstanceLocalServiceUtil;
import it.tref.liferay.portos.kaleo.controller.service.KaleoTaskInstanceTokenLocalServiceUtil;
import java.io.Serializable;
import java.util.ArrayList;
@ -26,7 +18,6 @@ import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
import com.liferay.portal.kernel.dao.orm.Order;
import com.liferay.portal.kernel.dao.orm.OrderFactoryUtil;
import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.messaging.Message;
@ -36,7 +27,6 @@ import com.liferay.portal.kernel.workflow.WorkflowInstance;
import com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil;
import com.liferay.portal.model.User;
public class SchedulerKaleoController implements MessageListener {
private static final Log _log = LogFactoryUtil.getLog(SchedulerKaleoController.class);
@ -45,155 +35,86 @@ public class SchedulerKaleoController implements MessageListener {
@Override
public void receive(Message message) throws MessageListenerException {
if (lock.tryLock()) {
try {
//Riparazione pratiche con workflow sporco
//riparaLifecycleWorkflow();
// Riparazione pratiche con workflow sporco
riparaLifecycleWorkflowNew();
} catch (Exception e) {
_log.error(e,e);
}finally{
_log.error(e, e);
} finally {
lock.unlock();
}
}
}
/*private void riparaLifecycleWorkflow() throws SystemException{
List<Object[]> lista = IntPraticaLocalServiceUtil.riparaWorkflow();
for (Object[] objs : lista) {
long kaleotaskinstancetokenid = Long.parseLong(String.valueOf(objs[0]));
long kaleoinstancetokenid = Long.parseLong(String.valueOf(objs[1]));
long controllopraticaid = Long.parseLong(String.valueOf(objs[2]));
long statusbyuserid = Long.parseLong(String.valueOf(objs[3]));
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controllopraticaid);
DynamicQuery queryKIT = DynamicQueryFactoryUtil.forClass(KaleoTaskInstanceToken.class);
queryKIT.add(RestrictionsFactoryUtil.eq("classPK", controllopraticaid));
Order defaultOrderDettPrtatica = OrderFactoryUtil.asc("createDate");
queryKIT.addOrder(defaultOrderDettPrtatica);
List<KaleoTaskInstanceToken> listas = KaleoTaskInstanceTokenLocalServiceUtil.dynamicQuery(queryKIT);
if(listas != null && !listas.isEmpty()){
KaleoTaskInstanceToken ktit = listas.get(0);
DynamicQuery queryKAT = DynamicQueryFactoryUtil.forClass(KaleoTaskAssignmentInstance.class);
queryKAT.add(RestrictionsFactoryUtil.eq("kaleoTaskInstanceTokenId", ktit.getKaleoTaskInstanceTokenId()));
List<KaleoTaskAssignmentInstance> listass = KaleoTaskAssignmentInstanceLocalServiceUtil.dynamicQuery(queryKAT);
if(listass != null && !listass.isEmpty()){
KaleoTaskAssignmentInstance assignmentInstanceApp = listass.get(0);
long kaleoTaskAssignementInstanceId = assignmentInstanceApp.getKaleoTaskAssignmentInstanceId() + 1;
// long kaleoTaskAssignementInstanceId = KaleoTaskAssignmentInstanceLocalServiceUtil.getLastKaleoTaskAssignmentInstanceId();
// KaleoTaskAssignmentInstance app = KaleoTaskAssignmentInstanceLocalServiceUtil.fetchKaleoTaskAssignmentInstance(kaleoTaskAssignementInstanceId);
// if(app != null){
// kaleoTaskAssignementInstanceId = KaleoTaskAssignmentInstanceLocalServiceUtil.getLastKaleoTaskAssignmentInstanceId();
// }
KaleoTaskAssignmentInstance assignmentInstance = KaleoTaskAssignmentInstanceLocalServiceUtil.createKaleoTaskAssignmentInstance(
kaleoTaskAssignementInstanceId);
assignmentInstance.setCreateDate(assignmentInstanceApp.getCreateDate());
assignmentInstance.setModifiedDate(assignmentInstanceApp.getModifiedDate());
assignmentInstance.setModifiedDate(assignmentInstanceApp.getModifiedDate());
assignmentInstance.setGroupId(assignmentInstanceApp.getGroupId());
assignmentInstance.setCompanyId(assignmentInstanceApp.getCompanyId());
assignmentInstance.setUserId(assignmentInstanceApp.getUserId());
assignmentInstance.setUserName(assignmentInstanceApp.getUserName());
assignmentInstance.setKaleoDefinitionId(assignmentInstanceApp.getKaleoDefinitionId());
assignmentInstance.setKaleoInstanceId(assignmentInstanceApp.getKaleoInstanceId());
assignmentInstance.setKaleoInstanceTokenId(kaleoinstancetokenid);
assignmentInstance.setKaleoTaskInstanceTokenId(kaleotaskinstancetokenid);
assignmentInstance.setKaleoTaskId(21642L);
assignmentInstance.setKaleoTaskName("Esito");
assignmentInstance.setAssigneeClassName(User.class.getName());
assignmentInstance.setAssigneeClassPK(statusbyuserid);
assignmentInstance.setCompleted(false);
KaleoTaskAssignmentInstanceLocalServiceUtil.updateKaleoTaskAssignmentInstance(assignmentInstance);
if(controlloPratica != null){
_log.debug("Pulisco Workflow ed indicizzo per intPraticaId=" + controlloPratica.getIntPraticaId());
IntPraticaLocalServiceUtil.reIndexFasciolo(controlloPratica.getIntPraticaId(), controlloPratica.getCompanyId());
}
}
}
}
}
*/
/**
* ADT
* @throws Exception
*
*
*
*/
private void riparaLifecycleWorkflowNew() throws Exception {
List<Object[]> listaKO=new ArrayList<Object[]>();
private void riparaLifecycleWorkflowNew() throws Exception {
List<Object[]> listaKO = new ArrayList<Object[]>();
List<Object[]> lista = IntPraticaLocalServiceUtil.riparaWorkflow();
for (Object[] objs : lista) {
long kaleotaskinstancetokenid = Long.parseLong(String.valueOf(objs[0]));
long kaleoinstancetokenid = Long.parseLong(String.valueOf(objs[1]));
long controllopraticaid = (objs[2]!=null)? Long.parseLong(String.valueOf(objs[2])):0;
long controllopraticaid = (objs[2] != null) ? Long.parseLong(String.valueOf(objs[2])) : 0;
long statusbyuserid = Long.parseLong(String.valueOf(objs[3]));
_log.info("RIPARA_WORKFLOW inizio lavorazione -- controllopraticaid="+controllopraticaid+" statusbyuserid="+statusbyuserid+" kaleoinstancetokenid="+kaleoinstancetokenid+" --kaleotaskinstancetokenid="+kaleotaskinstancetokenid);
_log.info("RIPARA_WORKFLOW inizio lavorazione -- controllopraticaid=" + controllopraticaid
+ " statusbyuserid=" + statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid
+ " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid);
if (controllopraticaid==0){
_log.info("RIPARA_WORKFLOW KO controllopraticaid non valorizzato ="+controllopraticaid);
if (controllopraticaid == 0) {
_log.info("RIPARA_WORKFLOW KO controllopraticaid non valorizzato =" + controllopraticaid);
continue;
}
try{
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controllopraticaid);
try {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.fetchControlloPratica(controllopraticaid);
DynamicQuery queryKIT = DynamicQueryFactoryUtil.forClass(KaleoTaskInstanceToken.class);
queryKIT.add(RestrictionsFactoryUtil.eq("classPK", controllopraticaid));
Order defaultOrderDettPrtatica = OrderFactoryUtil.asc("createDate");
queryKIT.addOrder(defaultOrderDettPrtatica);
List<KaleoTaskInstanceToken> listas = KaleoTaskInstanceTokenLocalServiceUtil.dynamicQuery(queryKIT);
if(listas != null && !listas.isEmpty()){
KaleoTaskInstanceToken ktit =null;
if (listas != null && !listas.isEmpty()) {
KaleoTaskInstanceToken ktit = null;
for (KaleoTaskInstanceToken k:listas){
if (k.getKaleoTaskName().equalsIgnoreCase("Assegnazione")){
ktit=k;
for (KaleoTaskInstanceToken k : listas) {
if (k.getKaleoTaskName().equalsIgnoreCase("Assegnazione")) {
ktit = k;
break;
}
}
if (ktit!=null){
WorkflowInstance wfInstance=WorkflowInstanceManagerUtil.getWorkflowInstance(controlloPratica.getCompanyId(), ktit.getKaleoInstanceId());
Serializable wfVariante=wfInstance.getWorkflowContext().get("wf_variante");
boolean isVariante=false;
if (wfVariante!=null){
isVariante=(wfVariante!=null&&wfVariante.toString().length()>0);
if (ktit != null) {
WorkflowInstance wfInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(
controlloPratica.getCompanyId(), ktit.getKaleoInstanceId());
Serializable wfVariante = wfInstance.getWorkflowContext().get("wf_variante");
boolean isVariante = false;
if (wfVariante != null) {
isVariante = (wfVariante != null && wfVariante.toString().length() > 0);
}
_log.info("RIPARA_WORKFLOW isVariante="+isVariante+" per controllopraticaid="+controllopraticaid);
_log.info("RIPARA_WORKFLOW KaleoTaskInstanceTokenId="+ktit.getKaleoTaskInstanceTokenId()+" --controllopraticaid="+controllopraticaid);
_log.info("RIPARA_WORKFLOW isVariante=" + isVariante + " per controllopraticaid="
+ controllopraticaid);
_log.info("RIPARA_WORKFLOW KaleoTaskInstanceTokenId=" + ktit.getKaleoTaskInstanceTokenId()
+ " --controllopraticaid=" + controllopraticaid);
DynamicQuery queryKAT = DynamicQueryFactoryUtil.forClass(KaleoTaskAssignmentInstance.class);
queryKAT.add(RestrictionsFactoryUtil.eq("kaleoTaskInstanceTokenId", ktit.getKaleoTaskInstanceTokenId()));
List<KaleoTaskAssignmentInstance> listass = KaleoTaskAssignmentInstanceLocalServiceUtil.dynamicQuery(queryKAT);
_log.info("size lista KaleoTaskAssignmentInstance per kaleoTaskInstanceTokenId="+ ktit.getKaleoTaskInstanceTokenId()+" :"+listass.size());
//for (KaleoTaskAssignmentInstance x:listass){
// _log.info("KaleoTaskAssignmentInstanceId="+x.getKaleoTaskAssignmentInstanceId()+" -- KaleoTaskName:"+x.getKaleoTaskName());
//}
if(listass != null && !listass.isEmpty()){
//creazione record assente sulla tabella KaleoTaskAssignmentInstance
queryKAT.add(RestrictionsFactoryUtil.eq("kaleoTaskInstanceTokenId",
ktit.getKaleoTaskInstanceTokenId()));
List<KaleoTaskAssignmentInstance> listass = KaleoTaskAssignmentInstanceLocalServiceUtil
.dynamicQuery(queryKAT);
_log.info("size lista KaleoTaskAssignmentInstance per kaleoTaskInstanceTokenId="
+ ktit.getKaleoTaskInstanceTokenId() + " :" + listass.size());
// for (KaleoTaskAssignmentInstance x:listass){
// _log.info("KaleoTaskAssignmentInstanceId="+x.getKaleoTaskAssignmentInstanceId()+" -- KaleoTaskName:"+x.getKaleoTaskName());
// }
if (listass != null && !listass.isEmpty()) {
// creazione record assente sulla tabella KaleoTaskAssignmentInstance
KaleoTaskAssignmentInstance assignmentInstanceApp = listass.get(0);
long kaleoTaskAssignementInstanceId = CounterLocalServiceUtil.increment("com.liferay.counter.model.Counter");
KaleoTaskAssignmentInstance assignmentInstance = KaleoTaskAssignmentInstanceLocalServiceUtil.createKaleoTaskAssignmentInstance(
kaleoTaskAssignementInstanceId);
long kaleoTaskAssignementInstanceId = CounterLocalServiceUtil
.increment("com.liferay.counter.model.Counter");
KaleoTaskAssignmentInstance assignmentInstance = KaleoTaskAssignmentInstanceLocalServiceUtil
.createKaleoTaskAssignmentInstance(kaleoTaskAssignementInstanceId);
assignmentInstance.setCreateDate(assignmentInstanceApp.getCreateDate());
assignmentInstance.setModifiedDate(assignmentInstanceApp.getModifiedDate());
@ -212,60 +133,75 @@ public class SchedulerKaleoController implements MessageListener {
assignmentInstance.setAssigneeClassPK(statusbyuserid);
assignmentInstance.setCompleted(false);
KaleoTaskAssignmentInstanceLocalServiceUtil.updateKaleoTaskAssignmentInstance(assignmentInstance);
////////////////////////////////////////////////////////////////////////////////
//patch per tener contro anche delle varianti create da applicativo portos2: forzo lo stato del WF a ESITO
long kaleoInstanceId=assignmentInstanceApp.getKaleoInstanceId();
KaleoInstance kaleoInstance = KaleoInstanceLocalServiceUtil.getKaleoInstance(kaleoInstanceId);
long rootKaleoInstanceTokenId=kaleoInstance.getRootKaleoInstanceTokenId();
KaleoInstanceToken rootKaleoInstanceToken = KaleoInstanceTokenLocalServiceUtil.getKaleoInstanceToken(rootKaleoInstanceTokenId);
_log.info("rootKaleoInstanceToken="+rootKaleoInstanceToken.getCurrentKaleoNodeName());
rootKaleoInstanceToken.setCurrentKaleoNodeId(21639);
rootKaleoInstanceToken.setCurrentKaleoNodeName("Esito");
KaleoInstanceTokenLocalServiceUtil.updateKaleoInstanceToken(rootKaleoInstanceToken);
////////////////////
//task di assegnazione viene inserito a completato:
if (!assignmentInstanceApp.isCompleted()){
assignmentInstanceApp.setCompleted(true);
assignmentInstanceApp.setCompletionDate(new Date());
KaleoTaskAssignmentInstanceLocalServiceUtil.updateKaleoTaskAssignmentInstance(assignmentInstanceApp);
}
//solo per le nuove varianti di PORTOS2
if (isVariante){
_log.info("cancellazione task di assegnazione per controllopraticaid="+controllopraticaid);
KaleoTaskInstanceTokenLocalServiceUtil.deleteKaleoTaskInstanceToken(ktit);
KaleoTaskAssignmentInstanceLocalServiceUtil.deleteKaleoTaskAssignmentInstance(assignmentInstanceApp);
}else if (!ktit.isCompleted()){
ktit.setCompleted(true);
ktit.setCompletionDate(new Date());
KaleoTaskInstanceTokenLocalServiceUtil.updateKaleoTaskInstanceToken(ktit);
}
//////////////////////////////////////////////////////////////////////////////////
if(controlloPratica != null){
_log.info("RIPARA_WORKFLOW - Pulisco Workflow ed indicizzo per intPraticaId=" + controlloPratica.getIntPraticaId());
KaleoTaskAssignmentInstanceLocalServiceUtil
.updateKaleoTaskAssignmentInstance(assignmentInstance);
// patch per tener contro anche delle varianti create da applicativo portos2: forzo lo stato
// del WF a ESITO
long kaleoInstanceId = assignmentInstanceApp.getKaleoInstanceId();
KaleoInstance kaleoInstance = KaleoInstanceLocalServiceUtil
.getKaleoInstance(kaleoInstanceId);
long rootKaleoInstanceTokenId = kaleoInstance.getRootKaleoInstanceTokenId();
KaleoInstanceToken rootKaleoInstanceToken = KaleoInstanceTokenLocalServiceUtil
.getKaleoInstanceToken(rootKaleoInstanceTokenId);
_log.info("rootKaleoInstanceToken=" + rootKaleoInstanceToken.getCurrentKaleoNodeName());
rootKaleoInstanceToken.setCurrentKaleoNodeId(21639);
rootKaleoInstanceToken.setCurrentKaleoNodeName("Esito");
KaleoInstanceTokenLocalServiceUtil.updateKaleoInstanceToken(rootKaleoInstanceToken);
// //////////////////
// task di assegnazione viene inserito a completato:
if (!assignmentInstanceApp.isCompleted()) {
assignmentInstanceApp.setCompleted(true);
assignmentInstanceApp.setCompletionDate(new Date());
KaleoTaskAssignmentInstanceLocalServiceUtil
.updateKaleoTaskAssignmentInstance(assignmentInstanceApp);
}
// solo per le nuove varianti di PORTOS2
if (isVariante) {
_log.info("cancellazione task di assegnazione per controllopraticaid="
+ controllopraticaid);
KaleoTaskInstanceTokenLocalServiceUtil.deleteKaleoTaskInstanceToken(ktit);
KaleoTaskAssignmentInstanceLocalServiceUtil
.deleteKaleoTaskAssignmentInstance(assignmentInstanceApp);
} else if (!ktit.isCompleted()) {
ktit.setCompleted(true);
ktit.setCompletionDate(new Date());
KaleoTaskInstanceTokenLocalServiceUtil.updateKaleoTaskInstanceToken(ktit);
}
// ////////////////////////////////////////////////////////////////////////////////
if (controlloPratica != null) {
_log.info("RIPARA_WORKFLOW - Pulisco Workflow ed indicizzo per intPraticaId="
+ controlloPratica.getIntPraticaId());
CacheRegistryUtil.clear();
IntPraticaLocalServiceUtil.reIndexFasciolo(controlloPratica.getIntPraticaId(), controlloPratica.getCompanyId());
IntPraticaLocalServiceUtil.reIndexFasciolo(controlloPratica.getIntPraticaId(),
controlloPratica.getCompanyId());
}
}
_log.info("RIPARA_WORKFLOW fine lavorazione OK -- controllopraticaid="+controllopraticaid+" statusbyuserid="+statusbyuserid+" kaleoinstancetokenid="+kaleoinstancetokenid+" --kaleotaskinstancetokenid="+kaleotaskinstancetokenid);
}else{
_log.info("RIPARA_WORKFLOW fine lavorazione KO --task assegnazione non trovato per controllopraticaid="+controllopraticaid+" statusbyuserid="+statusbyuserid+" kaleoinstancetokenid="+kaleoinstancetokenid+" --kaleotaskinstancetokenid="+kaleotaskinstancetokenid);
_log.info("RIPARA_WORKFLOW fine lavorazione OK -- controllopraticaid=" + controllopraticaid
+ " statusbyuserid=" + statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid
+ " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid);
} else {
_log.info("RIPARA_WORKFLOW fine lavorazione KO --task assegnazione non trovato per controllopraticaid="
+ controllopraticaid
+ " statusbyuserid="
+ statusbyuserid
+ " kaleoinstancetokenid="
+ kaleoinstancetokenid + " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid);
listaKO.add(objs);
}
}
}catch(Exception e){
_log.error("Errore RIPARA_WORKFLOW -- controllopraticaid="+controllopraticaid+" statusbyuserid="+statusbyuserid+" kaleoinstancetokenid="+kaleoinstancetokenid+" --kaleotaskinstancetokenid="+kaleotaskinstancetokenid,e);
} catch (Exception e) {
_log.error("Errore RIPARA_WORKFLOW -- controllopraticaid=" + controllopraticaid + " statusbyuserid="
+ statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid
+ " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid, e);
}
}
@ -273,23 +209,24 @@ public class SchedulerKaleoController implements MessageListener {
}
private void patchTaskEsitiForWF(List<Object[]> lista){
private void patchTaskEsitiForWF(List<Object[]> lista) {
for (Object[] objs : lista) {
long kaleotaskinstancetokenid = Long.parseLong(String.valueOf(objs[0]));
long kaleoinstancetokenid = Long.parseLong(String.valueOf(objs[1]));
long controllopraticaid = (objs[2]!=null)? Long.parseLong(String.valueOf(objs[2])):0;
long controllopraticaid = (objs[2] != null) ? Long.parseLong(String.valueOf(objs[2])) : 0;
long statusbyuserid = Long.parseLong(String.valueOf(objs[3]));
try{
if (controllopraticaid==0){
try {
if (controllopraticaid == 0) {
continue;
}
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controllopraticaid);
if (controlloPratica==null)
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.fetchControlloPratica(controllopraticaid);
if (controlloPratica == null)
continue;
//KaleoTaskInstanceToken ordinati per dati di creazione decresente
// KaleoTaskInstanceToken ordinati per dati di creazione decresente
DynamicQuery queryKIT = DynamicQueryFactoryUtil.forClass(KaleoTaskInstanceToken.class);
queryKIT.add(RestrictionsFactoryUtil.eq("classPK", controllopraticaid));
queryKIT.add(RestrictionsFactoryUtil.eq("kaleoTaskName", "Esito"));
@ -298,23 +235,28 @@ public class SchedulerKaleoController implements MessageListener {
queryKIT.addOrder(defaultOrderDettPrtatica);
List<KaleoTaskInstanceToken> listas = KaleoTaskInstanceTokenLocalServiceUtil.dynamicQuery(queryKIT);
if (listas != null && !listas.isEmpty()) {
KaleoTaskInstanceToken ktit = null;
if(listas != null && !listas.isEmpty()){
KaleoTaskInstanceToken ktit =null;
for (KaleoTaskInstanceToken k:listas){
if (k.getKaleoTaskName().equalsIgnoreCase("Esito")){
ktit=k;
_log.info("patchTaskEsitiForWF - task esito senza assegnazione controlloPraticaid = "+controllopraticaid+" - KaleoTaskInstanceTokenId= " +k.getKaleoTaskInstanceTokenId()+" -KaleoTaskId="+k.getKaleoTaskId()+" -statusbyuserid="+statusbyuserid);
for (KaleoTaskInstanceToken k : listas) {
if (k.getKaleoTaskName().equalsIgnoreCase("Esito")) {
ktit = k;
_log.info("patchTaskEsitiForWF - task esito senza assegnazione controlloPraticaid = "
+ controllopraticaid + " - KaleoTaskInstanceTokenId= "
+ k.getKaleoTaskInstanceTokenId() + " -KaleoTaskId=" + k.getKaleoTaskId()
+ " -statusbyuserid=" + statusbyuserid);
break;
}
}
if (ktit!=null){
//WorkflowInstance wfInstance=WorkflowInstanceManagerUtil.getWorkflowInstance(controlloPratica.getCompanyId(), ktit.getKaleoInstanceId());
if (ktit != null) {
// WorkflowInstance
// wfInstance=WorkflowInstanceManagerUtil.getWorkflowInstance(controlloPratica.getCompanyId(),
// ktit.getKaleoInstanceId());
long kaleoTaskAssignementInstanceId = CounterLocalServiceUtil.increment("com.liferay.counter.model.Counter");
KaleoTaskAssignmentInstance assignmentInstance = KaleoTaskAssignmentInstanceLocalServiceUtil.createKaleoTaskAssignmentInstance(
kaleoTaskAssignementInstanceId);
long kaleoTaskAssignementInstanceId = CounterLocalServiceUtil
.increment("com.liferay.counter.model.Counter");
KaleoTaskAssignmentInstance assignmentInstance = KaleoTaskAssignmentInstanceLocalServiceUtil
.createKaleoTaskAssignmentInstance(kaleoTaskAssignementInstanceId);
assignmentInstance.setCreateDate(ktit.getCreateDate());
assignmentInstance.setModifiedDate(ktit.getModifiedDate());
@ -333,22 +275,33 @@ public class SchedulerKaleoController implements MessageListener {
assignmentInstance.setAssigneeClassPK(statusbyuserid);
assignmentInstance.setCompleted(false);
KaleoTaskAssignmentInstanceLocalServiceUtil.updateKaleoTaskAssignmentInstance(assignmentInstance);
KaleoTaskAssignmentInstanceLocalServiceUtil
.updateKaleoTaskAssignmentInstance(assignmentInstance);
if(controlloPratica != null){
if (controlloPratica != null) {
CacheRegistryUtil.clear();
IntPraticaLocalServiceUtil.reIndexFasciolo(controlloPratica.getIntPraticaId(), controlloPratica.getCompanyId());
IntPraticaLocalServiceUtil.reIndexFasciolo(controlloPratica.getIntPraticaId(),
controlloPratica.getCompanyId());
}
_log.info("patchTaskEsitiForWF fine lavorazione OK -- controllopraticaid="+controllopraticaid+" statusbyuserid="+statusbyuserid+" kaleoinstancetokenid="+kaleoinstancetokenid+" --kaleotaskinstancetokenid="+kaleotaskinstancetokenid);
}else{
_log.info("patchTaskEsitiForWF fine lavorazione KO --task esito non trovato per controllopraticaid="+controllopraticaid+" statusbyuserid="+statusbyuserid+" kaleoinstancetokenid="+kaleoinstancetokenid+" --kaleotaskinstancetokenid="+kaleotaskinstancetokenid);
_log.info("patchTaskEsitiForWF fine lavorazione OK -- controllopraticaid=" + controllopraticaid
+ " statusbyuserid=" + statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid
+ " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid);
} else {
_log.info("patchTaskEsitiForWF fine lavorazione KO --task esito non trovato per controllopraticaid="
+ controllopraticaid
+ " statusbyuserid="
+ statusbyuserid
+ " kaleoinstancetokenid="
+ kaleoinstancetokenid + " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid);
}
}
}catch(Exception e){
_log.error("Errore patchTaskEsitiForWF -- controllopraticaid="+controllopraticaid+" statusbyuserid="+statusbyuserid+" kaleoinstancetokenid="+kaleoinstancetokenid+" --kaleotaskinstancetokenid="+kaleotaskinstancetokenid,e);
} catch (Exception e) {
_log.error("Errore patchTaskEsitiForWF -- controllopraticaid=" + controllopraticaid
+ " statusbyuserid=" + statusbyuserid + " kaleoinstancetokenid=" + kaleoinstancetokenid
+ " --kaleotaskinstancetokenid=" + kaleotaskinstancetokenid, e);
}
}

4
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
##
build.namespace=portos_kaleo_controller
build.number=6
build.date=1574151325177
build.number=8
build.date=1616412878684
build.auto.upgrade=true
##

1
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java

@ -32,7 +32,6 @@ public class StatoPraticaConstants {
public static final String CAMBIO_ISTRUTTORE = "CI";
public static final String NON_AUTORIZZATA = "AN";
public static final String VARIAZIONE_SOGGETTI = "VS";
public static final String VIARCH = "IA";
/*
* Probabilmente non è il posto più corretto, però si usa dovunque lo stato della pratica per impostare tipo avviso,

336
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf

@ -1,242 +1,202 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%--
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
--%>
Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later
version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
--%>
<%@page import="com.liferay.portal.kernel.json.JSONException"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="com.liferay.portal.kernel.json.JSONFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.json.JSONObject"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<table class="table table-striped attivita-table" <%-- id="<portlet:namespace/>_<%= workflowLog.getType() %>" --%>>
<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%>
<%@page import="com.liferay.portal.kernel.util.StringPool"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="com.liferay.portal.kernel.workflow.WorkflowLog"%>
<%@page import="com.liferay.portal.model.Role"%>
<%@page import="com.liferay.portal.model.User"%>
<%@page import="com.liferay.portal.service.RoleLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="com.liferay.portal.util.PortalUtil"%>
<%@page import="java.util.Map"%>
<table class="table table-striped attivita-table">
<thead class="table-columns attivita-group__head">
<tr>
<th class="head-date text-center">Data</th>
<th class="head-description">Descrizione</th>
<th class="head-activity text-center">Attività</th>
<th class="head-comment text-center">Commento</th>
</tr>
</tr>
</thead>
<tbody class="attivita-group__body">
<%
//ADT: bug bo id=33
Map<Long,String> historyWorkflowEsitiLogs = (Map<Long,String>)request.getAttribute("historyWorkflowEsitiLogs");
for (WorkflowLog workflowLog : workflowLogs) {
Role curRole = null;
User curUser = null;
String actorName = null;
if (workflowLog.getRoleId() != 0) {
curRole = RoleLocalServiceUtil.getRole(workflowLog.getRoleId());
actorName = curRole.getDescriptiveName();
}
else if (workflowLog.getUserId() != 0) {
curUser = UserLocalServiceUtil.getUser(workflowLog.getUserId());
actorName = curUser.getFullName();
}
String kaleoNodeName = null;
String transitionName = null;
try {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(workflowLog.getState());
kaleoNodeName = jsonObject.getString("kaleoNodeName");
transitionName = jsonObject.getString("transitionName");
} catch (JSONException e) {
kaleoNodeName = workflowLog.getState();
}
%>
<%
@SuppressWarnings("unchecked")
Map<Long, String> historyWorkflowEsitiLogs = (Map<Long, String>) request.getAttribute("historyWorkflowEsitiLogs");
for (WorkflowLog workflowLog : workflowLogs) {
Role curRole = null;
User curUser = null;
String actorName = null;
if (workflowLog.getRoleId() != 0) {
curRole = RoleLocalServiceUtil.getRole(workflowLog.getRoleId());
actorName = HtmlUtil.escape(curRole.getDescriptiveName());
}
else if (workflowLog.getUserId() != 0) {
curUser = UserLocalServiceUtil.getUser(workflowLog.getUserId());
actorName = HtmlUtil.escape(curUser.getFullName());
}
String kaleoNodeName = null;
String transitionName = null;
try {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(workflowLog.getState());
kaleoNodeName = jsonObject.getString("kaleoNodeName");
transitionName = jsonObject.getString("transitionName");
} catch (JSONException e) {
kaleoNodeName = workflowLog.getState();
}
%>
<tr>
<td class="text-center date-col">
<%= dateFormatDateTime.format(workflowLog.getCreateDate()) %>
</td>
<td class="description-col">
<td class="text-center date-col"><%= dateFormatDateTime.format(workflowLog.getCreateDate()) %></td>
<td class="description-col">
<c:choose>
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_COMPLETION %>">
<div>
<c:choose>
<c:when test="<%= Validator.isNull(transitionName) %>">
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" />
<liferay-ui:message arguments="<%= new Object[] { actorName, kaleoNodeName } %>"
key="x-completed-the-task-x" />
</c:when>
<c:otherwise>
<c:if test='<%= "registra-esito".equalsIgnoreCase(transitionName) %>'>
<%
//ADT: bug bo id=33
String esito = (String)request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId());
}
String esito = (String)request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs != null && historyWorkflowEsitiLogs.containsKey(
workflowLog.getWorkflowLogId())) {
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId());
}
%>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, esito} %>" key="x-completed-the-task-y-z" />
<liferay-ui:message arguments="<%= new Object[] { actorName, kaleoNodeName, esito} %>"
key="x-completed-the-task-y-z" />
</c:if>
<c:if test='<%= "assegna".equalsIgnoreCase(transitionName) %>'>
<%
String assegna = (String)request.getAttribute("assegna-value");
String assegna = (String) request.getAttribute("assegna-value");
%>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, assegna} %>" key="x-completed-the-task-y-z" />
<liferay-ui:message arguments="<%= new Object[] { actorName, kaleoNodeName, assegna} %>"
key="x-completed-the-task-y-z" />
</c:if>
<c:if test='<%= !"assegna".equalsIgnoreCase(transitionName) && !"registra-esito".equalsIgnoreCase(transitionName) %>'>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" />
<c:if test='<%= !"assegna".equalsIgnoreCase(transitionName)
&& !"registra-esito".equalsIgnoreCase(transitionName) %>'>
<liferay-ui:message arguments="<%= new Object[] { actorName, kaleoNodeName} %>"
key="x-completed-the-task-x" />
</c:if>
</c:otherwise>
</c:choose>
<portlet:renderURL var="historyFormTaskURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<portlet:param name="struts_action" value="/workflow_tasks/render_history_form_task" />
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowLog.getWorkflowTaskId()) %>" />
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowLog
.getWorkflowTaskId()) %>" />
</portlet:renderURL>
<span>&nbsp;</span>
<liferay-ui:icon
image="history"
url='<%=historyFormTaskURL %>'
useDialog='<%=true %>'
/>
<liferay-ui:icon image="history" url="<%= historyFormTaskURL %>" useDialog="true" />
</div>
</c:when>
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_UPDATE %>">
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="x-updated-the-due-date" />
<liferay-ui:message arguments="<%= actorName %>" key="x-updated-the-due-date" />
</div>
</c:when>
<c:when test="<%= workflowLog.getType() == WorkflowLog.TRANSITION %>">
<div>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), workflowLog.getState()} %>" key="x-sent-signal-x" />
<liferay-ui:message arguments="<%= new Object[] { actorName, workflowLog.getState() } %>"
key="x-sent-signal-x" />
</div>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser.getUserId()) %>">
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>" key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself" : "x-assigned-the-task-to-herself" %>' />
<liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>"
key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself"
: "x-assigned-the-task-to-herself" %>' />
</div>
</c:when>
<c:otherwise>
<%
if (curRole == null) {
String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK);
%>
<div>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName), HtmlUtil.escape(actorName)} %>" key="x-assigned-the-task-to-x" />
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName),
actorName} %>" key="x-assigned-the-task-to-x" />
<c:if test="<%= workflowLog.getPreviousUserId() != 0 %>">
<liferay-ui:message arguments="<%= PortalUtil.getUserName(workflowLog.getPreviousUserId(), StringPool.BLANK) %>" key="previous-assignee-was-x" />
<liferay-ui:message arguments="<%= PortalUtil.getUserName(workflowLog
.getPreviousUserId(), StringPool.BLANK) %>" key="previous-assignee-was-x" />
</c:if>
</div>
<%
}
else {
} else {
%>
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="task-initially-assigned-to-the-x-role" />
<liferay-ui:message arguments="<%= actorName %>"
key="task-initially-assigned-to-the-x-role" />
</div>
<%
}
%>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
</td>
<td class="text-center activity-col">
</td>
<td class="text-center activity-col">
<%
if(Validator.isNotNull(kaleoNodeName)){
out.print(kaleoNodeName);
if(Validator.isNotNull(transitionName)){
if("registra-esito".equalsIgnoreCase(transitionName)){
//out.print(" ( " + (String)request.getAttribute("registra-esito-value") + " ) ");
//ADT BUG BO ID=33
String esito = (String)request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId());
if (Validator.isNotNull(kaleoNodeName)) {
out.print(kaleoNodeName);
if (Validator.isNotNull(transitionName)) {
if ("registra-esito".equalsIgnoreCase(transitionName)) {
String esito = (String) request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs != null && historyWorkflowEsitiLogs.containsKey(workflowLog
.getWorkflowLogId())) {
esito = historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId());
}
out.print(" ( " + esito + " ) ");
} else if("assegna".equalsIgnoreCase(transitionName)){
out.print(" ( " + (String)request.getAttribute("assegna-value") + " ) ");
}
} else if ("assegna".equalsIgnoreCase(transitionName)) {
out.print(" ( " + (String)request.getAttribute("assegna-value") + " ) ");
}
}
}
%>
</td>
<td class="activity-note">
<c:if test='<%=Validator.isNotNull(workflowLog.getComment()) && !"Assigned initial task.".equals(workflowLog.getComment()) %>'>
<div class="post-it-note">
<div class="header-post-it">
<p class="header-post-it_date"><%= dateFormatDateTime.format(workflowLog.getCreateDate()) %></p>
<p class="header-post-it_name">
<c:if test="<%=Validator.isNotNull(curUser) %>">
<%= curUser.getFullName() %>
</c:if>
</p>
</div>
<div class="body-post-it">
<%= HtmlUtil.escape(workflowLog.getComment()) %>
</div>
</td>
<td class="activity-note">
<c:if test='<%= Validator.isNotNull(workflowLog.getComment())
&& !"Assigned initial task.".equals(workflowLog.getComment()) %>'>
<div class="post-it-note">
<div class="header-post-it">
<p class="header-post-it_date"><%= dateFormatDateTime.format(workflowLog.getCreateDate()) %></p>
<p class="header-post-it_name">
<c:if test="<%= Validator.isNotNull(curUser) %>">
<%= curUser.getFullName() %>
</c:if>
</p>
</div>
</c:if>
</td>
</tr>
<%-- <div class="task-activity task-type-<%= workflowLog.getType() %>">
<div>
</div>
</div> --%>
<%
}
%>
</tbody>
<div class="body-post-it">
<%= HtmlUtil.escape(workflowLog.getComment()) %>
</div>
</div>
</c:if>
</td>
</tr>
<%
}
%>
</tbody>
</table>
<style>
.head-date {
width: 120px;
@ -255,10 +215,9 @@ for (WorkflowLog workflowLog : workflowLogs) {
table-layout: fixed;
}
.attivita-table thead th {
background-color: #812121!important;
color: white;
background-color: #812121!important;
color: white;
}
.attivita-table td {
border: 1px solid #dddddd;
}
@ -266,44 +225,41 @@ for (WorkflowLog workflowLog : workflowLogs) {
padding-bottom: 40px!important;
}
.post-it-note {
min-width: 13em;
background: rgb(255,215,7);
position: relative;
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
min-width: 13em;
background: rgb(255,215,7);
position: relative;
}
.post-it-note:after {
content: "";
position: absolute;
bottom: -2em;
left: 0;
right: 2em;
border-width: 1em;
border-style: solid;
border-color: rgb(255,215,7);
content: "";
position: absolute;
bottom: -2em;
left: 0;
right: 2em;
border-width: 1em;
border-style: solid;
border-color: rgb(255,215,7);
}
.post-it-note:before {
content: "";
position: absolute;
bottom: -2em;
right: 0;
border-width: 2em 2em 0 0;
border-style: solid;
border-color: #d3b100 transparent;
content: "";
position: absolute;
bottom: -2em;
right: 0;
border-width: 2em 2em 0 0;
border-style: solid;
border-color: #d3b100 transparent;
}
.header-post-it {
background-color: rgba(211, 177, 0, 0.30);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 5px;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 5px;
}
.header-post-it p {
margin: 0;
@ -312,6 +268,6 @@ for (WorkflowLog workflowLog : workflowLogs) {
font-size: 12px;
}
.body-post-it {
padding: 5px 10px 0px 10px;
padding: 5px 10px 0px 10px;
}
</style>

8
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp

@ -68,11 +68,11 @@ for (Entry<String, List<Map<String, Serializable>>> entry : fieldNameOptions.ent
String select = match.replaceAll("(?s)([?>]*>).*", "$1\n");
for (Map<String, Serializable> option : entry.getValue()) {
String value = option.get("value").toString();
select += "<option value=\"" + HtmlUtil.escape(value) + "\"";
select += "<option value=\"" + HtmlUtil.escape(value) + StringPool.QUOTE;
if ((name.equals("istruttore") && value.equalsIgnoreCase(istruttore)) || MapUtil.getBoolean(option, "default")) {
select += " selected=\"selected\"";
}
select += ">" + HtmlUtil.escape(option.get("label").toString()) + "</option>\n";
select += StringPool.GREATER_THAN + HtmlUtil.escape(option.get("label").toString()) + "</option>\n";
}
html = html.replaceAll(regexSelect, "$1" + select + "</select>\n" + "$3");
} else {
@ -89,7 +89,7 @@ for (Entry<String, List<Map<String, Serializable>>> entry : fieldNameOptions.ent
}
}
}
html = html.replaceAll("name=\"" + ns + "(.*?)_INSTANCE_[^\"]+\"", "name=\"" + prefix + "$1" + suffix + "\"");
html = html.replaceAll("name=\"" + ns + "(.*?)_INSTANCE_[^\"]+\"", "name=\"" + prefix + "$1" + suffix + StringPool.QUOTE);
html = html.replace("name=\"" + ns + "_fieldsDisplay\"", "name=\"_fieldsDisplay\"");
for (Entry<String, Serializable> p : parameters.entrySet()) {
html = html.replaceAll("(<textarea\\s.*?\\sname=\"" + prefix + p.getKey() + suffix + "\"[^>]*>[^<]*)</textarea>",
@ -97,6 +97,6 @@ for (Entry<String, Serializable> p : parameters.entrySet()) {
}
// Rimozione valori non utilizzati
html = html.replaceAll("(?s)<input[^>]*?value=\"Value[0-9]\"[^>]*>.*?</label>", "</label>");
html = html.replaceAll("(?s)<label[^>]*>[ \t\r\n]*</label>", "");
html = html.replaceAll("(?s)<label[^>]*>[ \t\r\n]*</label>", StringPool.BLANK);
%>
<%= html %>

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

@ -90,6 +90,7 @@ import com.liferay.portal.workflow.kaleo.service.KaleoTaskInstanceTokenLocalServ
public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
private final static Log _log = LogFactoryUtil.getLog(EditWorkflowTaskAction.class);
@SuppressWarnings("serial")
private final static List<String> valoriAmmessi = new ArrayList<String>() {
{
@ -99,7 +100,16 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
add(StatoPraticaConstants.NON_CONFORME);
add(StatoPraticaConstants.NO_PARERE);
add(StatoPraticaConstants.PREAVVISO_CONTRARIO);
add(StatoPraticaConstants.VIARCH);
}
};
@SuppressWarnings("serial")
private static final List<Integer> logTypes = new ArrayList<Integer>() {
{
add(WorkflowLog.TASK_ASSIGN);
add(WorkflowLog.TASK_COMPLETION);
add(WorkflowLog.TASK_UPDATE);
add(WorkflowLog.TRANSITION);
}
};
@ -144,12 +154,9 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
protected void assignTask(ActionRequest actionRequest) throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
long assigneeUserId = ParamUtil.getLong(actionRequest, "assigneeUserId");
String comment = ParamUtil.getString(actionRequest, "comment");
WorkflowTaskManagerUtil.assignWorkflowTaskToUser(themeDisplay.getCompanyId(), themeDisplay.getUserId(),
workflowTaskId, assigneeUserId, comment, null, null);
}
@ -164,17 +171,13 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
// ADT: bug mancata problema assegnazione WF
checkPresenzaIstruttore(transitionName, workflowTaskId);
// ADT: BUG ANOMALIA REGISTRA ESITO
_log.info("transitionName = " + transitionName);
if (transitionName.equalsIgnoreCase("registra-esito")) {
HttpServletRequest httpServletRequest = PortalUtil.getOriginalServletRequest(PortalUtil
.getHttpServletRequest(actionRequest));
String esito = httpServletRequest.getParameter("kaleo--esito--") != null ? httpServletRequest.getParameter(
"kaleo--esito--").trim() : "";
"kaleo--esito--").trim() : StringPool.BLANK;
String testoDocumento = httpServletRequest.getParameter("kaleo--testo_del_documento--") != null ? httpServletRequest
.getParameter("kaleo--testo_del_documento--") : "";
if (esito.equals(StatoPraticaConstants.VIARCH)) {
aggiorna = false;
}
.getParameter("kaleo--testo_del_documento--") : StringPool.BLANK;
if (!valoriAmmessi.contains(esito)
|| ((esito.equalsIgnoreCase(StatoPraticaConstants.INTEGRAZIONE) || esito
.equalsIgnoreCase(StatoPraticaConstants.PREAVVISO_CONTRARIO)) && testoDocumento.isEmpty())) {
@ -200,7 +203,6 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
long companyId = controllo.getCompanyId();
long roleId = RoleLocalServiceUtil.getRole(companyId, "portos_assegnatore").getRoleId();
int uo = Integer.parseInt(istruttore.substring(6));
WorkflowTaskManagerUtil.assignWorkflowTaskToRole(companyId, themeDisplay.getUserId(), workflowTaskId,
roleId, "Trasferito all'UO " + uo + " per assegnazione all'istruttore.\n" + comment, null,
WorkflowUtil.getWorkflowContext(controllo));
@ -218,8 +220,8 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
}
protected void removeUO(ActionRequest actionRequest) throws PortalException, SystemException {
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
String comment = ParamUtil.getString(actionRequest, "comment");
ControlloPratica controllo = WorkflowUtil.getControlloPratica(workflowTaskId);
@ -228,7 +230,6 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
long userId = themeDisplay.getUserId();
Map<String, Serializable> workflowContext = WorkflowUtil.getWorkflowContext(controllo);
long roleId = RoleLocalServiceUtil.getRole(companyId, "portos_assegnatore").getRoleId();
WorkflowTaskManagerUtil.assignWorkflowTaskToUser(companyId, userId, workflowTaskId, userId, StringPool.BLANK,
null, workflowContext);
WorkflowTaskManagerUtil
@ -241,12 +242,9 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
protected void relaseTask(ActionRequest actionRequest) throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
long assigneeUserId = ParamUtil.getLong(actionRequest, "assigneeUserId");
String comment = ParamUtil.getString(actionRequest, "comment");
WorkflowTaskManagerUtil.assignWorkflowTaskToRole(themeDisplay.getCompanyId(), assigneeUserId, workflowTaskId,
0L, comment, null, null);
}
@ -259,25 +257,19 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
protected void updateTask(ActionRequest actionRequest) throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
String comment = ParamUtil.getString(actionRequest, "comment");
int dueDateMonth = ParamUtil.getInteger(actionRequest, "dueDateMonth");
int dueDateDay = ParamUtil.getInteger(actionRequest, "dueDateDay");
int dueDateYear = ParamUtil.getInteger(actionRequest, "dueDateYear");
int dueDateHour = ParamUtil.getInteger(actionRequest, "dueDateHour");
int dueDateMinute = ParamUtil.getInteger(actionRequest, "dueDateMinute");
int dueDateAmPm = ParamUtil.getInteger(actionRequest, "dueDateAmPm");
if (dueDateAmPm == Calendar.PM) {
dueDateHour += 12;
}
Date dueDate = PortalUtil.getDate(dueDateMonth, dueDateDay, dueDateYear, dueDateHour, dueDateMinute,
WorkflowTaskDueDateException.class);
WorkflowTaskManagerUtil.updateDueDate(themeDisplay.getCompanyId(), themeDisplay.getUserId(), workflowTaskId,
comment, dueDate);
}
@ -296,45 +288,30 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
if (isDisplaySuccessMessage(actionRequest)) {
addSuccessMessage(actionRequest, actionResponse);
}
if (Validator.isNull(redirect)) {
redirect = (String) actionRequest.getAttribute(WebKeys.REDIRECT);
}
if (Validator.isNull(redirect)) {
redirect = ParamUtil.getString(actionRequest, "redirect");
}
if ((portletConfig != null) && Validator.isNotNull(redirect) && Validator.isNotNull(closeRedirect)) {
redirect = HttpUtil.setParameter(redirect, "closeRedirect", closeRedirect);
SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest)
+ SessionMessages.KEY_SUFFIX_CLOSE_REDIRECT, closeRedirect);
}
if (Validator.isNull(redirect)) {
return;
}
// LPS-1928
HttpServletRequest request = PortalUtil.getHttpServletRequest(actionRequest);
if (BrowserSnifferUtil.isIe(request) && (BrowserSnifferUtil.getMajorVersion(request) == 6.0)
&& redirect.contains(StringPool.POUND)) {
String redirectToken = "&#";
if (!redirect.contains(StringPool.QUESTION)) {
redirectToken = StringPool.QUESTION + redirectToken;
}
redirect = StringUtil.replace(redirect, StringPool.POUND, redirectToken);
}
redirect = PortalUtil.escapeRedirect(redirect);
if (Validator.isNotNull(redirect)) {
actionResponse.sendRedirect(redirect);
}
@ -345,17 +322,12 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
if (!SessionErrors.isEmpty(portletRequest)) {
return false;
}
ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
Layout layout = themeDisplay.getLayout();
if (layout.isTypeControlPanel()) {
return true;
}
String portletId = (String) portletRequest.getAttribute(WebKeys.PORTLET_ID);
try {
LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet();
@ -367,29 +339,22 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
_log.debug(pe, pe);
}
}
Portlet portlet = PortletLocalServiceUtil.getPortletById(themeDisplay.getCompanyId(), portletId);
if (portlet.isAddDefaultResource()) {
return true;
}
return false;
}
protected void addSuccessMessage(ActionRequest actionRequest, ActionResponse actionResponse) {
PortletConfig portletConfig = (PortletConfig) actionRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
boolean addProcessActionSuccessMessage = GetterUtil.getBoolean(
portletConfig.getInitParameter("add-process-action-success-action"), true);
if (!addProcessActionSuccessMessage) {
return;
}
String successMessage = ParamUtil.getString(actionRequest, "successMessage");
SessionMessages.add(actionRequest, "requestProcessed", successMessage);
}
@ -401,9 +366,7 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
public static String getForwardKey(PortletRequest portletRequest) {
String portletId = (String) portletRequest.getAttribute(WebKeys.PORTLET_ID);
String portletNamespace = PortalUtil.getPortletNamespace(portletId);
return portletNamespace.concat(PORTLET_STRUTS_FORWARD);
}
@ -429,11 +392,8 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
// Gestione permessi action button
ControlloPratica controllo = getControlloPratica(workflowTask.getWorkflowInstanceId());
// ADT BUG BO ID=33
renderRequest.setAttribute("historyWorkflowEsitiLogs",
getHistoryWorkfloLogs(themeDisplay, workflowTask.getWorkflowInstanceId(), renderRequest, controllo));
Group group = GroupLocalServiceUtil.getGroup(controllo.getGroupId());
User user = themeDisplay.getUser();
Organization org = OrganizationLocalServiceUtil.getOrganization(group.getClassPK());
@ -463,20 +423,16 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
ClassLoader classLoaderKaleoLog = (ClassLoader) PortletBeanLocatorUtil.locate(
it.tref.liferay.portos.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader");
DynamicQuery dqKaleoLog = DynamicQueryFactoryUtil.forClass(FormLog.class, classLoaderKaleoLog);
dqKaleoLog.add(RestrictionsFactoryUtil.eq("workflowInstanceId", taskInstanceId));
dqKaleoLog.add(RestrictionsFactoryUtil.eq("transitionName", transitionName));
List<FormLog> listaKaleoLog = FormLogLocalServiceUtil.dynamicQuery(dqKaleoLog);
if (listaKaleoLog != null && !listaKaleoLog.isEmpty()) {
FormLog formLog = listaKaleoLog.get(0);
JSONObject json = JSONFactoryUtil.createJSONObject(formLog.getFormParameters());
KaleoInstance kaleoInstance = KaleoInstanceLocalServiceUtil.getKaleoInstance(taskInstanceId);
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(kaleoInstance
.getClassPK());
if (json.has("esito")) {
String tipoEsito = StringPool.BLANK;
if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) {
@ -511,11 +467,6 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
Map<Long, String> esitiMapByWorkflowLogID = new HashMap<Long, String>();
try {
List<Integer> logTypes = new ArrayList<Integer>();
logTypes.add(WorkflowLog.TASK_ASSIGN);
logTypes.add(WorkflowLog.TASK_COMPLETION);
logTypes.add(WorkflowLog.TASK_UPDATE);
logTypes.add(WorkflowLog.TRANSITION);
List<WorkflowLog> workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(
themeDisplay.getCompanyId(), workflowInstanceId, logTypes, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
WorkflowComparatorFactoryUtil.getLogCreateDateComparator(true));
@ -586,7 +537,7 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId());
serviceContext.setUserId(controlloPratica.getUserId());
FormLogLocalServiceUtil.addFormLog(kaleoTaskInstanceToken.getKaleoInstanceId(), 0l,
FormLogLocalServiceUtil.addFormLog(kaleoTaskInstanceToken.getKaleoInstanceId(), 0L,
"cambio-istruttore", jsonFormParameters, serviceContext);
_log.info("checkPresenzaIstruttore correttamente eseguito - ControlloPraticaId = "
+ controlloPratica.getControlloPraticaId());
@ -598,7 +549,7 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
} catch (Exception e) {
_log.error("checkPresenzaIstruttore KO per workflowTaskId = " + workflowTaskId + " [" + e.getMessage()
+ " , " + e.getCause() + "]");
+ " , " + e.getCause() + StringPool.CLOSE_BRACKET);
}
}
}

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

@ -53,130 +53,95 @@ import com.liferay.portlet.dynamicdatamapping.util.DDMXSDUtil;
public class RenderFormTaskPortletAction extends BaseStrutsPortletAction {
private static final Log _log = LogFactoryUtil.getLog(RenderFormTaskPortletAction.class);
@Override
public String render(PortletConfig portletConfig, RenderRequest renderRequest,
RenderResponse renderResponse) throws Exception {
public String render(PortletConfig portletConfig, RenderRequest renderRequest, RenderResponse renderResponse)
throws Exception {
ServiceContext serviceContext = ServiceContextFactory.getInstance(renderRequest);
long companyId = PortalUtil.getCompanyId(renderRequest);
long workflowTaskId = ParamUtil.getLong(renderRequest, "workflowTaskId");
long assigneeUserId = ParamUtil.getLong(renderRequest, "assigneeUserId");
String transitionName = ParamUtil.getString(renderRequest, "transitionName");
KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceToken(workflowTaskId);
KaleoDefinition kaleoDefinition = KaleoDefinitionLocalServiceUtil
.getKaleoDefinition(kaleoTaskInstanceToken.getKaleoDefinitionId());
KaleoDefinition kaleoDefinition = KaleoDefinitionLocalServiceUtil.getKaleoDefinition(kaleoTaskInstanceToken
.getKaleoDefinitionId());
KaleoTask kaleoTask = kaleoTaskInstanceToken.getKaleoTask();
FormDefinitionLink formDefinitionLink = FormDefinitionLinkLocalServiceUtil
.fetchByC_DefinitionName_DefinitionVersion(companyId, kaleoDefinition.getName(),
kaleoDefinition.getVersion());
if (formDefinitionLink == null) {
return null;
}
FormTemplateLink formTemplateLink = FormTemplateLinkLocalServiceUtil
.fetchByFormDefinitionLinkId_KaleoNodeId_TransitionName(
formDefinitionLink.getFormDefinitionLinkId(), kaleoTask.getKaleoNodeId(),
transitionName);
.fetchByFormDefinitionLinkId_KaleoNodeId_TransitionName(formDefinitionLink.getFormDefinitionLinkId(),
kaleoTask.getKaleoNodeId(), transitionName);
if (formTemplateLink == null) {
return null;
}
long ddmTemplateId = formTemplateLink.getDdmTemplateId();
long ddmStructureId = formDefinitionLink.getDdmStructureId();
/*
* Script OnOpenForm
*/
Map<String, Serializable> workflowContext = WorkflowUtil.executeOnOpenForm(companyId, workflowTaskId,
assigneeUserId, transitionName);
Map<String, Serializable> parameters = WorkflowUtil.getFormParameters(companyId, workflowTaskId);
Map<String, List<Map<String, Serializable>>> fieldNameOptions = getOptions(workflowContext,
serviceContext.getLocale());
renderRequest.setAttribute("ddmTemplateId", ddmTemplateId);
renderRequest.setAttribute("ddmStructureId", ddmStructureId);
renderRequest.setAttribute("parameters", parameters);
renderRequest.setAttribute("prefix", WorkflowConstants.PREFIX_NAME_ELEMENT_FORM);
renderRequest.setAttribute("suffix", WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM);
renderRequest.setAttribute("fieldNameOptions", fieldNameOptions);
// ADT BUG BO id = 27
String classPkForCarichiLavoro = ParamUtil.getString(renderRequest, "classPkForCarichiLavoro");
boolean checkVisualizzaCarichiLavoro = (ddmTemplateId == 21699 || ddmTemplateId == 21705);
if (checkVisualizzaCarichiLavoro) {
renderRequest.setAttribute("classPkForCarichiLavoro", classPkForCarichiLavoro);
}
// ADT BUG BO ID=32
if (transitionName != null && transitionName.equalsIgnoreCase("registra-esito")) {
parameters.remove("esito");
parameters.remove("testo_del_documento");
}
return "/portlet/workflow_tasks/render_form_task.jsp";
}
@SuppressWarnings("unchecked")
@Override
public void serveResource(PortletConfig portletConfig, ResourceRequest resourceRequest,
ResourceResponse resourceResponse) throws Exception {
ServiceContext serviceContext = ServiceContextFactory.getInstance(resourceRequest);
long companyId = PortalUtil.getCompanyId(resourceRequest);
long workflowTaskId = ParamUtil.getLong(resourceRequest, "workflowTaskId");
long assigneeUserId = ParamUtil.getLong(resourceRequest, "assigneeUserId");
String transitionName = ParamUtil.getString(resourceRequest, "transitionName");
List<String> errors = new ArrayList<String>();
KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceToken(workflowTaskId);
KaleoDefinition kaleoDefinition = KaleoDefinitionLocalServiceUtil
.getKaleoDefinition(kaleoTaskInstanceToken.getKaleoDefinitionId());
KaleoDefinition kaleoDefinition = KaleoDefinitionLocalServiceUtil.getKaleoDefinition(kaleoTaskInstanceToken
.getKaleoDefinitionId());
KaleoTask kaleoTask = kaleoTaskInstanceToken.getKaleoTask();
FormDefinitionLink formDefinitionLink = FormDefinitionLinkLocalServiceUtil
.fetchByC_DefinitionName_DefinitionVersion(companyId, kaleoDefinition.getName(),
kaleoDefinition.getVersion());
if (formDefinitionLink != null) {
FormTemplateLink formTemplateLink = FormTemplateLinkLocalServiceUtil
.fetchByFormDefinitionLinkId_KaleoNodeId_TransitionName(
formDefinitionLink.getFormDefinitionLinkId(), kaleoTask.getKaleoNodeId(),
transitionName);
formDefinitionLink.getFormDefinitionLinkId(), kaleoTask.getKaleoNodeId(), transitionName);
if (formTemplateLink != null) {
Map<String, Serializable> workflowContext = new HashMap<String, Serializable>();
WorkflowUtil.updateWorkflowContextWithTaskFormParameters(resourceRequest, workflowContext);
DDMTemplate ddmTemplate = DDMTemplateLocalServiceUtil.getDDMTemplate(formTemplateLink
.getDdmTemplateId());
String xsd = DDMXSDUtil.getXSD(PortalUtil.getClassNameId(DDMTemplate.class),
ddmTemplate.getTemplateId());
JSONArray jsonArray = DDMXSDUtil.getJSONArray(xsd);
@SuppressWarnings("unchecked")
Map<String, String> formParameters = (Map<String, String>) workflowContext
.get(WorkflowConstants.CONTEXT_TASK_FORM_PARAMETERS);
if (formParameters != null) {
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
@ -201,15 +166,13 @@ public class RenderFormTaskPortletAction extends BaseStrutsPortletAction {
}
}
}
/*
* Script OnValidation
*/
workflowContext = WorkflowUtil.executeOnValidation(companyId, workflowTaskId, assigneeUserId,
transitionName, workflowContext);
String json = MapUtil.getString(workflowContext,
WorkflowConstants.CONTEXT_VALIDATION_OUTCOME_PARAMETER);
String json = MapUtil
.getString(workflowContext, WorkflowConstants.CONTEXT_VALIDATION_OUTCOME_PARAMETER);
if (Validator.isNotNull(json)) {
JSONObject validationJSON = JSONFactoryUtil.createJSONObject(json);
JSONArray validationErrorsJSON = validationJSON.getJSONArray("errors");
@ -221,9 +184,7 @@ public class RenderFormTaskPortletAction extends BaseStrutsPortletAction {
}
}
}
JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
if (!errors.isEmpty()) {
jsonObject.put("valid", false);
JSONArray jsonMessages = JSONFactoryUtil.createJSONArray();
@ -234,24 +195,19 @@ public class RenderFormTaskPortletAction extends BaseStrutsPortletAction {
} else {
jsonObject.put("valid", true);
}
resourceResponse.setContentType(ContentTypes.APPLICATION_JSON);
HttpServletResponse httpServletResponse = PortalUtil.getHttpServletResponse(resourceResponse);
ServletResponseUtil.write(httpServletResponse, jsonObject.toString());
resourceResponse.flushBuffer();
}
private Map<String, List<Map<String, Serializable>>> getOptions(
Map<String, Serializable> workflowContext, Locale locale) throws PortalException {
private Map<String, List<Map<String, Serializable>>> getOptions(Map<String, Serializable> workflowContext,
Locale locale) throws PortalException {
Map<String, List<Map<String, Serializable>>> fieldNameOptions = Collections.emptyMap();
if (workflowContext.containsKey(WorkflowConstants.CONTEXT_OPEN_FORM_OPTIONS_PARAMETER)) {
String json = MapUtil.getString(workflowContext,
WorkflowConstants.CONTEXT_OPEN_FORM_OPTIONS_PARAMETER);
String json = MapUtil.getString(workflowContext, WorkflowConstants.CONTEXT_OPEN_FORM_OPTIONS_PARAMETER);
if (Validator.isNotNull(json)) {
// field name (ddm) -> map<string, string>
fieldNameOptions = new HashMap<String, List<Map<String, Serializable>>>();
@ -267,8 +223,7 @@ public class RenderFormTaskPortletAction extends BaseStrutsPortletAction {
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject optionJSON = jsonArray.getJSONObject(i);
Map<String, Serializable> optionFields = new HashMap<String, Serializable>();
optionFields.put("label",
LanguageUtil.get(locale, optionJSON.getString("label")));
optionFields.put("label", LanguageUtil.get(locale, optionJSON.getString("label")));
optionFields.put("value", optionJSON.getString("value"));
optionFields.put("default", optionJSON.getBoolean("default"));
options.add(optionFields);

103
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/util/WorkflowUtil.java

@ -56,8 +56,7 @@ public class WorkflowUtil {
KaleoTaskInstanceToken taskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceToken(workflowTaskId);
if (taskInstanceToken.getClassName().equals(ControlloPratica.class.getName())) {
controllo = ControlloPraticaLocalServiceUtil.getControlloPratica(taskInstanceToken
.getClassPK());
controllo = ControlloPraticaLocalServiceUtil.getControlloPratica(taskInstanceToken.getClassPK());
}
} catch (PortalException | SystemException e) {
}
@ -74,8 +73,8 @@ public class WorkflowUtil {
return pratica;
}
public static Map<String, Serializable> getWorkflowContext(ControlloPratica controllo)
throws PortalException, SystemException {
public static Map<String, Serializable> getWorkflowContext(ControlloPratica controllo) throws PortalException,
SystemException {
WorkflowInstanceLink link = WorkflowInstanceLinkLocalServiceUtil.getWorkflowInstanceLink(
controllo.getCompanyId(), controllo.getGroupId(), ControlloPratica.class.getName(),
controllo.getPrimaryKey());
@ -84,46 +83,34 @@ public class WorkflowUtil {
return instance.getWorkflowContext();
}
public static Map<String, Serializable> executeOnOpenForm(long companyId, long workflowTaskId,
long assigneeUserId, String transitionName) throws PortalException, SystemException {
public static Map<String, Serializable> executeOnOpenForm(long companyId, long workflowTaskId, long assigneeUserId,
String transitionName) throws PortalException, SystemException {
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(companyId);
serviceContext.setUserId(assigneeUserId);
KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceToken(workflowTaskId);
KaleoTask kaleoTask = kaleoTaskInstanceToken.getKaleoTask();
Map<String, Serializable> workflowContext = new HashMap<String, Serializable>();
WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil
.getWorkflowHandler(kaleoTaskInstanceToken.getClassName());
WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(kaleoTaskInstanceToken
.getClassName());
if (workflowHandler != null) {
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_TYPE,
workflowHandler.getType(Locale.getDefault()));
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_TYPE, workflowHandler.getType(Locale.getDefault()));
}
workflowContext
.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME, kaleoTaskInstanceToken.getClassName());
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME, kaleoTaskInstanceToken.getClassName());
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK,
String.valueOf(kaleoTaskInstanceToken.getClassPK()));
workflowContext.put(WorkflowConstants.CONTEXT_COMPANY_ID,
String.valueOf(kaleoTaskInstanceToken.getCompanyId()));
workflowContext.put(WorkflowConstants.CONTEXT_GROUP_ID,
String.valueOf(kaleoTaskInstanceToken.getGroupId()));
workflowContext
.put(WorkflowConstants.CONTEXT_COMPANY_ID, String.valueOf(kaleoTaskInstanceToken.getCompanyId()));
workflowContext.put(WorkflowConstants.CONTEXT_GROUP_ID, String.valueOf(kaleoTaskInstanceToken.getGroupId()));
workflowContext.put(WorkflowConstants.CONTEXT_USER_ID, String.valueOf(assigneeUserId));
workflowContext.put(WorkflowConstants.CONTEXT_SERVICE_CONTEXT, serviceContext);
workflowContext.put(WorkflowConstants.CONTEXT_TRANSITION_NAME, transitionName);
ExecutionContext executionContext = new ExecutionContext(
kaleoTaskInstanceToken.getKaleoInstanceToken(), kaleoTaskInstanceToken, workflowContext,
serviceContext);
ExecutionContext executionContext = new ExecutionContext(kaleoTaskInstanceToken.getKaleoInstanceToken(),
kaleoTaskInstanceToken, workflowContext, serviceContext);
ActionExecutorUtil.executeKaleoActions(KaleoNode.class.getName(), kaleoTask.getKaleoNodeId(),
ExecutionType.ON_OPEN_FORM, executionContext);
return executionContext.getWorkflowContext();
}
@ -140,42 +127,30 @@ public class WorkflowUtil {
if (workflowContext == null) {
workflowContext = Collections.<String, Serializable> emptyMap();
}
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(companyId);
serviceContext.setUserId(assigneeUserId);
KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceToken(workflowTaskId);
KaleoTask kaleoTask = kaleoTaskInstanceToken.getKaleoTask();
WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil
.getWorkflowHandler(kaleoTaskInstanceToken.getClassName());
WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(kaleoTaskInstanceToken
.getClassName());
if (workflowHandler != null) {
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_TYPE,
workflowHandler.getType(Locale.getDefault()));
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_TYPE, workflowHandler.getType(Locale.getDefault()));
}
workflowContext
.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME, kaleoTaskInstanceToken.getClassName());
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME, kaleoTaskInstanceToken.getClassName());
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK,
String.valueOf(kaleoTaskInstanceToken.getClassPK()));
workflowContext.put(WorkflowConstants.CONTEXT_COMPANY_ID,
String.valueOf(kaleoTaskInstanceToken.getCompanyId()));
workflowContext.put(WorkflowConstants.CONTEXT_GROUP_ID,
String.valueOf(kaleoTaskInstanceToken.getGroupId()));
workflowContext
.put(WorkflowConstants.CONTEXT_COMPANY_ID, String.valueOf(kaleoTaskInstanceToken.getCompanyId()));
workflowContext.put(WorkflowConstants.CONTEXT_GROUP_ID, String.valueOf(kaleoTaskInstanceToken.getGroupId()));
workflowContext.put(WorkflowConstants.CONTEXT_USER_ID, String.valueOf(assigneeUserId));
workflowContext.put(WorkflowConstants.CONTEXT_SERVICE_CONTEXT, serviceContext);
workflowContext.put(WorkflowConstants.CONTEXT_TRANSITION_NAME, transitionName);
ExecutionContext executionContext = new ExecutionContext(
kaleoTaskInstanceToken.getKaleoInstanceToken(), kaleoTaskInstanceToken, workflowContext,
serviceContext);
ExecutionContext executionContext = new ExecutionContext(kaleoTaskInstanceToken.getKaleoInstanceToken(),
kaleoTaskInstanceToken, workflowContext, serviceContext);
ActionExecutorUtil.executeKaleoActions(KaleoNode.class.getName(), kaleoTask.getKaleoNodeId(),
ExecutionType.ON_VALIDATION, executionContext);
return executionContext.getWorkflowContext();
}
@ -189,26 +164,20 @@ public class WorkflowUtil {
String className, long workflowTaskId) throws PortalException, SystemException {
if (Validator.isNotNull(workflowTaskId)) {
KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceToken(workflowTaskId);
companyId = kaleoTaskInstanceToken.getCompanyId();
groupId = kaleoTaskInstanceToken.getGroupId();
classPK = kaleoTaskInstanceToken.getClassPK();
className = kaleoTaskInstanceToken.getClassName();
}
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil
.fetchWorkflowInstanceLink(companyId, groupId, className, classPK);
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(
companyId, groupId, className, classPK);
if (workflowInstanceLink == null) {
throw new NoSuchWorkflowInstanceLinkException();
}
long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId();
Map<String, Serializable> parameters = new HashMap<String, Serializable>();
// order asc
List<FormLog> formLogs = FormLogLocalServiceUtil.findByC_Instance(companyId, workflowInstanceId,
QueryUtil.ALL_POS, QueryUtil.ALL_POS);
@ -220,7 +189,6 @@ public class WorkflowUtil {
parameters.putAll(jsonDeserializer.deserialize(formParameters));
}
}
return parameters;
}
@ -228,23 +196,18 @@ public class WorkflowUtil {
Map<String, Serializable> workflowContext) {
Map<String, String> formParameters = null;
Enumeration<String> enu = portletRequest.getParameterNames();
while (enu.hasMoreElements()) {
String name = enu.nextElement();
if (!name.startsWith(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM)
&& !name.endsWith(WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM)) {
continue;
}
if (formParameters == null) {
formParameters = new HashMap<String, String>();
}
String parameterName = name.substring(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM.length(),
name.length() - WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM.length());
String parameterName = name.substring(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM.length(), name.length()
- WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM.length());
String[] values = ParamUtil.getParameterValues(portletRequest, name);
for (int i = 0; i < values.length; i++) {
_log.info(name + "[" + i + "] = \"" + values[i] + "\"");
@ -253,37 +216,27 @@ public class WorkflowUtil {
_log.info("Finale \"" + value + "\"");
formParameters.put(parameterName, value);
}
if (formParameters == null) {
HttpServletRequest httpServletRequest = PortalUtil.getOriginalServletRequest(PortalUtil
.getHttpServletRequest(portletRequest));
Enumeration<String> enums = httpServletRequest.getParameterNames();
while (enums.hasMoreElements()) {
String name = enums.nextElement();
if (!name.startsWith(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM)
&& !name.endsWith(WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM)) {
continue;
}
if (formParameters == null) {
formParameters = new HashMap<String, String>();
}
String parameterName = name.substring(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM.length(),
name.length() - WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM.length());
String value = StringUtil.merge(ParamUtil.getParameterValues(httpServletRequest, name));
formParameters.put(parameterName, value);
}
}
if (formParameters != null) {
workflowContext
.put(WorkflowConstants.CONTEXT_TASK_FORM_PARAMETERS, (Serializable) formParameters);
workflowContext.put(WorkflowConstants.CONTEXT_TASK_FORM_PARAMETERS, (Serializable) formParameters);
}
}
}

4
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
##
build.namespace=Kaleo
build.number=28
build.date=1616063088077
build.number=32
build.date=1616424088204
build.auto.upgrade=true
##

Caricamento…
Annulla
Salva