diff --git a/trunk/SIPRPSoft/src/SIPRPNode.driver.xml b/trunk/SIPRPSoft/src/SIPRPNode.driver.xml index 31d88c5d..897b3592 100644 --- a/trunk/SIPRPSoft/src/SIPRPNode.driver.xml +++ b/trunk/SIPRPSoft/src/SIPRPNode.driver.xml @@ -1,7 +1,7 @@ - - + + diff --git a/trunk/SIPRPSoft/src/siprp/Main.java b/trunk/SIPRPSoft/src/siprp/Main.java index ff71ffc6..9b5fa35a 100644 --- a/trunk/SIPRPSoft/src/siprp/Main.java +++ b/trunk/SIPRPSoft/src/siprp/Main.java @@ -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 ); diff --git a/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java index da5972ed..e895afe5 100644 --- a/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java +++ b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java @@ -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" ); diff --git a/trunk/SIPRPSoft/src/siprp/database/cayenne/objects/TrabalhadoresEcds.java b/trunk/SIPRPSoft/src/siprp/database/cayenne/objects/TrabalhadoresEcds.java index 6a435603..f2129ab4 100755 --- a/trunk/SIPRPSoft/src/siprp/database/cayenne/objects/TrabalhadoresEcds.java +++ b/trunk/SIPRPSoft/src/siprp/database/cayenne/objects/TrabalhadoresEcds.java @@ -45,7 +45,7 @@ public class TrabalhadoresEcds extends _TrabalhadoresEcds implements MedicinaCon public OrderedMap getGruposExamesForPerfil() { OrderedMap grupos = new OrderedMap(); - List estadosSoFar = new ArrayList(); + 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 estados = new ArrayList(); + List 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 ); }