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

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Tiago Simão 17 years ago
parent c4a4266605
commit 4dc92c949c

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<driver project-version="3.0" class="org.postgresql.Driver">
<!--url value="jdbc:postgresql://10.158.2.2:5432/siprp_local"/-->
<url value="jdbc:postgresql://storage:5432/siprp_local"/>
<url value="jdbc:postgresql://10.158.2.2:5432/siprp_local"/>
<!--url value="jdbc:postgresql://storage:5432/siprp_local"/-->
<!--url value="jdbc:postgresql://localhost:5432/siprp_local"/-->
<connectionPool min="1" max="1"/>
<login userName="postgres" password="Typein" encoderClass="org.apache.cayenne.conf.PlainTextPasswordEncoder" passwordLocation="model" passwordSource="Not Applicable"/>

@ -15,6 +15,8 @@ import java.util.Properties;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.plaf.ColorUIResource;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.MutableTreeNode;
@ -83,6 +85,15 @@ public class Main implements com.evolute.utils.ui.window.Connector
public static void main( String args[] )
throws Exception
{
UIManager.put( "TextField.inactiveForeground", UIManager.get( "TextField.foreground" ) );
UIManager.put( "TextField.foreground", ColorUIResource.RED.darker() );
UIManager.put( "TextArea.inactiveForeground", UIManager.get( "TextArea.foreground" ) );
UIManager.put( "TextArea.foreground", ColorUIResource.RED.darker() );
UIManager.put( "ComboBox.disabledForeground", UIManager.get( "ComboBox.foreground" ) );
UIManager.put( "ComboBox.foreground", ColorUIResource.RED.darker() );
// Singleton.setInstance( SingletonConstants.COMPANY_NAME, "Centro Cl\u00ednico Avenida" );
// Singleton.setInstance( SingletonConstants.COMPANY_LOGO, "logo_evo.jpg" );
// Singleton.setInstance( SingletonConstants.WEB_AWARE, Boolean.FALSE );

@ -96,21 +96,21 @@ public class SIPRPDataLoader implements CompanyDataLoader
// Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" );
// Singleton.setInstance( SingletonConstants.LOCAL_URL, "www.evolute.pt:5436" );
// Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local_3" );
// Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
// Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );
// Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" );
// Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" );
// Singleton.setInstance( SingletonConstants.LOCAL_URL, "10.158.2.2:5432" );
// Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local" );
// Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );
Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" );
Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" );
Singleton.setInstance( SingletonConstants.LOCAL_URL, "dbserver:5432" );
Singleton.setInstance( SingletonConstants.LOCAL_URL, "10.158.2.2:5432" );
Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local" );
Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
//
// Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );
// Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" );
// Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" );
// Singleton.setInstance( SingletonConstants.LOCAL_URL, "dbserver:5432" );
// Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local" );
// Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
//
// Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );

@ -45,7 +45,7 @@ public class TrabalhadoresEcds extends _TrabalhadoresEcds implements MedicinaCon
public OrderedMap<PrtGruposProtocolo> getGruposExamesForPerfil()
{
OrderedMap<PrtGruposProtocolo> grupos = new OrderedMap<PrtGruposProtocolo>();
List<Integer> estadosSoFar = new ArrayList<Integer>();
Trabalhadores trabalhador = this.getToTrabalhadores();
Integer perfil = trabalhador.getPerfil();
if( perfil != null )
@ -68,44 +68,51 @@ public class TrabalhadoresEcds extends _TrabalhadoresEcds implements MedicinaCon
grupos.putLast( grupoEcd, descricao );
Integer estado = getEstadoForGrupoEcd( grupoEcd );
grupos.putLast( grupoEcd, estado != null ? MedicinaConstants.ESTADOS_EXAME_STR[estado] : " " );
if( !estadosSoFar.contains( estado ) )
{
estadosSoFar.add( estado );
}
}
}
}
}
}
}
if( estadosSoFar.size() == 1 )
List<Integer> estados = new ArrayList<Integer>();
List<TrabalhadoresEcdsDatas> marcacoes = getTrabalhadoresEcdsDatasArray();
if( marcacoes != null )
{
if( estadosSoFar.contains( new Integer( ESTADO_ANULADO ) ) || estadosSoFar.contains( new Integer( ESTADO_REALIZADO ) ) )
{
setEstado( ESTADO_REALIZADO );
}
else if( estadosSoFar.contains( new Integer( ESTADO_POR_REALIZAR ) ) )
{
setEstado( ESTADO_POR_REALIZAR );
}
else
for( TrabalhadoresEcdsDatas marcacao : marcacoes )
{
setEstado( ESTADO_POR_MARCAR );
Integer estado = marcacao.getEstado();
if( !estados.contains( estado ) )
{
estados.add( estado );
}
}
}
else if( estadosSoFar.size() == 2 )
if( estados.size() == 1 )
{
// if( estadosSoFar.contains( new Integer( ESTADO_ANULADO ) ) || estadosSoFar.contains( new Integer( ESTADO_REALIZADO ) ) )
// {
setEstado( estados.get( 0 ) );
// }
// else if( estadosSoFar.contains( new Integer( ESTADO_POR_REALIZAR ) ) )
// {
// setEstado( ESTADO_POR_REALIZAR );
// }
// else
// {
// setEstado( ESTADO_POR_MARCAR );
// }
}
else if( estados.size() == 2 )
{
if( estadosSoFar.contains( new Integer( ESTADO_ANULADO ) ) && estadosSoFar.contains( new Integer( ESTADO_REALIZADO ) ) )
if( estados.contains( new Integer( ESTADO_ANULADO ) ) && estados.contains( new Integer( ESTADO_REALIZADO ) ) )
{
setEstado( ESTADO_REALIZADO );
}
else if( estadosSoFar.contains( new Integer( ESTADO_POR_MARCAR ) ) )
else if( estados.contains( new Integer( ESTADO_POR_MARCAR ) ) )
{
setEstado( ESTADO_POR_MARCAR );
}
else if( estadosSoFar.contains( new Integer( ESTADO_ANULADO ) ) || estadosSoFar.contains( new Integer( ESTADO_REALIZADO ) ) )
else if( estados.contains( new Integer( ESTADO_ANULADO ) ) || estados.contains( new Integer( ESTADO_REALIZADO ) ) )
{
setEstado( ESTADO_PARCIALMENTE_REALIZADO );
}
@ -116,11 +123,11 @@ public class TrabalhadoresEcds extends _TrabalhadoresEcds implements MedicinaCon
}
else
{
if( estadosSoFar.contains( new Integer( ESTADO_POR_MARCAR ) ) )
if( estados.contains( new Integer( ESTADO_POR_MARCAR ) ) )
{
setEstado( ESTADO_POR_MARCAR );
}
else if( estadosSoFar.contains( new Integer( ESTADO_ANULADO ) ) && estadosSoFar.contains( new Integer( ESTADO_REALIZADO ) ) )
else if( estados.contains( new Integer( ESTADO_ANULADO ) ) && estados.contains( new Integer( ESTADO_REALIZADO ) ) )
{
setEstado( ESTADO_PARCIALMENTE_REALIZADO );
}

Loading…
Cancel
Save