Rev 303 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 303 | Rev 323 | ||
|---|---|---|---|
| Line 2... | Line 2... | ||
| 2 | 2 | ||
| 3 | import java.io.Serializable; |
3 | import java.io.Serializable; |
| - | 4 | import java.util.ArrayList; |
|
| 4 | 5 | ||
| 5 | import javax.inject.Inject; |
6 | import javax.inject.Inject; |
| 6 | import javax.inject.Named; |
7 | import javax.inject.Named; |
| 7 | 8 | ||
| 8 | import org.primefaces.event.FlowEvent; |
9 | import org.primefaces.event.FlowEvent; |
| Line 125... | Line 126... | ||
| 125 | /*********************************************************/
|
126 | /*********************************************************/
|
| 126 | 127 | ||
| 127 | public void iniciarCadastroExterno() { |
128 | public void iniciarCadastroExterno() { |
| 128 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
129 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
| 129 | public void execute() { |
130 | public void execute() { |
| 130 | setPessoaSelecionada(pessoaService.cadastroExterno(null, new Pessoa(getEntidade()), null, null)); |
- | |
| - | 131 | Pessoa pessoa = new Pessoa(getEntidade()); |
|
| - | 132 | pessoa.setEnderecos(new ArrayList<Endereco>()); |
|
| - | 133 | setPessoaSelecionada(pessoaService.cadastroExterno(null, pessoa, null, null)); |
|
| 131 | if (getPessoaSelecionada().getNome().equals("NOVATO")) { |
134 | if (getPessoaSelecionada().getNome().equals("NOVATO")) { |
| 132 | getPessoaSelecionada().setNome(""); |
135 | getPessoaSelecionada().setNome(""); |
| 133 | }
|
136 | }
|
| 134 | setFuncionarioSelecionado(getPessoaSelecionada().getFuncionario()); |
137 | setFuncionarioSelecionado(getPessoaSelecionada().getFuncionario()); |
| 135 | setEnderecoSelecionado(getPessoaSelecionada().primeiroEndereco()); |
138 | setEnderecoSelecionado(getPessoaSelecionada().primeiroEndereco()); |
| Line 155... | Line 158... | ||
| 155 | public void finalizarCadastro() { |
158 | public void finalizarCadastro() { |
| 156 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
159 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
| 157 | public void execute() { |
160 | public void execute() { |
| 158 | new GerenciadorEmailImpl() |
161 | new GerenciadorEmailImpl() |
| 159 | .comEmailsDestino(ConstantesSEC.DESTINATARIOS_EMAIL_RH) |
162 | .comEmailsDestino(ConstantesSEC.DESTINATARIOS_EMAIL_RH) |
| 160 | .comAssunto("NOVO COLABORADOR CADASTRADO [ESPAĆO CASE]") |
- | |
| - | 163 | .comAssunto("[EC] NOVO COLABORADOR CADASTRADO") |
|
| 161 | .comConteudoHtml("COLABORADOR: " + getPessoaSelecionada().getNome()) |
164 | .comConteudoHtml("COLABORADOR: " + getPessoaSelecionada().getNome()) |
| 162 | .enviar(); |
165 | .enviar(); |
| 163 | setPessoaSelecionada(null); |
166 | setPessoaSelecionada(null); |
| 164 | setEnderecoSelecionado(null); |
167 | setEnderecoSelecionado(null); |
| 165 | limparEntidade(); |
168 | limparEntidade(); |