|
|
|
|
@ -17,7 +17,6 @@ import com.evolute.utils.data.*;
|
|
|
|
|
import com.evolute.utils.db.*;
|
|
|
|
|
import com.evolute.utils.metadb.*;
|
|
|
|
|
import com.evolute.utils.sql.*;
|
|
|
|
|
import com.evolute.utils.strings.*;
|
|
|
|
|
import com.evolute.utils.tables.*;
|
|
|
|
|
|
|
|
|
|
import siprp.*;
|
|
|
|
|
@ -157,14 +156,32 @@ public class MedicinaDataProvider extends MetaProvider
|
|
|
|
|
new Field( "marcacao_trabalhador_id" ).isEqual( marcacaoID ) );
|
|
|
|
|
Virtual2DArray array = executer.executeQuery( select );
|
|
|
|
|
Integer ids[] = new Integer[ array.columnLength() ];
|
|
|
|
|
for( int n = 0; n < ids.length; n++ )
|
|
|
|
|
for( int n = 0; n < array.columnLength(); n++ )
|
|
|
|
|
{
|
|
|
|
|
ids[ n ] = ( Integer ) array.get( n, 0 );
|
|
|
|
|
}
|
|
|
|
|
return ids;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void deleteDetalhesRealziadosForMarcacao( Integer marcacaoID )
|
|
|
|
|
public Integer[] getDetalhesRealizadosForEstadosMarcacao( Integer marcacaoID )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
Select select =
|
|
|
|
|
new Select( new String[]{ "marcacoes_grupos_realizados", "marcacoes_trabalhador_estados" },
|
|
|
|
|
new String[]{ "grupo_protocolo_id" },
|
|
|
|
|
new Field( "marcacoes_trabalhador_estados.marcacao_id" ).isEqual( marcacaoID ).and(
|
|
|
|
|
new Field( "marcacoes_trabalhador_estados.id" ).isEqual(
|
|
|
|
|
new Field( "marcacoes_grupos_realizados.marcacoes_trabalhador_estado_id" ) ) ) );
|
|
|
|
|
Virtual2DArray array = executer.executeQuery( select );
|
|
|
|
|
Integer ids[] = new Integer[ array.columnLength() ];
|
|
|
|
|
for( int n = 0; n < array.columnLength(); n++ )
|
|
|
|
|
{
|
|
|
|
|
ids[ n ] = ( Integer ) array.get( n, 0 );
|
|
|
|
|
}
|
|
|
|
|
return ids;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void deleteDetalhesRealizadosForMarcacao( Integer marcacaoID )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
Delete delete =
|
|
|
|
|
@ -401,4 +418,15 @@ public class MedicinaDataProvider extends MetaProvider
|
|
|
|
|
Virtual2DArray array = executer.executeQuery( select );
|
|
|
|
|
return array.getObjects();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Integer getTrabalhadorIDByMarcacaoID( Integer marcacaoID )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
Select select =
|
|
|
|
|
new Select( new String[]{ "marcacoes_trabalhador" },
|
|
|
|
|
new String[]{ "trabalhador_id" },
|
|
|
|
|
new Field( "id" ).isEqual( marcacaoID ) );
|
|
|
|
|
Virtual2DArray array = executer.executeQuery( select );
|
|
|
|
|
return ( Integer ) array.get( 0, 0 );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|