Rev 623 | Rev 625 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 623 | Rev 624 | ||
|---|---|---|---|
| Line 15... | Line 15... | ||
| 15 | import br.com.ec.domain.dto.ClienteDTO; |
15 | import br.com.ec.domain.dto.ClienteDTO; |
| 16 | import br.com.ec.domain.dto.ComercialPosVendaDTO; |
16 | import br.com.ec.domain.dto.ComercialPosVendaDTO; |
| 17 | import br.com.ec.domain.dto.PosVendaDTO; |
17 | import br.com.ec.domain.dto.PosVendaDTO; |
| 18 | import br.com.ec.domain.dto.VendaDTO; |
18 | import br.com.ec.domain.dto.VendaDTO; |
| 19 | import br.com.ec.domain.model.tipos.TipoPeriodoConsulta; |
19 | import br.com.ec.domain.model.tipos.TipoPeriodoConsulta; |
| - | 20 | import br.com.ec.domain.service.LancamentoService; |
|
| 20 | import br.com.ec.domain.service.PosVendaService; |
21 | import br.com.ec.domain.service.PosVendaService; |
| 21 | import br.com.ec.domain.service.TransferenciaService; |
22 | import br.com.ec.domain.service.TransferenciaService; |
| 22 | import br.com.ec.web.exception.VerificadorLancamentoException; |
23 | import br.com.ec.web.exception.VerificadorLancamentoException; |
| 23 | import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean; |
24 | import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean; |
| 24 | import br.com.ec.web.generic.AbstractBean; |
25 | import br.com.ec.web.generic.AbstractBean; |
| Line 28... | Line 29... | ||
| 28 | public class PosVendaBean extends AbstractBean<ComercialPosVendaDTO> implements Serializable { |
29 | public class PosVendaBean extends AbstractBean<ComercialPosVendaDTO> implements Serializable { |
| 29 | 30 | ||
| 30 | private static final long serialVersionUID = 1L; |
31 | private static final long serialVersionUID = 1L; |
| 31 | 32 | ||
| 32 | private PosVendaService posVendaService; |
33 | private PosVendaService posVendaService; |
| - | 34 | private LancamentoService lancamentoService; |
|
| 33 | 35 | ||
| 34 | private PosVendaDTO posVendaSelecionado; |
36 | private PosVendaDTO posVendaSelecionado; |
| 35 | 37 | ||
| 36 | @Inject |
38 | @Inject |
| 37 | public PosVendaBean(PosVendaService posVendaService) { |
- | |
| - | 39 | public PosVendaBean(PosVendaService posVendaService, LancamentoService lancamentoService) { |
|
| 38 | this.posVendaService = posVendaService; |
40 | this.posVendaService = posVendaService; |
| - | 41 | this.lancamentoService = lancamentoService; |
|
| 39 | }
|
42 | }
|
| 40 | 43 | ||
| 41 | @Override |
44 | @Override |
| 42 | public GenericService<ComercialPosVendaDTO> getService() { |
45 | public GenericService<ComercialPosVendaDTO> getService() { |
| 43 | return null; |
46 | return null; |
| Line 88... | Line 91... | ||
| 88 | 91 | ||
| 89 | public void selecionarPosVenda(PosVendaDTO posVenda/* , TipoPosVendaAtivacao tipoAtivacao */) { |
92 | public void selecionarPosVenda(PosVendaDTO posVenda/* , TipoPosVendaAtivacao tipoAtivacao */) { |
| 90 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
93 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
| 91 | public void execute() { |
94 | public void execute() { |
| 92 | // CONSULTAR DETALHES BASEANDO-SE NO TIPO DE ATIVACAO
|
95 | // CONSULTAR DETALHES BASEANDO-SE NO TIPO DE ATIVACAO
|
| - | 96 | posVenda.getVendaDTO().setListaLancamentos(lancamentoService.consultarLancamentosDaVenda(posVenda.getVendaDTO().getSequencial())); |
|
| 93 | setPosVendaSelecionado(posVenda); |
97 | setPosVendaSelecionado(posVenda); |
| 94 | }
|
98 | }
|
| 95 | }); |
99 | }); |
| 96 | }
|
100 | }
|
| 97 | 101 | ||