git-svn-id: https://svn.coded.pt/svn/SIPRP@2028 bb69d46d-e84e-40c8-a05a-06db0d633741

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Frederico Palma 11 years ago
parent 277c6b6c85
commit 7babdd7bb0

@ -3,15 +3,17 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0 - Java 7">
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
<attribute name="owner.project.facets" value="jst.web;#system#"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.7.0-openjdk-1.7.0.71-2.5.3.0.fc20.x86_64">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 7 [1.7.0_51]">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/servlet-api.jar"/>
<classpathentry kind="lib" path="lib/el-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v7.0 - Java 7"/>
<runtime name="Apache Tomcat v7.0"/>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.6"/>
<installed facet="jst.web" version="2.5"/>

@ -19,8 +19,14 @@ database.siprp = siprp
username.siprp = siprp
password.siprp = -rg2hpgsql
server.siprp_local = vps-siprp.evo.pt
port.siprp_local = 5432
database.siprp_local = siprp_local_3
#server.siprp_local = vps-siprp.evo.pt
#port.siprp_local = 5432
#database.siprp_local = siprp_local_3
#username.siprp_local = siprp
#password.siprp_local = -rg2hpgsql
server.siprp_local = localhost
port.siprp_local = 5444
database.siprp_local = siprp_local
username.siprp_local = siprp
password.siprp_local = -rg2hpgsql
password.siprp_local = rg2h-opksiprp

@ -305,7 +305,7 @@ public class PlanosActuacaoImporterProvider extends GenericDataProvider
Select innerSelect = new Select2(
new String[] { HsRelatorioPostoData.TABLENAME, HsRelatorioPostoMedidaData.TABLENAME,
HsRelatorioMedidaData.TABLENAME, HsRelatorioRiscoData.TABLENAME, HsRelatorioPostoRiscoData.TABLENAME,
HsRelatorioData.TABLENAME, HsRelatorioAreaData.TABLENAME, HsRelatorioRiscoValorQualitativoData.TABLENAME },
HsRelatorioData.TABLENAME, HsRelatorioAreaData.TABLENAME },
new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER,
Select2.JOIN_INNER, Select2.JOIN_INNER },
new Expression[]{
@ -319,7 +319,7 @@ public class PlanosActuacaoImporterProvider extends GenericDataProvider
},
new String[]{ "DISTINCT " + HsRelatorioPostoMedidaData.MEDIDA_ID_FULL,
HsRelatorioPostoRiscoData.RISCO_ID_FULL,
HsRelatorioMedidaData.DESCRIPTION_FULL,
HsRelatorioMedidaData.DESCRIPTION_FULL + " AS descricao",
"CASE WHEN " +
new Field( HsRelatorioPostoRiscoData.VALOR_QUALITATIVO_ID_FULL ).isEqual( null )
.and( new Field( HsRelatorioPostoRiscoData.PROBABILIDADE_FULL ).isEqual( null ) )
@ -379,7 +379,7 @@ public class PlanosActuacaoImporterProvider extends GenericDataProvider
new Field( HsRelatorioAreaData.ID_FULL ).isEqual( new Field( HsRelatorioPostoData.AREA_ID_FULL ) )
},
new String[]{ HsRelatorioPostoMedidaData.POSTO_ID_FULL,
HsRelatorioPostoData.DESCRIPTION_FULL,
HsRelatorioPostoData.DESCRIPTION_FULL + " AS descricao",
"CASE WHEN " +
new Field( HsRelatorioPostoRiscoData.VALOR_QUALITATIVO_ID_FULL ).isEqual( null )
.and( new Field( HsRelatorioPostoRiscoData.PROBABILIDADE_FULL ).isEqual( null ) )
@ -389,11 +389,11 @@ public class PlanosActuacaoImporterProvider extends GenericDataProvider
" THEN " + HsRelatorioPostoRiscoData.PROBABILIDADE_FULL + "*" + HsRelatorioPostoRiscoData.SEVERIDADE_FULL +
" ELSE " + HsRelatorioPostoRiscoData.VALOR_QUALITATIVO_ID_FULL +
" END AS valor ",
"coalesce( " + HsRelatorioPostoData.IS_PRINCIPAL_FULL + ", false )" },
"coalesce( " + HsRelatorioPostoData.IS_PRINCIPAL_FULL + ", false ) AS is_principal" },
new Field( HsRelatorioPostoMedidaData.MEDIDA_ID ).isEqual( m.getId() )
.and( new Field( HsRelatorioPostoRiscoData.RISCO_ID_FULL ).isEqual( r.getId() ) )
.and( new Field( HsRelatorioPostoData.AREA_ID_FULL ).isEqual( a.getId() ) ),
new String[]{ HsRelatorioRiscoData.ID_FULL }, null, null, null
new String[]{ HsRelatorioPostoMedidaData.POSTO_ID_FULL }, null, null, null
);
Select select = new Select( MessageFormat.format( "SELECT subquery.posto_id, valor, descricao, is_principal FROM ( {0} ) subquery ", innerSelect.toString() ) );
@ -470,7 +470,7 @@ public class PlanosActuacaoImporterProvider extends GenericDataProvider
},
new String[]{ "DISTINCT " + HsRelatorioPostoMedidaData.MEDIDA_ID_FULL,
HsRelatorioPostoRiscoData.RISCO_ID_FULL,
HsRelatorioMedidaData.DESCRIPTION_FULL,
HsRelatorioMedidaData.DESCRIPTION_FULL + " AS descricao",
"CASE WHEN " +
new Field( HsRelatorioPostoRiscoData.VALOR_QUALITATIVO_ID_FULL ).isEqual( null )
.and( new Field( HsRelatorioPostoRiscoData.PROBABILIDADE_FULL ).isEqual( null ) )

Loading…
Cancel
Save