Commit 0b6c9c14fa6bf3da0db814d56b990372e63268a2
1 parent
04343250
Exists in
master
removendo arquivos inuteis
Showing
172 changed files
with
0 additions
and
5992 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 172 files displayed.
cit-alcada-api/.classpath
@@ -1,32 +0,0 @@ | @@ -1,32 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<classpath> | ||
3 | - <classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java"> | ||
4 | - <attributes> | ||
5 | - <attribute name="optional" value="true"/> | ||
6 | - <attribute name="maven.pomderived" value="true"/> | ||
7 | - </attributes> | ||
8 | - </classpathentry> | ||
9 | - <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
10 | - <attributes> | ||
11 | - <attribute name="maven.pomderived" value="true"/> | ||
12 | - </attributes> | ||
13 | - </classpathentry> | ||
14 | - <classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
15 | - <attributes> | ||
16 | - <attribute name="optional" value="true"/> | ||
17 | - <attribute name="maven.pomderived" value="true"/> | ||
18 | - </attributes> | ||
19 | - </classpathentry> | ||
20 | - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | ||
21 | - <attributes> | ||
22 | - <attribute name="maven.pomderived" value="true"/> | ||
23 | - </attributes> | ||
24 | - </classpathentry> | ||
25 | - <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
26 | - <attributes> | ||
27 | - <attribute name="maven.pomderived" value="true"/> | ||
28 | - <attribute name="org.eclipse.jst.component.nondependency" value=""/> | ||
29 | - </attributes> | ||
30 | - </classpathentry> | ||
31 | - <classpathentry kind="output" path="target/classes"/> | ||
32 | -</classpath> |
cit-alcada-api/.project
@@ -1,36 +0,0 @@ | @@ -1,36 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<projectDescription> | ||
3 | - <name>cit-alcada-api</name> | ||
4 | - <comment></comment> | ||
5 | - <projects> | ||
6 | - </projects> | ||
7 | - <buildSpec> | ||
8 | - <buildCommand> | ||
9 | - <name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
10 | - <arguments> | ||
11 | - </arguments> | ||
12 | - </buildCommand> | ||
13 | - <buildCommand> | ||
14 | - <name>org.eclipse.jdt.core.javabuilder</name> | ||
15 | - <arguments> | ||
16 | - </arguments> | ||
17 | - </buildCommand> | ||
18 | - <buildCommand> | ||
19 | - <name>org.eclipse.wst.validation.validationbuilder</name> | ||
20 | - <arguments> | ||
21 | - </arguments> | ||
22 | - </buildCommand> | ||
23 | - <buildCommand> | ||
24 | - <name>org.eclipse.m2e.core.maven2Builder</name> | ||
25 | - <arguments> | ||
26 | - </arguments> | ||
27 | - </buildCommand> | ||
28 | - </buildSpec> | ||
29 | - <natures> | ||
30 | - <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
31 | - <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
32 | - <nature>org.eclipse.jdt.core.javanature</nature> | ||
33 | - <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
34 | - <nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
35 | - </natures> | ||
36 | -</projectDescription> |
cit-alcada-api/.settings/org.eclipse.core.resources.prefs
cit-alcada-api/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +0,0 @@ | @@ -1,8 +0,0 @@ | ||
1 | -eclipse.preferences.version=1 | ||
2 | -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
4 | -org.eclipse.jdt.core.compiler.compliance=1.7 | ||
5 | -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
8 | -org.eclipse.jdt.core.compiler.source=1.7 |
cit-alcada-api/.settings/org.eclipse.wst.common.component
@@ -1,6 +0,0 @@ | @@ -1,6 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> | ||
2 | - <wb-module deploy-name="cit-alcada-api"> | ||
3 | - <wb-resource deploy-path="/" source-path="/src/main/java"/> | ||
4 | - <wb-resource deploy-path="/" source-path="/src/main/resources"/> | ||
5 | - </wb-module> | ||
6 | -</project-modules> |
cit-alcada-api/.settings/org.eclipse.wst.common.project.facet.core.xml
cit-alcada-api/.settings/org.eclipse.wst.validation.prefs
cit-alcada-api/bin/.project
@@ -1,36 +0,0 @@ | @@ -1,36 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<projectDescription> | ||
3 | - <name>cit-alcada-api</name> | ||
4 | - <comment></comment> | ||
5 | - <projects> | ||
6 | - </projects> | ||
7 | - <buildSpec> | ||
8 | - <buildCommand> | ||
9 | - <name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
10 | - <arguments> | ||
11 | - </arguments> | ||
12 | - </buildCommand> | ||
13 | - <buildCommand> | ||
14 | - <name>org.eclipse.jdt.core.javabuilder</name> | ||
15 | - <arguments> | ||
16 | - </arguments> | ||
17 | - </buildCommand> | ||
18 | - <buildCommand> | ||
19 | - <name>org.eclipse.wst.validation.validationbuilder</name> | ||
20 | - <arguments> | ||
21 | - </arguments> | ||
22 | - </buildCommand> | ||
23 | - <buildCommand> | ||
24 | - <name>org.eclipse.m2e.core.maven2Builder</name> | ||
25 | - <arguments> | ||
26 | - </arguments> | ||
27 | - </buildCommand> | ||
28 | - </buildSpec> | ||
29 | - <natures> | ||
30 | - <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
31 | - <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
32 | - <nature>org.eclipse.jdt.core.javanature</nature> | ||
33 | - <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
34 | - <nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
35 | - </natures> | ||
36 | -</projectDescription> |
cit-alcada-api/bin/.settings/org.eclipse.core.resources.prefs
cit-alcada-api/bin/.settings/org.eclipse.jdt.core.prefs
cit-alcada-api/bin/pom.xml
@@ -1,61 +0,0 @@ | @@ -1,61 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<!-- ******************************************************************************************************************** --> | ||
3 | -<!-- * LICENCA*GPLv2 * --> | ||
4 | -<!-- * Copyright [2011,2012,2013,2014,2015] da CentralIT Tecnologia da Informação Ltda (www.centralit.com.br) * --> | ||
5 | -<!-- * * --> | ||
6 | -<!-- * Este arquivo é parte do programa/software: Citsmart (www.citsmart.com.br) * --> | ||
7 | -<!-- * * --> | ||
8 | -<!-- * O Citsmart é um software livre; você pode redistribui-lo e/ou modificá-lo dentro dos termos da Licença * --> | ||
9 | -<!-- * Pública Geral GNU como publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. * --> | ||
10 | -<!-- * * --> | ||
11 | -<!-- * Este programa/software é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma * --> | ||
12 | -<!-- * garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral * --> | ||
13 | -<!-- * GNU/GPL em português para maiores detalhes. * --> | ||
14 | -<!-- * * --> | ||
15 | -<!-- * Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título 'LICENCA.txt', junto com este * --> | ||
16 | -<!-- * programa/software, se não, acesse o Portal do Software Público Brasileiro no endereço www.softwarepublico.gov.br * --> | ||
17 | -<!-- * ou escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,USA * --> | ||
18 | -<!-- ******************************************************************************************************************** --> | ||
19 | -<project | ||
20 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
21 | - xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
22 | - <modelVersion>4.0.0</modelVersion> | ||
23 | - | ||
24 | - <parent> | ||
25 | - <groupId>br.com.centralit</groupId> | ||
26 | - <artifactId>cit-alcada</artifactId> | ||
27 | - <version>1.8.0-SNAPSHOT</version> | ||
28 | - </parent> | ||
29 | - | ||
30 | - <artifactId>cit-alcada-api</artifactId> | ||
31 | - <name>cit-alcada-api</name> | ||
32 | - | ||
33 | - <properties> | ||
34 | - <findbugs.config.path>${project.parent.parent.parent.basedir}/filterfile.xml</findbugs.config.path> | ||
35 | - <license.config.path>${project.parent.parent.basedir}/src/licensing</license.config.path> | ||
36 | - <maven-antrun-plugin.phase>package</maven-antrun-plugin.phase> | ||
37 | - </properties> | ||
38 | - | ||
39 | - <dependencies> | ||
40 | - <dependency> | ||
41 | - <groupId>br.com.centralit</groupId> | ||
42 | - <artifactId>cit-core</artifactId> | ||
43 | - <version>${cit-core.version}</version> | ||
44 | - </dependency> | ||
45 | - <dependency> | ||
46 | - <groupId>br.com.centralit</groupId> | ||
47 | - <artifactId>cit-portal-api</artifactId> | ||
48 | - <version>${project.version}</version> | ||
49 | - </dependency> | ||
50 | - <dependency> | ||
51 | - <groupId>br.com.centralit</groupId> | ||
52 | - <artifactId>cit-tabelas-corp-api</artifactId> | ||
53 | - <version>${project.version}</version> | ||
54 | - </dependency> | ||
55 | - <dependency> | ||
56 | - <groupId>org.json</groupId> | ||
57 | - <artifactId>json</artifactId> | ||
58 | - </dependency> | ||
59 | - </dependencies> | ||
60 | -</project> | ||
61 | - |
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/CentroResultadoDelegacaoDao.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/LimiteAprovacaoAlcadaDao.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/LimiteAprovacaoDao.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/LimiteAprovacaoNivelAutoridadeDao.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/LimiteAprovacaoValorDao.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/SolicitacaoAlcadaDao.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/impl/CentroResultadoDelegacaoDaoHibernate.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/impl/LimiteAprovacaoAlcadaDaoHibernate.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/impl/LimiteAprovacaoDaoHibernate.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/impl/LimiteAprovacaoNivelAutoridadeDaoHibernate.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/impl/LimiteAprovacaoValorDaoHibernate.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/dao/impl/SolicitacaoAlcadaDaoHibernate.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/framework/json/ViewsAlcada$AlcadaView.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/framework/json/ViewsAlcada$LimiteAprovacaoView.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/framework/json/ViewsAlcada$RecuperacaoAlcadaView.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/framework/json/ViewsAlcada.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/model/LimiteAprovacao.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/model/LimiteAprovacaoAlcada.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/model/LimiteAprovacaoNivelAutoridade.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/model/LimiteAprovacaoValor.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/model/ResponsavelAlcada.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/model/SolicitacaoAlcada.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/model/ValorAcumulado.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/package-info.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/CentroResultadoDelegacaoService.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/LimiteAprovacaoAlcadaService.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/LimiteAprovacaoNivelAutoridadeService.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/LimiteAprovacaoService.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/LimiteAprovacaoValorService.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/SolicitacaoAlcadaService.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/impl/CentroResultadoDelegacaoServiceImpl.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/impl/InicializarAlcadaServiceImpl.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/impl/LimiteAprovacaoAlcadaServiceImpl.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/impl/LimiteAprovacaoNivelAutoridadeServiceImpl.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/impl/LimiteAprovacaoServiceImpl.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/impl/LimiteAprovacaoValorServiceImpl.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/impl/SolicitacaoAlcadaServiceImpl.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/validation/CentroResultadoDelegacaoValidator.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/validation/LimiteAprovacaoAlcadaValidator.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/validation/LimiteAprovacaoNivelAutoridadeValidator.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/validation/LimiteAprovacaoValidator.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/validation/LimiteAprovacaoValorValidator.class
No preview for this file type
cit-alcada-api/bin/src/main/java/br/com/centralit/api/service/validation/SolicitacaoAlcadaValidator.class
No preview for this file type
cit-alcada-api/bin/src/main/resources/.gitignore
@@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
1 | -/*.tag |
cit-alcada-api/bin/target/classes/META-INF/MANIFEST.MF
cit-alcada-api/bin/target/classes/META-INF/maven/br.com.centralit/cit-alcada-api/pom.properties
@@ -1,7 +0,0 @@ | @@ -1,7 +0,0 @@ | ||
1 | -#Generated by Maven Integration for Eclipse | ||
2 | -#Thu Mar 17 13:13:12 BRT 2016 | ||
3 | -version=1.8.0-SNAPSHOT | ||
4 | -groupId=br.com.centralit | ||
5 | -m2e.projectName=cit-alcada-api | ||
6 | -m2e.projectLocation=D\:\\repositorios_git\\citsmartgrp\\cit-alcada\\cit-alcada-api | ||
7 | -artifactId=cit-alcada-api |
cit-alcada-api/bin/target/classes/META-INF/maven/br.com.centralit/cit-alcada-api/pom.xml
@@ -1,61 +0,0 @@ | @@ -1,61 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<!-- ******************************************************************************************************************** --> | ||
3 | -<!-- * LICENCA*GPLv2 * --> | ||
4 | -<!-- * Copyright [2011,2012,2013,2014,2015] da CentralIT Tecnologia da Informação Ltda (www.centralit.com.br) * --> | ||
5 | -<!-- * * --> | ||
6 | -<!-- * Este arquivo é parte do programa/software: Citsmart (www.citsmart.com.br) * --> | ||
7 | -<!-- * * --> | ||
8 | -<!-- * O Citsmart é um software livre; você pode redistribui-lo e/ou modificá-lo dentro dos termos da Licença * --> | ||
9 | -<!-- * Pública Geral GNU como publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. * --> | ||
10 | -<!-- * * --> | ||
11 | -<!-- * Este programa/software é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma * --> | ||
12 | -<!-- * garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral * --> | ||
13 | -<!-- * GNU/GPL em português para maiores detalhes. * --> | ||
14 | -<!-- * * --> | ||
15 | -<!-- * Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título 'LICENCA.txt', junto com este * --> | ||
16 | -<!-- * programa/software, se não, acesse o Portal do Software Público Brasileiro no endereço www.softwarepublico.gov.br * --> | ||
17 | -<!-- * ou escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,USA * --> | ||
18 | -<!-- ******************************************************************************************************************** --> | ||
19 | -<project | ||
20 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
21 | - xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
22 | - <modelVersion>4.0.0</modelVersion> | ||
23 | - | ||
24 | - <parent> | ||
25 | - <groupId>br.com.centralit</groupId> | ||
26 | - <artifactId>cit-alcada</artifactId> | ||
27 | - <version>1.8.0-SNAPSHOT</version> | ||
28 | - </parent> | ||
29 | - | ||
30 | - <artifactId>cit-alcada-api</artifactId> | ||
31 | - <name>cit-alcada-api</name> | ||
32 | - | ||
33 | - <properties> | ||
34 | - <findbugs.config.path>${project.parent.parent.parent.basedir}/filterfile.xml</findbugs.config.path> | ||
35 | - <license.config.path>${project.parent.parent.basedir}/src/licensing</license.config.path> | ||
36 | - <maven-antrun-plugin.phase>package</maven-antrun-plugin.phase> | ||
37 | - </properties> | ||
38 | - | ||
39 | - <dependencies> | ||
40 | - <dependency> | ||
41 | - <groupId>br.com.centralit</groupId> | ||
42 | - <artifactId>cit-core</artifactId> | ||
43 | - <version>${cit-core.version}</version> | ||
44 | - </dependency> | ||
45 | - <dependency> | ||
46 | - <groupId>br.com.centralit</groupId> | ||
47 | - <artifactId>cit-portal-api</artifactId> | ||
48 | - <version>${project.version}</version> | ||
49 | - </dependency> | ||
50 | - <dependency> | ||
51 | - <groupId>br.com.centralit</groupId> | ||
52 | - <artifactId>cit-tabelas-corp-api</artifactId> | ||
53 | - <version>${project.version}</version> | ||
54 | - </dependency> | ||
55 | - <dependency> | ||
56 | - <groupId>org.json</groupId> | ||
57 | - <artifactId>json</artifactId> | ||
58 | - </dependency> | ||
59 | - </dependencies> | ||
60 | -</project> | ||
61 | - |
cit-alcada-web/.classpath
@@ -1,42 +0,0 @@ | @@ -1,42 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<classpath> | ||
3 | - <classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java"> | ||
4 | - <attributes> | ||
5 | - <attribute name="optional" value="true"/> | ||
6 | - <attribute name="maven.pomderived" value="true"/> | ||
7 | - </attributes> | ||
8 | - </classpathentry> | ||
9 | - <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/webapp"> | ||
10 | - <attributes> | ||
11 | - <attribute name="maven.pomderived" value="true"/> | ||
12 | - </attributes> | ||
13 | - </classpathentry> | ||
14 | - <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
15 | - <attributes> | ||
16 | - <attribute name="maven.pomderived" value="true"/> | ||
17 | - </attributes> | ||
18 | - </classpathentry> | ||
19 | - <classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
20 | - <attributes> | ||
21 | - <attribute name="optional" value="true"/> | ||
22 | - <attribute name="maven.pomderived" value="true"/> | ||
23 | - </attributes> | ||
24 | - </classpathentry> | ||
25 | - <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> | ||
26 | - <attributes> | ||
27 | - <attribute name="maven.pomderived" value="true"/> | ||
28 | - </attributes> | ||
29 | - </classpathentry> | ||
30 | - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | ||
31 | - <attributes> | ||
32 | - <attribute name="maven.pomderived" value="true"/> | ||
33 | - </attributes> | ||
34 | - </classpathentry> | ||
35 | - <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
36 | - <attributes> | ||
37 | - <attribute name="maven.pomderived" value="true"/> | ||
38 | - <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
39 | - </attributes> | ||
40 | - </classpathentry> | ||
41 | - <classpathentry kind="output" path="target/classes"/> | ||
42 | -</classpath> |
cit-alcada-web/.project
@@ -1,52 +0,0 @@ | @@ -1,52 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<projectDescription> | ||
3 | - <name>cit-alcada-web</name> | ||
4 | - <comment></comment> | ||
5 | - <projects> | ||
6 | - </projects> | ||
7 | - <buildSpec> | ||
8 | - <buildCommand> | ||
9 | - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> | ||
10 | - <triggers>full,incremental,</triggers> | ||
11 | - <arguments> | ||
12 | - <dictionary> | ||
13 | - <key>LaunchConfigHandle</key> | ||
14 | - <value><project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator (2).launch</value> | ||
15 | - </dictionary> | ||
16 | - </arguments> | ||
17 | - </buildCommand> | ||
18 | - <buildCommand> | ||
19 | - <name>org.eclipse.jdt.core.javabuilder</name> | ||
20 | - <arguments> | ||
21 | - </arguments> | ||
22 | - </buildCommand> | ||
23 | - <buildCommand> | ||
24 | - <name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
25 | - <arguments> | ||
26 | - </arguments> | ||
27 | - </buildCommand> | ||
28 | - <buildCommand> | ||
29 | - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> | ||
30 | - <triggers>full,incremental,</triggers> | ||
31 | - <arguments> | ||
32 | - <dictionary> | ||
33 | - <key>LaunchConfigHandle</key> | ||
34 | - <value><project>/.externalToolBuilders/org.eclipse.wst.validation.validationbuilder (2).launch</value> | ||
35 | - </dictionary> | ||
36 | - </arguments> | ||
37 | - </buildCommand> | ||
38 | - <buildCommand> | ||
39 | - <name>org.eclipse.m2e.core.maven2Builder</name> | ||
40 | - <arguments> | ||
41 | - </arguments> | ||
42 | - </buildCommand> | ||
43 | - </buildSpec> | ||
44 | - <natures> | ||
45 | - <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
46 | - <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
47 | - <nature>org.eclipse.jdt.core.javanature</nature> | ||
48 | - <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
49 | - <nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
50 | - <nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
51 | - </natures> | ||
52 | -</projectDescription> |
cit-alcada-web/.settings/org.eclipse.core.resources.prefs
cit-alcada-web/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +0,0 @@ | @@ -1,8 +0,0 @@ | ||
1 | -eclipse.preferences.version=1 | ||
2 | -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
4 | -org.eclipse.jdt.core.compiler.compliance=1.7 | ||
5 | -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
8 | -org.eclipse.jdt.core.compiler.source=1.7 |
cit-alcada-web/.settings/org.eclipse.wst.common.component
@@ -1,26 +0,0 @@ | @@ -1,26 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> | ||
2 | - <wb-module deploy-name="cit-alcada-web"> | ||
3 | - <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> | ||
4 | - <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> | ||
5 | - <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> | ||
6 | - <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> | ||
7 | - <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/webapp"/> | ||
8 | - <dependent-module archiveName="cit-alcada-api-1.8.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cit-alcada-api/cit-alcada-api"> | ||
9 | - <dependency-type>uses</dependency-type> | ||
10 | - </dependent-module> | ||
11 | - <dependent-module archiveName="cit-portal-api-1.8.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cit-portal-api/cit-portal-api"> | ||
12 | - <dependency-type>uses</dependency-type> | ||
13 | - </dependent-module> | ||
14 | - <dependent-module archiveName="cit-tabelas-corp-api-1.8.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cit-tabelas-corp-api/cit-tabelas-corp-api"> | ||
15 | - <dependency-type>uses</dependency-type> | ||
16 | - </dependent-module> | ||
17 | - <dependent-module archiveName="cit-core-1.8.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cit-core/cit-core"> | ||
18 | - <dependency-type>uses</dependency-type> | ||
19 | - </dependent-module> | ||
20 | - <dependent-module archiveName="cit-esi-io-1.8.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cit-esi-io/cit-esi-io"> | ||
21 | - <dependency-type>uses</dependency-type> | ||
22 | - </dependent-module> | ||
23 | - <property name="context-root" value="cit-alcada-web"/> | ||
24 | - <property name="java-output-path" value="/cit-alcada-web/target/classes"/> | ||
25 | - </wb-module> | ||
26 | -</project-modules> |
cit-alcada-web/.settings/org.eclipse.wst.common.project.facet.core.xml
cit-alcada-web/.settings/org.eclipse.wst.validation.prefs
cit-alcada-web/bin/.project
@@ -1,52 +0,0 @@ | @@ -1,52 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<projectDescription> | ||
3 | - <name>cit-alcada-web</name> | ||
4 | - <comment></comment> | ||
5 | - <projects> | ||
6 | - </projects> | ||
7 | - <buildSpec> | ||
8 | - <buildCommand> | ||
9 | - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> | ||
10 | - <triggers>full,incremental,</triggers> | ||
11 | - <arguments> | ||
12 | - <dictionary> | ||
13 | - <key>LaunchConfigHandle</key> | ||
14 | - <value><project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator (2).launch</value> | ||
15 | - </dictionary> | ||
16 | - </arguments> | ||
17 | - </buildCommand> | ||
18 | - <buildCommand> | ||
19 | - <name>org.eclipse.jdt.core.javabuilder</name> | ||
20 | - <arguments> | ||
21 | - </arguments> | ||
22 | - </buildCommand> | ||
23 | - <buildCommand> | ||
24 | - <name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
25 | - <arguments> | ||
26 | - </arguments> | ||
27 | - </buildCommand> | ||
28 | - <buildCommand> | ||
29 | - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> | ||
30 | - <triggers>full,incremental,</triggers> | ||
31 | - <arguments> | ||
32 | - <dictionary> | ||
33 | - <key>LaunchConfigHandle</key> | ||
34 | - <value><project>/.externalToolBuilders/org.eclipse.wst.validation.validationbuilder (2).launch</value> | ||
35 | - </dictionary> | ||
36 | - </arguments> | ||
37 | - </buildCommand> | ||
38 | - <buildCommand> | ||
39 | - <name>org.eclipse.m2e.core.maven2Builder</name> | ||
40 | - <arguments> | ||
41 | - </arguments> | ||
42 | - </buildCommand> | ||
43 | - </buildSpec> | ||
44 | - <natures> | ||
45 | - <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
46 | - <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
47 | - <nature>org.eclipse.jdt.core.javanature</nature> | ||
48 | - <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
49 | - <nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
50 | - <nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
51 | - </natures> | ||
52 | -</projectDescription> |
cit-alcada-web/bin/.settings/org.eclipse.core.resources.prefs
cit-alcada-web/bin/.settings/org.eclipse.jdt.core.prefs
cit-alcada-web/bin/pom.xml
@@ -1,49 +0,0 @@ | @@ -1,49 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<!-- ******************************************************************************************************************** --> | ||
3 | -<!-- * LICENCA*GPLv2 * --> | ||
4 | -<!-- * Copyright [2011,2012,2013,2014,2015] da CentralIT Tecnologia da Informação Ltda (www.centralit.com.br) * --> | ||
5 | -<!-- * * --> | ||
6 | -<!-- * Este arquivo é parte do programa/software: Citsmart (www.citsmart.com.br) * --> | ||
7 | -<!-- * * --> | ||
8 | -<!-- * O Citsmart é um software livre; você pode redistribui-lo e/ou modificá-lo dentro dos termos da Licença * --> | ||
9 | -<!-- * Pública Geral GNU como publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. * --> | ||
10 | -<!-- * * --> | ||
11 | -<!-- * Este programa/software é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma * --> | ||
12 | -<!-- * garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral * --> | ||
13 | -<!-- * GNU/GPL em português para maiores detalhes. * --> | ||
14 | -<!-- * * --> | ||
15 | -<!-- * Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título 'LICENCA.txt', junto com este * --> | ||
16 | -<!-- * programa/software, se não, acesse o Portal do Software Público Brasileiro no endereço www.softwarepublico.gov.br * --> | ||
17 | -<!-- * ou escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,USA * --> | ||
18 | -<!-- ******************************************************************************************************************** --> | ||
19 | -<project | ||
20 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
21 | - xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
22 | - <modelVersion>4.0.0</modelVersion> | ||
23 | - | ||
24 | - <parent> | ||
25 | - <groupId>br.com.centralit</groupId> | ||
26 | - <artifactId>cit-alcada</artifactId> | ||
27 | - <version>1.8.0-SNAPSHOT</version> | ||
28 | - </parent> | ||
29 | - | ||
30 | - <artifactId>cit-alcada-web</artifactId> | ||
31 | - <packaging>war</packaging> | ||
32 | - <name>cit-alcada-web</name> | ||
33 | - | ||
34 | - <properties> | ||
35 | - <findbugs.config.path>${project.parent.parent.parent.basedir}/filterfile.xml</findbugs.config.path> | ||
36 | - <license.config.path>${project.parent.parent.basedir}/src/licensing</license.config.path> | ||
37 | - <maven-antrun-plugin.phase>package</maven-antrun-plugin.phase> | ||
38 | - <minify-maven-plugin.phase>prepare-package</minify-maven-plugin.phase> | ||
39 | - </properties> | ||
40 | - | ||
41 | - <dependencies> | ||
42 | - <dependency> | ||
43 | - <groupId>br.com.centralit</groupId> | ||
44 | - <artifactId>cit-alcada-api</artifactId> | ||
45 | - <version>${project.version}</version> | ||
46 | - </dependency> | ||
47 | - </dependencies> | ||
48 | - | ||
49 | -</project> |
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/CentroResultadoAlcadaResponsavelController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/CentroResultadoController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/CentroResultadoDelegacaoController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/CentroResultadoResponsavelAlcadaController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/CentroResultadoResponsavelController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/CentroResultadoSubstituicaoController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/InicializarAlcadaController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/LimiteAprovacaoController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/SolicitacaoAlcadaController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/UsuarioAlcadaController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/ViewCentroResultadoResponsavelController.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/controller/package-info.class
No preview for this file type
cit-alcada-web/bin/src/main/java/br/com/centralit/listener/StartupListenerAlcada.class
No preview for this file type
cit-alcada-web/bin/src/main/resources/.gitignore
@@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
1 | -/*.tag |
cit-alcada-web/bin/src/main/resources/log4j.properties
@@ -1,21 +0,0 @@ | @@ -1,21 +0,0 @@ | ||
1 | -# Root logger option | ||
2 | -log4j.rootLogger=INFO, file, stdout | ||
3 | - | ||
4 | -# Direct log messages to a log file | ||
5 | -log4j.appender.file=org.apache.log4j.RollingFileAppender | ||
6 | -log4j.appender.file.File=${project.build.directory}/log/${project.name}.log | ||
7 | -log4j.appender.file.MaxFileSize=5MB | ||
8 | -log4j.appender.file.MaxBackupIndex=10 | ||
9 | -log4j.appender.file.layout=org.apache.log4j.PatternLayout | ||
10 | -log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n | ||
11 | - | ||
12 | -# Direct log messages to stdout | ||
13 | -log4j.appender.stdout=org.apache.log4j.ConsoleAppender | ||
14 | -log4j.appender.stdout.Target=System.out | ||
15 | -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | ||
16 | -log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n | ||
17 | - | ||
18 | -#Frameworks to logging | ||
19 | -log4j.logger.org.springframework=DEBUG | ||
20 | -log4j.logger.org.hibernate=INFO | ||
21 | -log4j.logger.org.hibernate.type=trace | ||
22 | \ No newline at end of file | 0 | \ No newline at end of file |
cit-alcada-web/bin/src/main/resources/scripts-db/vw_centroresultadoresponsavel_sqlserver.sql
@@ -1,103 +0,0 @@ | @@ -1,103 +0,0 @@ | ||
1 | - | ||
2 | -/* Nova versão da View, inclusão da coluna virtual delegacao com os valores "S/N". Tratar concatenação | ||
3 | -IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[vw_centroresultadoresponsavel]')) | ||
4 | - EXEC sp_executesql concat(N'CREATE VIEW [dbo].[vw_centroresultadoresponsavel] | ||
5 | - AS | ||
6 | - SELECT dbo.Alcada.identificador AS alcada, dbo.CentroResultado.codigoSistemaOrigem AS centro_resultado, dbo.seguranca_usuario.username AS usuario, | ||
7 | - dbo.CentroResultadoResponsavel.dataCriacao AS data_inicio, dbo.CentroResultadoResponsavel.dataInativo AS data_inativo, | ||
8 | - dbo.NivelAutoridade.nome AS nivel_autoridade, ', N'N', N' as delegacao | ||
9 | - FROM dbo.CentroResultadoResponsavel INNER JOIN | ||
10 | - dbo.CentroResultado ON dbo.CentroResultado.id = dbo.CentroResultadoResponsavel.centroResultado_id INNER JOIN | ||
11 | - dbo.CentroResultadoResponsavelAlcada ON | ||
12 | - dbo.CentroResultadoResponsavelAlcada.centroResultadoResponsavel_id = dbo.CentroResultadoResponsavel.id INNER JOIN | ||
13 | - dbo.Alcada ON dbo.Alcada.id = dbo.CentroResultadoResponsavelAlcada.alcada_id INNER JOIN | ||
14 | - dbo.Parceiro ON dbo.Parceiro.id = dbo.CentroResultadoResponsavel.responsavel_id INNER JOIN | ||
15 | - dbo.Pessoa ON dbo.Pessoa.id = dbo.Parceiro.pessoa_id INNER JOIN | ||
16 | - dbo.seguranca_usuario ON dbo.seguranca_usuario.id = dbo.Pessoa.usuario_id INNER JOIN | ||
17 | - dbo.AlcadaNivelAutoridade ON dbo.AlcadaNivelAutoridade.alcada_id = dbo.Alcada.id INNER JOIN | ||
18 | - dbo.NivelAutoridade ON dbo.NivelAutoridade.id = dbo.AlcadaNivelAutoridade.nivelAutoridade_id | ||
19 | - WHERE dbo.NivelAutoridade.hierarquia = | ||
20 | - (SELECT MIN(t1.hierarquia) | ||
21 | - FROM dbo.NivelAutoridade t1 INNER JOIN | ||
22 | - dbo.AlcadaNivelAutoridade t2 ON t2.nivelautoridade_id = t1.id AND t2.alcada_id = Alcada.id INNER JOIN | ||
23 | - dbo.NivelAutoridadeGrupo t3 ON t3.nivelAutoridade_id = t1.id INNER JOIN | ||
24 | - dbo.GrupoUsuario t4 ON t4.usuario_id = seguranca_usuario.id AND t4.grupo_id = t3.grupo_id | ||
25 | - where t2.datainativo is null and t3.datainativo is null and t4.datainativo is null) | ||
26 | - and AlcadaNivelAutoridade.dataInativo is null | ||
27 | - UNION ALL | ||
28 | - SELECT dbo.Alcada.identificador AS alcada, dbo.CentroResultado.codigoSistemaOrigem AS centro_resultado, dbo.seguranca_usuario.username AS usuario, | ||
29 | - dbo.centroresultadodelegacao.datainiciodelegacao AS data_inicio, coalesce(centroresultadodelegacao.datarevogacao,centroresultadodelegacao.datafimdelegacao) AS data_inativo, | ||
30 | - dbo.NivelAutoridade.nome AS nivel_autoridade, ', N'S', N' as delegacao | ||
31 | - FROM dbo.centroresultadodelegacao INNER JOIN | ||
32 | - dbo.CentroResultadoResponsavelAlcada ON | ||
33 | - dbo.centroresultadodelegacao.centroResultadoResponsavelAlcada_id = CentroResultadoResponsavelAlcada.id INNER JOIN | ||
34 | - dbo.CentroResultadoResponsavel ON dbo.CentroResultadoResponsavel.id = dbo.CentroResultadoResponsavelAlcada.centroresultadoresponsavel_id INNER JOIN | ||
35 | - dbo.CentroResultado ON dbo.CentroResultado.id = dbo.CentroResultadoResponsavel.centroResultado_id INNER JOIN | ||
36 | - dbo.Alcada ON dbo.Alcada.id = dbo.CentroResultadoResponsavelAlcada.alcada_id INNER JOIN | ||
37 | - dbo.Parceiro ON dbo.Parceiro.id = dbo.centroresultadodelegacao.delegado_id INNER JOIN | ||
38 | - dbo.Pessoa ON dbo.Pessoa.id = dbo.Parceiro.pessoa_id INNER JOIN | ||
39 | - dbo.seguranca_usuario ON dbo.seguranca_usuario.id = dbo.Pessoa.usuario_id INNER JOIN | ||
40 | - dbo.AlcadaNivelAutoridade ON dbo.AlcadaNivelAutoridade.alcada_id = dbo.Alcada.id INNER JOIN | ||
41 | - dbo.NivelAutoridade ON dbo.NivelAutoridade.id = dbo.AlcadaNivelAutoridade.nivelAutoridade_id INNER JOIN | ||
42 | - dbo.Parceiro parc ON parc.id = dbo.centroresultadoresponsavel.responsavel_id INNER JOIN | ||
43 | - dbo.Pessoa pes ON pes.id = parc.pessoa_id | ||
44 | - WHERE dbo.NivelAutoridade.hierarquia = | ||
45 | - (SELECT MIN(t1.hierarquia) | ||
46 | - FROM dbo.NivelAutoridade t1 INNER JOIN | ||
47 | - dbo.AlcadaNivelAutoridade t2 ON t2.nivelautoridade_id = t1.id AND t2.alcada_id = Alcada.id INNER JOIN | ||
48 | - dbo.NivelAutoridadeGrupo t3 ON t3.nivelAutoridade_id = t1.id INNER JOIN | ||
49 | - dbo.GrupoUsuario t4 ON t4.usuario_id = pes.usuario_id AND t4.grupo_id = t3.grupo_id | ||
50 | - where t2.datainativo is null and t3.datainativo is null and t4.datainativo is null) | ||
51 | - and AlcadaNivelAutoridade.dataInativo is null') | ||
52 | -GO | ||
53 | -*/ | ||
54 | - | ||
55 | -ALTER VIEW [dbo].[vw_centroresultadoresponsavel] | ||
56 | -AS | ||
57 | -SELECT dbo.Alcada.identificador AS alcada, dbo.CentroResultado.codigoSistemaOrigem AS centro_resultado, dbo.seguranca_usuario.username AS usuario, | ||
58 | - dbo.CentroResultadoResponsavel.dataCriacao AS data_inicio, dbo.CentroResultadoResponsavel.dataInativo AS data_inativo, | ||
59 | - dbo.NivelAutoridade.nome AS nivel_autoridade, 'N' as delegacao | ||
60 | -FROM dbo.CentroResultadoResponsavel INNER JOIN | ||
61 | - dbo.CentroResultado ON dbo.CentroResultado.id = dbo.CentroResultadoResponsavel.centroResultado_id INNER JOIN | ||
62 | - dbo.CentroResultadoResponsavelAlcada ON | ||
63 | - dbo.CentroResultadoResponsavelAlcada.centroResultadoResponsavel_id = dbo.CentroResultadoResponsavel.id INNER JOIN | ||
64 | - dbo.Alcada ON dbo.Alcada.id = dbo.CentroResultadoResponsavelAlcada.alcada_id INNER JOIN | ||
65 | - dbo.Parceiro ON dbo.Parceiro.id = dbo.CentroResultadoResponsavel.responsavel_id INNER JOIN | ||
66 | - dbo.Pessoa ON dbo.Pessoa.id = dbo.Parceiro.pessoa_id INNER JOIN | ||
67 | - dbo.seguranca_usuario ON dbo.seguranca_usuario.id = dbo.Pessoa.usuario_id INNER JOIN | ||
68 | - dbo.AlcadaNivelAutoridade ON dbo.AlcadaNivelAutoridade.alcada_id = dbo.Alcada.id INNER JOIN | ||
69 | - dbo.NivelAutoridade ON dbo.NivelAutoridade.id = dbo.AlcadaNivelAutoridade.nivelAutoridade_id | ||
70 | -WHERE dbo.NivelAutoridade.hierarquia = | ||
71 | - (SELECT MIN(t1.hierarquia) | ||
72 | - FROM dbo.NivelAutoridade t1 INNER JOIN | ||
73 | - dbo.AlcadaNivelAutoridade t2 ON t2.nivelautoridade_id = t1.id AND t2.alcada_id = Alcada.id INNER JOIN | ||
74 | - dbo.NivelAutoridadeGrupo t3 ON t3.nivelAutoridade_id = t1.id INNER JOIN | ||
75 | - dbo.GrupoUsuario t4 ON t4.usuario_id = seguranca_usuario.id AND t4.grupo_id = t3.grupo_id | ||
76 | -where t2.datainativo is null and t3.datainativo is null and t4.datainativo is null) | ||
77 | -and AlcadaNivelAutoridade.dataInativo is null | ||
78 | -UNION ALL | ||
79 | -SELECT dbo.Alcada.identificador AS alcada, dbo.CentroResultado.codigoSistemaOrigem AS centro_resultado, dbo.seguranca_usuario.username AS usuario, | ||
80 | - dbo.centroresultadodelegacao.datainiciodelegacao AS data_inicio, coalesce(centroresultadodelegacao.datarevogacao,centroresultadodelegacao.datafimdelegacao) AS data_inativo, | ||
81 | - dbo.NivelAutoridade.nome AS nivel_autoridade, 'S' as delegacao | ||
82 | -FROM dbo.centroresultadodelegacao INNER JOIN | ||
83 | - dbo.CentroResultadoResponsavelAlcada ON | ||
84 | - dbo.centroresultadodelegacao.centroResultadoResponsavelAlcada_id = CentroResultadoResponsavelAlcada.id INNER JOIN | ||
85 | - dbo.CentroResultadoResponsavel ON dbo.CentroResultadoResponsavel.id = dbo.CentroResultadoResponsavelAlcada.centroresultadoresponsavel_id INNER JOIN | ||
86 | - dbo.CentroResultado ON dbo.CentroResultado.id = dbo.CentroResultadoResponsavel.centroResultado_id INNER JOIN | ||
87 | - dbo.Alcada ON dbo.Alcada.id = dbo.CentroResultadoResponsavelAlcada.alcada_id INNER JOIN | ||
88 | - dbo.Parceiro ON dbo.Parceiro.id = dbo.centroresultadodelegacao.delegado_id INNER JOIN | ||
89 | - dbo.Pessoa ON dbo.Pessoa.id = dbo.Parceiro.pessoa_id INNER JOIN | ||
90 | - dbo.seguranca_usuario ON dbo.seguranca_usuario.id = dbo.Pessoa.usuario_id INNER JOIN | ||
91 | - dbo.AlcadaNivelAutoridade ON dbo.AlcadaNivelAutoridade.alcada_id = dbo.Alcada.id INNER JOIN | ||
92 | - dbo.NivelAutoridade ON dbo.NivelAutoridade.id = dbo.AlcadaNivelAutoridade.nivelAutoridade_id INNER JOIN | ||
93 | - dbo.Parceiro parc ON parc.id = dbo.centroresultadoresponsavel.responsavel_id INNER JOIN | ||
94 | - dbo.Pessoa pes ON pes.id = parc.pessoa_id | ||
95 | -WHERE dbo.NivelAutoridade.hierarquia = | ||
96 | - (SELECT MIN(t1.hierarquia) | ||
97 | - FROM dbo.NivelAutoridade t1 INNER JOIN | ||
98 | - dbo.AlcadaNivelAutoridade t2 ON t2.nivelautoridade_id = t1.id AND t2.alcada_id = Alcada.id INNER JOIN | ||
99 | - dbo.NivelAutoridadeGrupo t3 ON t3.nivelAutoridade_id = t1.id INNER JOIN | ||
100 | - dbo.GrupoUsuario t4 ON t4.usuario_id = pes.usuario_id AND t4.grupo_id = t3.grupo_id | ||
101 | -where t2.datainativo is null and t3.datainativo is null and t4.datainativo is null) | ||
102 | -and AlcadaNivelAutoridade.dataInativo is null | ||
103 | -GO | ||
104 | \ No newline at end of file | 0 | \ No newline at end of file |
cit-alcada-web/bin/src/main/resources/spring/applicationContext.xml
@@ -1,36 +0,0 @@ | @@ -1,36 +0,0 @@ | ||
1 | -<beans xmlns="http://www.springframework.org/schema/beans" | ||
2 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | - xmlns:context="http://www.springframework.org/schema/context" | ||
4 | - xmlns:util="http://www.springframework.org/schema/util" | ||
5 | - xmlns:p="http://www.springframework.org/schema/p" | ||
6 | - xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
7 | - http://www.springframework.org/schema/beans/spring-beans-3.1.xsd | ||
8 | - http://www.springframework.org/schema/context | ||
9 | - http://www.springframework.org/schema/context/spring-context-3.1.xsd | ||
10 | - http://www.springframework.org/schema/util | ||
11 | - http://www.springframework.org/schema/util/spring-util-3.1.xsd"> | ||
12 | - | ||
13 | - <bean id="citPortalDataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> | ||
14 | - <property name="jndiName" value="java:/env/jdbc/cit-alcada" /> | ||
15 | - </bean> | ||
16 | - | ||
17 | - <bean id="entityManagerFactory" | ||
18 | - class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" | ||
19 | - p:packagesToScan="br.com.centralit.framework.model, br.com.centralit.api.model" p:dataSource-ref="citPortalDataSource" | ||
20 | - p:jpaPropertyMap-ref="jpaPropertyMap" p:jpaVendorAdapter-ref="jpaVendorAdapter" /> | ||
21 | - | ||
22 | - <bean id="jpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" /> | ||
23 | - | ||
24 | - <util:map id="jpaPropertyMap"> | ||
25 | - <entry key="generateDdl" value="${hibernate.generate.ddl}" /> | ||
26 | - <entry key="hibernate.hbm2ddl.auto" value="${hibernate.hbm2ddl.auto}" /> | ||
27 | - <entry key="hibernate.dialect" value="${hibernate.dialect}" /> | ||
28 | - <entry key="hibernate.show.sql" value="${hibernate.show.sql}" /> | ||
29 | - <entry key="hibernate.format_sql" value="${hibernate.format.sql}" /> | ||
30 | - <entry key="hibernate.jdbc.use_streams_for_binary" value="true" /> | ||
31 | - </util:map> | ||
32 | - | ||
33 | - <import resource="webmvc-context.xml" /> | ||
34 | - <import resource="classpath*:spring/applicationContext-base.xml" /> | ||
35 | - <import resource="${authentication.method}" /> | ||
36 | -</beans> | ||
37 | \ No newline at end of file | 0 | \ No newline at end of file |
cit-alcada-web/bin/src/main/resources/spring/spring-security-cas.xml
@@ -1,77 +0,0 @@ | @@ -1,77 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<beans xmlns="http://www.springframework.org/schema/beans" | ||
3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | - xmlns:p="http://www.springframework.org/schema/p" | ||
5 | - xmlns:security="http://www.springframework.org/schema/security" | ||
6 | - xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
7 | - http://www.springframework.org/schema/beans/spring-beans.xsd | ||
8 | - http://www.springframework.org/schema/security | ||
9 | - http://www.springframework.org/schema/security/spring-security-3.2.xsd"> | ||
10 | - | ||
11 | - <security:http auto-config="true" use-expressions="true" entry-point-ref="casProcessingFilterEntryPoint" access-denied-page="/denied.jsp"> | ||
12 | - <security:intercept-url pattern="/loginCas" access="permitAll" /> | ||
13 | - <security:intercept-url pattern="/rest/solicitacaoAlcada/**" access="permitAll" /> | ||
14 | - <security:intercept-url pattern="/rest/inicializarCarga/**" access="permitAll" /> | ||
15 | - <security:intercept-url pattern="/**" access="isFullyAuthenticated()" requires-channel="https"/> | ||
16 | - <security:logout logout-success-url="/cas-logout.jsp"/> | ||
17 | - <security:custom-filter ref="casAuthenticationFilter" after="CAS_FILTER"/> | ||
18 | - | ||
19 | - <security:session-management session-fixation-protection="newSession"> | ||
20 | - <security:concurrency-control max-sessions="1"/> | ||
21 | - </security:session-management> | ||
22 | - </security:http> | ||
23 | - | ||
24 | - <security:authentication-manager alias="authenticationManager"> | ||
25 | - <security:authentication-provider ref="casAuthenticationProvider"/> | ||
26 | - </security:authentication-manager> | ||
27 | - | ||
28 | - <bean id="casAuthenticationFilter" | ||
29 | - class="org.springframework.security.cas.web.CasAuthenticationFilter"> | ||
30 | - <property name="authenticationManager" ref="authenticationManager"/> | ||
31 | - <property name="authenticationFailureHandler"> | ||
32 | - <bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler"> | ||
33 | - <property name="defaultFailureUrl" value="/authfailed.jsp"/> | ||
34 | - </bean> | ||
35 | - </property> | ||
36 | - <property name="authenticationSuccessHandler"> | ||
37 | - <bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler"> | ||
38 | - <property name="defaultTargetUrl" value="/"/> | ||
39 | - </bean> | ||
40 | - </property> | ||
41 | - <property name="proxyGrantingTicketStorage" ref="proxyGrantingTicketStorage"/> | ||
42 | - <property name="proxyReceptorUrl" value="/secure/receptor"/> | ||
43 | - </bean> | ||
44 | - | ||
45 | - <bean id="casProcessingFilterEntryPoint" class="org.springframework.security.cas.web.CasAuthenticationEntryPoint"> | ||
46 | - <property name="loginUrl" value="${authentication.url}/cas/login"/> | ||
47 | - <property name="serviceProperties" ref="serviceProperties"/> | ||
48 | - </bean> | ||
49 | - | ||
50 | - <bean id="casAuthenticationProvider" | ||
51 | - class="org.springframework.security.cas.authentication.CasAuthenticationProvider" | ||
52 | - p:key="central@123" | ||
53 | - p:serviceProperties-ref="serviceProperties" | ||
54 | - p:authenticationUserDetailsService-ref="userDetailsService"> | ||
55 | - <property name="ticketValidator"> | ||
56 | - <bean class="org.jasig.cas.client.validation.Saml11TicketValidator"> | ||
57 | - <constructor-arg index="0" value="${authentication.url}/cas"/> | ||
58 | - </bean> | ||
59 | - </property> | ||
60 | - </bean> | ||
61 | - | ||
62 | - <bean id="proxyGrantingTicketStorage" class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl"/> | ||
63 | - | ||
64 | - <bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties"> | ||
65 | - <property name="service" value="${authentication.url}/cit-alcada-web/j_spring_cas_security_check"/> | ||
66 | - <property name="sendRenew" value="false"/> | ||
67 | - </bean> | ||
68 | - | ||
69 | - <bean id="userDetailsService" class="br.com.centralit.api.security.GrantedAuthorityFromAssertionAttributesUserDetailsService"> | ||
70 | - <constructor-arg> | ||
71 | - <list> | ||
72 | - <value>authorities</value> | ||
73 | - </list> | ||
74 | - </constructor-arg> | ||
75 | - </bean> | ||
76 | - | ||
77 | -</beans> |
cit-alcada-web/bin/src/main/resources/spring/spring-security-db.xml
@@ -1,30 +0,0 @@ | @@ -1,30 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<beans xmlns="http://www.springframework.org/schema/beans" | ||
3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | - xmlns:p="http://www.springframework.org/schema/p" | ||
5 | - xmlns:security="http://www.springframework.org/schema/security" | ||
6 | - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | ||
7 | - http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd"> | ||
8 | - | ||
9 | - <security:global-method-security secured-annotations="enabled" /> | ||
10 | - | ||
11 | - <security:http auto-config="true" use-expressions="true" access-denied-page="/login?error=403"> | ||
12 | - <security:intercept-url pattern="/rest/esi/**" access="permitAll" /> | ||
13 | - <security:intercept-url pattern="/login" access="permitAll" /> | ||
14 | - <security:intercept-url pattern="/j_spring_security_check" access="permitAll" /> | ||
15 | - <security:intercept-url pattern="/assets/**" access="permitAll" /> | ||
16 | - <security:intercept-url pattern="/**" access="hasRole('ROLE_USER')" /> | ||
17 | - | ||
18 | - <security:form-login login-page="/login" authentication-failure-url="/login?error=403" default-target-url="/index" /> | ||
19 | - | ||
20 | - <security:logout invalidate-session="true" logout-success-url="/login" logout-url="/logout" /> | ||
21 | - | ||
22 | - <security:remember-me key="CentralITSolutions" remember-me-parameter="j_remenberme" /> | ||
23 | - </security:http> | ||
24 | - | ||
25 | - <bean id="customAuthenticationProvider" class="br.com.centralit.api.security.CustomAuthenticationProvider" /> | ||
26 | - | ||
27 | - <security:authentication-manager> | ||
28 | - <security:authentication-provider ref="customAuthenticationProvider" /> | ||
29 | - </security:authentication-manager> | ||
30 | -</beans> | ||
31 | \ No newline at end of file | 0 | \ No newline at end of file |
cit-alcada-web/bin/src/main/resources/spring/spring-security-openam.xml
@@ -1,351 +0,0 @@ | @@ -1,351 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | -<beans xmlns="http://www.springframework.org/schema/beans" | ||
3 | - xmlns:security="http://www.springframework.org/schema/security" | ||
4 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
5 | - xmlns:context="http://www.springframework.org/schema/context" | ||
6 | - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd | ||
7 | - http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> | ||
8 | - | ||
9 | - <!-- Enable auto-wiring --> | ||
10 | - <context:annotation-config/> | ||
11 | - | ||
12 | - <!-- Scan for auto-wiring classes in spring saml packages --> | ||
13 | - <context:component-scan base-package="org.springframework.security.saml"/> | ||
14 | - | ||
15 | - <bean id="filterSecurityInterceptor" class="org.springframework.security.web.access.intercept.FilterSecurityInterceptor"> | ||
16 | - <property name="authenticationManager" ref="authenticationManager"></property> | ||
17 | - <property name="accessDecisionManager" ref="affirmativeBased"></property> | ||
18 | - <property name="securityMetadataSource" ref="optionsFromDataBaseFilterInvocationSecurityMetadataSource"></property> | ||
19 | - <property name="validateConfigAttributes" value="true"/> | ||
20 | - </bean> | ||
21 | - | ||
22 | - <bean id="optionsFromDataBaseFilterInvocationSecurityMetadataSource" class="br.com.centralit.api.security.MyFilterSecurityMetadataSource" /> | ||
23 | - | ||
24 | - <bean id="roleVoter" class="org.springframework.security.access.vote.RoleVoter" /> | ||
25 | - | ||
26 | - <bean id="affirmativeBased" class='org.springframework.security.access.vote.AffirmativeBased'> | ||
27 | - <property name="decisionVoters"> | ||
28 | - <list> | ||
29 | - <ref bean="roleVoter"/> | ||
30 | - </list> | ||
31 | - </property> | ||
32 | - </bean> | ||
33 | - | ||
34 | - <!-- Unsecured pages --> | ||
35 | - <security:http security="none" pattern="/favicon.ico"/> | ||
36 | - <security:http security="none" pattern="/images/**"/> | ||
37 | - <security:http security="none" pattern="/css/**"/> | ||
38 | - <security:http security="none" pattern="/logout.jsp"/> | ||
39 | - <security:http security="none" pattern="/accessDeniedPage.htm"/> | ||
40 | - | ||
41 | - <security:global-method-security secured-annotations="enabled" /> | ||
42 | - | ||
43 | - <!-- Security for the administration UI --> | ||
44 | - <security:http pattern="/saml/web/**" access-denied-page="/accessDeniedPage.htm"> | ||
45 | - <security:form-login login-processing-url="/saml/web/login" login-page="/saml/web/metadata/login" default-target-url="/saml/web/metadata"/> | ||
46 | - <security:intercept-url pattern="/saml/web/metadata/login" access="IS_AUTHENTICATED_ANONYMOUSLY"/> | ||
47 | - <security:intercept-url pattern="/saml/web/**" access="ROLE_ADMIN"/> | ||
48 | - <security:custom-filter before="FIRST" ref="metadataGeneratorFilter"/> | ||
49 | - </security:http> | ||
50 | - | ||
51 | - <!-- Secured pages with SAML as entry point --> | ||
52 | - <security:http entry-point-ref="samlEntryPoint" auto-config="true" access-denied-page="/accessDeniedPage.htm"> | ||
53 | - <security:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY"/> | ||
54 | - <security:custom-filter before="FIRST" ref="metadataGeneratorFilter"/> | ||
55 | - <security:custom-filter after="BASIC_AUTH_FILTER" ref="samlFilter"/> | ||
56 | - </security:http> | ||
57 | - | ||
58 | - <!-- Filters for processing of SAML messages --> | ||
59 | - <bean id="samlFilter" class="org.springframework.security.web.FilterChainProxy"> | ||
60 | - <security:filter-chain-map request-matcher="ant"> | ||
61 | - <security:filter-chain pattern="/saml/login/**" filters="samlEntryPoint"/> | ||
62 | - <security:filter-chain pattern="/saml/logout/**" filters="samlLogoutFilter"/> | ||
63 | - <security:filter-chain pattern="/saml/metadata/**" filters="metadataDisplayFilter"/> | ||
64 | - <security:filter-chain pattern="/saml/SSO/**" filters="samlWebSSOProcessingFilter"/> | ||
65 | - <security:filter-chain pattern="/saml/SSOHoK/**" filters="samlWebSSOHoKProcessingFilter"/> | ||
66 | - <security:filter-chain pattern="/saml/SingleLogout/**" filters="samlLogoutProcessingFilter"/> | ||
67 | - <security:filter-chain pattern="/saml/discovery/**" filters="samlIDPDiscovery"/> | ||
68 | - <security:filter-chain pattern="/html/**" filters="filterSecurityInterceptor"/> | ||
69 | - </security:filter-chain-map> | ||
70 | - </bean> | ||
71 | - | ||
72 | - <!-- Handler deciding where to redirect user after successful login --> | ||
73 | - <bean id="successRedirectHandler" class="org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler"> | ||
74 | - <property name="defaultTargetUrl" value="/"/> | ||
75 | - </bean> | ||
76 | - <!-- | ||
77 | - Use the following for interpreting RelayState coming from unsolicited response as redirect URL: | ||
78 | - <bean id="successRedirectHandler" class="org.springframework.security.saml.SAMLRelayStateSuccessHandler"> | ||
79 | - <property name="defaultTargetUrl" value="/" /> | ||
80 | - </bean> | ||
81 | - --> | ||
82 | - | ||
83 | - <!-- Handler deciding where to redirect user after failed login --> | ||
84 | - <bean id="failureRedirectHandler" | ||
85 | - class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler"> | ||
86 | - <property name="useForward" value="true"/> | ||
87 | - <property name="defaultFailureUrl" value="/error.jsp"/> | ||
88 | - </bean> | ||
89 | - | ||
90 | - <!-- Handler for successful logout --> | ||
91 | - <bean id="successLogoutHandler" class="org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler"> | ||
92 | - <property name="defaultTargetUrl" value="/logout.jsp"/> | ||
93 | - </bean> | ||
94 | - | ||
95 | - <security:authentication-manager alias="authenticationManager"> | ||
96 | - <!-- Register authentication manager for SAML provider --> | ||
97 | - <security:authentication-provider ref="samlAuthenticationProvider"/> | ||
98 | - <!-- Register authentication manager for administration UI --> | ||
99 | - <security:authentication-provider> | ||
100 | - <security:user-service id="adminInterfaceService"> | ||
101 | - <security:user name="admin" password="admin" authorities="ROLE_ADMIN"/> | ||
102 | - </security:user-service> | ||
103 | - </security:authentication-provider> | ||
104 | - </security:authentication-manager> | ||
105 | - | ||
106 | - <!-- Logger for SAML messages and events --> | ||
107 | - <bean id="samlLogger" class="org.springframework.security.saml.log.SAMLDefaultLogger"/> | ||
108 | - | ||
109 | - <!-- Central storage of cryptographic keys --> | ||
110 | - <bean id="keyManager" class="org.springframework.security.saml.key.JKSKeyManager"> | ||
111 | - <constructor-arg value="classpath:security/samlKeystore.jks"/> | ||
112 | - <constructor-arg type="java.lang.String" value="nalle123"/> | ||
113 | - <constructor-arg> | ||
114 | - <map> | ||
115 | - <entry key="apollo" value="nalle123"/> | ||
116 | - </map> | ||
117 | - </constructor-arg> | ||
118 | - <constructor-arg type="java.lang.String" value="apollo"/> | ||
119 | - </bean> | ||
120 | - | ||
121 | - <!-- Entry point to initialize authentication, default values taken from properties file --> | ||
122 | - <bean id="samlEntryPoint" class="org.springframework.security.saml.SAMLEntryPoint"> | ||
123 | - <property name="defaultProfileOptions"> | ||
124 | - <bean class="org.springframework.security.saml.websso.WebSSOProfileOptions"> | ||
125 | - <property name="binding" value="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/> | ||
126 | - <property name="includeScoping" value="true"/> | ||
127 | - </bean> | ||
128 | - </property> | ||
129 | - </bean> | ||
130 | - | ||
131 | - <!-- IDP Discovery Service --> | ||
132 | - <bean id="samlIDPDiscovery" class="org.springframework.security.saml.SAMLDiscovery"> | ||
133 | - <property name="idpSelectionPath" value="/WEB-INF/security/idpSelection.jsp"/> | ||
134 | - </bean> | ||
135 | - | ||
136 | - <!-- Filter automatically generates default SP metadata --> | ||
137 | - <bean id="metadataGeneratorFilter" class="org.springframework.security.saml.metadata.MetadataGeneratorFilter"> | ||
138 | - <constructor-arg> | ||
139 | - <bean class="org.springframework.security.saml.metadata.MetadataGenerator"> | ||
140 | - <property name="entityId" value="patrimonio.com"/> | ||
141 | - </bean> | ||
142 | - </constructor-arg> | ||
143 | - </bean> | ||
144 | - | ||
145 | - <!-- bean id="metadataGeneratorFilter" class="org.springframework.security.saml.metadata.MetadataGeneratorFilter"> | ||
146 | - <constructor-arg> | ||
147 | - <bean class="org.springframework.security.saml.metadata.MetadataGenerator"> | ||
148 | - <property name="extendedMetadata"> | ||
149 | - <bean class="org.springframework.security.saml.metadata.ExtendedMetadata"> | ||
150 | - <property name="entityId" value="teste"/> | ||
151 | - <property name="idpDiscoveryEnabled" value="true"/> | ||
152 | - </bean> | ||
153 | - </property> | ||
154 | - </bean> | ||
155 | - </constructor-arg> | ||
156 | - </bean --> | ||
157 | - | ||
158 | - <!-- The filter is waiting for connections on URL suffixed with filterSuffix and presents SP metadata there --> | ||
159 | - <bean id="metadataDisplayFilter" class="org.springframework.security.saml.metadata.MetadataDisplayFilter"/> | ||
160 | - | ||
161 | - <!-- IDP Metadata configuration - paths to metadata of IDPs in circle of trust is here --> | ||
162 | - <bean id="metadata" class="org.springframework.security.saml.metadata.CachingMetadataManager"> | ||
163 | - <constructor-arg> | ||
164 | - <list> | ||
165 | - <!-- Example of classpath metadata with Extended Metadata --> | ||
166 | - <bean class="org.springframework.security.saml.metadata.ExtendedMetadataDelegate"> | ||
167 | - <constructor-arg> | ||
168 | - <bean class="org.opensaml.saml2.metadata.provider.ResourceBackedMetadataProvider"> | ||
169 | - <constructor-arg> | ||
170 | - <bean class="java.util.Timer"/> | ||
171 | - </constructor-arg> | ||
172 | - <constructor-arg> | ||
173 | - <bean class="org.opensaml.util.resource.ClasspathResource"> | ||
174 | - <constructor-arg value="/metadata/idp.xml"/> | ||
175 | - </bean> | ||
176 | - </constructor-arg> | ||
177 | - <property name="parserPool" ref="parserPool"/> | ||
178 | - </bean> | ||
179 | - </constructor-arg> | ||
180 | - <constructor-arg> | ||
181 | - <bean class="org.springframework.security.saml.metadata.ExtendedMetadata"> | ||
182 | - </bean> | ||
183 | - </constructor-arg> | ||
184 | - </bean> | ||
185 | - <!-- Example of HTTP metadata without Extended Metadata --> | ||
186 | - <bean class="org.opensaml.saml2.metadata.provider.HTTPMetadataProvider"> | ||
187 | - <!-- URL containing the metadata --> | ||
188 | - <constructor-arg> | ||
189 | - <value type="java.lang.String">http://iam.cit.local:8080/openam/saml2/jsp/exportmetadata.jsp?realm=grp</value> | ||
190 | - </constructor-arg> | ||
191 | - <!-- Timeout for metadata loading in ms --> | ||
192 | - <constructor-arg> | ||
193 | - <value type="int">15000</value> | ||
194 | - </constructor-arg> | ||
195 | - <property name="parserPool" ref="parserPool"/> | ||
196 | - </bean> | ||
197 | - <!-- Example of file system metadata without Extended Metadata --> | ||
198 | - <!-- | ||
199 | - <bean class="org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider"> | ||
200 | - <constructor-arg> | ||
201 | - <value type="java.io.File">/usr/local/metadata/idp.xml</value> | ||
202 | - </constructor-arg> | ||
203 | - <property name="parserPool" ref="parserPool"/> | ||
204 | - </bean> | ||
205 | - --> | ||
206 | - </list> | ||
207 | - </constructor-arg> | ||
208 | - <!-- OPTIONAL used when one of the metadata files contains information about this service provider --> | ||
209 | - <!-- <property name="hostedSPName" value=""/> --> | ||
210 | - <!-- OPTIONAL property: can tell the system which IDP should be used for authenticating user by default. --> | ||
211 | - <!-- <property name="defaultIDP" value="http://localhost:8080/opensso"/> --> | ||
212 | - </bean> | ||
213 | - | ||
214 | - <!-- SAML Authentication Provider responsible for validating of received SAML messages --> | ||
215 | - <bean id="samlAuthenticationProvider" class="org.springframework.security.saml.SAMLAuthenticationProvider"> | ||
216 | - <!-- OPTIONAL property: can be used to store/load user data after login --> | ||
217 | - <!-- | ||
218 | - <property name="userDetails" ref="bean" /> | ||
219 | - --> | ||
220 | - <property name="userDetails" ref="samlUserDetailsServiceBean" /> | ||
221 | - </bean> | ||
222 | - | ||
223 | - <bean id="samlUserDetailsServiceBean" class="br.com.centralit.api.security.SAMLUserDetailsServiceImpl" /> | ||
224 | - | ||
225 | - <!-- Provider of default SAML Context --> | ||
226 | - <bean id="contextProvider" class="org.springframework.security.saml.context.SAMLContextProviderImpl"/> | ||
227 | - | ||
228 | - <!-- Processing filter for WebSSO profile messages --> | ||
229 | - <bean id="samlWebSSOProcessingFilter" class="org.springframework.security.saml.SAMLProcessingFilter"> | ||
230 | - <property name="authenticationManager" ref="authenticationManager"/> | ||
231 | - <property name="authenticationSuccessHandler" ref="successRedirectHandler"/> | ||
232 | - <property name="authenticationFailureHandler" ref="failureRedirectHandler"/> | ||
233 | - </bean> | ||
234 | - | ||
235 | - <!-- Processing filter for WebSSO Holder-of-Key profile --> | ||
236 | - <bean id="samlWebSSOHoKProcessingFilter" class="org.springframework.security.saml.SAMLWebSSOHoKProcessingFilter"> | ||
237 | - <property name="authenticationManager" ref="authenticationManager"/> | ||
238 | - <property name="authenticationSuccessHandler" ref="successRedirectHandler"/> | ||
239 | - <property name="authenticationFailureHandler" ref="failureRedirectHandler"/> | ||
240 | - </bean> | ||
241 | - | ||
242 | - <!-- Logout handler terminating local session --> | ||
243 | - <bean id="logoutHandler" | ||
244 | - class="org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler"> | ||
245 | - <property name="invalidateHttpSession" value="false"/> | ||
246 | - </bean> | ||
247 | - | ||
248 | - <!-- Override default logout processing filter with the one processing SAML messages --> | ||
249 | - <bean id="samlLogoutFilter" class="org.springframework.security.saml.SAMLLogoutFilter"> | ||
250 | - <constructor-arg index="0" ref="successLogoutHandler"/> | ||
251 | - <constructor-arg index="1" ref="logoutHandler"/> | ||
252 | - <constructor-arg index="2" ref="logoutHandler"/> | ||
253 | - </bean> | ||
254 | - | ||
255 | - <!-- Filter processing incoming logout messages --> | ||
256 | - <!-- First argument determines URL user will be redirected to after successful global logout --> | ||
257 | - <bean id="samlLogoutProcessingFilter" class="org.springframework.security.saml.SAMLLogoutProcessingFilter"> | ||
258 | - <constructor-arg index="0" ref="successLogoutHandler"/> | ||
259 | - <constructor-arg index="1" ref="logoutHandler"/> | ||
260 | - </bean> | ||
261 | - | ||
262 | - <!-- Class loading incoming SAML messages from httpRequest stream --> | ||
263 | - <bean id="processor" class="org.springframework.security.saml.processor.SAMLProcessorImpl"> | ||
264 | - <constructor-arg> | ||
265 | - <list> | ||
266 | - <ref bean="redirectBinding"/> | ||
267 | - <ref bean="postBinding"/> | ||
268 | - <ref bean="artifactBinding"/> | ||
269 | - <ref bean="soapBinding"/> | ||
270 | - <ref bean="paosBinding"/> | ||
271 | - </list> | ||
272 | - </constructor-arg> | ||
273 | - </bean> | ||
274 | - | ||
275 | - <!-- SAML 2.0 WebSSO Assertion Consumer --> | ||
276 | - <bean id="webSSOprofileConsumer" class="org.springframework.security.saml.websso.WebSSOProfileConsumerImpl"> | ||
277 | - <property name="responseSkew" value="500"></property> | ||
278 | - </bean> | ||
279 | - | ||
280 | - <!-- SAML 2.0 Holder-of-Key WebSSO Assertion Consumer --> | ||
281 | - <bean id="hokWebSSOprofileConsumer" class="org.springframework.security.saml.websso.WebSSOProfileConsumerHoKImpl"/> | ||
282 | - | ||
283 | - <!-- SAML 2.0 Web SSO profile --> | ||
284 | - <bean id="webSSOprofile" class="org.springframework.security.saml.websso.WebSSOProfileImpl"/> | ||
285 | - | ||
286 | - <!-- SAML 2.0 Holder-of-Key Web SSO profile --> | ||
287 | - <bean id="hokWebSSOProfile" class="org.springframework.security.saml.websso.WebSSOProfileConsumerHoKImpl"/> | ||
288 | - | ||
289 | - <!-- SAML 2.0 ECP profile --> | ||
290 | - <bean id="ecpprofile" class="org.springframework.security.saml.websso.WebSSOProfileECPImpl"/> | ||
291 | - | ||
292 | - <!-- SAML 2.0 Logout Profile --> | ||
293 | - <bean id="logoutprofile" class="org.springframework.security.saml.websso.SingleLogoutProfileImpl"/> | ||
294 | - | ||
295 | - <!-- Bindings, encoders and decoders used for creating and parsing messages --> | ||
296 | - <bean id="postBinding" class="org.springframework.security.saml.processor.HTTPPostBinding"> | ||
297 | - <constructor-arg ref="parserPool"/> | ||
298 | - <constructor-arg ref="velocityEngine"/> | ||
299 | - </bean> | ||
300 | - | ||
301 | - <bean id="redirectBinding" class="org.springframework.security.saml.processor.HTTPRedirectDeflateBinding"> | ||
302 | - <constructor-arg ref="parserPool"/> | ||
303 | - </bean> | ||
304 | - | ||
305 | - <bean id="artifactBinding" class="org.springframework.security.saml.processor.HTTPArtifactBinding"> | ||
306 | - <constructor-arg ref="parserPool"/> | ||
307 | - <constructor-arg ref="velocityEngine"/> | ||
308 | - <constructor-arg> | ||
309 | - <bean class="org.springframework.security.saml.websso.ArtifactResolutionProfileImpl"> | ||
310 | - <constructor-arg> | ||
311 | - <bean class="org.apache.commons.httpclient.HttpClient"> | ||
312 | - <constructor-arg> | ||
313 | - <bean class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager"/> | ||
314 | - </constructor-arg> | ||
315 | - </bean> | ||
316 | - </constructor-arg> | ||
317 | - <property name="processor"> | ||
318 | - <bean class="org.springframework.security.saml.processor.SAMLProcessorImpl"> | ||
319 | - <constructor-arg ref="soapBinding"/> | ||
320 | - </bean> | ||
321 | - </property> | ||
322 | - </bean> | ||
323 | - </constructor-arg> | ||
324 | - </bean> | ||
325 | - | ||
326 | - <bean id="soapBinding" class="org.springframework.security.saml.processor.HTTPSOAP11Binding"> | ||
327 | - <constructor-arg ref="parserPool"/> | ||
328 | - </bean> | ||
329 | - | ||
330 | - <bean id="paosBinding" class="org.springframework.security.saml.processor.HTTPPAOS11Binding"> | ||
331 | - <constructor-arg ref="parserPool"/> | ||
332 | - </bean> | ||
333 | - | ||
334 | - <!-- Initialization of OpenSAML library--> | ||
335 | - <bean class="org.springframework.security.saml.SAMLBootstrap"/> | ||
336 | - | ||
337 | - <!-- Initialization of the velocity engine --> | ||
338 | - <bean id="velocityEngine" class="org.springframework.security.saml.util.VelocityFactory" factory-method="getEngine"/> | ||
339 | - | ||
340 | - <!-- XML parser pool needed for OpenSAML parsing --> | ||
341 | - <bean id="parserPool" class="org.opensaml.xml.parse.StaticBasicParserPool" init-method="initialize"> | ||
342 | - <property name="builderFeatures"> | ||
343 | - <map> | ||
344 | - <entry key="http://apache.org/xml/features/dom/defer-node-expansion" value="false"/> | ||
345 | - </map> | ||
346 | - </property> | ||
347 | - </bean> | ||
348 | - | ||
349 | - <bean id="parserPoolHolder" class="org.springframework.security.saml.parser.ParserPoolHolder"/> | ||
350 | - | ||
351 | -</beans> |
cit-alcada-web/bin/src/main/resources/spring/webmvc-context.xml
@@ -1,51 +0,0 @@ | @@ -1,51 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<beans xmlns="http://www.springframework.org/schema/beans" | ||
3 | - xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | - xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" | ||
5 | - xsi:schemaLocation=" | ||
6 | - http://www.springframework.org/schema/beans | ||
7 | - http://www.springframework.org/schema/beans/spring-beans-3.1.xsd | ||
8 | - http://www.springframework.org/schema/context | ||
9 | - http://www.springframework.org/schema/context/spring-context-3.1.xsd | ||
10 | - http://www.springframework.org/schema/mvc | ||
11 | - http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"> | ||
12 | - | ||
13 | - <mvc:annotation-driven> | ||
14 | - <mvc:message-converters register-defaults="true"> | ||
15 | - <bean id="jacksonMessageConverter" class="br.com.centralit.framework.json.CustomMappingJackson2"/> | ||
16 | - </mvc:message-converters> | ||
17 | - </mvc:annotation-driven> | ||
18 | - | ||
19 | - <mvc:default-servlet-handler /> | ||
20 | - | ||
21 | - <mvc:resources mapping="/resources/**" location="/resources/" /> | ||
22 | - <mvc:resources mapping="/assets/**" location="/assets/" /> | ||
23 | - | ||
24 | - <!-- i18n --> | ||
25 | - <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> | ||
26 | - <property name="basename" value="WEB-INF/i18n" /> | ||
27 | - <property name="defaultEncoding" value="UTF-8" /> | ||
28 | - <property name="useCodeAsDefaultMessage" value="true" /> | ||
29 | - </bean> | ||
30 | - | ||
31 | - <bean id="localeResolver" class="org.springframework.web.servlet.i18n.FixedLocaleResolver"> | ||
32 | - <property name="defaultLocale" value="pt_BR" /> | ||
33 | - </bean> | ||
34 | - | ||
35 | - <!-- View Handler --> | ||
36 | - <bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> | ||
37 | - <property name="resourceLoaderPath" value="/html/" /> | ||
38 | - </bean> | ||
39 | - | ||
40 | - <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> | ||
41 | - <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> | ||
42 | - <property name="prefix" value="/html/" /> | ||
43 | - <property name="suffix" value=".jsp" /> | ||
44 | - </bean> | ||
45 | - | ||
46 | - <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> | ||
47 | - <!-- setting maximum upload size --> | ||
48 | - <property name="maxUploadSize" value="52428800" /> | ||
49 | - | ||
50 | - </bean> | ||
51 | -</beans> |
cit-alcada-web/bin/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -1,8 +0,0 @@ | @@ -1,8 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<jboss-deployment-structure> | ||
3 | - <deployment> | ||
4 | - <dependencies> | ||
5 | - <module name="br.com.citsmart-grp" /> | ||
6 | - </dependencies> | ||
7 | - </deployment> | ||
8 | -</jboss-deployment-structure> | ||
9 | \ No newline at end of file | 0 | \ No newline at end of file |
cit-alcada-web/bin/src/main/webapp/WEB-INF/jboss-web.xml
cit-alcada-web/bin/src/main/webapp/WEB-INF/web.xml
@@ -1,110 +0,0 @@ | @@ -1,110 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<web-app xmlns="http://java.sun.com/xml/ns/javaee" | ||
3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | ||
5 | - version="3.0"> | ||
6 | - <display-name>cit-alcada-web</display-name> | ||
7 | - <session-config> | ||
8 | - <session-timeout>600</session-timeout> | ||
9 | - </session-config> | ||
10 | - <listener> | ||
11 | - <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> | ||
12 | - </listener> | ||
13 | - <listener> | ||
14 | - <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> | ||
15 | - </listener> | ||
16 | - <context-param> | ||
17 | - <param-name>contextConfigLocation</param-name> | ||
18 | - <param-value> | ||
19 | - /WEB-INF/classes/spring/applicationContext.xml | ||
20 | - </param-value> | ||
21 | - </context-param> | ||
22 | - | ||
23 | - <!-- Configuracoes do properties --> | ||
24 | - <context-param> | ||
25 | - <param-name>contextInitializerClasses</param-name> | ||
26 | - <param-value>br.com.centralit.framework.util.CustomApplicationContextInitializer</param-value> | ||
27 | - </context-param> | ||
28 | - <context-param> | ||
29 | - <param-name>propertiesFile</param-name> | ||
30 | - <param-value>classpath:cit-app.properties</param-value> | ||
31 | - </context-param> | ||
32 | - <context-param> | ||
33 | - <param-name>propertiesFileLoadOrder</param-name> | ||
34 | - <param-value>FIRST</param-value> | ||
35 | - </context-param> | ||
36 | - <!-- Este parametro controla a ordem na qual o arquivo de propriedades sera carregado --> | ||
37 | - <!-- "FIRST": Os parametros do arquivo de propriedades sao carregados primero que os outros recursos no ambiente (System, JVM, JNDI Parameters). --> | ||
38 | - <!-- "LAST": Os parametros do arquivo de propriedades sao carregados por ultimo que os outros recursos no ambiente (System, JVM, JNDI Parameters). --> | ||
39 | - <!-- Por padrao o parametro eh "FIRST". --> | ||
40 | - | ||
41 | - <filter> | ||
42 | - <filter-name>openSessionInViewFilter</filter-name> | ||
43 | - <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class> | ||
44 | - </filter> | ||
45 | - <filter-mapping> | ||
46 | - <filter-name>openSessionInViewFilter</filter-name> | ||
47 | - <url-pattern>*.json</url-pattern> | ||
48 | - </filter-mapping> | ||
49 | - | ||
50 | - <filter> | ||
51 | - <filter-name>encoding-filter</filter-name> | ||
52 | - <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> | ||
53 | - <init-param> | ||
54 | - <param-name>encoding</param-name> | ||
55 | - <param-value>UTF-8</param-value> | ||
56 | - </init-param> | ||
57 | - </filter> | ||
58 | - <filter-mapping> | ||
59 | - <filter-name>encoding-filter</filter-name> | ||
60 | - <url-pattern>/*</url-pattern> | ||
61 | - </filter-mapping> | ||
62 | - | ||
63 | - <filter> | ||
64 | - <filter-name>CAS Single Sign Out Filter</filter-name> | ||
65 | - <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class> | ||
66 | - </filter> | ||
67 | - | ||
68 | - <filter-mapping> | ||
69 | - <filter-name>CAS Single Sign Out Filter</filter-name> | ||
70 | - <url-pattern>/*</url-pattern> | ||
71 | - </filter-mapping> | ||
72 | - | ||
73 | - <listener> | ||
74 | - <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class> | ||
75 | - </listener> | ||
76 | - | ||
77 | - <filter> | ||
78 | - <filter-name>springSecurityFilterChain</filter-name> | ||
79 | - <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> | ||
80 | - </filter> | ||
81 | - <filter-mapping> | ||
82 | - <filter-name>springSecurityFilterChain</filter-name> | ||
83 | - <url-pattern>/*</url-pattern> | ||
84 | - </filter-mapping> | ||
85 | - | ||
86 | - <!-- CORS Filter --> | ||
87 | - <filter> | ||
88 | - <filter-name>cors</filter-name> | ||
89 | - <filter-class>br.com.centralit.framework.filter.SimpleCORSFilter</filter-class> | ||
90 | - </filter> | ||
91 | - | ||
92 | - <filter-mapping> | ||
93 | - <filter-name>cors</filter-name> | ||
94 | - <url-pattern>/*</url-pattern> | ||
95 | - </filter-mapping> | ||
96 | - | ||
97 | - <servlet> | ||
98 | - <servlet-name>spring</servlet-name> | ||
99 | - <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> | ||
100 | - <init-param> | ||
101 | - <param-name>contextConfigLocation</param-name> | ||
102 | - <param-value></param-value> | ||
103 | - </init-param> | ||
104 | - </servlet> | ||
105 | - <servlet-mapping> | ||
106 | - <servlet-name>spring</servlet-name> | ||
107 | - <url-pattern>/</url-pattern> | ||
108 | - </servlet-mapping> | ||
109 | - | ||
110 | -</web-app> |
cit-alcada-web/bin/src/main/webapp/assets/js/angular/custom/controller/AlcadaController.js
@@ -1,200 +0,0 @@ | @@ -1,200 +0,0 @@ | ||
1 | -'use strict'; | ||
2 | - | ||
3 | -citApp.controller('AlcadaController', ['$scope', 'AlcadaRepository', 'NivelAutoridadeRepository', 'GrupoRepository', '$translate', '$filter', '$timeout', 'DominioRepository', 'FlowRepository', | ||
4 | - function AlcadaController($scope, AlcadaRepository, NivelAutoridadeRepository, GrupoRepository, | ||
5 | - $translate, $filter, $timeout, DominioRepository, FlowRepository ) { | ||
6 | - | ||
7 | - $scope.fluxo = {}; | ||
8 | - | ||
9 | - $scope.alcada = { | ||
10 | - permiteAprovacaoNivelInferior : false | ||
11 | - }; | ||
12 | - | ||
13 | - // Limpa formulário para novo cadastro | ||
14 | - $scope.resetForm = function() { | ||
15 | - $scope.limparAlcada(); | ||
16 | - $scope.edit = true; | ||
17 | - $timeout(function(){ | ||
18 | - $scope.alcadaForm.$submitted = false; | ||
19 | - $scope.alcadaForm.$setPristine(); | ||
20 | - }); | ||
21 | - }; | ||
22 | - | ||
23 | - // Atualiza pagina de pesquisa | ||
24 | - $scope.atualizaPaginaPesquisa = function () { | ||
25 | - angular.element('#searchAlcada').scope().fetchResult(); | ||
26 | - }; | ||
27 | - | ||
28 | - // MODAL QUE CONFIRMA REMOVER DA ALCADA | ||
29 | - $scope.remove = function(alcada){ | ||
30 | - $scope.alcada = alcada; | ||
31 | - $scope.$openModalConfirm({ | ||
32 | - message: $translate.instant('MSG.CONFIRMA_EXCLUSAO'), | ||
33 | - callback: function () { | ||
34 | - AlcadaRepository.remove($scope.alcada).then(function() { | ||
35 | - | ||
36 | - $scope.$modalConfirmInstance.dismiss('cancel'); | ||
37 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | ||
38 | - angular.element('#searchAlcada').scope().fetchResult(); | ||
39 | - | ||
40 | - $scope.resetForm(); | ||
41 | - }); | ||
42 | - } | ||
43 | - }); | ||
44 | - }; | ||
45 | - | ||
46 | - // SALVA A ALCADA | ||
47 | - $scope.saveOrUpdate = function(){ | ||
48 | - $scope.alcadaForm.$submitted = true; | ||
49 | - | ||
50 | - //verifica se o formulario está valido para salvar | ||
51 | - if($scope.alcadaForm.$valid){ | ||
52 | - | ||
53 | - $scope.setLoadingSalva(true); | ||
54 | - | ||
55 | - AlcadaRepository.save($scope.alcada).then(function(result) { | ||
56 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_SALVO')); | ||
57 | - $scope.alcadaForm.$submitted = false; | ||
58 | - | ||
59 | - $scope.getAlcada(result.originalElement, true); | ||
60 | - | ||
61 | - $scope.setLoading(false); | ||
62 | - }); | ||
63 | - }else{ | ||
64 | - //Mensagem de erro de campos obrigatorios não preenchidos | ||
65 | - $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS'), " ", false); | ||
66 | - } | ||
67 | - }; | ||
68 | - | ||
69 | - // Limpa o formulario preenchido | ||
70 | - $scope.limparAlcada = function(){ | ||
71 | - $scope.alcada = { | ||
72 | - permiteAprovacaoNivelInferior : false, | ||
73 | - fluxoDelegacao : "" | ||
74 | - }; | ||
75 | - $scope.fluxo = null; | ||
76 | - }; | ||
77 | - | ||
78 | - // Consulta entidade e mostra no formulario | ||
79 | - $scope.getAlcada = function(alcada, edit){ | ||
80 | - $scope.setLoadingGet(true); | ||
81 | - | ||
82 | - AlcadaRepository.get(alcada.id).then(function(result) { | ||
83 | - $scope.alcada = result.originalElement; | ||
84 | - | ||
85 | - $scope.alcada.niveisAutoridades = _.sortBy($scope.alcada.niveisAutoridades, function (alcada) { | ||
86 | - return alcada.nivelAutoridade.nome; | ||
87 | - }); | ||
88 | - | ||
89 | - if ($scope.alcada.fluxoDelegacao && $scope.alcada.fluxoDelegacao != '') { | ||
90 | - FlowRepository.getByName($scope.alcada.fluxoDelegacao).then(function(result) { | ||
91 | - $scope.fluxo = result.originalElement.flow; | ||
92 | - }); | ||
93 | - }else{ | ||
94 | - $scope.fluxo = null; | ||
95 | - } | ||
96 | - $scope.edit = edit; | ||
97 | - $scope.setLoading(false); | ||
98 | - }); | ||
99 | - }; | ||
100 | - | ||
101 | - //FIND PARA AUTOCOMPLETE DO GRUPORESPONSAVEL | ||
102 | - $scope.findAutoCompleteGrupoResponsavel = function(value){ | ||
103 | - return GrupoRepository.findAutoComplete('nome', value).then(function(result) { | ||
104 | - return result; | ||
105 | - }); | ||
106 | - }; | ||
107 | - | ||
108 | - //FIND PARA AUTOCOMPLETE DO GRUPOADMINISTRADOR | ||
109 | - $scope.findAutoCompleteGrupoAdministrador = function(value){ | ||
110 | - return GrupoRepository.findAutoComplete('nome', value).then(function(result) { | ||
111 | - return result; | ||
112 | - }); | ||
113 | - }; | ||
114 | - | ||
115 | - //ALTERA TRUE PARA SIM E FALSE PARA NÃO | ||
116 | - $scope.aplicarFiltroBoolean = function(value){ | ||
117 | - return $filter('booleanSimNao')(value); | ||
118 | - }; | ||
119 | - | ||
120 | - //FIND PARA AUTOCOMPLETE DO NivelAutoridade | ||
121 | - $scope.findNivelAutoridade = function(value){ | ||
122 | - return NivelAutoridadeRepository.findAutoComplete('nome', value).then(function(result) { | ||
123 | - return $filter('idNotEqualObj')(result, $scope.alcada.niveisAutoridades, "nivelAutoridade"); | ||
124 | - }); | ||
125 | - }; | ||
126 | - | ||
127 | - //#### INICIO METODOS ALCADANIVELAUTORIDADE ####// | ||
128 | - //ADICIONA O NIVELAUTORIDADE SELECIONADO | ||
129 | - $scope.adicionarAlcadaNivelAutoridade = function(){ | ||
130 | - // SE NAO POSSUI ARRAY DE NIVELAUTORIDADE, CRIA O ATRIBUTO | ||
131 | - if($scope.alcadaNivelAutoridade != null && $scope.alcadaNivelAutoridade.nivelAutoridade != null && | ||
132 | - $scope.alcadaNivelAutoridade.antecedenciaMinimaAprovacao != null){ | ||
133 | - if(!$scope.alcada.niveisAutoridades){ | ||
134 | - $scope.alcada.niveisAutoridades = []; | ||
135 | - } | ||
136 | - | ||
137 | - $scope.alcada.niveisAutoridades.push({nivelAutoridade : $scope.alcadaNivelAutoridade.nivelAutoridade, | ||
138 | - permiteAprovacaoPropria : $scope.alcadaNivelAutoridade.permiteAprovacaoPropria, | ||
139 | - antecedenciaMinimaAprovacao : $scope.alcadaNivelAutoridade.antecedenciaMinimaAprovacao}); | ||
140 | - $timeout(function(){ | ||
141 | - $scope.alcadaNivelAutoridade.nivelAutoridade = null; | ||
142 | - $scope.alcadaNivelAutoridade.permiteAprovacaoPropria = false; | ||
143 | - $scope.alcadaNivelAutoridade.antecedenciaMinimaAprovacao = ''; | ||
144 | - }); | ||
145 | - } | ||
146 | - else{ | ||
147 | - //Mensagem de erro de campos obrigatorios não preenchidos | ||
148 | - $scope.showAlert('error', $translate.instant('ALCADA.VALIDACAO.ALERTA_OBRIGATORIOS_NIVELAUTORIDADE_ALCADA'), " ", false); | ||
149 | - } | ||
150 | - }; | ||
151 | - | ||
152 | - //REMOVE O NIVELAUTORIDADE SELECIONADO | ||
153 | - $scope.removerAlcadaNivelAutoridade = function(){ | ||
154 | - if(!$scope.nivelAutoridadeChecked) { | ||
155 | - $scope.showAlert('warning', $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_SER_REMOVIDO')); | ||
156 | - return; | ||
157 | - } else { | ||
158 | - $scope.$openModalConfirm({ | ||
159 | - message: $translate.instant('MSG.DESEJA_EXCLUIR_ITENS'), | ||
160 | - callback: function () { | ||
161 | - $scope.$modalConfirmInstance.dismiss('cancel'); | ||
162 | - $scope.alcada.niveisAutoridades.splice($scope.nivelAutoridadeChecked.$index, 1); | ||
163 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | ||
164 | - } | ||
165 | - }); | ||
166 | - } | ||
167 | - }; | ||
168 | - | ||
169 | - $scope.findFlow = function(value) { | ||
170 | - var flowVH = { | ||
171 | - nome : value | ||
172 | - }; | ||
173 | - return FlowRepository.findFlow(flowVH).then(function(result) { | ||
174 | - var flows = []; | ||
175 | - if (result && result.length > 0) { | ||
176 | - for (var i = 0; i < result.length; i++) { | ||
177 | - var flow = result[i].originalElement; | ||
178 | - if (flow.flowApplication == 'SERVICE_INTEGRATION') { | ||
179 | - flows.push(result[i]); | ||
180 | - } | ||
181 | - } | ||
182 | - } | ||
183 | - return flows; | ||
184 | - }); | ||
185 | - }; | ||
186 | - | ||
187 | - $scope.limparAutoCompleteFluxo = function() { | ||
188 | - $scope.alcada.fluxoDelegacao = null; | ||
189 | - }; | ||
190 | - | ||
191 | - $scope.setFluxo = function (item) { | ||
192 | - if(item && item.id) { | ||
193 | - $scope.fluxo = item; | ||
194 | - $scope.alcada.fluxoDelegacao = item.name; | ||
195 | - } | ||
196 | - }; | ||
197 | - | ||
198 | - | ||
199 | - //#### FIM METODOS ALCADANIVELAUTORIDADE ####// | ||
200 | -}]); | ||
201 | \ No newline at end of file | 0 | \ No newline at end of file |
cit-alcada-web/bin/src/main/webapp/assets/js/angular/custom/controller/AlcadaListController.js
@@ -1,39 +0,0 @@ | @@ -1,39 +0,0 @@ | ||
1 | -'use strict'; | ||
2 | - | ||
3 | -citApp.controller('AlcadaListController', ['$scope', 'AlcadaRepository', '$translate', '$timeout', 'DominioRepository', | ||
4 | - function AlcadaListController($scope, AlcadaRepository, $translate, $timeout, DominioRepository) { | ||
5 | - $scope.$showAdvancedFilters = false; | ||
6 | - | ||
7 | - $scope.resetForm = function() { | ||
8 | - angular.element("#editAlcada").scope().resetForm(); | ||
9 | - }; | ||
10 | - | ||
11 | - $scope.headers = [ {title : $translate.instant('LABEL.NOME'), value : 'nome' } , | ||
12 | - {title : $translate.instant('ALCADA.LABEL.IDENTIFICADOR'), value : 'identificador' } , | ||
13 | - {title : $translate.instant('ALCADA.LABEL.APROVACAO_NIVEL_INFERIOR'), value : 'permiteAprovacaoNivelInferior' , filter : 'booleanSimNao'} , | ||
14 | - {title : $translate.instant('ALCADA.LABEL.DISPENSA_NOVA_APROVACAO'), value : 'percDispensaNovaAprovacao' , filter : 'percentageList' }]; | ||
15 | - | ||
16 | - $scope.filterCriteria = { | ||
17 | - start : 1, | ||
18 | - dir : 'asc', | ||
19 | - sort : 'id', | ||
20 | - limit : 10, | ||
21 | - fields: ['id', 'nome', 'identificador', 'permiteAprovacaoNivelInferior', 'percDispensaNovaAprovacao'], | ||
22 | - filters : [ {type : 'string', field : 'nome' } , | ||
23 | - {type : 'string', field : 'identificador' } , | ||
24 | - {type : 'boolean', field : 'permiteAprovacaoNivelInferior' } , | ||
25 | - {type : 'money', field : 'percDispensaNovaAprovacao' }] | ||
26 | - }; | ||
27 | - | ||
28 | - // ABRI Alcada SELECIONADA | ||
29 | - $scope.abrirVisualizar = function(edit){ | ||
30 | - var alcada = $scope.alcadaChecked; | ||
31 | - | ||
32 | - if(!alcada) { | ||
33 | - $scope.showAlert('warning', !edit ? $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_VISUALIZACAO') : $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_EDICAO')); | ||
34 | - return; | ||
35 | - } | ||
36 | - angular.element('#editAlcada').scope().getAlcada(alcada, edit); | ||
37 | - $scope.$showPageEditWorkspace($scope.workspace); | ||
38 | - }; | ||
39 | -}]); | ||
40 | \ No newline at end of file | 0 | \ No newline at end of file |
cit-alcada-web/bin/src/main/webapp/assets/js/angular/custom/controller/CentroResultadoAlcadaResponsavelController.js
@@ -1,99 +0,0 @@ | @@ -1,99 +0,0 @@ | ||
1 | -'use strict'; | ||
2 | - | ||
3 | -citApp.controller('CentroResultadoAlcadaResponsavelController', ['$scope', 'CentroResultadoAlcadaResponsavelRepository', 'AlcadaRepository', 'CentroResultadoRepository', 'ColaboradorRepository', '$translate', '$timeout', | ||
4 | - function CentroResultadoAlcadaResponsavelController($scope, CentroResultadoAlcadaResponsavelRepository, AlcadaRepository, CentroResultadoRepository, ColaboradorRepository, $translate, $timeout) { | ||
5 | - | ||
6 | - $scope.centroResultadoAlcadaResponsavel = {}; | ||
7 | - | ||
8 | - // Limpa formulário para novo cadastro | ||
9 | - $scope.resetForm = function() { | ||
10 | - $scope.limparCentroResultadoAlcadaResponsavel(); | ||
11 | - $scope.edit = true; | ||
12 | - $timeout(function(){ | ||
13 | - $scope.centroResultadoAlcadaResponsavelForm.$submitted = false; | ||
14 | - $scope.centroResultadoAlcadaResponsavelForm.$setPristine(); | ||
15 | - }); | ||
16 | - }; | ||
17 | - | ||
18 | - // Atualiza pagina de pesquisa | ||
19 | - $scope.atualizaPaginaPesquisa = function () { | ||
20 | - angular.element('#searchCentroResultadoAlcadaResponsavel').scope().fetchResult(); | ||
21 | - }; | ||
22 | - | ||
23 | - // MODAL QUE CONFIRMA REMOVER DA CIDADE | ||
24 | - $scope.remove = function(centroResultadoAlcadaResponsavel){ | ||
25 | - $scope.centroResultadoAlcadaResponsavel = centroResultadoAlcadaResponsavel; | ||
26 | - $scope.$openModalConfirm({ | ||
27 | - message: $translate.instant('MSG.CONFIRMA_EXCLUSAO'), | ||
28 | - callback: function () { | ||
29 | - CentroResultadoAlcadaResponsavelRepository.remove($scope.centroResultadoAlcadaResponsavel).then(function() { | ||
30 | - | ||
31 | - $scope.$modalConfirmInstance.dismiss('cancel'); | ||
32 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | ||
33 | - angular.element('#searchCentroResultadoAlcadaResponsavel').scope().fetchResult(); | ||
34 | - | ||
35 | - $scope.resetForm(); | ||
36 | - }); | ||
37 | - } | ||
38 | - }); | ||
39 | - }; | ||
40 | - | ||
41 | - // SALVA O CentroResultadoAlcadaResponsavel | ||
42 | - $scope.saveOrUpdate = function(){ | ||
43 | - $scope.centroResultadoAlcadaResponsavelForm.$submitted = true; | ||
44 | - | ||
45 | - //verifica se o formulario está valido para salvar | ||
46 | - if($scope.centroResultadoAlcadaResponsavelForm.$valid){ | ||
47 | - | ||
48 | - $scope.setLoadingSalva(true); | ||
49 | - | ||
50 | - CentroResultadoAlcadaResponsavelRepository.save($scope.centroResultadoAlcadaResponsavel).then(function(result) { | ||
51 | - $scope.centroResultadoAlcadaResponsavel = result.originalElement; | ||
52 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_SALVO')); | ||
53 | - $scope.centroResultadoAlcadaResponsavelForm.$submitted = false; | ||
54 | - }); | ||
55 | - $scope.setLoading(false); | ||
56 | - }else{ | ||
57 | - //Mensagem de erro de campos obrigatorios não preenchidos | ||
58 | - $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS'), " ", false); | ||
59 | - } | ||
60 | - }; | ||
61 | - | ||
62 | - // Limpa o formulario preenchido | ||
63 | - $scope.limparCentroResultadoAlcadaResponsavel = function(){ | ||
64 | - $scope.centroResultadoAlcadaResponsavel = {}; | ||
65 | - }; | ||
66 | - | ||
67 | - // Consulta entidade e mostra no formulario | ||
68 | - $scope.getCentroResultadoAlcadaResponsavel = function(centroResultadoAlcadaResponsavel, edit){ | ||
69 | - $scope.setLoadingGet(true); | ||
70 | - | ||
71 | - CentroResultadoAlcadaResponsavelRepository.get(centroResultadoAlcadaResponsavel.id).then(function(result) { | ||
72 | - $scope.centroResultadoAlcadaResponsavel = result.originalElement; | ||
73 | - $scope.edit = edit; | ||
74 | - $scope.setLoading(false); | ||
75 | - }); | ||
76 | - }; | ||
77 | - | ||
78 | - // FIND AUTOCOMPLETE ALCADA | ||
79 | - $scope.findAutoCompleteAlcada = function(value){ | ||
80 | - return AlcadaRepository.findAutoComplete('nome', value).then(function(result) { | ||
81 | - return result; | ||
82 | - }); | ||
83 | - }; | ||
84 | - | ||
85 | - // FIND AUTOCOMPLETE CENTRORESULTADO | ||
86 | - $scope.findAutoCompleteCentroResultado = function(value){ | ||
87 | - return CentroResultadoRepository.findAutoComplete('nome', value).then(function(result) { | ||
88 | - return result; | ||
89 | - }); | ||
90 | - }; | ||
91 | - | ||
92 | - // FIND AUTOCOMPLETE RESPONSAVEL | ||
93 | - $scope.findAutoCompleteColaborador = function(value){ | ||
94 | - return ColaboradorRepository.findAutoComplete('nome', value).then(function(result) { | ||
95 | - return result; | ||
96 | - }); | ||
97 | - }; | ||
98 | - | ||
99 | -}]); |
cit-alcada-web/bin/src/main/webapp/assets/js/angular/custom/controller/CentroResultadoAlcadaResponsavelListController.js
@@ -1,33 +0,0 @@ | @@ -1,33 +0,0 @@ | ||
1 | -'use strict'; | ||
2 | - | ||
3 | -citApp.controller('CentroResultadoAlcadaResponsavelListController', ['$scope', 'CentroResultadoAlcadaResponsavelRepository', '$translate', '$timeout', 'DominioRepository', | ||
4 | - function CentroResultadoAlcadaResponsavelListController($scope, CentroResultadoAlcadaResponsavelRepository, $translate, $timeout, DominioRepository) { | ||
5 | - $scope.$showAdvancedFilters = false; | ||
6 | - | ||
7 | - $scope.resetForm = function() { | ||
8 | - angular.element("#editCentroResultadoAlcadaResponsavel").scope().resetForm(); | ||
9 | - }; | ||
10 | - | ||
11 | - $scope.headers = [ {title : $translate.instant('ALCADA.LABEL.ALCADA'), value : 'alcada.nome' } , {title : $translate.instant('LABEL.CENTRORESULTADO'), value : 'centroResultado.nome' } , {title : $translate.instant('LABEL.COLABORADOR'), value : 'colaborador.nome' }]; | ||
12 | - | ||
13 | - $scope.filterCriteria = { | ||
14 | - start : 1, | ||
15 | - dir : 'asc', | ||
16 | - sort : 'id', | ||
17 | - limit : 10, | ||
18 | - fields: ['id', 'alcada.nome', 'centroResultado.nome', 'colaborador.nome'], | ||
19 | - filters : [ {type : 'string', field : 'alcada.nome' } , {type : 'string', field : 'centroResultado.nome' } , {type : 'string', field : 'colaborador.nome' }] | ||
20 | - }; | ||
21 | - | ||
22 | - // ABRI CentroResultadoAlcadaResponsavel SELECIONADA | ||
23 | - $scope.abrirVisualizar = function(edit){ | ||
24 | - var centroResultadoAlcadaResponsavel = $scope.centroResultadoAlcadaResponsavelChecked; | ||
25 | - | ||
26 | - if(!centroResultadoAlcadaResponsavel) { | ||
27 | - $scope.showAlert('warning', !edit ? $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_VISUALIZACAO') : $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_EDICAO')); | ||
28 | - return; | ||
29 | - } | ||
30 | - angular.element('#editCentroResultadoAlcadaResponsavel').scope().getCentroResultadoAlcadaResponsavel(centroResultadoAlcadaResponsavel, edit); | ||
31 | - $scope.$showPageEditWorkspace($scope.workspace); | ||
32 | - }; | ||
33 | -}]); | ||
34 | \ No newline at end of file | 0 | \ No newline at end of file |
cit-alcada-web/bin/src/main/webapp/assets/js/angular/custom/controller/CentroResultadoController.js
@@ -1,259 +0,0 @@ | @@ -1,259 +0,0 @@ | ||
1 | -'use strict'; | ||
2 | - | ||
3 | -citApp.controller('CentroResultadoController', ['$scope', 'CentroResultadoRepository', 'CentroResultadoResponsavelRepository', 'PessoaRepository', 'AlcadaRepository', '$translate', '$timeout', '$filter', | ||
4 | - function CentroResultadoController($scope, CentroResultadoRepository, CentroResultadoResponsavelRepository, PessoaRepository, AlcadaRepository, $translate, $timeout, $filter) { | ||
5 | - | ||
6 | - $scope.centroResultado = {}; | ||
7 | - $scope.historicoResponsaveis = []; | ||
8 | - $scope.alcadas = []; | ||
9 | - // Limpa formulário para novo cadastro | ||
10 | - $scope.resetForm = function() { | ||
11 | - $scope.limparCentroResultado(); | ||
12 | - $scope.findAlcadaSource(); | ||
13 | - $scope.edit = true; | ||
14 | - $timeout(function(){ | ||
15 | - $scope.centroResultadoForm.$submitted = false; | ||
16 | - $scope.centroResultadoForm.$setPristine(); | ||
17 | - }); | ||
18 | - }; | ||
19 | - | ||
20 | - // Atualiza pagina de pesquisa | ||
21 | - $scope.atualizaPaginaPesquisa = function () { | ||
22 | - angular.element('#searchCentroResultado').scope().fetchResult(); | ||
23 | - }; | ||
24 | - | ||
25 | - // MODAL QUE CONFIRMA REMOVER Do CENTRO DE RESULTADO | ||
26 | - $scope.remove = function(centroResultado){ | ||
27 | - $scope.centroResultado = centroResultado; | ||
28 | - $scope.$openModalConfirm({ | ||
29 | - message: $translate.instant('MSG.CONFIRMA_EXCLUSAO'), | ||
30 | - callback: function () { | ||
31 | - CentroResultadoRepository.remove($scope.centroResultado).then(function() { | ||
32 | - | ||
33 | - $scope.$modalConfirmInstance.dismiss('cancel'); | ||
34 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | ||
35 | - angular.element('#searchCentroResultado').scope().fetchResult(); | ||
36 | - | ||
37 | - $scope.resetForm(); | ||
38 | - }); | ||
39 | - } | ||
40 | - }); | ||
41 | - }; | ||
42 | - | ||
43 | - // SALVA O CentroResultado | ||
44 | - $scope.saveOrUpdate = function(){ | ||
45 | - $scope.centroResultadoForm.$submitted = true; | ||
46 | - | ||
47 | - // $scope.verificaResponsaveis(); | ||
48 | - //verifica se o formulario está valido para salvar | ||
49 | - if($scope.centroResultadoForm.$valid){ | ||
50 | - | ||
51 | - if (!$scope.centroResultado.centroResultadoParent && $scope.centroResultado.responsaveis && $scope.centroResultado.responsaveis.lenght){ | ||
52 | - | ||
53 | - $scope.showAlert('warning', $translate.instant('ALCADA.MSG.CENTRO_RESULTADO_SEM_PARENT_REMOVE_RESPONSAVEIS'), " ", false); | ||
54 | - | ||
55 | - } else { | ||
56 | - $scope.setLoadingSalva(true); | ||
57 | - | ||
58 | - CentroResultadoRepository.save($scope.centroResultado).then(function(result) { | ||
59 | - $scope.centroResultado = result.originalElement; | ||
60 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_SALVO')); | ||
61 | - $scope.centroResultadoForm.$submitted = false; | ||
62 | - $scope.getCentroResultado(result.originalElement, true); | ||
63 | - | ||
64 | - $scope.setLoading(false); | ||
65 | - }); | ||
66 | - } | ||
67 | - }else{ | ||
68 | - //Mensagem de erro de campos obrigatorios não preenchidos | ||
69 | - $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS'), " ", false); | ||
70 | - } | ||
71 | - }; | ||
72 | - | ||
73 | - // Limpa o formulario preenchido | ||
74 | - $scope.limparCentroResultado = function(){ | ||
75 | - $scope.alcadas = []; | ||
76 | - $scope.centroResultado = {}; | ||
77 | - $scope.historicoResponsaveis = []; | ||
78 | - $scope.responsavel = null; | ||
79 | - $scope.editResponsavel = false; | ||
80 | - }; | ||
81 | - | ||
82 | - // Consulta entidade e mostra no formulario | ||
83 | - $scope.getCentroResultado = function(centroResultado, edit){ | ||
84 | - $scope.setLoadingGet(true); | ||
85 | - $scope.limparCentroResultado(); | ||
86 | - | ||
87 | - CentroResultadoRepository.get(centroResultado.id).then(function(result) { | ||
88 | - $scope.centroResultado = result.originalElement; | ||
89 | - $scope.buscaHistoricoResponsaveis(centroResultado); | ||
90 | - $scope.findAlcadaSource(); | ||
91 | - $scope.edit = edit; | ||
92 | - $scope.setLoading(false); | ||
93 | - }); | ||
94 | - }; | ||
95 | - | ||
96 | - $scope.buscaHistoricoResponsaveis = function(centroResultado){ | ||
97 | - CentroResultadoResponsavelRepository.buscaHistoricoResponsaveis(centroResultado.id).then(function(result) { | ||
98 | - $scope.historicoResponsaveis = result; | ||
99 | - }); | ||
100 | - }; | ||
101 | - | ||
102 | - $scope.findAutoCompleteCentroResultado = function(value){ | ||
103 | - return CentroResultadoRepository.findAutoComplete('nome', value).then(function(result) { | ||
104 | - | ||
105 | - var resultFiltered = $filter('idNotEqual')(result, [$scope.centroResultado]); | ||
106 | - | ||
107 | - return resultFiltered; | ||
108 | - }); | ||
109 | - }; | ||
110 | - | ||
111 | - //#### INICIO METODOS RESPONSAVEL ALCADA CENTRORESULTADO | ||
112 | - $scope.findAutoCompleteAlcada = function(value){ | ||
113 | - return AlcadaRepository.findAutoComplete('nome', value).then(function(result) { | ||
114 | - return result; | ||
115 | - }); | ||
116 | - }; | ||
117 | - | ||
118 | - $scope.findAutoCompleteResponsavel = function(value) { | ||
119 | - return PessoaRepository.findColaboradorPorNome(value).then(function(result) { | ||
120 | - | ||
121 | - var responsaveis = []; | ||
122 | - | ||
123 | - if($scope.centroResultado.responsaveis) { | ||
124 | - $scope.centroResultado.responsaveis.forEach(function (item) { | ||
125 | - responsaveis.push(item.responsavel); | ||
126 | - }); | ||
127 | - } | ||
128 | - | ||
129 | - var resultFiltered = $filter('idNotEqual')(result, responsaveis); | ||
130 | - | ||
131 | - return resultFiltered; | ||
132 | - }); | ||
133 | - }; | ||
134 | - | ||
135 | - //ADICIONA O RESPONSAVEL SELECIONADO | ||
136 | - $scope.adicionarResponsavel = function(){ | ||
137 | - // SE NAO POSSUI ARRAY DE RESPONSAVEIS, CRIA O ATRIBUTO | ||
138 | - if($scope.responsavel != null && $scope.alcadas.length > 0){ | ||
139 | - | ||
140 | - if(!$scope.centroResultado.responsaveis){ | ||
141 | - $scope.centroResultado.responsaveis = []; | ||
142 | - } | ||
143 | - | ||
144 | - var indexResponsavel = _.findIndex($scope.centroResultado.responsaveis, {responsavel: {id: $scope.responsavel.id}}); | ||
145 | - if(indexResponsavel >= 0) { | ||
146 | - $scope.centroResultado.responsaveis[indexResponsavel].responsavel = $scope.responsavel; | ||
147 | - | ||
148 | - // Seta data inativo nos itens removidos pelo usuario | ||
149 | - $scope.centroResultado.responsaveis[indexResponsavel].alcadas.forEach(function (item) { | ||
150 | - var indexAlcada = _.findIndex($scope.alcadas, {alcada: {id: item.alcada.id}}); | ||
151 | - | ||
152 | - if(indexAlcada < 0 && item.id) { | ||
153 | - item.dataInativo = $filter('date')(new Date(), 'dd/MM/yyyy'); | ||
154 | - } else if(item.id) { | ||
155 | - item.dataInativo = null; | ||
156 | - } | ||
157 | - }); | ||
158 | - | ||
159 | - // Adiciona os itens selecionados que ainda não foi salvo | ||
160 | - $scope.alcadas.forEach(function (item) { | ||
161 | - if(!item.id) { | ||
162 | - $scope.centroResultado.responsaveis[indexResponsavel].alcadas.push(item); | ||
163 | - } | ||
164 | - }); | ||
165 | - } else { | ||
166 | - $scope.centroResultado.responsaveis.push({alcadas : $scope.alcadas, | ||
167 | - responsavel : $scope.responsavel, dataInativo: null}); | ||
168 | - } | ||
169 | - | ||
170 | - $timeout(function(){ | ||
171 | - $scope.alcadas = []; | ||
172 | - $scope.findAlcadaSource(); | ||
173 | - $scope.responsavel = null; | ||
174 | - $scope.editResponsavel = false; | ||
175 | - }); | ||
176 | - }else{ | ||
177 | - //Mensagem de erro de campos obrigatorios não preenchidos | ||
178 | - $scope.showAlert('error', $translate.instant('ALCADA.VALIDACAO.ALERTA_OBRIGATORIOS_RESPONSAVEIS'), " ", false); | ||
179 | - } | ||
180 | - }; | ||
181 | - | ||
182 | - //REMOVE O RESPONSAVEL SELECIONADO | ||
183 | - $scope.removerResponsavel = function(){ | ||
184 | - if(!$scope.responsavelChecked) { | ||
185 | - $scope.showAlert('warning', $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_SER_REMOVIDO')); | ||
186 | - return; | ||
187 | - } else { | ||
188 | - $scope.$openModalConfirm({ | ||
189 | - message: $translate.instant('MSG.CONFIRMA_EXCLUSAO'), | ||
190 | - callback: function () { | ||
191 | - if($scope.responsavelChecked.id != undefined && $scope.responsavelChecked.id){ | ||
192 | - CentroResultadoResponsavelRepository.removeById($scope.responsavelChecked.id).then(function() { | ||
193 | - $scope.$modalConfirmInstance.dismiss('cancel'); | ||
194 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | ||
195 | - $scope.centroResultado.responsaveis.splice($scope.responsavelChecked.$index, 1); | ||
196 | - }); | ||
197 | - } else { | ||
198 | - $scope.$modalConfirmInstance.dismiss('cancel'); | ||
199 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | ||
200 | - $scope.centroResultado.responsaveis.splice($scope.responsavelChecked.$index, 1); | ||
201 | - } | ||
202 | - } | ||
203 | - }); | ||
204 | - } | ||
205 | - }; | ||
206 | - | ||
207 | - // EDITAR O RESPONSAVEL SELECIONADO | ||
208 | - $scope.editarResponsavel = function () { | ||
209 | - if(!$scope.responsavelChecked) { | ||
210 | - $scope.showAlert('warning', $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_SER_EDITADO')); | ||
211 | - return; | ||
212 | - } else { | ||
213 | - $scope.responsavel = $scope.responsavelChecked.responsavel; | ||
214 | - $scope.alcadas = _.where($scope.responsavelChecked.alcadas, {dataInativo: null}); | ||
215 | - $scope.editResponsavel = true; | ||
216 | - | ||
217 | - removeAttributesGrupoAlcada(); | ||
218 | - | ||
219 | - $scope.responsavelChecked.alcadas.forEach(function (item) { | ||
220 | - var indexAlcada = _.findIndex($scope.grupoAlcadaSource, {alcada: {id: item.alcada.id}}); | ||
221 | - $scope.grupoAlcadaSource[indexAlcada] = item; | ||
222 | - }); | ||
223 | - } | ||
224 | - }; | ||
225 | - | ||
226 | - var removeAttributesGrupoAlcada = function () { | ||
227 | - var grupoAlcadaCopy = angular.copy($scope.grupoAlcadaSource); | ||
228 | - $scope.grupoAlcadaSource = []; | ||
229 | - | ||
230 | - grupoAlcadaCopy.forEach(function (item) { | ||
231 | - $scope.grupoAlcadaSource.push( _.pick(item, 'alcada') ); | ||
232 | - }); | ||
233 | - }; | ||
234 | - | ||
235 | - //#### FIM METODOS RESPONSAVEL ALCADA CENTRORESULTADO | ||
236 | - | ||
237 | - $scope.grupoAlcadaSource = []; | ||
238 | - | ||
239 | - $scope.filterCriteriaAlcada = { | ||
240 | - start : 1, | ||
241 | - dir : 'asc', | ||
242 | - sort : 'id', | ||
243 | - limit : 10, | ||
244 | - fields: ['id', 'nome'] | ||
245 | - }; | ||
246 | - | ||
247 | - //Método responsável por listar as alcadas | ||
248 | - $scope.findAlcadaSource = function(){ | ||
249 | - $scope.grupoAlcadaSource = []; | ||
250 | - AlcadaRepository.getListPage($scope.filterCriteriaAlcada).then(function(result) { | ||
251 | - //Percorre a lista de alcada para montar a lista de grupoAlcada | ||
252 | - result.originalElement.objects.forEach(function (item, index) { | ||
253 | - var grupoAlcada = {}; | ||
254 | - grupoAlcada.alcada = item; | ||
255 | - $scope.grupoAlcadaSource.push(grupoAlcada); | ||
256 | - }); | ||
257 | - }); | ||
258 | - }; | ||
259 | -}]); | ||
260 | \ No newline at end of file | 0 | \ No newline at end of file |
cit-alcada-web/bin/src/main/webapp/assets/js/angular/custom/controller/CentroResultadoDelegacaoController.js
@@ -1,312 +0,0 @@ | @@ -1,312 +0,0 @@ | ||
1 | -'use strict'; | ||
2 | - | ||
3 | -citApp.controller('CentroResultadoDelegacaoController', ['$scope', 'CentroResultadoDelegacaoRepository', 'PessoaRepository', 'CentroResultadoRepository', 'DominioRepository', 'AlcadaRepository', 'CentroResultadoResponsavelRepository', 'CentroResultadoResponsavelAlcadaRepository', '$translate', '$timeout', '$filter', | ||
4 | - function CentroResultadoDelegacaoController($scope, CentroResultadoDelegacaoRepository, PessoaRepository, CentroResultadoRepository, DominioRepository, AlcadaRepository, CentroResultadoResponsavelRepository, CentroResultadoResponsavelAlcadaRepository, $translate, $timeout, $filter) { | ||
5 | - $scope.centroResultadoDelegacao = {}; | ||
6 | - $scope.alcadasSelecionadas = []; | ||
7 | - $scope.idsAlcadasSelecionados = []; | ||
8 | - $scope.historicoDelegacoes = []; | ||
9 | - $scope.colaboradoresSelecionados = []; | ||
10 | - | ||
11 | - $scope.TIPO_ABRANGENCIA_DELEGACAO_NOVAS_E_ANDAMENTO_CODIGO = 1; | ||
12 | - $scope.TIPO_ABRANGENCIA_DELEGACAO_NOVAS = 2; | ||
13 | - $scope.TIPO_ABRANGENCIA_DELEGACAO_ESPECIFICAS = 3; | ||
14 | - | ||
15 | - // Limpa formulário para novo cadastro | ||
16 | - $scope.resetForm = function() { | ||
17 | - $scope.alcadas = []; | ||
18 | - $scope.filter.centroResultado = null; | ||
19 | - $scope.idsAlcadasSelecionados = []; | ||
20 | - $scope.historicoDelegacoes = []; | ||
21 | - $scope.alcadasSelecionadas = []; | ||
22 | - $scope.limparCentroResultadoDelegacao(); | ||
23 | - $scope.edit = true; | ||
24 | - $timeout(function(){ | ||
25 | - $scope.centroResultadoDelegacaoForm.$submitted = false; | ||
26 | - $scope.centroResultadoDelegacaoForm.$setPristine(); | ||
27 | - }); | ||
28 | - }; | ||
29 | - | ||
30 | - // Limpa o formulario preenchido | ||
31 | - $scope.limpar = function(){ | ||
32 | - $scope.centroResultadoDelegacao = {}; | ||
33 | - $scope.resetForm(); | ||
34 | - }; | ||
35 | - | ||
36 | - // Atualiza pagina de pesquisa | ||
37 | - $scope.atualizaPaginaPesquisa = function () { | ||
38 | - angular.element('#searchCentroResultadoDelegacao').scope().fetchResult(); | ||
39 | - }; | ||
40 | - | ||
41 | - // MODAL QUE CONFIRMA REMOVER DA CIDADE | ||
42 | - $scope.remove = function(centroResultadoDelegacao){ | ||
43 | - $scope.centroResultadoDelegacao = centroResultadoDelegacao; | ||
44 | - $scope.$openModalConfirm({ | ||
45 | - message: $translate.instant('MSG.CONFIRMA_EXCLUSAO'), | ||
46 | - callback: function () { | ||
47 | - CentroResultadoDelegacaoRepository.remove($scope.centroResultadoDelegacao).then(function() { | ||
48 | - | ||
49 | - $scope.$modalConfirmInstance.dismiss('cancel'); | ||
50 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | ||
51 | - angular.element('#searchCentroResultadoDelegacao').scope().fetchResult(); | ||
52 | - | ||
53 | - $scope.resetForm(); | ||
54 | - }); | ||
55 | - } | ||
56 | - }); | ||
57 | - }; | ||
58 | - | ||
59 | - // Consulta entidade e mostra no formulario | ||
60 | - $scope.getCentroResultadoDelegacao = function(centroResultadoDelegacao, edit){ | ||
61 | - $scope.setLoadingGet(true); | ||
62 | - | ||
63 | - CentroResultadoDelegacaoRepository.get(centroResultadoDelegacao.id).then(function(result) { | ||
64 | - $scope.centroResultadoDelegacao = result.originalElement; | ||
65 | - $scope.buscaHistoricoDelegacoes($scope.centroResultadoDelegacao.centroResultadoResponsavelAlcada.centroResultadoResponsavel.centroResultado.id); | ||
66 | - $scope.edit = edit; | ||
67 | - $scope.setLoading(false); | ||
68 | - }); | ||
69 | - }; | ||
70 | - | ||
71 | - //FIND AUTOCOMPLETE ALCADA | ||
72 | - $scope.findAutoCompleteAlcada = function(value){ | ||
73 | - return AlcadaRepository.findAutoComplete('nome', value).then(function(result) { | ||
74 | - return result; | ||
75 | - }); | ||
76 | - }; | ||
77 | - | ||
78 | - //FIND AUTOCOMPLETE CENTRORESULTADO | ||
79 | - $scope.findAutoCompleteCentroResultado = function(value){ | ||
80 | - return CentroResultadoRepository.findAutoComplete('nome', value).then(function(result) { | ||
81 | - return result; | ||
82 | - }); | ||
83 | - }; | ||
84 | - | ||
85 | - //FIND AUTOCOMPELTE RESPONSAVEL | ||
86 | - $scope.findAutoCompleteColaborador = function(value){ | ||
87 | - return PessoaRepository.findColaboradorPorNome(value).then(function(result) { | ||
88 | - // Filtra para nao mostrar os colaboradores que foram selecionados | ||
89 | - return $filter('idNotEqual')(result, $scope.colaboradoresSelecionados); | ||
90 | - }); | ||
91 | - }; | ||
92 | - | ||
93 | - //BUSCA OS DOMINIOS tipoAbrangenciaDelegacao | ||
94 | - DominioRepository.findAllDominio('tipoAbrangenciaDelegacao').then(function(result) { | ||
95 | - $scope.dominioTipoAbrangenciaDelegacaoList = result; | ||
96 | - }); | ||
97 | - | ||
98 | - | ||
99 | - //#### INICIO METODOS TABELA ALCADAS PAGINADA ####// | ||
100 | - // DEFINE CABEÇALHOS DA LISTAGEM | ||
101 | - $scope.headers = [ {title : $translate.instant('LABEL.RESPONSAVEL'), value : 'centroResultadoResponsavel.responsavel.pessoa.nome' } , | ||
102 | - {title : $translate.instant('ALCADA.LABEL.ALCADA'), value : 'alcada.nome' } ]; | ||
103 | - | ||
104 | - $scope.totalPages = 10; | ||
105 | - $scope.totalItens = 0; | ||
106 | - $scope.limit = 2; | ||
107 | - | ||
108 | - //FILTRO CRITERIA | ||
109 | - $scope.filterCriteria = { | ||
110 | - start : 1, | ||
111 | - dir : 'desc', | ||
112 | - sort : 'id', | ||
113 | - limit : 10, | ||
114 | - fields: ['id', 'centroResultadoResponsavel.responsavel.pessoa.nome', 'centroResultadoResponsavel.responsavel.pessoa.id', 'alcada.nome' ], | ||
115 | - filters : [ {type : 'numeric', field : 'centroResultadoResponsavel.centroResultado.id' }] | ||
116 | - }; | ||
117 | - | ||
118 | - $scope.fetchResult = function(page) { | ||
119 | - $scope.setLoadingPesquisa(true); | ||
120 | - $scope.itemSelecionado = undefined; | ||
121 | - | ||
122 | - | ||
123 | - $scope.alcadas = []; | ||
124 | - | ||
125 | - $scope.idsAlcadasSelecionados = []; | ||
126 | - $scope.historicoDelegacoes = []; | ||
127 | - $scope.alcadasSelecionadas = []; | ||
128 | - $scope.limparCentroResultadoDelegacao(); | ||
129 | - | ||
130 | - $timeout(function(){ | ||
131 | - $scope.centroResultadoDelegacaoForm.$submitted = false; | ||
132 | - $scope.centroResultadoDelegacaoForm.$setPristine(); | ||
133 | - }); | ||
134 | - | ||
135 | - if($scope.filter.centroResultado && $scope.filter.centroResultado.id){ | ||
136 | - $scope.filterCriteria.filters[0].value = $scope.filter.centroResultado.id; | ||
137 | - $scope.buscaHistoricoDelegacoes($scope.filter.centroResultado.id); | ||
138 | - }else{ | ||
139 | - $scope.filterCriteria.filters[0].value = ''; | ||
140 | - } | ||
141 | - | ||
142 | - CentroResultadoResponsavelAlcadaRepository.getListPage($scope.filterCriteria).then(function(result) { | ||
143 | - $scope.alcadas = result.originalElement.objects; | ||
144 | - $scope.totalPages = result.originalElement.totalPages; | ||
145 | - $scope.totalItens = result.originalElement.totalItens; | ||
146 | - $scope.scrollToCadastro('#tableAlcadas'); | ||
147 | - $scope.selecionarAlcadas = false; | ||
148 | - $scope.setLoading(false); | ||
149 | - | ||
150 | - if(!result.originalElement.objects || (result.originalElement.objects && result.originalElement.objects.length <= 0)) { | ||
151 | - $scope.showAlert('warning', $translate.instant('ALCADA.MSG.NAO_FOI_ENCONTRADO_RESPONSAVEIS_PARA_ESTE_CENTRO_RESULTADO')); | ||
152 | - } | ||
153 | - }, function() { | ||
154 | - $scope.alcadas = []; | ||
155 | - $scope.totalPages = 0; | ||
156 | - $scope.totalItens = 0; | ||
157 | - $scope.setLoading(false); | ||
158 | - }); | ||
159 | - }; | ||
160 | - //#### FIM METODOS TABELA ALCADAS PAGINADA ####// | ||
161 | - | ||
162 | - //#### INICIO METODOS DELEGAR ####// | ||
163 | - //SELECIONA UMA ALCADA - RESPONSAVEL | ||
164 | - $scope.selecionarAlcada = function(alcada, $index){ | ||
165 | - $timeout(function(){ | ||
166 | - if (!alcada.$checked) { | ||
167 | - var indexIdAlcadaSelecionada = _.indexOf($scope.idsAlcadasSelecionados, alcada.id); | ||
168 | - if(indexIdAlcadaSelecionada >= 0) { | ||
169 | - $scope.idsAlcadasSelecionados.splice(indexIdAlcadaSelecionada, 1); | ||
170 | - } | ||
171 | - | ||
172 | - var indexAlcadaSelecionada = _.findIndex($scope.alcadasSelecionadas, {id: alcada.id}); | ||
173 | - if(indexAlcadaSelecionada >= 0) { | ||
174 | - $scope.alcadasSelecionadas.splice(indexAlcadaSelecionada, 1); | ||
175 | - } | ||
176 | - }else { | ||
177 | - $scope.idsAlcadasSelecionados.push(alcada.id); | ||
178 | - $scope.alcadasSelecionadas.push(alcada); | ||
179 | - } | ||
180 | - }); | ||
181 | - }; | ||
182 | - | ||
183 | - DominioRepository.findAllDominio('tipoAbrangenciaCentroResultadoDelegacao').then(function(result) { | ||
184 | - $scope.dominioTipoAbrangenciaList = result; | ||
185 | - }); | ||
186 | - | ||
187 | - $scope.iniciaModal = function(){ | ||
188 | - $scope.limparCentroResultadoDelegacao(); | ||
189 | - getColaboradoresSelecionados(); | ||
190 | - $scope.$openModal('/cit-alcada-web/html/centroResultadoDelegacao/dialogCentroResultadoDelegacao.html', 'lg'); | ||
191 | - }; | ||
192 | - | ||
193 | - var getColaboradoresSelecionados = function() { | ||
194 | - $scope.colaboradoresSelecionados = []; | ||
195 | - | ||
196 | - var colaborador = 0; | ||
197 | - | ||
198 | - for(var i = 0; i < $scope.alcadasSelecionadas.length; i++) { | ||
199 | - colaborador = {id: $scope.alcadasSelecionadas[i]['centroResultadoResponsavel.responsavel.pessoa.id']}; | ||
200 | - | ||
201 | - if(!_.findWhere($scope.colaboradoresSelecionados, colaborador)) { | ||
202 | - $scope.colaboradoresSelecionados.push(colaborador); | ||
203 | - } | ||
204 | - } | ||
205 | - }; | ||
206 | - | ||
207 | - //DELEGA UMA ALCADA - RESPONSAVEL | ||
208 | - $scope.delegarAlcada = function(formDelegacaoAlcada) { | ||
209 | - formDelegacaoAlcada.$submitted = true; | ||
210 | - | ||
211 | - if(formDelegacaoAlcada.$valid){ | ||
212 | - var dataInicio = $scope.centroResultadoDelegacao.dataInicioDelegacao; | ||
213 | - var dataFim = $scope.centroResultadoDelegacao.dataFimDelegacao; | ||
214 | - | ||
215 | - if(isPeriodoValido(dataInicio, dataFim)){ | ||
216 | - var centroResultadoDelegacaoList = []; | ||
217 | - for (var i = 0; i < $scope.alcadasSelecionadas.length; i++) { | ||
218 | - centroResultadoDelegacaoList.push(montarObjeto($scope.alcadasSelecionadas[i].id)); | ||
219 | - } | ||
220 | - | ||
221 | - $scope.saveList(centroResultadoDelegacaoList); | ||
222 | - | ||
223 | - } else { | ||
224 | - $scope.showAlert("error", $translate.instant("VALIDACAO.PERIODO_INVALIDO_DATAINICIO_MAIOR_DATAFIM") + " ", false ); | ||
225 | - } | ||
226 | - }else{ | ||
227 | - $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS')); | ||
228 | - } | ||
229 | - }; | ||
230 | - | ||
231 | - $scope.saveList = function (centroResultadoDelegacaoList) { | ||
232 | - $scope.setLoadingSalva(true); | ||
233 | - | ||
234 | - CentroResultadoDelegacaoRepository.saveList(centroResultadoDelegacaoList).then(function (result) { | ||
235 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_SALVO')); | ||
236 | - $scope.centroResultadoDelegacaoForm.$submitted = false; | ||
237 | - | ||
238 | - $scope.buscaHistoricoDelegacoes($scope.filter.centroResultado.id); | ||
239 | - $scope.setLoading(false); | ||
240 | - | ||
241 | - if($scope.$modalInstance) { | ||
242 | - $scope.$modalInstance.dismiss('cancel'); | ||
243 | - } | ||
244 | - }); | ||
245 | - }; | ||
246 | - | ||
247 | - $scope.limparCentroResultadoDelegacao = function(){ | ||
248 | - $scope.centroResultadoDelegacao = {}; | ||
249 | - }; | ||
250 | - //MONTA O OBJETO DELEGACAO PARA SALVAR | ||
251 | - function montarObjeto(idCentroResultadoResponsavelAlcada){ | ||
252 | - var centroResultadoDelegacao = angular.copy($scope.centroResultadoDelegacao); | ||
253 | - | ||
254 | - centroResultadoDelegacao.centroResultadoResponsavelAlcada = { | ||
255 | - id: idCentroResultadoResponsavelAlcada | ||
256 | - }; | ||
257 | - | ||
258 | - montaObjetoRequisicoes(centroResultadoDelegacao); | ||
259 | - | ||
260 | - return centroResultadoDelegacao; | ||
261 | - } | ||
262 | - | ||
263 | - var montaObjetoRequisicoes = function(centroResultadoDelegacao) { | ||
264 | - if(centroResultadoDelegacao.requisicoes && centroResultadoDelegacao.requisicoes.length) { | ||
265 | - var requisicoes = []; | ||
266 | - for(var i = 0; i < centroResultadoDelegacao.requisicoes.length; i++) { | ||
267 | - var requisicao = { | ||
268 | - requisicao: centroResultadoDelegacao.requisicoes[i] | ||
269 | - }; | ||
270 | - | ||
271 | - requisicoes.push(requisicao); | ||
272 | - } | ||
273 | - | ||
274 | - centroResultadoDelegacao.requisicoes = requisicoes; | ||
275 | - } | ||
276 | - }; | ||
277 | - | ||
278 | - //#### FIM METODOS DELEGACAO####// | ||
279 | - | ||
280 | - //BUSCA TODAS AS DELEGACOES DO CENTRO DE RESULTADO | ||
281 | - $scope.buscaHistoricoDelegacoes = function(centroResultadoId){ | ||
282 | - CentroResultadoDelegacaoRepository.buscaHistoricoDelegacoes(centroResultadoId).then(function(result) { | ||
283 | - $scope.historicoDelegacoes = result; | ||
284 | - }); | ||
285 | - }; | ||
286 | - | ||
287 | - $scope.revogarDelegacao = function(){ | ||
288 | - if(!$scope.delegadoChecked) { | ||
289 | - $scope.showAlert('warning', $translate.instant('ALCADA.MSG.SELECIONE_UM_ITEM_PARA_REVOGAR')); | ||
290 | - return; | ||
291 | - } | ||
292 | - if($scope.delegadoChecked.dataRevogacao) { | ||
293 | - $scope.showAlert('warning', $translate.instant('ALCADA.MSG.ITEM_JA_REVOGADO')); | ||
294 | - return; | ||
295 | - } else { | ||
296 | - $scope.$openModalConfirm({ | ||
297 | - message: $translate.instant('ALCADA.MSG.CONFIRMA_REVOGACAO'), | ||
298 | - callback: function () { | ||
299 | - CentroResultadoDelegacaoRepository.revogar($scope.delegadoChecked.id).then(function (result) { | ||
300 | - $scope.$modalConfirmInstance.dismiss('cancel'); | ||
301 | - $scope.showAlert("success", $translate.instant('ALCADA.MSG.ITEM_REGOVADO')); | ||
302 | - | ||
303 | - $scope.delegadoChecked.dataRevogacao = dataHoje(); | ||
304 | - }); | ||
305 | - } | ||
306 | - }); | ||
307 | - } | ||
308 | - }; | ||
309 | - function dataHoje() { | ||
310 | - return $filter('date')(new Date(), 'dd/MM/yyyy'); | ||
311 | - }; | ||
312 | -}]); |
cit-alcada-web/bin/src/main/webapp/assets/js/angular/custom/controller/CentroResultadoDelegacaoListController.js
@@ -1,49 +0,0 @@ | @@ -1,49 +0,0 @@ | ||
1 | -'use strict'; | ||
2 | - | ||
3 | -citApp.controller('CentroResultadoDelegacaoListController', ['$scope', 'CentroResultadoDelegacaoRepository', '$translate', '$timeout', 'DominioRepository', | ||
4 | - function CentroResultadoDelegacaoListController($scope, CentroResultadoDelegacaoRepository, $translate, $timeout, DominioRepository) { | ||
5 | - $scope.$showAdvancedFilters = false; | ||
6 | - | ||
7 | - $scope.resetForm = function() { | ||
8 | - angular.element("#editCentroResultadoDelegacao").scope().resetForm(); | ||
9 | - }; | ||
10 | - | ||
11 | - $scope.headers = [ {title : $translate.instant('ALCADA.LABEL.CENTRO_RESULTADO'), value : 'centroResultado.nome' } , | ||
12 | - {title : $translate.instant('LABEL.DELEGADO'), value : 'delegado.pessoa.nome' } , | ||
13 | - {title : $translate.instant('LABEL.DATA_INICIO_DELEGACAO'), value : 'dataInicioDelegacao' , filter : 'dateBR'} , | ||
14 | - {title : $translate.instant('LABEL.DATA_FIM_DELEGACAO'), value : 'dataFimDelegacao' , filter : 'dateBR'} , | ||
15 | - {title : $translate.instant('LABEL.DOMINIO'), value : 'dominioTipoAbrangenciaDelegacao.descricao' }]; | ||
16 | - | ||
17 | - $scope.filterCriteria = { | ||
18 | - start : 1, | ||
19 | - dir : 'asc', | ||
20 | - sort : 'id', | ||
21 | - limit : 10, | ||
22 | - fields: ['id', 'centroResultado.nome', | ||
23 | - 'delegado.pessoa.nome', | ||
24 | - 'dataInicioDelegacao', | ||
25 | - 'dataFimDelegacao', | ||
26 | - 'dominioTipoAbrangenciaDelegacao.descricao'], | ||
27 | - filters : [ {type : 'string', field : 'centroResultado.nome' } , | ||
28 | - {type : 'string', field : 'delegado.pessoa.nome' } , | ||
29 | - {type : 'date', field : 'dataInicioDelegacao' } , | ||
30 | - {type : 'date', field : 'dataFimDelegacao' } , | ||
31 | - {type : 'string', field : 'dominioTipoAbrangenciaDelegacao.descricao', listaDominio : [] }] | ||
32 | - }; | ||
33 | - | ||
34 | - DominioRepository.findAllDominio('tipoDado').then(function(result) { | ||
35 | - $scope.filterCriteria.filters[7].listaDominio = result; | ||
36 | - }); | ||
37 | - | ||
38 | - // ABRI CentroResultadoDelegacao SELECIONADA | ||
39 | - $scope.abrirVisualizar = function(edit){ | ||
40 | - var centroResultadoDelegacao = $scope.centroResultadoDelegacaoChecked; | ||
41 | - | ||
42 | - if(!centroResultadoDelegacao) { | ||
43 | - $scope.showAlert('warning', !edit ? $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_VISUALIZACAO') : $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_EDICAO')); | ||
44 | - return; | ||
45 | - } | ||
46 | - angular.element('#editCentroResultadoDelegacao').scope().getCentroResultadoDelegacao(centroResultadoDelegacao, edit); | ||
47 | - $scope.$showPageEditWorkspace($scope.workspace); | ||
48 | - }; | ||
49 | -}]); | ||
50 | \ No newline at end of file | 0 | \ No newline at end of file |