Rev 414 | Rev 462 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 414 | Rev 449 | ||
|---|---|---|---|
| Line 6... | Line 6... | ||
| 6 | import java.io.Serializable; |
6 | import java.io.Serializable; |
| 7 | import java.io.StringReader; |
7 | import java.io.StringReader; |
| 8 | import java.util.Date; |
8 | import java.util.Date; |
| 9 | import java.util.List; |
9 | import java.util.List; |
| 10 | 10 | ||
| - | 11 | import javax.persistence.CascadeType; |
|
| 11 | import javax.persistence.Column; |
12 | import javax.persistence.Column; |
| 12 | import javax.persistence.Entity; |
13 | import javax.persistence.Entity; |
| 13 | import javax.persistence.GeneratedValue; |
14 | import javax.persistence.GeneratedValue; |
| 14 | import javax.persistence.GenerationType; |
15 | import javax.persistence.GenerationType; |
| 15 | import javax.persistence.Id; |
16 | import javax.persistence.Id; |
| 16 | import javax.persistence.JoinColumn; |
17 | import javax.persistence.JoinColumn; |
| 17 | import javax.persistence.ManyToOne; |
18 | import javax.persistence.ManyToOne; |
| - | 19 | import javax.persistence.OneToMany; |
|
| 18 | import javax.persistence.SequenceGenerator; |
20 | import javax.persistence.SequenceGenerator; |
| 19 | import javax.persistence.Table; |
21 | import javax.persistence.Table; |
| 20 | import javax.persistence.Transient; |
22 | import javax.persistence.Transient; |
| 21 | import javax.validation.constraints.NotNull; |
23 | import javax.validation.constraints.NotNull; |
| 22 | import javax.validation.constraints.Size; |
24 | import javax.validation.constraints.Size; |
| Line 40... | Line 42... | ||
| 40 | import br.com.ec.core.generic.identidade.Identidade; |
42 | import br.com.ec.core.generic.identidade.Identidade; |
| 41 | import br.com.ec.core.interfaces.Alterar; |
43 | import br.com.ec.core.interfaces.Alterar; |
| 42 | import br.com.ec.core.interfaces.Cadastrar; |
44 | import br.com.ec.core.interfaces.Cadastrar; |
| 43 | import br.com.ec.core.util.StringUtil; |
45 | import br.com.ec.core.util.StringUtil; |
| 44 | import br.com.ec.core.util.VerificadorUtil; |
46 | import br.com.ec.core.util.VerificadorUtil; |
| - | 47 | import br.com.ec.domain.dto.NotaFiscalProdutoDTO; |
|
| 45 | import br.com.ec.domain.model.nfe.TipoModeloNotaFiscal; |
48 | import br.com.ec.domain.model.nfe.TipoModeloNotaFiscal; |
| 46 | import br.com.ec.domain.model.nfe.TipoNotaFiscal; |
49 | import br.com.ec.domain.model.nfe.TipoNotaFiscal; |
| 47 | import br.com.ec.domain.model.nfe.TipoNotaFiscalNaturezaOperacao; |
50 | import br.com.ec.domain.model.nfe.TipoNotaFiscalNaturezaOperacao; |
| 48 | import br.com.ec.domain.model.nfe.TipoNotaFiscalPresencaComprador; |
51 | import br.com.ec.domain.model.nfe.TipoNotaFiscalPresencaComprador; |
| 49 | import br.com.ec.domain.model.nfe.TipoNotaFiscalStatusRetorno; |
52 | import br.com.ec.domain.model.nfe.TipoNotaFiscalStatusRetorno; |
| Line 84... | Line 87... | ||
| 84 | 87 | ||
| 85 | private String statusRetorno; |
88 | private String statusRetorno; |
| 86 | private String motivoRetorno; |
89 | private String motivoRetorno; |
| 87 | private Date dataHoraEvento; |
90 | private Date dataHoraEvento; |
| 88 | private String textoXmlEvento; |
91 | private String textoXmlEvento; |
| 89 | - | ||
| 90 | // private List<NotaFiscalProduto> listaNFRemessaProdutos;
|
- | |
| 91 | 92 | ||
| 92 | private byte[] arquivoXml; |
93 | private byte[] arquivoXml; |
| 93 | 94 | ||
| 94 | // private List<Parcela> listaParcelas;
|
95 | // private List<Parcela> listaParcelas;
|
| 95 | // private List<CompraProduto> listaCompraProduto;
|
96 | // private List<CompraProduto> listaCompraProduto;
|
| 96 | private List<Lancamento> listaLancamento; |
97 | private List<Lancamento> listaLancamento; |
| 97 | private List<VendaFormaPagamento> listaFormaPagamento; |
98 | private List<VendaFormaPagamento> listaFormaPagamento; |
| - | 99 | ||
| - | 100 | private List<NotaFiscalProdutoDTO> listaProdutosVinculadosDTO; |
|
| 98 | 101 | ||
| 99 | private Boolean notaFiscalPendente; |
102 | private Boolean notaFiscalPendente; |
| 100 | 103 | ||
| 101 | public NotaFiscal() {} |
104 | public NotaFiscal() {} |
| 102 | 105 | ||
| Line 317... | Line 320... | ||
| 317 | return textoXmlEvento; |
320 | return textoXmlEvento; |
| 318 | }
|
321 | }
|
| 319 | public void setTextoXmlEvento(String textoXmlEvento) { |
322 | public void setTextoXmlEvento(String textoXmlEvento) { |
| 320 | this.textoXmlEvento = textoXmlEvento; |
323 | this.textoXmlEvento = textoXmlEvento; |
| 321 | }
|
324 | }
|
| 322 | - | ||
| 323 | // @OneToMany(mappedBy="notaFiscal", cascade=CascadeType.ALL, orphanRemoval=true)
|
- | |
| 324 | /*
|
- | |
| 325 | @Transient
|
- | |
| 326 | public List<NotaFiscalProduto> getListaNFRemessaProdutos() {
|
- | |
| 327 | return listaNFRemessaProdutos;
|
- | |
| 328 | }
|
- | |
| 329 | public void setListaNFRemessaProdutos(List<NotaFiscalProduto> listaNFRemessaProdutos) {
|
- | |
| 330 | this.listaNFRemessaProdutos = listaNFRemessaProdutos;
|
- | |
| 331 | }
|
- | |
| 332 | */
|
- | |
| 333 | 325 | ||
| 334 | @Transient |
326 | @Transient |
| 335 | public Boolean temPessoaJuridica() { |
327 | public Boolean temPessoaJuridica() { |
| 336 | if (VerificadorUtil.estaNulo(getVenda())) return false; |
328 | if (VerificadorUtil.estaNulo(getVenda())) return false; |
| 337 | if (VerificadorUtil.estaNulo(getVenda().getLoja())) return false; |
329 | if (VerificadorUtil.estaNulo(getVenda().getLoja())) return false; |
| Line 388... | Line 380... | ||
| 388 | public List<VendaFormaPagamento> getListaFormaPagamento() { |
380 | public List<VendaFormaPagamento> getListaFormaPagamento() { |
| 389 | return listaFormaPagamento; |
381 | return listaFormaPagamento; |
| 390 | }
|
382 | }
|
| 391 | public void setListaFormaPagamento(List<VendaFormaPagamento> listaFormaPagamento) { |
383 | public void setListaFormaPagamento(List<VendaFormaPagamento> listaFormaPagamento) { |
| 392 | this.listaFormaPagamento = listaFormaPagamento; |
384 | this.listaFormaPagamento = listaFormaPagamento; |
| - | 385 | }
|
|
| - | 386 | ||
| - | 387 | ||
| - | 388 | // @OneToMany(mappedBy="notaFiscal", cascade=CascadeType.ALL, orphanRemoval=true)
|
|
| - | 389 | @Transient |
|
| - | 390 | public List<NotaFiscalProdutoDTO> getListaProdutosVinculadosDTO() { |
|
| - | 391 | return listaProdutosVinculadosDTO; |
|
| - | 392 | }
|
|
| - | 393 | public void setListaProdutosVinculadosDTO(List<NotaFiscalProdutoDTO> listaProdutosVinculadosDTO) { |
|
| - | 394 | this.listaProdutosVinculadosDTO = listaProdutosVinculadosDTO; |
|
| 393 | }
|
395 | }
|
| 394 | 396 | ||
| 395 | @Transient |
397 | @Transient |
| 396 | public Boolean getNotaFiscalPendente() { |
398 | public Boolean getNotaFiscalPendente() { |
| 397 | return notaFiscalPendente; |
399 | return notaFiscalPendente; |