|
|
|
@ -11,10 +11,13 @@ package siprp.lembretes.remarcacoes.actions;
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.Component;
|
|
|
|
import java.awt.Component;
|
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.AbstractAction;
|
|
|
|
import javax.swing.AbstractAction;
|
|
|
|
import javax.swing.JOptionPane;
|
|
|
|
import javax.swing.JOptionPane;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import shst.medicina.multi.MultiMarcacoesWindow;
|
|
|
|
import siprp.SIPRPTracker;
|
|
|
|
import siprp.SIPRPTracker;
|
|
|
|
import siprp.SingletonConstants;
|
|
|
|
import siprp.SingletonConstants;
|
|
|
|
import siprp.data.outer.EmpresasData;
|
|
|
|
import siprp.data.outer.EmpresasData;
|
|
|
|
@ -32,8 +35,6 @@ import siprp.database.cayenne.objects.TrabalhadoresProcesso;
|
|
|
|
import siprp.database.cayenne.providers.MedicinaDAO;
|
|
|
|
import siprp.database.cayenne.providers.MedicinaDAO;
|
|
|
|
import siprp.lembretes.Lembrete;
|
|
|
|
import siprp.lembretes.Lembrete;
|
|
|
|
import siprp.lembretes.LembretesDataProvider;
|
|
|
|
import siprp.lembretes.LembretesDataProvider;
|
|
|
|
import siprp.medicina.processo.logic.MedicinaProcessoLogic;
|
|
|
|
|
|
|
|
import siprp.medicina.processo.ui.MedicinaProcessoWindow;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.evolute.entity.ProviderInterface;
|
|
|
|
import com.evolute.entity.ProviderInterface;
|
|
|
|
import com.evolute.utils.Singleton;
|
|
|
|
import com.evolute.utils.Singleton;
|
|
|
|
@ -128,17 +129,24 @@ public class TratarMarcacaoTrabalhadorAction extends AbstractAction
|
|
|
|
trabalhador = processo.getToTrabalhadores();
|
|
|
|
trabalhador = processo.getToTrabalhadores();
|
|
|
|
estabelecimento = trabalhador.getToEstabelecimentos();
|
|
|
|
estabelecimento = trabalhador.getToEstabelecimentos();
|
|
|
|
empresa = estabelecimento.getToEmpresas();
|
|
|
|
empresa = estabelecimento.getToEmpresas();
|
|
|
|
MedicinaProcessoWindow window = tracker.getMedicinaProcessoWindow();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.runActionLater( MedicinaProcessoLogic.SELECT_EMPRESA, empresa );
|
|
|
|
// MedicinaProcessoWindow window = tracker.getMedicinaProcessoWindow();
|
|
|
|
window.runActionLater( MedicinaProcessoLogic.SELECT_ESTABELECIMENTO, estabelecimento );
|
|
|
|
// window.runActionLater( MedicinaProcessoLogic.SELECT_EMPRESA, empresa );
|
|
|
|
window.runActionLater( MedicinaProcessoLogic.LOAD_TRABALHADOR, trabalhador );
|
|
|
|
// window.runActionLater( MedicinaProcessoLogic.SELECT_ESTABELECIMENTO, estabelecimento );
|
|
|
|
window.runActionLater( MedicinaProcessoLogic.SELECT_TRABALHADOR, trabalhador );
|
|
|
|
// window.runActionLater( MedicinaProcessoLogic.LOAD_TRABALHADOR, trabalhador );
|
|
|
|
window.runActionLater( MedicinaProcessoLogic.SELECT_PROCESSO, processo );
|
|
|
|
// window.runActionLater( MedicinaProcessoLogic.SELECT_TRABALHADOR, trabalhador );
|
|
|
|
window.runActionLater( consulta == null ? MedicinaProcessoLogic.SELECT_EXAME : MedicinaProcessoLogic.SELECT_CONSULTA, consulta == null ? exame : consulta );
|
|
|
|
// window.runActionLater( MedicinaProcessoLogic.SELECT_PROCESSO, processo );
|
|
|
|
window.runActionLater( consulta == null ? MedicinaProcessoLogic.CREATE_EXAME_MARCACAO : MedicinaProcessoLogic.CREATE_CONSULTA_MARCACAO, null );
|
|
|
|
// window.runActionLater( consulta == null ? MedicinaProcessoLogic.SELECT_EXAME : MedicinaProcessoLogic.SELECT_CONSULTA, consulta == null ? exame : consulta );
|
|
|
|
window.runPendingActions();
|
|
|
|
// window.runActionLater( consulta == null ? MedicinaProcessoLogic.CREATE_EXAME_MARCACAO : MedicinaProcessoLogic.CREATE_CONSULTA_MARCACAO, null );
|
|
|
|
|
|
|
|
// window.runPendingActions();
|
|
|
|
|
|
|
|
// window.setVisible( true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List< Integer > trabalhadoresIDs = new ArrayList< Integer >();
|
|
|
|
|
|
|
|
trabalhadoresIDs.add( trabalhador.getId() );
|
|
|
|
|
|
|
|
MultiMarcacoesWindow window = tracker.getMultiMarcacoesWindow();
|
|
|
|
|
|
|
|
window.setEmpresaAndEstabelecimento( empresa.getId(), estabelecimento.getId(), trabalhadoresIDs );
|
|
|
|
window.setVisible( true );
|
|
|
|
window.setVisible( true );
|
|
|
|
|
|
|
|
|
|
|
|
lembretesProvider.apagarLembreteByID( lembreteID );
|
|
|
|
lembretesProvider.apagarLembreteByID( lembreteID );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|