Subversion Repositories Integrator Subversion

Rev

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

Rev 106 Rev 116
Line 2... Line 2...
2
2
3
import java.io.Serializable;
3
import java.io.Serializable;
-
 
4
import java.util.ArrayList;
4
import java.util.List;
5
import java.util.List;
5
6
6
import javax.inject.Inject;
7
import javax.inject.Inject;
7
import javax.inject.Named;
8
import javax.inject.Named;
8
9
Line 54... Line 55...
54
        private Integer quantidadeNotificacoes;
55
        private Integer quantidadeNotificacoes;
55
        private Integer quantidadeNotificacoesContagem;
56
        private Integer quantidadeNotificacoesContagem;
56
        private Integer quantidadeNotificacoesRetirarDoSite;
57
        private Integer quantidadeNotificacoesRetirarDoSite;
57
        private Integer quantidadeTransferenciasParaReceberAbertas;
58
        private Integer quantidadeTransferenciasParaReceberAbertas;
58
       
59
       
59
        private Integer quantidadeVendas;
-
 
-
 
60
        private Integer quantidadeVendas;
-
 
61
       
-
 
62
        private Boolean consultarComCasaDasCapas = false;
60
       
63
       
61
        @Inject
64
        @Inject
62
        public LojaBean(LojaService lojaService, VendaService vendaService, VendaVivoService vendaVivoService,
65
        public LojaBean(LojaService lojaService, VendaService vendaService, VendaVivoService vendaVivoService,
63
                        ProdutoService produtoService, AberturaLojaService aberturaLojaService, TransferenciaService transferenciaService) {
66
                        ProdutoService produtoService, AberturaLojaService aberturaLojaService, TransferenciaService transferenciaService) {
64
                this.lojaService = lojaService;
67
                this.lojaService = lojaService;
Line 126... Line 129...
126
                }
129
                }
127
                return listaLojasAtivasEspacoCase;
130
                return listaLojasAtivasEspacoCase;
128
        }
131
        }
129
        public void setListaLojasAtivasEspacoCase(List<Loja> listaLojasAtivasEspacoCase) {
132
        public void setListaLojasAtivasEspacoCase(List<Loja> listaLojasAtivasEspacoCase) {
130
                this.listaLojasAtivasEspacoCase = listaLojasAtivasEspacoCase;
133
                this.listaLojasAtivasEspacoCase = listaLojasAtivasEspacoCase;
-
 
134
        }
-
 
135
        public List<Loja> listaLojasAtivasEspacoCase(Boolean comCasaDasCapas) {
-
 
136
                Loja lojaCasaDasCapas = new Loja(ConstantesSEC.SEQUENCIAL_CASA_DAS_CAPAS_17);
-
 
137
                if (comCasaDasCapas) {
-
 
138
                        if (!getListaLojasAtivasEspacoCase().contains(lojaCasaDasCapas)) {
-
 
139
                                setListaLojasAtivasEspacoCase(lojaService.listarLojasAtivasEspacoCaseEeCasaDasCapas());
-
 
140
                        }
-
 
141
                } else {
-
 
142
                        getListaLojasAtivasEspacoCase().remove(lojaCasaDasCapas);
-
 
143
//                      if (getListaLojasAtivasEspacoCase().contains(lojaCasaDasCapas)) {
-
 
144
//                              setListaLojasAtivasEspacoCase(lojaService.listarLojasAtivasEspacoCaseEeCasaDasCapas());
-
 
145
//                      }
-
 
146
                }
-
 
147
                return getListaLojasAtivasEspacoCase();
-
 
148
                /*
-
 
149
                List<Loja> lojasNaoEspacoCase = new ArrayList<Loja>();
-
 
150
                lojasNaoEspacoCase.add(lojaCasaDasCapas);
-
 
151
               
-
 
152
                List<Loja> lojas = getListaLojasAtivasEspacoCase();
-
 
153
                if (!comCasaDasCapas) {
-
 
154
                        lojas.removeAll(lojasNaoEspacoCase);
-
 
155
                }
-
 
156
                return lojas;
-
 
157
                */
131
        }
158
        }
132
       
159
       
133
        public List<Loja> getListaLojas() {
160
        public List<Loja> getListaLojas() {
134
                if (VerificadorUtil.estaNulo(listaLojas)) {
161
                if (VerificadorUtil.estaNulo(listaLojas)) {
135
                        setListaLojas(lojaService.consultarTodos(new Loja()));
162
                        setListaLojas(lojaService.consultarTodos(new Loja()));
Line 242... Line 269...
242
                        Venda venda = new Venda();
269
                        Venda venda = new Venda();
243
                        venda.setLoja(loja);
270
                        venda.setLoja(loja);
244
                        setQuantidadeVendas(vendaService.obterQuantidadeDeVendasPorLojaEePeriodo(venda, DataUtils.getDataAtual(), DataUtils.getDataAtual()));
271
                        setQuantidadeVendas(vendaService.obterQuantidadeDeVendasPorLojaEePeriodo(venda, DataUtils.getDataAtual(), DataUtils.getDataAtual()));
245
                }
272
                }
246
                return getQuantidadeVendas();
273
                return getQuantidadeVendas();
-
 
274
        }
-
 
275
       
-
 
276
        public Boolean getConsultarComCasaDasCapas() {
-
 
277
                return consultarComCasaDasCapas;
-
 
278
        }
-
 
279
        public void setConsultarComCasaDasCapas(Boolean consultarComCasaDasCapas) {
-
 
280
                this.consultarComCasaDasCapas = consultarComCasaDasCapas;
247
        }
281
        }
248
       
282
       
249
        public Integer quantidadeVendasVivo(Loja loja) {
283
        public Integer quantidadeVendasVivo(Loja loja) {
250
                VendaVivo venda = new VendaVivo();
284
                VendaVivo venda = new VendaVivo();
251
                venda.setLoja(loja);
285
                venda.setLoja(loja);