Rev 195 | Rev 235 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 195 | Rev 231 | ||
|---|---|---|---|
| Line 24... | Line 24... | ||
| 24 | import org.hibernate.annotations.ForeignKey; |
24 | import org.hibernate.annotations.ForeignKey; |
| 25 | 25 | ||
| 26 | import br.com.ec.core.generic.identidade.Identidade; |
26 | import br.com.ec.core.generic.identidade.Identidade; |
| 27 | import br.com.ec.core.interfaces.Alterar; |
27 | import br.com.ec.core.interfaces.Alterar; |
| 28 | import br.com.ec.core.interfaces.Cadastrar; |
28 | import br.com.ec.core.interfaces.Cadastrar; |
| - | 29 | import br.com.ec.core.util.DataUtils; |
|
| 29 | import br.com.ec.core.util.VerificadorUtil; |
30 | import br.com.ec.core.util.VerificadorUtil; |
| 30 | import br.com.ec.domain.dto.TransferenciaProdutoDTO; |
31 | import br.com.ec.domain.dto.TransferenciaProdutoDTO; |
| 31 | 32 | ||
| 32 | @Entity |
33 | @Entity |
| 33 | @Table(name="sec_transferencia", schema="sc_sec") |
34 | @Table(name="sec_transferencia", schema="sc_sec") |
| Line 40... | Line 41... | ||
| 40 | private Loja lojaEntrada; |
41 | private Loja lojaEntrada; |
| 41 | private Date dataSolicitacao; |
42 | private Date dataSolicitacao; |
| 42 | private Boolean conferido; |
43 | private Boolean conferido; |
| 43 | private Date dataFinalizacao; |
44 | private Date dataFinalizacao; |
| 44 | private NotaFiscal notaFiscalRemessa; |
45 | private NotaFiscal notaFiscalRemessa; |
| - | 46 | private Date dataHoraInicioTransporte; |
|
| - | 47 | private Usuario usuarioTransportador; |
|
| - | 48 | private Usuario usuarioReceptor; |
|
| 45 | 49 | ||
| 46 | private List<TransferenciaProduto> listaProdutos; |
50 | private List<TransferenciaProduto> listaProdutos; |
| 47 | - | ||
| 48 | private List<TransferenciaProdutoDTO> produtosDTO; |
51 | private List<TransferenciaProdutoDTO> produtosDTO; |
| 49 | 52 | ||
| 50 | @Override |
53 | @Override |
| 51 | @Transient |
54 | @Transient |
| 52 | public Object getId() { |
55 | public Object getId() { |
| Line 122... | Line 125... | ||
| 122 | public NotaFiscal getNotaFiscalRemessa() { |
125 | public NotaFiscal getNotaFiscalRemessa() { |
| 123 | return notaFiscalRemessa; |
126 | return notaFiscalRemessa; |
| 124 | }
|
127 | }
|
| 125 | public void setNotaFiscalRemessa(NotaFiscal notaFiscalRemessa) { |
128 | public void setNotaFiscalRemessa(NotaFiscal notaFiscalRemessa) { |
| 126 | this.notaFiscalRemessa = notaFiscalRemessa; |
129 | this.notaFiscalRemessa = notaFiscalRemessa; |
| - | 130 | }
|
|
| - | 131 | ||
| - | 132 | @Column(name="dth_inicio_transporte") |
|
| - | 133 | public Date getDataHoraInicioTransporte() { |
|
| - | 134 | return dataHoraInicioTransporte; |
|
| - | 135 | }
|
|
| - | 136 | public void setDataHoraInicioTransporte(Date dataHoraInicioTransporte) { |
|
| - | 137 | this.dataHoraInicioTransporte = dataHoraInicioTransporte; |
|
| - | 138 | }
|
|
| - | 139 | public String dataHoraInicioTransporteFormatado() { |
|
| - | 140 | return DataUtils.converterDataComHorarioParaString(getDataHoraInicioTransporte()); |
|
| - | 141 | }
|
|
| - | 142 | ||
| - | 143 | @ManyToOne |
|
| - | 144 | @ForeignKey(name="fk_transferencia_usuairo_transportador") |
|
| - | 145 | @JoinColumn(name = "seq_usuario_transportador", nullable = true) |
|
| - | 146 | public Usuario getUsuarioTransportador() { |
|
| - | 147 | return usuarioTransportador; |
|
| - | 148 | }
|
|
| - | 149 | public void setUsuarioTransportador(Usuario usuarioTransportador) { |
|
| - | 150 | this.usuarioTransportador = usuarioTransportador; |
|
| - | 151 | }
|
|
| - | 152 | ||
| - | 153 | @ManyToOne |
|
| - | 154 | @ForeignKey(name="fk_transferencia_usuairo_receptor") |
|
| - | 155 | @JoinColumn(name = "seq_usuario_receptor", nullable = true) |
|
| - | 156 | public Usuario getUsuarioReceptor() { |
|
| - | 157 | return usuarioReceptor; |
|
| - | 158 | }
|
|
| - | 159 | public void setUsuarioReceptor(Usuario usuarioReceptor) { |
|
| - | 160 | this.usuarioReceptor = usuarioReceptor; |
|
| 127 | }
|
161 | }
|
| 128 | 162 | ||
| 129 | @OneToMany(mappedBy="transferencia", cascade=CascadeType.ALL, orphanRemoval=true) |
163 | @OneToMany(mappedBy="transferencia", cascade=CascadeType.ALL, orphanRemoval=true) |
| 130 | public List<TransferenciaProduto> getListaProdutos() { |
164 | public List<TransferenciaProduto> getListaProdutos() { |
| 131 | return listaProdutos; |
165 | return listaProdutos; |