Rev 487 | Rev 489 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 487 | Rev 488 | ||
|---|---|---|---|
| Line 57... | Line 57... | ||
| 57 | private CompraProdutoDTO compraProdutoDTOParaVinculoNotaFiscal; |
57 | private CompraProdutoDTO compraProdutoDTOParaVinculoNotaFiscal; |
| 58 | private List<CompraProdutoDTO> listaCompraProdutoDTOParaVinculoNotaFiscal; |
58 | private List<CompraProdutoDTO> listaCompraProdutoDTOParaVinculoNotaFiscal; |
| 59 | 59 | ||
| 60 | private String chaveNotaFiscalParaReferenciaNotaFiscal = ""; |
60 | private String chaveNotaFiscalParaReferenciaNotaFiscal = ""; |
| 61 | private NotaFiscalDTO notaFiscalDTOParaReferenciaNotaFiscal; |
61 | private NotaFiscalDTO notaFiscalDTOParaReferenciaNotaFiscal; |
| - | 62 | private Transporte transporteSelecionado; |
|
| 62 | 63 | ||
| 63 | private NotaFiscalService notaFiscalService; |
64 | private NotaFiscalService notaFiscalService; |
| 64 | private NotaFiscalProdutoService notaFiscalProdutoService; |
65 | private NotaFiscalProdutoService notaFiscalProdutoService; |
| 65 | private ProdutoService produtoService; |
66 | private ProdutoService produtoService; |
| 66 | private CompraProdutoService compraProdutoService; |
67 | private CompraProdutoService compraProdutoService; |
| Line 100... | Line 101... | ||
| 100 | }
|
101 | }
|
| 101 | 102 | ||
| 102 | @Override |
103 | @Override |
| 103 | public void preConsultar() { |
104 | public void preConsultar() { |
| 104 | setTipoOperacao(TipoOperacao.CONSULTAR); |
105 | setTipoOperacao(TipoOperacao.CONSULTAR); |
| - | 106 | }
|
|
| - | 107 | ||
| - | 108 | @Override |
|
| - | 109 | public void preCadastrar() { |
|
| - | 110 | setTransporteSelecionado(new Transporte()); |
|
| - | 111 | super.preCadastrar(); |
|
| - | 112 | }
|
|
| - | 113 | ||
| - | 114 | @Override |
|
| - | 115 | public void cadastrar() { |
|
| - | 116 | getEntidade().setTransporte(getTransporteSelecionado()); |
|
| - | 117 | super.cadastrar(); |
|
| 105 | }
|
118 | }
|
| 106 | 119 | ||
| 107 | @Override |
120 | @Override |
| 108 | public void preAlterar(NotaFiscal notaFiscal) { |
121 | public void preAlterar(NotaFiscal notaFiscal) { |
| 109 | if (VerificadorUtil.estaNulo(notaFiscal.getTransporte())) { |
122 | if (VerificadorUtil.estaNulo(notaFiscal.getTransporte())) { |
| 110 | notaFiscal.setTransporte(new Transporte()); |
- | |
| - | 123 | setTransporteSelecionado(new Transporte()); |
|
| - | 124 | } else { |
|
| - | 125 | setTransporteSelecionado(notaFiscal.getTransporte()); |
|
| 111 | }
|
126 | }
|
| 112 | super.preAlterar(notaFiscal); |
127 | super.preAlterar(notaFiscal); |
| - | 128 | }
|
|
| - | 129 | ||
| - | 130 | @Override |
|
| - | 131 | public void alterar() { |
|
| - | 132 | getEntidade().setTransporte(getTransporteSelecionado()); |
|
| - | 133 | super.alterar(); |
|
| 113 | }
|
134 | }
|
| 114 | 135 | ||
| 115 | /*
|
136 | /*
|
| 116 | @Override
|
137 | @Override
|
| 117 | public void preAlterar(NotaFiscal notaFiscal) {
|
138 | public void preAlterar(NotaFiscal notaFiscal) {
|
| Line 209... | Line 230... | ||
| 209 | public NotaFiscalDTO getNotaFiscalDTOParaReferenciaNotaFiscal() { |
230 | public NotaFiscalDTO getNotaFiscalDTOParaReferenciaNotaFiscal() { |
| 210 | return notaFiscalDTOParaReferenciaNotaFiscal; |
231 | return notaFiscalDTOParaReferenciaNotaFiscal; |
| 211 | }
|
232 | }
|
| 212 | public void setNotaFiscalDTOParaReferenciaNotaFiscal(NotaFiscalDTO notaFiscalDTOParaReferenciaNotaFiscal) { |
233 | public void setNotaFiscalDTOParaReferenciaNotaFiscal(NotaFiscalDTO notaFiscalDTOParaReferenciaNotaFiscal) { |
| 213 | this.notaFiscalDTOParaReferenciaNotaFiscal = notaFiscalDTOParaReferenciaNotaFiscal; |
234 | this.notaFiscalDTOParaReferenciaNotaFiscal = notaFiscalDTOParaReferenciaNotaFiscal; |
| - | 235 | }
|
|
| - | 236 | ||
| - | 237 | public Transporte getTransporteSelecionado() { |
|
| - | 238 | return transporteSelecionado; |
|
| - | 239 | }
|
|
| - | 240 | public void setTransporteSelecionado(Transporte transporteSelecionado) { |
|
| - | 241 | this.transporteSelecionado = transporteSelecionado; |
|
| 214 | }
|
242 | }
|
| 215 | 243 | ||
| 216 | public String getStatusSefaz() { |
244 | public String getStatusSefaz() { |
| 217 | return statusSefaz; |
245 | return statusSefaz; |
| 218 | }
|
246 | }
|