Rev 523 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 523 | Rev 524 | ||
|---|---|---|---|
| Line 11... | Line 11... | ||
| 11 | 11 | ||
| 12 | import br.com.ec.core.generic.GenericService; |
12 | import br.com.ec.core.generic.GenericService; |
| 13 | import br.com.ec.domain.dto.ConsolidacoesDTO; |
13 | import br.com.ec.domain.dto.ConsolidacoesDTO; |
| 14 | import br.com.ec.domain.dto.VigenciaDTO; |
14 | import br.com.ec.domain.dto.VigenciaDTO; |
| 15 | import br.com.ec.domain.model.tipos.TipoProduto; |
15 | import br.com.ec.domain.model.tipos.TipoProduto; |
| - | 16 | import br.com.ec.domain.service.ConsolidadoEstoqueService; |
|
| 16 | import br.com.ec.domain.service.TransferenciaService; |
17 | import br.com.ec.domain.service.TransferenciaService; |
| 17 | import br.com.ec.domain.service.VigenciaService; |
18 | import br.com.ec.domain.service.VigenciaService; |
| 18 | import br.com.ec.web.exception.VerificadorLancamentoException; |
19 | import br.com.ec.web.exception.VerificadorLancamentoException; |
| 19 | import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean; |
20 | import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean; |
| 20 | import br.com.ec.web.generic.AbstractBean; |
21 | import br.com.ec.web.generic.AbstractBean; |
| Line 27... | Line 28... | ||
| 27 | private static final long serialVersionUID = 1L; |
28 | private static final long serialVersionUID = 1L; |
| 28 | 29 | ||
| 29 | private List<VigenciaDTO> vigenciasDTO; |
30 | private List<VigenciaDTO> vigenciasDTO; |
| 30 | 31 | ||
| 31 | private VigenciaService vigenciaService; |
32 | private VigenciaService vigenciaService; |
| - | 33 | private ConsolidadoEstoqueService consolidadoEstoqueService; |
|
| 32 | 34 | ||
| 33 | @Inject |
35 | @Inject |
| 34 | public ConsolidacoesBean(VigenciaService vigenciaService) { |
- | |
| - | 36 | public ConsolidacoesBean(VigenciaService vigenciaService, ConsolidadoEstoqueService consolidadoEstoqueService) { |
|
| 35 | this.vigenciaService = vigenciaService; |
37 | this.vigenciaService = vigenciaService; |
| - | 38 | this.consolidadoEstoqueService = consolidadoEstoqueService; |
|
| 36 | }
|
39 | }
|
| 37 | 40 | ||
| 38 | @Override |
41 | @Override |
| 39 | public GenericService<ConsolidacoesDTO> getService() { |
42 | public GenericService<ConsolidacoesDTO> getService() { |
| 40 | return null; |
43 | return null; |
| Line 70... | Line 73... | ||
| 70 | setEntidade(new ConsolidacoesDTO()); |
73 | setEntidade(new ConsolidacoesDTO()); |
| 71 | }
|
74 | }
|
| 72 | 75 | ||
| 73 | /**************************************************/
|
76 | /**************************************************/
|
| 74 | 77 | ||
| 75 | public void consolidarEstoque() { |
- | |
| - | 78 | public void consolidarEstoque(VigenciaDTO vigenciaDTO) { |
|
| 76 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
79 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
| 77 | public void execute() { |
80 | public void execute() { |
| - | 81 | consolidadoEstoqueService.consolidarEstoque(vigenciaDTO); |
|
| 78 | LancadorMensagem.lancarSucesso("ESTOQUE CONSOLIDADO COM SUCESSO"); |
82 | LancadorMensagem.lancarSucesso("ESTOQUE CONSOLIDADO COM SUCESSO"); |
| - | 83 | iniciarConsolidacoes(); |
|
| 79 | }
|
84 | }
|
| 80 | }); |
85 | }); |
| 81 | }
|
86 | }
|
| 82 | 87 | ||
| 83 | }
|
88 | }
|