Rev 629 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 629 | Rev 631 | ||
|---|---|---|---|
| Line 5... | Line 5... | ||
| 5 | import java.util.List; |
5 | import java.util.List; |
| 6 | 6 | ||
| 7 | import javax.inject.Inject; |
7 | import javax.inject.Inject; |
| 8 | import javax.inject.Named; |
8 | import javax.inject.Named; |
| 9 | 9 | ||
| 10 | import org.apache.commons.httpclient.util.DateUtil; |
- | |
| 11 | import org.apache.commons.lang.time.DateUtils; |
- | |
| 12 | import org.springframework.context.annotation.Scope; |
10 | import org.springframework.context.annotation.Scope; |
| 13 | 11 | ||
| 14 | import br.com.ec.core.generic.GenericService; |
12 | import br.com.ec.core.generic.GenericService; |
| 15 | import br.com.ec.core.util.DataUtils; |
- | |
| 16 | import br.com.ec.core.util.VerificadorUtil; |
13 | import br.com.ec.core.util.VerificadorUtil; |
| 17 | import br.com.ec.domain.dto.ComercialPosVendaDTO; |
14 | import br.com.ec.domain.dto.ComercialPosVendaDTO; |
| - | 15 | import br.com.ec.domain.dto.NpsPosVendaDTO; |
|
| 18 | import br.com.ec.domain.model.NpsPosVenda; |
16 | import br.com.ec.domain.model.NpsPosVenda; |
| 19 | import br.com.ec.domain.model.PosVenda; |
17 | import br.com.ec.domain.model.PosVenda; |
| 20 | import br.com.ec.domain.model.tipos.TipoNpsPosVenda; |
18 | import br.com.ec.domain.model.tipos.TipoNpsPosVenda; |
| 21 | import br.com.ec.domain.model.tipos.TipoPeriodoConsulta; |
19 | import br.com.ec.domain.model.tipos.TipoPeriodoConsulta; |
| 22 | import br.com.ec.domain.service.NpsPosVendaService; |
20 | import br.com.ec.domain.service.NpsPosVendaService; |
| Line 93... | Line 91... | ||
| 93 | /**************************************************/
|
91 | /**************************************************/
|
| 94 | 92 | ||
| 95 | public NpsPosVenda getNpsPosVendaSelecionado() { |
93 | public NpsPosVenda getNpsPosVendaSelecionado() { |
| 96 | if (VerificadorUtil.estaNulo(npsPosVendaSelecionado)) { |
94 | if (VerificadorUtil.estaNulo(npsPosVendaSelecionado)) { |
| 97 | if (VerificadorUtil.naoEstaNulo(getParametro("sq"))) { |
95 | if (VerificadorUtil.naoEstaNulo(getParametro("sq"))) { |
| - | 96 | PosVenda posVenda = new PosVenda(new Long(getParametro("sq").toString())); |
|
| - | 97 | NpsPosVendaDTO npsPosVendaDTO = npsPosVendaService.consultarPorPosVendaEeTipo(posVenda.getSequencial(), TipoNpsPosVenda.ATENDIMENTO_A.getValor()); |
|
| 98 | npsPosVendaSelecionado = new NpsPosVenda(); |
98 | npsPosVendaSelecionado = new NpsPosVenda(); |
| 99 | npsPosVendaSelecionado.setPosVenda(new PosVenda(new Long(getParametro("sq").toString()))); |
- | |
| 100 | npsPosVendaSelecionado.setObservacao(""); |
- | |
| 101 | npsPosVendaSelecionado.setTipoNps(TipoNpsPosVenda.ATENDIMENTO_A.getValor()); |
- | |
| - | 99 | if (VerificadorUtil.naoEstaNulo(npsPosVendaDTO)) { |
|
| - | 100 | npsPosVendaSelecionado.setPosVenda(posVenda); |
|
| - | 101 | npsPosVendaSelecionado.preencherDados(npsPosVendaDTO); |
|
| - | 102 | } else { |
|
| - | 103 | npsPosVendaSelecionado.setPosVenda(posVenda); |
|
| - | 104 | npsPosVendaSelecionado.setObservacao(""); |
|
| - | 105 | npsPosVendaSelecionado.setTipoNps(TipoNpsPosVenda.ATENDIMENTO_A.getValor()); |
|
| - | 106 | }
|
|
| 102 | }
|
107 | }
|
| 103 | }
|
108 | }
|
| 104 | return npsPosVendaSelecionado; |
109 | return npsPosVendaSelecionado; |
| 105 | }
|
110 | }
|
| 106 | public void setNpsPosVendaSelecionado(NpsPosVenda npsPosVendaSelecionado) { |
111 | public void setNpsPosVendaSelecionado(NpsPosVenda npsPosVendaSelecionado) { |