Rev 630 | Rev 636 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 630 | Rev 631 | ||
|---|---|---|---|
| Line 32... | Line 32... | ||
| 32 | 32 | ||
| 33 | public PosVendaDTO(Long sequencial) { |
33 | public PosVendaDTO(Long sequencial) { |
| 34 | this.sequencial = sequencial; |
34 | this.sequencial = sequencial; |
| 35 | }
|
35 | }
|
| 36 | 36 | ||
| 37 | public static String CONSULTA_DTO_SIMPLES = "e.sequencial, e.venda.sequencial, e.venda.dataVenda, e.cliente.sequencial, e.cliente.nome, e.cliente.dataNascimento," |
- | |
| - | 37 | public static String CONSULTA_DTO_SIMPLES = "e.sequencial, " |
|
| - | 38 | + " (SELECT vd.sequencial FROM Venda vd WHERE vd.sequencial = e.venda.sequencial), "
|
|
| - | 39 | // + "e.venda.sequencial, e.venda.dataVenda, "
|
|
| - | 40 | + "e.cliente.sequencial, e.cliente.nome, e.cliente.cpfCnpj, e.cliente.dataNascimento,"
|
|
| 38 | + "e.cliente.contato, e.cliente.telefone, e.dataCadastro, e.dataInicio, e.dataFinalizacao, e.tipoFinalizacao, e.observacao"; |
41 | + "e.cliente.contato, e.cliente.telefone, e.dataCadastro, e.dataInicio, e.dataFinalizacao, e.tipoFinalizacao, e.observacao"; |
| 39 | public PosVendaDTO(Long sequencial, Long sequencialVenda, Date dataVenda, Long sequencialCliente, String nomeCliente, Date dataNascimentoCliente, |
- | |
| 40 | String contatoCliente, String telefoneCliente, Date dataCadastro, Date dataInicio, Date dataFinalizacao, String tipoFinalizacao, String observacao) { |
- | |
| - | 42 | public PosVendaDTO(Long sequencial, Long sequencialVenda, Long sequencialCliente, String nomeCliente, String cpfCnpjCliente, |
|
| - | 43 | Date dataNascimentoCliente, String contatoCliente, String telefoneCliente, Date dataCadastro, Date dataInicio, Date dataFinalizacao, |
|
| - | 44 | String tipoFinalizacao, String observacao) { |
|
| 41 | super(); |
45 | super(); |
| 42 | this.sequencial = sequencial; |
46 | this.sequencial = sequencial; |
| 43 | VendaDTO vendaDTO = new VendaDTO(sequencialVenda); |
47 | VendaDTO vendaDTO = new VendaDTO(sequencialVenda); |
| 44 | vendaDTO.setDataVenda(dataVenda); |
- | |
| 45 | this.vendaDTO = vendaDTO; |
48 | this.vendaDTO = vendaDTO; |
| 46 | this.clienteDTO = new ClienteDTO(sequencialCliente, nomeCliente, dataNascimentoCliente, contatoCliente, telefoneCliente); |
- | |
| - | 49 | this.clienteDTO = new ClienteDTO(sequencialCliente, nomeCliente, cpfCnpjCliente, dataNascimentoCliente, contatoCliente, telefoneCliente); |
|
| 47 | this.dataCadastro = dataCadastro; |
50 | this.dataCadastro = dataCadastro; |
| 48 | this.dataInicio = dataInicio; |
51 | this.dataInicio = dataInicio; |
| 49 | this.dataFinalizacao = dataFinalizacao; |
52 | this.dataFinalizacao = dataFinalizacao; |
| 50 | this.tipoFinalizacao = tipoFinalizacao; |
53 | this.tipoFinalizacao = tipoFinalizacao; |
| 51 | this.observacao = observacao; |
54 | this.observacao = observacao; |
| Line 156... | Line 159... | ||
| 156 | return VerificadorUtil.estaNulo(getDataInicio())? "danger" : VerificadorUtil.naoEstaNulo(getNpsPosVendaAgradecimento())? VerificadorUtil.naoEstaNulo(getNpsPosVendaAgradecimento().getDataFinalizacao())? "success" : "warning" : "warning"; |
159 | return VerificadorUtil.estaNulo(getDataInicio())? "danger" : VerificadorUtil.naoEstaNulo(getNpsPosVendaAgradecimento())? VerificadorUtil.naoEstaNulo(getNpsPosVendaAgradecimento().getDataFinalizacao())? "success" : "warning" : "warning"; |
| 157 | }
|
160 | }
|
| 158 | 161 | ||
| 159 | public String notaNpsPosVendaAtendimento() { |
162 | public String notaNpsPosVendaAtendimento() { |
| 160 | return VerificadorUtil.naoEstaNulo(getNpsPosVendaAgradecimento())? "" + getNpsPosVendaAgradecimento().getNota() : "SEM NOTA!"; |
163 | return VerificadorUtil.naoEstaNulo(getNpsPosVendaAgradecimento())? "" + getNpsPosVendaAgradecimento().getNota() : "SEM NOTA!"; |
| - | 164 | }
|
|
| - | 165 | ||
| - | 166 | public Long getSequencialDaVenda() { |
|
| - | 167 | return VerificadorUtil.naoEstaNulo(getVendaDTO())? VerificadorUtil.naoEstaNulo(getVendaDTO().getSequencial())? getVendaDTO().getSequencial() : null : null; |
|
| 161 | }
|
168 | }
|
| 162 | 169 | ||
| 163 | }
|
170 | }
|