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

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Diogo Neves 15 years ago
parent e19037e573
commit 707ee6a7ee

@ -20,7 +20,7 @@ import com.sun.rave.web.ui.component.TextField;
import com.sun.rave.web.ui.model.Option;
import db.EstatisticasConstants;
import db.data.siprp.outer.SeccoesData;
import db.data.siprp_local.outer.EstabelecimentosData;
import db.providers.AnalisesDataProvider;
import db.providers.EstatisticasDataProvider;
import global.Global;
import java.text.SimpleDateFormat;
@ -380,7 +380,8 @@ public class EstatisticasProcesso extends AbstractPageBean
try
{
EstatisticasDataProvider statsProvider = EstatisticasDataProvider.getInstance();
Option[] causas = statsProvider.getCausasAcidente();
Option[] causas = AnalisesDataProvider.getInstance().getCausasAcidente();
if ( causas != null )
{
dropCausas.setItems( causas );

@ -258,34 +258,6 @@ public class EstatisticasDataProvider extends GenericDataProvider
return getProvider().load( SeccoesData.class, seccaoID, SeccoesData.ID );
}
public com.sun.rave.web.ui.model.Option[] getCausasAcidente( ) throws Exception
{
com.sun.rave.web.ui.model.Option[] options = null;
Select2 query = new Select2(
new String[] { CausasData.TABLENAME },
new Integer[] { },
new Expression[] { },
new String[] { CausasData.ID_FULL, CausasData.CAUSA_FULL },
new Field( CausasData.ACTIVA_FULL ).isEqual( "y" ),
new String[] { CausasData.CAUSA_FULL },
null, null, null
);
Virtual2DArray array = getExecuter().executeQuery( query );
if ( array != null )
{
options = new com.sun.rave.web.ui.model.Option[ array.columnLength() + 1 ];
options[ 0 ] = new Option( "", "" );
for ( int i = 0; i < array.columnLength(); i++ )
{
Integer causaID = array.get( i, 0 );
String causa = array.get( i, 1 );
options[ (i+1) ] = new Option( causaID, causa );
}
}
return options;
}
public String getCausaByID( Integer causaID ) throws Exception
{
String causa = "";

Loading…
Cancel
Save