Subversion Repositories Integrator Subversion

Rev

Rev 465 | Rev 468 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 465 Rev 467
Line 36... Line 36...
36
@Scope("view")
36
@Scope("view")
37
public class NotaFiscalBean extends AbstractBean<NotaFiscal> implements Serializable {
37
public class NotaFiscalBean extends AbstractBean<NotaFiscal> implements Serializable {
38
38
39
        private static final long serialVersionUID = 1L;
39
        private static final long serialVersionUID = 1L;
40
       
40
       
41
        private NotaFiscalService notaFiscalService;
-
 
42
        private NotaFiscalProdutoService notaFiscalProdutoService;
-
 
43
        private NotaFiscalReferenciadaService notaFiscalReferenciadaService;
-
 
44
        private ProdutoService produtoService;
-
 
45
        private EmissorRelatorioService emissorRelatorioService;
-
 
-
 
41
        private String statusSefaz = "";
46
       
42
       
47
        private ParametrosConsultaNotaFiscal parametrosConsultaNotaFiscal;
43
        private ParametrosConsultaNotaFiscal parametrosConsultaNotaFiscal;
48
        private NotaFiscalConsultaPorDemanda lazy;
44
        private NotaFiscalConsultaPorDemanda lazy;
49
       
45
       
50
        private Long sequencialVendaParaVinculo;
46
        private Long sequencialVendaParaVinculo;
Line 55... Line 51...
55
        private Integer quantidadeProdutoParaVinculoNotaFiscal = 0;
51
        private Integer quantidadeProdutoParaVinculoNotaFiscal = 0;
56
        private ProdutoDTO produtoDTOParaVinculoNotaFiscal;
52
        private ProdutoDTO produtoDTOParaVinculoNotaFiscal;
57
       
53
       
58
        private String chaveNotaFiscalParaReferenciaNotaFiscal = "";
54
        private String chaveNotaFiscalParaReferenciaNotaFiscal = "";
59
        private NotaFiscalDTO notaFiscalDTOParaReferenciaNotaFiscal;
55
        private NotaFiscalDTO notaFiscalDTOParaReferenciaNotaFiscal;
-
 
56
       
-
 
57
        private NotaFiscalService notaFiscalService;
-
 
58
        private NotaFiscalProdutoService notaFiscalProdutoService;
-
 
59
        private NotaFiscalReferenciadaService notaFiscalReferenciadaService;
-
 
60
        private ProdutoService produtoService;
-
 
61
        private EmissorRelatorioService emissorRelatorioService;
60
       
62
       
61
        @Inject
63
        @Inject
62
        public NotaFiscalBean(NotaFiscalConsultaPorDemanda lazy, NotaFiscalService notaFiscalService, NotaFiscalProdutoService notaFiscalProdutoService,
64
        public NotaFiscalBean(NotaFiscalConsultaPorDemanda lazy, NotaFiscalService notaFiscalService, NotaFiscalProdutoService notaFiscalProdutoService,
63
                        NotaFiscalReferenciadaService notaFiscalReferenciadaService, ProdutoService produtoService, EmissorRelatorioService emissorRelatorioService) {
65
                        NotaFiscalReferenciadaService notaFiscalReferenciadaService, ProdutoService produtoService, EmissorRelatorioService emissorRelatorioService) {
64
                this.lazy = lazy;
66
                this.lazy = lazy;
Line 72... Line 74...
72
        @Override
74
        @Override
73
        public void preCarregamento() {
75
        public void preCarregamento() {
74
                parametrosConsultaNotaFiscal = new ParametrosConsultaNotaFiscal();
76
                parametrosConsultaNotaFiscal = new ParametrosConsultaNotaFiscal();
75
                prepararConsultaDemanda();
77
                prepararConsultaDemanda();
76
                limparEntidade();
78
                limparEntidade();
-
 
79
                atualizarStatusSefaz();
77
        }
80
        }
78
81
79
        @Override
82
        @Override
80
        public void limparEntidade() {
83
        public void limparEntidade() {
81
                setEntidade(new NotaFiscal());
84
                setEntidade(new NotaFiscal());
Line 182... Line 185...
182
        public NotaFiscalDTO getNotaFiscalDTOParaReferenciaNotaFiscal() {
185
        public NotaFiscalDTO getNotaFiscalDTOParaReferenciaNotaFiscal() {
183
                return notaFiscalDTOParaReferenciaNotaFiscal;
186
                return notaFiscalDTOParaReferenciaNotaFiscal;
184
        }
187
        }
185
        public void setNotaFiscalDTOParaReferenciaNotaFiscal(NotaFiscalDTO notaFiscalDTOParaReferenciaNotaFiscal) {
188
        public void setNotaFiscalDTOParaReferenciaNotaFiscal(NotaFiscalDTO notaFiscalDTOParaReferenciaNotaFiscal) {
186
                this.notaFiscalDTOParaReferenciaNotaFiscal = notaFiscalDTOParaReferenciaNotaFiscal;
189
                this.notaFiscalDTOParaReferenciaNotaFiscal = notaFiscalDTOParaReferenciaNotaFiscal;
-
 
190
        }
-
 
191
       
-
 
192
        public String getStatusSefaz() {
-
 
193
                return statusSefaz;
-
 
194
        }
-
 
195
        public void setStatusSefaz(String statusSefaz) {
-
 
196
                this.statusSefaz = statusSefaz;
187
        }
197
        }
188
       
198
       
189
        /**************************************************/
199
        /**************************************************/
-
 
200
       
-
 
201
        public void atualizarStatusSefaz() {
-
 
202
                setStatusSefaz(notaFiscalService.retornarStatusSefaz());
-
 
203
        }
190
       
204
       
191
        public void desvincularVenda() {
205
        public void desvincularVenda() {
192
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
206
                new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() {
193
                        public void execute() {
207
                        public void execute() {
194
                                notaFiscalService.desvincularVenda(getEntidade().getSequencial());
208
                                notaFiscalService.desvincularVenda(getEntidade().getSequencial());