Rev 242 | Rev 319 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 242 | Rev 259 | ||
|---|---|---|---|
| Line 4... | Line 4... | ||
| 4 | import javax.inject.Named; |
4 | import javax.inject.Named; |
| 5 | 5 | ||
| 6 | import org.springframework.context.annotation.Scope; |
6 | import org.springframework.context.annotation.Scope; |
| 7 | 7 | ||
| 8 | import br.com.ec.domain.dto.UsuarioDTO; |
8 | import br.com.ec.domain.dto.UsuarioDTO; |
| - | 9 | import br.com.ec.domain.model.tipos.TipoAno; |
|
| - | 10 | import br.com.ec.domain.model.tipos.TipoMes; |
|
| 9 | import br.com.ec.domain.service.ContextoSeguranca; |
11 | import br.com.ec.domain.service.ContextoSeguranca; |
| 10 | import br.com.ec.domain.service.PerfilService; |
12 | import br.com.ec.domain.service.PerfilService; |
| 11 | import br.com.ec.domain.service.UsuarioService; |
13 | import br.com.ec.domain.service.UsuarioService; |
| 12 | import br.com.ec.web.exception.VerificadorLancamentoException; |
14 | import br.com.ec.web.exception.VerificadorLancamentoException; |
| 13 | import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean; |
15 | import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean; |
| Line 151... | Line 153... | ||
| 151 | return perfilService.temPerfilTreinamento(getUsuarioDTO().getPerfis()); |
153 | return perfilService.temPerfilTreinamento(getUsuarioDTO().getPerfis()); |
| 152 | }
|
154 | }
|
| 153 | 155 | ||
| 154 | public Boolean temPerfilLoja() { |
156 | public Boolean temPerfilLoja() { |
| 155 | return perfilService.temPerfilLoja(getUsuarioDTO().getPerfis()); |
157 | return perfilService.temPerfilLoja(getUsuarioDTO().getPerfis()); |
| - | 158 | }
|
|
| - | 159 | ||
| - | 160 | public TipoAno[] getTiposAno() { |
|
| - | 161 | return TipoAno.values(); |
|
| - | 162 | }
|
|
| - | 163 | ||
| - | 164 | public TipoMes[] getTiposMes() { |
|
| - | 165 | return TipoMes.values(); |
|
| 156 | }
|
166 | }
|
| 157 | 167 | ||
| 158 | /*
|
168 | /*
|
| 159 | public Boolean temAcessoLoja(Long sequencialLoja) {
|
169 | public Boolean temAcessoLoja(Long sequencialLoja) {
|
| 160 | return temPerfilGerenteAdministrativo() || verificarAcessoLoja(getUsuarioDTO().getPerfis(), sequencialLoja);
|
170 | return temPerfilGerenteAdministrativo() || verificarAcessoLoja(getUsuarioDTO().getPerfis(), sequencialLoja);
|
| Line 209... | Line 219... | ||
| 209 | public Integer getTempoEstoqueParaReporEmDias() {
|
219 | public Integer getTempoEstoqueParaReporEmDias() {
|
| 210 | Parametro parametro = new Parametro();
|
220 | Parametro parametro = new Parametro();
|
| 211 | parametro.setCodigo(ConstantesSEC.Parametro.CODIGO_PARAMETRO_TEMPO_ESTOQUE_REPOSICAO_PARA_COMPRAS);
|
221 | parametro.setCodigo(ConstantesSEC.Parametro.CODIGO_PARAMETRO_TEMPO_ESTOQUE_REPOSICAO_PARA_COMPRAS);
|
| 212 | parametro = getUsuario().getParametros().get(getUsuario().getParametros().indexOf(parametro));
|
222 | parametro = getUsuario().getParametros().get(getUsuario().getParametros().indexOf(parametro));
|
| 213 | return VerificadorUtil.naoEstaNulo(parametro)? new Integer(parametro.getValor()) : 60;
|
223 | return VerificadorUtil.naoEstaNulo(parametro)? new Integer(parametro.getValor()) : 60;
|
| 214 | }
|
- | |
| 215 |
|
- | |
| 216 | public TipoAno[] getTiposAno() {
|
- | |
| 217 | return TipoAno.values();
|
- | |
| 218 | }
|
- | |
| 219 |
|
- | |
| 220 | public TipoMes[] getTiposMes() {
|
- | |
| 221 | return TipoMes.values();
|
- | |
| 222 | }
|
224 | }
|
| 223 |
|
225 |
|
| 224 | public String textoSobreCorMargem() {
|
226 | public String textoSobreCorMargem() {
|
| 225 | return ConstantesSEC.Textos.TEXTO_COR_MARGEM;
|
227 | return ConstantesSEC.Textos.TEXTO_COR_MARGEM;
|
| 226 | }
|
228 | }
|