Commit 32e1024907ab0a11e4ae9104a72aee7386237958

Authored by Roberto Alencar
2 parents b56713cc 9106a36b

Merge branch 'developer' of http://ggas.com.br/root/ggas

Showing 555 changed files with 74863 additions and 46474 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 555 files displayed.

.gitignore
1   -/bin
2   -/build
3   -/.gradle
4   -/.settings
5   -/GGAS
6   -.classpath
7   -.project
  1 +/bin
  2 +/build
  3 +/.gradle
  4 +/.settings
  5 +/GGAS
  6 +.classpath
  7 +.project
8 8 *.orig
  9 +rebel.xml
  10 +*.jasper
  11 +/.sonar
9 12 \ No newline at end of file
... ...
build.gradle
  1 +buildscript {
  2 + repositories {
  3 + mavenCentral()
  4 + }
  5 + dependencies {
  6 + classpath 'com.mapvine:gradle-cobertura-plugin:0.1'
  7 +
  8 + }
  9 +}
  10 +apply plugin: 'cobertura'
1 11 apply plugin: 'java'
2 12 apply plugin: 'war'
3 13 apply plugin: 'eclipse-wtp'
4 14 //apply plugin: "sonar-runner"
5 15  
6   -
7 16 compileJava.options.encoding = 'UTF-8'
8   -
9   -version = '1.0'
  17 +sourceSets.main.output.resourcesDir = sourceSets.main.output.classesDir
  18 +version = '2.2.0'
10 19  
11 20 // Uses JDK 7
12 21 sourceCompatibility = 1.7
13 22 targetCompatibility = 1.7
14 23  
15   -
16   -
17   -
18 24 // 1. Get dependencies from Maven local repository
19 25 // 2. Get dependencies from Maven central repository
20 26 repositories {
... ... @@ -31,13 +37,11 @@ repositories {
31 37  
32 38 }
33 39  
34   -
35   -
36 40 //Project dependencies
37 41 dependencies {
38 42 compile(['junit:junit:4.11'],
39 43 ['log4j:log4j:1.2.17'],
40   -
  44 + ['org.easymock:easymock:3.3.1'],
41 45  
42 46 ['org.slf4j:slf4j-api:1.7.5'],
43 47 ['org.slf4j:slf4j-log4j12:1.7.5'],
... ... @@ -48,19 +52,19 @@ dependencies {
48 52 ['javax.servlet:servlet-api:2.5'],
49 53 ['net.sf.flexjson:flexjson:2.1'],
50 54  
51   - ['org.springframework:spring-core:3.2.9.RELEASE'],
52   - ['org.springframework:spring-test:3.2.9.RELEASE'],
53   - ['org.springframework:spring-context:3.2.9.RELEASE'],
54   - ['org.springframework:spring-aop:3.2.9.RELEASE'],
55   - ['org.springframework:spring-aspects:3.2.9.RELEASE'],
  55 + ['org.springframework:spring-core:4.1.0.RELEASE'],
  56 + ['org.springframework:spring-test:4.1.0.RELEASE'],
  57 + ['org.springframework:spring-context:4.1.0.RELEASE'],
  58 + ['org.springframework:spring-aop:4.1.0.RELEASE'],
  59 + ['org.springframework:spring-aspects:4.1.0.RELEASE'],
56 60 ['org.springframework.batch:spring-batch-core:2.2.7.RELEASE'],
57 61 ['org.springframework.data:spring-data-jpa:1.4.3.RELEASE'],
58   - ['org.springframework:spring-webmvc:3.2.6.RELEASE'],
  62 + ['org.springframework:spring-webmvc:4.1.0.RELEASE'],
59 63 ['org.springframework.webflow:spring-js-resources:2.2.1.RELEASE'],
60   - ['org.springframework:spring-context:3.2.9.RELEASE'],
  64 + ['org.springframework:spring-context:4.1.0.RELEASE'],
61 65 ['org.springframework.integration:spring-integration-mail:3.0.6.RELEASE'],
62   - ['org.springframework:spring-jdbc:3.2.6.RELEASE'],
63   - ['org.springframework:spring-orm:3.2.6.RELEASE'],
  66 + ['org.springframework:spring-jdbc:4.1.0.RELEASE'],
  67 + ['org.springframework:spring-orm:4.1.0.RELEASE'],
64 68 ['org.springframework.security:spring-security-web:3.1.0.RELEASE'],
65 69 ['org.springframework.security:spring-security-taglibs:3.1.0.RELEASE'],
66 70 ['org.jvnet.jax-ws-commons.spring:jaxws-spring:1.9'],
... ... @@ -72,24 +76,22 @@ dependencies {
72 76 ['javax.transaction:jta:1.1'],
73 77 ['commons-pool:commons-pool:1.5.6'],
74 78 ['commons-fileupload:commons-fileupload:1.2.2'],
75   - //['javax.servlet.jsp.jstl:jstl-api:1.2'],
  79 + ['javax.servlet.jsp.jstl:jstl-api:1.2'],
76 80 ['jstl:jstl:1.1.2'],
77 81 ['taglibs:standard:1.1.2'],
78 82  
79   - // ['org.glassfish.web:jstl-impl:1.2'],
80   - //['javax.el:el-api:2.2'],
  83 + ['org.glassfish.web:jstl-impl:1.2'],
  84 + ['javax.el:el-api:2.2'],
81 85 ['joda-time:joda-time:1.6'],
82 86 ['javax.servlet.jsp:jsp-api:2.1'],
83 87 ['commons-codec:commons-codec:1.5'],
84 88 ['org.apache.tiles:tiles-jsp:2.2.2'],
85 89  
86   -
87 90 ['com.h2database:h2:1.3.172'],
88 91 ['mysql:mysql-connector-java:5.1.31'],
89 92 ['org.postgresql:postgresql:9.2-1003-jdbc4'],
90 93 ['com.oracle:ojdbc6:11.2.0.3'],
91 94  
92   -
93 95 ['displaytag:displaytag:1.2'],
94 96 ['org.hibernate:hibernate-core:3.6.10.Final'],
95 97 ['org.hibernate:hibernate-ehcache:3.6.10.Final'],
... ... @@ -105,7 +107,6 @@ dependencies {
105 107 ['org.apache.poi:poi:3.11'],
106 108 ['org.apache.poi:poi-ooxml:3.11'],
107 109  
108   -
109 110 ['javax.mail:mail:1.4.3'],
110 111 ['commons-io:commons-io:1.4'],
111 112 ['org.codehaus.jackson:jackson-mapper-asl:1.9.12'],
... ... @@ -118,18 +119,17 @@ dependencies {
118 119  
119 120 ['net.sf.jasperreports:jasperreports:5.6.0'],
120 121 ['net.sf.barcode4j:barcode4j-light:2.0'],
121   - ['net.sourceforge.barbecue:barbecue:1.5-beta1'],
122   -
123 122  
124 123 ['com.google.code.gson:gson:2.3.1'],
125 124 ['org.jdom:jdom-legacy:1.1.3'],
126 125  
127 126 ['commons-digester:commons-digester:1.8'],
128   - ['org.codehaus.groovy:groovy-all:2.3.6']
  127 + ['org.codehaus.groovy:groovy-all:2.3.6'],
  128 +
129 129  
130 130 )
131 131  
132   -
  132 +
133 133 //include in compile only, exclude in the war
134 134 providedCompile 'javax.servlet:servlet-api:2.5','javax.el:el-api:2.2'
135 135  
... ... @@ -153,7 +153,8 @@ dependencies {
153 153 exclude module: 'commons-logging'
154 154 exclude module: 'commons-digester'
155 155 }
156   -
  156 +
  157 +
157 158  
158 159 }
159 160 configurations {
... ... @@ -161,25 +162,26 @@ configurations {
161 162 transitive = true
162 163 }
163 164 }
  165 +
164 166 dependencies {
165 167 jasperreports 'net.sf.jasperreports:jasperreports:5.6.0',
166 168 'org.codehaus.groovy:groovy-all:2.3.6',
167 169 'net.sf.barcode4j:barcode4j-light:2.0'
168 170 }
  171 +
169 172 task compileJasperJava(dependsOn: 'compileJava') << {
170 173 def jasperSourceDir = file('src/main/reports')
171   - def jasperTargetDir = file('build/classes/main/reports')
  174 + def jasperTargetDir = file('src/main/reports')
172 175 ant {
173 176 taskdef(name: 'jrc', classname: 'net.sf.jasperreports.ant.JRAntCompileTask', classpath: configurations.jasperreports.asPath)
174 177 jasperTargetDir.mkdirs()
175 178 jrc(srcdir: jasperSourceDir, destdir: jasperTargetDir) {
176 179 classpath(path: sourceSets.main.output.classesDir)
177   - include(name: '*.jrxml')
  180 + include(name: '**.jrxml')
178 181 }
179 182 }
180 183 }
181 184  
182   -classes.dependsOn compileJasperJava
183 185 /*
184 186 sonarRunner {
185 187 sonarProperties {
... ... @@ -195,4 +197,68 @@ sonarRunner {
195 197 property "sonar.java.binaries", "build/classes/main"
196 198 }
197 199 }
198   -*/
199 200 \ No newline at end of file
  201 +*/
  202 +
  203 +
  204 +task copyJasper(type: Copy) {
  205 + from 'src/main/reports'
  206 + into 'build/main/classes/'
  207 + include '**/*.hbm.xml'
  208 +}
  209 +
  210 +
  211 +task copyHbm(type: Copy) {
  212 + from 'src/main/java/br/com/ggas'
  213 + into 'build/resources/main/br/com/ggas/'
  214 + include '**/*.hbm.xml'
  215 +}
  216 +
  217 +task copyHbmResources(type: Copy) {
  218 + from 'src/main/java/br/com/ggas'
  219 + into 'build/classes/test/br/com/ggas/'
  220 + include '**/*.hbm.xml'
  221 +}
  222 +
  223 +task copyHbmBuild(type: Copy) {
  224 + from 'src/main/java/br/com/ggas'
  225 + into 'build/classes/main/br/com/ggas/'
  226 + include '**/*.hbm.xml'
  227 +}
  228 +
  229 +task copyHbmCobertura(type: Copy) {
  230 + from 'src/main/java/br/com/ggas'
  231 + into 'build/instrumented/br/com/ggas/'
  232 + include '**/*.hbm.xml'
  233 +}
  234 +
  235 +
  236 +
  237 +task makeJava(dependsOn: [compileJasperJava, copyJasper, compileJava, copyHbm, copyHbmResources, copyHbmBuild, copyHbmCobertura])
  238 +
  239 +
  240 +classes.dependsOn makeJava
  241 +
  242 +subprojects {
  243 + apply plugin: "java"
  244 + sonarRunner {
  245 + sonarProperties {
  246 + property "sonar.junit.reportsPath", test.reports.junitXml.destination
  247 + }
  248 + }
  249 +}
  250 +
  251 +
  252 +test {
  253 + maxHeapSize = "1024m"
  254 + jvmArgs "-XX:-UseSplitVerifier"
  255 +}
  256 +
  257 +
  258 +cobertura {
  259 + sourceDirs = ['src']
  260 + format = 'xml'
  261 + includes = ['**/*.java']
  262 + excludes = []
  263 +}
  264 +
  265 +//test.finalizedBy(project.tasks.cobertura)
... ...
sql/GGAS_Ver-2.2.0_130_Seq-001.sql 0 → 100644
... ... @@ -0,0 +1,39 @@
  1 +CREATE TABLE TEMP_SOLICITACAO_CONSUMO (
  2 +TESC_CD NUMBER(9,0) NOT NULL,
  3 +POCN_CD_SUPERVISORIO VARCHAR2(50) NOT NULL,
  4 +TESC_DT_SOLICITACAO DATE NOT NULL ,
  5 +TESC_MD_QR NUMBER(9,4) ,
  6 +TESC_NR_VERSAO NUMBER (5) NOT NULL ,
  7 +TESC_IN_USO NUMBER (1) NOT NULL ,
  8 +TESC_TM_ULTIMA_ALTERACAO TIMESTAMP NOT NULL
  9 +);
  10 +ALTER TABLE TEMP_SOLICITACAO_CONSUMO ADD constraint PK_TESC PRIMARY KEY (TESC_CD);
  11 +
  12 +-- ALTER TABLE TEMP_SOLICITACAO_CONSUMO ADD constraint FK_TESC_POCN FOREIGN KEY (POCN_CD_SUPERVISORIO) references PONTO_CONSUMO(POCN_CD_SUPERVISORIO);
  13 +
  14 +CREATE OR REPLACE PUBLIC SYNONYM TEMP_SOLICITACAO_CONSUMO FOR TEMP_SOLICITACAO_CONSUMO ;
  15 +
  16 +GRANT INSERT,SELECT, DELETE, UPDATE ON TEMP_SOLICITACAO_CONSUMO TO GGAS_OPER;
  17 +
  18 +CREATE SEQUENCE SQ_TESC_CD MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE ;
  19 +CREATE OR REPLACE PUBLIC SYNONYM SQ_TESC_CD FOR SQ_TESC_CD;
  20 +GRANT SELECT ON SQ_TESC_CD TO GGAS_OPER;
  21 +
  22 +COMMENT ON COLUMN TEMP_SOLICITACAO_CONSUMO.TESC_CD IS 'Chave primária gerada automaticamente e controlada pela sequence SQ_TESC_CD ';
  23 +COMMENT ON COLUMN TEMP_SOLICITACAO_CONSUMO.POCN_CD_SUPERVISORIO IS 'Chave Estrangeira da tabela Ponto Consumo';
  24 +COMMENT ON COLUMN TEMP_SOLICITACAO_CONSUMO.TESC_DT_SOLICITACAO IS 'data da programação de consumo';
  25 +COMMENT ON COLUMN TEMP_SOLICITACAO_CONSUMO.TESC_MD_QR IS 'Valor da quantidade Retirada';
  26 +COMMENT ON COLUMN TEMP_SOLICITACAO_CONSUMO.TESC_NR_VERSAO IS 'Número da versão do registro, utilizado para controle de concorrência ';
  27 +COMMENT ON COLUMN TEMP_SOLICITACAO_CONSUMO.TESC_IN_USO IS 'Indicador de que o registro está ativo para o sistema (0-Nao, 1-Sim)';
  28 +COMMENT ON COLUMN TEMP_SOLICITACAO_CONSUMO.TESC_TM_ULTIMA_ALTERACAO IS 'Data e hora da realização da última alteração ';
  29 +
  30 +
  31 +Insert into TABELA (TABE_CD,TABE_NM,TABE_DS,TABE_NM_MNEMONICO,TABE_IN_ATRIBUTO_DINAMICO,TABE_NR_VERSAO,TABE_IN_USO,TABE_TM_ULTIMA_ALTERACAO,TABE_IN_CONSULTA_DINAMICA,TABE_NM_CLASSE,TABE_IN_AUDITAVEL,TABE_IN_ALCADA,MENU_CD,TABE_NR_MESES_DESCARTE,TABE_IN_INTEGRACAO,TABE_IN_MAPEAMENTO,TABE_IN_CONSTANTE) select SQ_TABE_CD.nextval,'TEMP_SOLICITACAO_CONSUMO','TEMP_SOLICITACAO_CONSUMO','TESC',0,0,1,CURRENT_timestamp,1,'br.com.ggas.contrato.programacao.impl.TempSolicitacaoConsumo',1,0,null,null,1,0,0 from dual where not exists (select * from TABELA where TABE_NM='TEMP_SOLICITACAO_CONSUMO');
  32 +Insert into TABELA_COLUNA (TACO_CD,TABE_CD,TACO_NM,TACO_DS,TACO_NM_PROPRIEDADE,TACO_IN_CONSULTA_DINAMICA,TACO_NR_VERSAO,TACO_IN_USO,TACO_TM_ULTIMA_ALTERACAO,TACO_IN_AUDITAVEL,TACO_IN_ALCADA,TACO_IN_VARIAVEL,TACO_CD_VARIAVEL) select SQ_TACO_CD.nextval,(select tabe_cd from tabela where TABE_NM = 'TEMP_SOLICITACAO_CONSUMO'),'TESC_CD' , 'Chave primária gerada automaticamente e controlada pela sequence SQ_TESC_CD ','chavePrimaria',0,0,1,current_timestamp,0,0,0,null from dual where not exists (select * from TABELA_COLUNA where TABE_CD = (SELECT TABE_CD from TABELA WHERE TABE_NM = 'TEMP_SOLICITACAO_CONSUMO') and TACO_NM = 'TESC_CD');
  33 +Insert into TABELA_COLUNA (TACO_CD,TABE_CD,TACO_NM,TACO_DS,TACO_NM_PROPRIEDADE,TACO_IN_CONSULTA_DINAMICA,TACO_NR_VERSAO,TACO_IN_USO,TACO_TM_ULTIMA_ALTERACAO,TACO_IN_AUDITAVEL,TACO_IN_ALCADA,TACO_IN_VARIAVEL,TACO_CD_VARIAVEL) select SQ_TACO_CD.nextval,(select tabe_cd from tabela where TABE_NM = 'TEMP_SOLICITACAO_CONSUMO'),'POCN_CD_SUPERVISORIO', '','',0,0,1,current_timestamp,0,0,0,null from dual where not exists (select * from TABELA_COLUNA where TABE_CD = (SELECT TABE_CD from TABELA WHERE TABE_NM = 'TEMP_SOLICITACAO_CONSUMO') and TACO_NM = 'POCN_CD_SUPERVISORIO');
  34 +Insert into TABELA_COLUNA (TACO_CD,TABE_CD,TACO_NM,TACO_DS,TACO_NM_PROPRIEDADE,TACO_IN_CONSULTA_DINAMICA,TACO_NR_VERSAO,TACO_IN_USO,TACO_TM_ULTIMA_ALTERACAO,TACO_IN_AUDITAVEL,TACO_IN_ALCADA,TACO_IN_VARIAVEL,TACO_CD_VARIAVEL) select SQ_TACO_CD.nextval,(select tabe_cd from tabela where TABE_NM = 'TEMP_SOLICITACAO_CONSUMO'), 'TESC_DT_SOLICITACAO', '','',0,0,1,current_timestamp,0,0,0,null from dual where not exists (select * from TABELA_COLUNA where TABE_CD = (SELECT TABE_CD from TABELA WHERE TABE_NM = 'TEMP_SOLICITACAO_CONSUMO') and TACO_NM = 'TESC_DT_SOLICITACAO');
  35 +Insert into TABELA_COLUNA (TACO_CD,TABE_CD,TACO_NM,TACO_DS,TACO_NM_PROPRIEDADE,TACO_IN_CONSULTA_DINAMICA,TACO_NR_VERSAO,TACO_IN_USO,TACO_TM_ULTIMA_ALTERACAO,TACO_IN_AUDITAVEL,TACO_IN_ALCADA,TACO_IN_VARIAVEL,TACO_CD_VARIAVEL) select SQ_TACO_CD.nextval,(select tabe_cd from tabela where TABE_NM = 'TEMP_SOLICITACAO_CONSUMO'), 'TESC_MD_QR', '','',0,0,1,current_timestamp,0,0,0,null from dual where not exists (select * from TABELA_COLUNA where TABE_CD = (SELECT TABE_CD from TABELA WHERE TABE_NM = 'TEMP_SOLICITACAO_CONSUMO') and TACO_NM = 'TESC_MD_QR');
  36 +
  37 +Insert into TABELA_COLUNA (TACO_CD,TABE_CD,TACO_NM,TACO_DS,TACO_NM_PROPRIEDADE,TACO_IN_CONSULTA_DINAMICA,TACO_NR_VERSAO,TACO_IN_USO,TACO_TM_ULTIMA_ALTERACAO,TACO_IN_AUDITAVEL,TACO_IN_ALCADA,TACO_IN_VARIAVEL,TACO_CD_VARIAVEL) select SQ_TACO_CD.nextval,(select tabe_cd from tabela where TABE_NM = 'TEMP_SOLICITACAO_CONSUMO'),'TESC_NR_VERSAO','Número da versão do registro, utilizado para controle de concorrência','versao',0,0,1,current_timestamp,0,0,0,null from dual where not exists (select * from TABELA_COLUNA where TABE_CD = (SELECT TABE_CD from TABELA WHERE TABE_NM = 'TEMP_SOLICITACAO_CONSUMO') and TACO_NM = 'TESC_NR_VERSAO');
  38 +Insert into TABELA_COLUNA (TACO_CD,TABE_CD,TACO_NM,TACO_DS,TACO_NM_PROPRIEDADE,TACO_IN_CONSULTA_DINAMICA,TACO_NR_VERSAO,TACO_IN_USO,TACO_TM_ULTIMA_ALTERACAO,TACO_IN_AUDITAVEL,TACO_IN_ALCADA,TACO_IN_VARIAVEL,TACO_CD_VARIAVEL) select SQ_TACO_CD.nextval,(select tabe_cd from tabela where TABE_NM = 'TEMP_SOLICITACAO_CONSUMO'),'TESC_IN_USO','Indicador de que o registro está ativo para o sistema (0-Nao, 1-Sim)','habilitado',0,0,1,current_timestamp,0,0,0,null from dual where not exists (select * from TABELA_COLUNA where TABE_CD = (SELECT TABE_CD from TABELA WHERE TABE_NM = 'TEMP_SOLICITACAO_CONSUMO') and TACO_NM = 'TESC_IN_USO');
  39 +Insert into TABELA_COLUNA (TACO_CD,TABE_CD,TACO_NM,TACO_DS,TACO_NM_PROPRIEDADE,TACO_IN_CONSULTA_DINAMICA,TACO_NR_VERSAO,TACO_IN_USO,TACO_TM_ULTIMA_ALTERACAO,TACO_IN_AUDITAVEL,TACO_IN_ALCADA,TACO_IN_VARIAVEL,TACO_CD_VARIAVEL) select SQ_TACO_CD.nextval,(select tabe_cd from tabela where TABE_NM = 'TEMP_SOLICITACAO_CONSUMO'),'TESC_TM_ULTIMA_ALTERACAO','Data e hora da realização da última alteração','ultimaAlteracao',0,0,1,current_timestamp,0,0,0,null from dual where not exists (select * from TABELA_COLUNA where TABE_CD = (SELECT TABE_CD from TABELA WHERE TABE_NM = 'TEMP_SOLICITACAO_CONSUMO') and TACO_NM = 'TESC_TM_ULTIMA_ALTERACAO');
... ...
sql/GGAS_Ver-2.2.0_130_Seq-002.sql 0 → 100644
... ... @@ -0,0 +1,16 @@
  1 +insert into documento_impressao_layout
  2 + select SQ_DOIL_CD.nextval,
  3 + 'Aviso de Corte',
  4 + 'Relatório de aviso de corte',
  5 + 'relatorioAvisoCorteBahiaGas.jasper',
  6 + (select ENCO_CD from ENTIDADE_CONTEUDO where enco_ds like '%Aviso de Corte%'),1,1,current_timestamp
  7 + FROM DUAL WHERE NOT EXISTS
  8 + (select * from documento_impressao_layout where documento_impressao_layout.DOIL_NM_ARQUIVO = 'relatorioAvisoCorteBahiaGas.jasper');
  9 +
  10 +
  11 + Insert into PARAMETRO_SISTEMA (PMSI_CD,PMSI_CD_PARAMETRO,PMSI_DS_PARAMETRO,PMSI_VL_PARAMETRO,
  12 +PMSI_DS_COMPLEMENTO,PMSI_CD_TIPO_PARAMETRO,PMSI_NR_VERSAO,PMSI_IN_USO,PMSI_TM_ULTIMA_ALTERACAO,TABE_CD,MOSI_CD)
  13 +select SQ_PMSI_CD.nextval,'PARAMETRO_GERENTE_FINANCEIRO_FATURAMENTO',
  14 +'Nome do Gerente Financeiro.','NOME DO GERENTE FINANCEIRO',null,'1','1','1',
  15 +current_timestamp,null,'4' from dual where not exists (select * from PARAMETRO_SISTEMA where PMSI_CD_PARAMETRO = 'PARAMETRO_GERENTE_FINANCEIRO_FATURAMENTO');
  16 +commit;
0 17 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-003.sql 0 → 100644
... ... @@ -0,0 +1 @@
  1 +ALTER TABLE ti_nota_fiscal_item_tributo MODIFY TINT_VL_OUTRAS DEFAULT 0;
0 2 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-004.sql 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +ALTER TABLE CONTRATO_PONTO_CONS_PENALIDADE MODIFY COPP_IN_PARADA_PROGRAMADA null;
  2 +ALTER TABLE CONTRATO_PONTO_CONS_PENALIDADE MODIFY COPP_IN_FALHA_FORNECIMENTO null;
  3 +ALTER TABLE CONTRATO_PONTO_CONS_PENALIDADE MODIFY COPP_IN_CASOS_FORTUITO NULL;
  4 +ALTER TABLE CONTRATO_PONTO_CONS_PENALIDADE MODIFY COPP_IN_RECUPERAVEL NULL;
  5 +ALTER TABLE CONTRATO_PONTO_CONS_PENALIDADE MODIFY COPP_PR_NAO_RECUPERAVEL NULL;
  6 +ALTER TABLE CONTRATO_PONTO_CONS_PENALIDADE MODIFY ENCO_CD_FORM_APUR_PARA_PROG NULL;
  7 +ALTER TABLE CONTRATO_PONTO_CONS_PENALIDADE MODIFY ENCO_CD_FORM_APUR_CASO_FORT NULL;
  8 +ALTER TABLE CONTRATO_PONTO_CONS_PENALIDADE MODIFY ENCO_CD_FORM_APUR_FALH_FORN NULL;
0 9 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-005.sql 0 → 100644
... ... @@ -0,0 +1 @@
  1 +ALTER TABLE Contrato_ponto_consumo modify COPC_DS_COMPLEMENTO_ENDERECO VARCHAR(250 CHAR);
0 2 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-006.sql 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +alter table LEITURA_ANORMALIDADE drop column lean_in_emissao_ordem_servico;
  2 +commit;
0 3 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-007.sql 0 → 100644
... ... @@ -0,0 +1 @@
  1 +alter table unidade modify UNID_DS_ABREVIADO CHAR(20 CHAR);
0 2 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-008.sql 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +alter table TI_NOTA_FISCAL add TINF_VL_DESCONTO NUMBER(15,2) DEFAULT 0;
  2 +COMMENT ON COLUMN TI_NOTA_FISCAL.TINF_VL_DESCONTO IS 'Desconto na fatura ';
  3 +Insert into TABELA_COLUNA (TACO_CD,TABE_CD,TACO_NM,TACO_DS,TACO_NM_PROPRIEDADE,TACO_IN_CONSULTA_DINAMICA,TACO_NR_VERSAO,TACO_IN_USO,TACO_TM_ULTIMA_ALTERACAO,TACO_IN_AUDITAVEL,TACO_IN_ALCADA,TACO_IN_VARIAVEL,TACO_CD_VARIAVEL)
  4 +select SQ_TACO_CD.nextval,(select tabe_cd from tabela where TABE_NM = 'TI_NOTA_FISCAL'),'TINF_VL_DESCONTO' , 'valor de desconto na fatura','valorDesconto',0,0,1,current_timestamp,0,0,0,null from dual where not exists (select * from TABELA_COLUNA where TABE_CD = (SELECT TABE_CD from TABELA WHERE TABE_NM = 'TI_NOTA_FISCAL') and TACO_NM = 'TINF_VL_DESCONTO');
  5 +
  6 +alter table TI_NOTA_FISCAL_ITEM add TINI_VL_DESCONTO NUMBER(15,2) DEFAULT 0;
  7 +COMMENT ON COLUMN TI_NOTA_FISCAL_ITEM.TINI_VL_DESCONTO IS 'Desconto no item da fatura ';
  8 +Insert into TABELA_COLUNA (TACO_CD,TABE_CD,TACO_NM,TACO_DS,TACO_NM_PROPRIEDADE,TACO_IN_CONSULTA_DINAMICA,TACO_NR_VERSAO,TACO_IN_USO,TACO_TM_ULTIMA_ALTERACAO,TACO_IN_AUDITAVEL,TACO_IN_ALCADA,TACO_IN_VARIAVEL,TACO_CD_VARIAVEL)
  9 +select SQ_TACO_CD.nextval,(select tabe_cd from tabela where TABE_NM = 'TI_NOTA_FISCAL_ITEM'),'TINI_VL_DESCONTO' , 'valor de desconto no item da fatura','valorDesconto',0,0,1,current_timestamp,0,0,0,null from dual where not exists (select * from TABELA_COLUNA where TABE_CD = (SELECT TABE_CD from TABELA WHERE TABE_NM = 'TI_NOTA_FISCAL_ITEM') and TACO_NM = 'TINI_VL_DESCONTO');
0 10 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-009.sql 0 → 100644
... ... @@ -0,0 +1,33 @@
  1 +ALTER TABLE ARRECADADOR_CONTRATO_CONVENIO ADD ARCC_IN_PADRAO NUMBER(1);
  2 +
  3 +COMMENT ON COLUMN ARRECADADOR_CONTRATO_CONVENIO.ARCC_IN_PADRAO IS 'Indicador do convenio arrecadador padrao (0-Não, 1-Sim)';
  4 +
  5 +INSERT
  6 +INTO TABELA_COLUNA
  7 + (
  8 + TACO_CD,
  9 + TABE_CD,
  10 + TACO_NM,
  11 + TACO_DS,
  12 + TACO_NM_PROPRIEDADE,
  13 + TACO_IN_CONSULTA_DINAMICA,
  14 + TACO_NR_VERSAO,
  15 + TACO_IN_USO,
  16 + TACO_TM_ULTIMA_ALTERACAO,
  17 + TACO_IN_AUDITAVEL,
  18 + TACO_IN_ALCADA,
  19 + TACO_IN_VARIAVEL,
  20 + TACO_CD_VARIAVEL
  21 + )
  22 +SELECT SQ_TACO_CD.nextval,
  23 + (SELECT tabe_cd FROM tabela WHERE TABE_NM = 'ARRECADADOR_CONTRATO_CONVENIO'),
  24 + 'ARCC_IN_PADRAO' , 'Outros Valores', 'valorOutros',
  25 + 0, 0, 1, CURRENT_TIMESTAMP, 0, 0, 0, NULL
  26 +FROM dual
  27 +WHERE NOT EXISTS
  28 + (SELECT * FROM TABELA_COLUNA
  29 + WHERE TABE_CD = (SELECT TABE_CD FROM TABELA
  30 + WHERE TABE_NM = 'ARRECADADOR_CONTRATO_CONVENIO')
  31 + AND TACO_NM = 'ARCC_IN_PADRAO');
  32 +
  33 +UPDATE arrecadador_contrato_convenio SET arcc_in_padrao = 0;
0 34 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-010.sql 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +update constante_sistema set cost_vl = (select enco_cd_documento_impres_tipo from documento_impressao_layout where doil_nm like 'RELATORIO VERSO NOTA FISCAL FATURA' and doil_in_uso = 1) where cost_nm like 'RELATORIO_VERSO_NOTA_FISCAL_FATURA';
  2 +
  3 +alter table ponto_consumo modify POCN_DS_COMPLEMENTO VARCHAR2(255 CHAR);
  4 +update ponto_consumo set pocn_ds_complemento = pocn_ds where pocn_ds_complemento is null and upper(pocn_ds) like '%APT%';
0 5 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-011.sql 0 → 100644
... ... @@ -0,0 +1,294 @@
  1 + DECLARE
  2 + formatoData varChar2(50) := 'DD/MM/RR HH24:MI:SS,FF';
  3 + BEGIN
  4 +
  5 + EXECUTE IMMEDIATE ('delete from tabela_coluna where tabe_cd = (select tabe_cd from tabela where tabe_nm = ''' || 'TARIFA_TRIBUTO' || ''')');
  6 + EXECUTE IMMEDIATE ('delete from tabela where tabe_nm = ''' || 'TARIFA_TRIBUTO' || '''');
  7 + EXECUTE IMMEDIATE ('CREATE TABLE TARIFA_VIGENCIA_TRIBUTO
  8 + ( TAVT_CD NUMBER(9,0),
  9 + TAVI_CD NUMBER(9,0),
  10 + TRIB_CD NUMBER(9,0),
  11 + TAVT_NR_VERSAO NUMBER(5,0),
  12 + TAVT_IN_USO NUMBER(1,0),
  13 + TAVT_TM_ULTIMA_ALTERACAO TIMESTAMP (6),
  14 + TAVT_DT_FIM_VIGENCIA DATE,
  15 + TAVT_DT_INICIO_VIGENCIA DATE
  16 + )');
  17 + EXECUTE IMMEDIATE ('COMMENT ON COLUMN TARIFA_VIGENCIA_TRIBUTO.TAVT_CD IS ''' || 'Chave primária gerada automaticamente e controlada pela sequence SQ_TAVT_CD' || '''');
  18 + EXECUTE IMMEDIATE ('COMMENT ON COLUMN TARIFA_VIGENCIA_TRIBUTO.TAVI_CD IS ''' || 'Chave primária da tabela TARIFA_VIGENCIA' || '''');
  19 + EXECUTE IMMEDIATE ('COMMENT ON COLUMN TARIFA_VIGENCIA_TRIBUTO.TRIB_CD IS ''' || 'Chave primária da tabela TRIBUTO' || '''');
  20 + EXECUTE IMMEDIATE ('COMMENT ON COLUMN TARIFA_VIGENCIA_TRIBUTO.TAVT_NR_VERSAO IS ''' || 'Número da versão do registro, utilizado para controle de concorrência' || '''');
  21 + EXECUTE IMMEDIATE ('COMMENT ON COLUMN TARIFA_VIGENCIA_TRIBUTO.TAVT_IN_USO IS ''' || 'Indicador de que o registro está ativo para o sistema (0-Nao, 1-Sim)' || '''');
  22 + EXECUTE IMMEDIATE ('COMMENT ON COLUMN TARIFA_VIGENCIA_TRIBUTO.TAVT_TM_ULTIMA_ALTERACAO IS ''' || 'Data e hora da realização da última alteração' || '''');
  23 + EXECUTE IMMEDIATE ('COMMENT ON COLUMN TARIFA_VIGENCIA_TRIBUTO.TAVT_DT_FIM_VIGENCIA IS ''' || 'Data que termina o período de vigência do tributo na tarifa' || '''');
  24 + EXECUTE IMMEDIATE ('COMMENT ON COLUMN TARIFA_VIGENCIA_TRIBUTO.TAVT_DT_INICIO_VIGENCIA IS ''' || 'Data que inicia o período de vigência do tributo na tarifa' || '''');
  25 + EXECUTE IMMEDIATE ('COMMENT ON TABLE TARIFA_VIGENCIA_TRIBUTO IS ''' || 'Tributo da Tarifa Vigência' || '''');
  26 +
  27 + EXECUTE IMMEDIATE ('Create or Replace Public Synonym TARIFA_VIGENCIA_TRIBUTO for TARIFA_VIGENCIA_TRIBUTO');
  28 + EXECUTE IMMEDIATE ('GRANT DELETE,INSERT,SELECT,UPDATE ON TARIFA_VIGENCIA_TRIBUTO TO GGAS_OPER');
  29 +
  30 + EXECUTE IMMEDIATE ('CREATE SEQUENCE SQ_TAVT_CD MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE');
  31 + EXECUTE IMMEDIATE ('CREATE OR REPLACE PUBLIC SYNONYM SQ_TAVT_CD FOR SQ_TAVT_CD');
  32 + EXECUTE IMMEDIATE ('GRANT SELECT ON SQ_TAVT_CD TO GGAS_OPER');
  33 +
  34 + EXECUTE IMMEDIATE ('CREATE INDEX FK_TAVI_TAVT ON TARIFA_VIGENCIA_TRIBUTO (TAVI_CD)');
  35 + EXECUTE IMMEDIATE ('CREATE UNIQUE INDEX PK_TAVT ON TARIFA_VIGENCIA_TRIBUTO (TAVT_CD)');
  36 + EXECUTE IMMEDIATE ('ALTER TABLE TARIFA_VIGENCIA_TRIBUTO ADD CONSTRAINT PK_TAVT PRIMARY KEY (TAVT_CD) ENABLE');
  37 + EXECUTE IMMEDIATE ('ALTER TABLE TARIFA_VIGENCIA_TRIBUTO MODIFY (TAVT_DT_INICIO_VIGENCIA CONSTRAINT NN01_TAVT_DT_INICIO_VIGENCIA NOT NULL ENABLE)');
  38 + EXECUTE IMMEDIATE ('ALTER TABLE TARIFA_VIGENCIA_TRIBUTO MODIFY (TAVT_TM_ULTIMA_ALTERACAO CONSTRAINT NN01_TAVT_TM_ULTIMA_ALTERACAO NOT NULL ENABLE)');
  39 + EXECUTE IMMEDIATE ('ALTER TABLE TARIFA_VIGENCIA_TRIBUTO MODIFY (TAVT_IN_USO CONSTRAINT NN01_TAVT_IN_USO NOT NULL ENABLE)');
  40 + EXECUTE IMMEDIATE ('ALTER TABLE TARIFA_VIGENCIA_TRIBUTO MODIFY (TAVT_NR_VERSAO CONSTRAINT NN01_TAVT_NR_VERSAO NOT NULL ENABLE)');
  41 + EXECUTE IMMEDIATE ('ALTER TABLE TARIFA_VIGENCIA_TRIBUTO MODIFY (TRIB_CD CONSTRAINT NN07_TRIB_CD NOT NULL ENABLE)');
  42 + EXECUTE IMMEDIATE ('ALTER TABLE TARIFA_VIGENCIA_TRIBUTO MODIFY (TAVI_CD CONSTRAINT NN08_TAVI_CD NOT NULL ENABLE)');
  43 +
  44 + EXECUTE IMMEDIATE ('ALTER TABLE TARIFA_VIGENCIA_TRIBUTO ADD CONSTRAINT FK_TAVI_TAVT FOREIGN KEY (TAVI_CD) REFERENCES TARIFA_VIGENCIA (TAVI_CD) ENABLE');
  45 + EXECUTE IMMEDIATE ('ALTER TABLE TARIFA_VIGENCIA_TRIBUTO ADD CONSTRAINT FK_TRIB_TAVT FOREIGN KEY (TRIB_CD) REFERENCES TRIBUTO (TRIB_CD) ENABLE');
  46 +
  47 + EXECUTE IMMEDIATE (' INSERT
  48 + INTO TABELA
  49 + (
  50 + TABE_CD,
  51 + TABE_NM,
  52 + TABE_DS,
  53 + TABE_NM_MNEMONICO,
  54 + TABE_IN_ATRIBUTO_DINAMICO,
  55 + TABE_NR_VERSAO,
  56 + TABE_IN_USO,
  57 + TABE_TM_ULTIMA_ALTERACAO,
  58 + TABE_IN_CONSULTA_DINAMICA,
  59 + TABE_NM_CLASSE,
  60 + TABE_IN_AUDITAVEL,
  61 + TABE_IN_ALCADA,
  62 + MENU_CD,
  63 + TABE_NR_MESES_DESCARTE,
  64 + TABE_IN_INTEGRACAO,
  65 + TABE_IN_MAPEAMENTO,
  66 + TABE_IN_CONSTANTE
  67 + )
  68 + SELECT SQ_TABE_CD.nextval,
  69 + ''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''',
  70 + ''' || 'Tarifa Vigência Tributo' || ''',
  71 + ''' || 'TAVT' || ''',
  72 + 0,0,1,
  73 + CURRENT_TIMESTAMP,
  74 + 1,
  75 + ''' || 'br.com.ggas.faturamento.tarifa.impl.TarifaVigenciaTributoImpl' || ''',
  76 + 1,
  77 + 0,
  78 + NULL,
  79 + NULL,
  80 + 1,0,0 FROM dual WHERE NOT EXISTS (SELECT * FROM TABELA WHERE TABE_NM=''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''')');
  81 +
  82 + EXECUTE IMMEDIATE (' INSERT
  83 + INTO tabela_coluna
  84 + (
  85 + TACO_CD,
  86 + TABE_CD,
  87 + TACO_NM,
  88 + TACO_DS,
  89 + TACO_NM_PROPRIEDADE,
  90 + TACO_IN_CONSULTA_DINAMICA,
  91 + TACO_NR_VERSAO,
  92 + TACO_IN_USO,
  93 + TACO_TM_ULTIMA_ALTERACAO,
  94 + TACO_IN_AUDITAVEL,
  95 + TACO_IN_ALCADA
  96 + )
  97 + SELECT SQ_TACO_CD.nextval,
  98 + (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || '''),
  99 + ''' || 'TAVT_CD' || ''',
  100 + ''' || 'Chave Primária' || ''',
  101 + ''' || 'chavePrimaria' || ''',
  102 + 0,0,1,
  103 + CURRENT_TIMESTAMP,
  104 + 1,0
  105 + FROM dual WHERE NOT EXISTS (SELECT * FROM tabela_coluna WHERE tabe_cd = (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''') AND UPPER(TACO_NM)=''' || 'TAVT_CD' || ''')');
  106 +
  107 + EXECUTE IMMEDIATE (' INSERT
  108 + INTO tabela_coluna
  109 + (
  110 + TACO_CD,
  111 + TABE_CD,
  112 + TACO_NM,
  113 + TACO_DS,
  114 + TACO_NM_PROPRIEDADE,
  115 + TACO_IN_CONSULTA_DINAMICA,
  116 + TACO_NR_VERSAO,
  117 + TACO_IN_USO,
  118 + TACO_TM_ULTIMA_ALTERACAO,
  119 + TACO_IN_AUDITAVEL,
  120 + TACO_IN_ALCADA
  121 + )
  122 + SELECT SQ_TACO_CD.nextval,
  123 + (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || '''),
  124 + ''' || 'TAVI_CD' || ''',
  125 + ''' || 'Chave Primária da Tabela TARIFA_VIGENCIA' || ''',
  126 + ''' || 'tarifaVigencia' || ''',
  127 + 0,0,1,
  128 + CURRENT_TIMESTAMP,
  129 + 1,0
  130 + FROM dual WHERE NOT EXISTS (SELECT * FROM tabela_coluna WHERE tabe_cd = (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''') AND UPPER(TACO_NM)=''' || 'TAVI_CD' || ''')');
  131 +
  132 + EXECUTE IMMEDIATE (' INSERT
  133 + INTO tabela_coluna
  134 + (
  135 + TACO_CD,
  136 + TABE_CD,
  137 + TACO_NM,
  138 + TACO_DS,
  139 + TACO_NM_PROPRIEDADE,
  140 + TACO_IN_CONSULTA_DINAMICA,
  141 + TACO_NR_VERSAO,
  142 + TACO_IN_USO,
  143 + TACO_TM_ULTIMA_ALTERACAO,
  144 + TACO_IN_AUDITAVEL,
  145 + TACO_IN_ALCADA
  146 + )
  147 + SELECT SQ_TACO_CD.nextval,
  148 + (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || '''),
  149 + ''' || 'TRIB_CD' || ''',
  150 + ''' || 'Chave Primária da Tabela TRIBUTO' || ''',
  151 + ''' || 'tributo' || ''',
  152 + 0,0,1,
  153 + CURRENT_TIMESTAMP,
  154 + 1,0
  155 + FROM dual WHERE NOT EXISTS (SELECT * FROM tabela_coluna WHERE tabe_cd = (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''') AND UPPER(TACO_NM)=''' || 'TRIB_CD' || ''')');
  156 +
  157 + EXECUTE IMMEDIATE (' INSERT
  158 + INTO tabela_coluna
  159 + (
  160 + TACO_CD,
  161 + TABE_CD,
  162 + TACO_NM,
  163 + TACO_DS,
  164 + TACO_NM_PROPRIEDADE,
  165 + TACO_IN_CONSULTA_DINAMICA,
  166 + TACO_NR_VERSAO,
  167 + TACO_IN_USO,
  168 + TACO_TM_ULTIMA_ALTERACAO,
  169 + TACO_IN_AUDITAVEL,
  170 + TACO_IN_ALCADA
  171 + )
  172 + SELECT SQ_TACO_CD.nextval,
  173 + (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || '''),
  174 + ''' || 'TAVT_NR_VERSAO' || ''',
  175 + ''' || 'Número da versão do registro, utilizado para controle de concorrência' || ''',
  176 + ''' || 'versao' || ''',
  177 + 0,0,1,
  178 + CURRENT_TIMESTAMP,
  179 + 1,0
  180 + FROM dual WHERE NOT EXISTS (SELECT * FROM tabela_coluna WHERE tabe_cd = (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''') AND UPPER(TACO_NM)=''' || 'TAVT_NR_VERSAO' || ''')');
  181 +
  182 + EXECUTE IMMEDIATE (' INSERT
  183 + INTO tabela_coluna
  184 + (
  185 + TACO_CD,
  186 + TABE_CD,
  187 + TACO_NM,
  188 + TACO_DS,
  189 + TACO_NM_PROPRIEDADE,
  190 + TACO_IN_CONSULTA_DINAMICA,
  191 + TACO_NR_VERSAO,
  192 + TACO_IN_USO,
  193 + TACO_TM_ULTIMA_ALTERACAO,
  194 + TACO_IN_AUDITAVEL,
  195 + TACO_IN_ALCADA
  196 + )
  197 + SELECT SQ_TACO_CD.nextval,
  198 + (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || '''),
  199 + ''' || 'TAVT_TM_ULTIMA_ALTERACAO' || ''',
  200 + ''' || 'Indica a data e hora da realização da última alteração' || ''',
  201 + ''' || 'ultimaAlteracao' || ''',
  202 + 0,0,1,
  203 + CURRENT_TIMESTAMP,
  204 + 1,0
  205 + FROM dual WHERE NOT EXISTS (SELECT * FROM tabela_coluna WHERE tabe_cd = (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''') AND UPPER(TACO_NM)=''' || 'TAVT_TM_ULTIMA_ALTERACAO' || ''')');
  206 +
  207 + EXECUTE IMMEDIATE (' INSERT
  208 + INTO tabela_coluna
  209 + (
  210 + TACO_CD,
  211 + TABE_CD,
  212 + TACO_NM,
  213 + TACO_DS,
  214 + TACO_NM_PROPRIEDADE,
  215 + TACO_IN_CONSULTA_DINAMICA,
  216 + TACO_NR_VERSAO,
  217 + TACO_IN_USO,
  218 + TACO_TM_ULTIMA_ALTERACAO,
  219 + TACO_IN_AUDITAVEL,
  220 + TACO_IN_ALCADA
  221 + )
  222 + SELECT SQ_TACO_CD.nextval,
  223 + (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || '''),
  224 + ''' || 'TAVT_IN_USO' || ''',
  225 + ''' || 'Habilitado' || ''',
  226 + ''' || 'habilitado' || ''',
  227 + 0,0,1,
  228 + CURRENT_TIMESTAMP,
  229 + 1,0
  230 + FROM dual WHERE NOT EXISTS (SELECT * FROM tabela_coluna WHERE tabe_cd = (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''') AND UPPER(TACO_NM)=''' || 'TAVT_IN_USO' || ''')');
  231 +
  232 + EXECUTE IMMEDIATE (' INSERT
  233 + INTO tabela_coluna
  234 + (
  235 + TACO_CD,
  236 + TABE_CD,
  237 + TACO_NM,
  238 + TACO_DS,
  239 + TACO_NM_PROPRIEDADE,
  240 + TACO_IN_CONSULTA_DINAMICA,
  241 + TACO_NR_VERSAO,
  242 + TACO_IN_USO,
  243 + TACO_TM_ULTIMA_ALTERACAO,
  244 + TACO_IN_AUDITAVEL,
  245 + TACO_IN_ALCADA
  246 + )
  247 + SELECT SQ_TACO_CD.nextval,
  248 + (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || '''),
  249 + ''' || 'TAVT_DT_INICIO_VIGENCIA' || ''',
  250 + ''' || 'Data Vigência Inicial' || ''',
  251 + ''' || 'dataVigenciaInicial' || ''',
  252 + 0,0,1,
  253 + CURRENT_TIMESTAMP,
  254 + 1,0
  255 + FROM dual WHERE NOT EXISTS (SELECT * FROM tabela_coluna WHERE tabe_cd = (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''') AND UPPER(TACO_NM)=''' || 'TAVT_DT_INICIO_VIGENCIA' || ''')');
  256 +
  257 +
  258 + EXECUTE IMMEDIATE (' INSERT
  259 + INTO tabela_coluna
  260 + (
  261 + TACO_CD,
  262 + TABE_CD,
  263 + TACO_NM,
  264 + TACO_DS,
  265 + TACO_NM_PROPRIEDADE,
  266 + TACO_IN_CONSULTA_DINAMICA,
  267 + TACO_NR_VERSAO,
  268 + TACO_IN_USO,
  269 + TACO_TM_ULTIMA_ALTERACAO,
  270 + TACO_IN_AUDITAVEL,
  271 + TACO_IN_ALCADA
  272 + )
  273 + SELECT SQ_TACO_CD.nextval,
  274 + (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || '''),
  275 + ''' || 'TAVT_DT_FIM_VIGENCIA' || ''',
  276 + ''' || 'Data Vigência Final' || ''',
  277 + ''' || 'dataVigenciaFinal' || ''',
  278 + 0,0,1,
  279 + CURRENT_TIMESTAMP,
  280 + 1,0
  281 + FROM dual WHERE NOT EXISTS (SELECT * FROM tabela_coluna WHERE tabe_cd = (SELECT TABE_CD FROM TABELA WHERE UPPER(TABE_NM) = ''' || 'TARIFA_VIGENCIA_TRIBUTO' || ''') AND UPPER(TACO_NM)=''' || 'TAVT_DT_FIM_VIGENCIA' || ''')');
  282 +
  283 + for c in (select tavi.tavi_cd as vigencia, tatr.trib_cd as tributo, tatr.tatr_dt_inicio_vigencia as dataVigencia from tarifa tari
  284 + inner join TARIFA_TRIBUTO tatr on tatr.tari_cd = tari.tari_cd
  285 + inner join tarifa_vigencia tavi on tavi.tari_cd = tari.tari_cd
  286 + group by tavi.tavi_cd, tatr.trib_cd, tatr.tatr_dt_inicio_vigencia)
  287 + LOOP
  288 + EXECUTE IMMEDIATE ('INSERT INTO TARIFA_VIGENCIA_TRIBUTO SELECT SQ_TATR_CD.NEXTVAL, ' || c.vigencia ||', ' || c.tributo || ', ' || 0 ||', ' || 1 || ', current_timestamp, NULL, to_timestamp(''' || c.dataVigencia || ''', ''' || formatoData || ''') FROM dual WHERE NOT EXISTS (SELECT * FROM TARIFA_VIGENCIA_TRIBUTO WHERE TAVI_CD = ' || c.vigencia || ' AND TRIB_CD = ' || c.tributo || ')');
  289 + END LOOP;
  290 +
  291 + EXECUTE IMMEDIATE ('drop table tarifa_tributo cascade constraints');
  292 + EXECUTE IMMEDIATE ('drop sequence sq_tatr_cd');
  293 +
  294 + END;
0 295 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-012.sql 0 → 100644
... ... @@ -0,0 +1 @@
  1 +alter table cliente modify clie_ds_email_principal varchar2(1000 char);
0 2 \ No newline at end of file
... ...
sql/GGAS_Ver-2.2.0_130_Seq-013.sql 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +alter table ramo_atividade modify raat_ds varchar2(100 char);
  2 +
... ...
sql/GGAS_Ver-2.2.0_130_Seq-014.sql 0 → 100644
... ... @@ -0,0 +1,424 @@
  1 +Insert Into NFE_SERVICOS_URL
  2 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '1', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  3 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '1' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  4 +
  5 +Insert Into NFE_SERVICOS_URL
  6 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '2', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  7 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '2' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  8 +
  9 +Insert Into NFE_SERVICOS_URL
  10 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '3', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  11 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '3' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  12 +
  13 +Insert Into NFE_SERVICOS_URL
  14 +select SQ_NFSE_CD.NextVal, 'https://hnfe.sefaz.ba.gov.br/webservices/NfeAutorizacao/NfeAutorizacao.asmx', '4', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  15 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://hnfe.sefaz.ba.gov.br/webservices/NfeAutorizacao/NfeAutorizacao.asmx' and nfse_cd_uf = '4' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  16 +
  17 +Insert Into NFE_SERVICOS_URL
  18 +select SQ_NFSE_CD.NextVal, 'https://nfeh.sefaz.ce.gov.br/nfe2/services/NfeAutorizacao', '5', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  19 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfeh.sefaz.ce.gov.br/nfe2/services/NfeAutorizacao' and nfse_cd_uf = '5' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  20 +
  21 +Insert Into NFE_SERVICOS_URL
  22 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '6', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  23 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '6' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  24 +
  25 +Insert Into NFE_SERVICOS_URL
  26 +select SQ_NFSE_CD.NextVal, 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx', '7', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  27 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx' and nfse_cd_uf = '7' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  28 +
  29 +Insert Into NFE_SERVICOS_URL
  30 +select SQ_NFSE_CD.NextVal, 'https://homolog.sefaz.go.gov.br/nfe/services/v2/NfeAutorizacao?wsdl', '8', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  31 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homolog.sefaz.go.gov.br/nfe/services/v2/NfeAutorizacao?wsdl' and nfse_cd_uf = '8' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  32 +
  33 +Insert Into NFE_SERVICOS_URL
  34 +select SQ_NFSE_CD.NextVal, 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx', '9', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  35 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx' and nfse_cd_uf = '9' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  36 +
  37 +Insert Into NFE_SERVICOS_URL
  38 +select SQ_NFSE_CD.NextVal, 'https://hnfe.fazenda.mg.gov.br/nfe2/services/NfeAutorizacao', '10', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  39 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://hnfe.fazenda.mg.gov.br/nfe2/services/NfeAutorizacao' and nfse_cd_uf = '10' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  40 +
  41 +Insert Into NFE_SERVICOS_URL
  42 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.ms.gov.br/homologacao/services2/NfeAutorizacao', '11', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  43 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.ms.gov.br/homologacao/services2/NfeAutorizacao' and nfse_cd_uf = '11' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  44 +
  45 +Insert Into NFE_SERVICOS_URL
  46 +select SQ_NFSE_CD.NextVal, 'https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao?wsdl', '12', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  47 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao?wsdl' and nfse_cd_uf = '12' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  48 +
  49 +Insert Into NFE_SERVICOS_URL
  50 +select SQ_NFSE_CD.NextVal, 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx', '13', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  51 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx' and nfse_cd_uf = '13' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  52 +
  53 +Insert Into NFE_SERVICOS_URL
  54 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '14', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  55 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '14' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  56 +
  57 +Insert Into NFE_SERVICOS_URL
  58 +select SQ_NFSE_CD.NextVal, 'https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NfeAutorizacao?wsdl', '15', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  59 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NfeAutorizacao?wsdl' and nfse_cd_uf = '15' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  60 +
  61 +Insert Into NFE_SERVICOS_URL
  62 +select SQ_NFSE_CD.NextVal, 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx', '16', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  63 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx' and nfse_cd_uf = '16' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  64 +
  65 +Insert Into NFE_SERVICOS_URL
  66 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.fazenda.pr.gov.br/nfe/NFeAutorizacao3?wsdl', '17', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  67 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.fazenda.pr.gov.br/nfe/NFeAutorizacao3?wsdl' and nfse_cd_uf = '17' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  68 +
  69 +Insert Into NFE_SERVICOS_URL
  70 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '19', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  71 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '19' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  72 +
  73 +Insert Into NFE_SERVICOS_URL
  74 +select SQ_NFSE_CD.NextVal, 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx', '20', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  75 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://hom.sefazvirtual.fazenda.gov.br/NfeAutorizacao/NfeAutorizacao.asmx' and nfse_cd_uf = '20' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  76 +
  77 +Insert Into NFE_SERVICOS_URL
  78 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '21', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  79 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '21' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  80 +
  81 +Insert Into NFE_SERVICOS_URL
  82 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '22', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  83 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '22' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  84 +
  85 +Insert Into NFE_SERVICOS_URL
  86 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefaz.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '23', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  87 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefaz.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '23' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  88 +
  89 +Insert Into NFE_SERVICOS_URL
  90 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '24', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  91 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '24' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  92 +
  93 +Insert Into NFE_SERVICOS_URL
  94 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '25', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  95 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '25' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  96 +
  97 +Insert Into NFE_SERVICOS_URL
  98 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeautorizacao.asmx', '26', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  99 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeautorizacao.asmx' and nfse_cd_uf = '26' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  100 +
  101 +Insert Into NFE_SERVICOS_URL
  102 +select SQ_NFSE_CD.NextVal, 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '27', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  103 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homologacao.nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '27' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  104 +
  105 +Insert Into NFE_SERVICOS_URL
  106 +select SQ_NFSE_CD.NextVal, 'https://homnfe.sefaz.am.gov.br/services2/services/NfeAutorizacao', '28', 'H', 'RECNFE', '1', '1', Sysdate, '3.10'
  107 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://homnfe.sefaz.am.gov.br/services2/services/NfeAutorizacao' and nfse_cd_uf = '28' and nfse_ds_tipo = 'H' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  108 +
  109 +Insert Into NFE_SERVICOS_URL
  110 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '1', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  111 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '1' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  112 +
  113 +Insert Into NFE_SERVICOS_URL
  114 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '2', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  115 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '2' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  116 +
  117 +Insert Into NFE_SERVICOS_URL
  118 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '3', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  119 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '3' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  120 +
  121 +Insert Into NFE_SERVICOS_URL
  122 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefaz.ba.gov.br/webservices/NfeAutorizacao/NfeAutorizacao.asmx', '4', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  123 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefaz.ba.gov.br/webservices/NfeAutorizacao/NfeAutorizacao.asmx' and nfse_cd_uf = '4' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  124 +
  125 +Insert Into NFE_SERVICOS_URL
  126 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefaz.ce.gov.br/nfe2/services/NfeAutorizacao', '5', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  127 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefaz.ce.gov.br/nfe2/services/NfeAutorizacao' and nfse_cd_uf = '5' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  128 +
  129 +Insert Into NFE_SERVICOS_URL
  130 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '6', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  131 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '6' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  132 +
  133 +Insert Into NFE_SERVICOS_URL
  134 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefaz.go.gov.br/nfe/services/v2/NfeAutorizacao?wsdl', '8', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  135 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefaz.go.gov.br/nfe/services/v2/NfeAutorizacao?wsdl' and nfse_cd_uf = '8' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  136 +
  137 +Insert Into NFE_SERVICOS_URL
  138 +select SQ_NFSE_CD.NextVal, 'https://nfe.fazenda.mg.gov.br/nfe2/services/NfeAutorizacao', '10', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  139 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.fazenda.mg.gov.br/nfe2/services/NfeAutorizacao' and nfse_cd_uf = '10' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  140 +
  141 +Insert Into NFE_SERVICOS_URL
  142 +select SQ_NFSE_CD.NextVal, 'https://nfe.fazenda.ms.gov.br/producao/services2/NfeAutorizacao', '11', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  143 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.fazenda.ms.gov.br/producao/services2/NfeAutorizacao' and nfse_cd_uf = '11' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  144 +
  145 +Insert Into NFE_SERVICOS_URL
  146 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao?wsdl', '12', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  147 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao?wsdl' and nfse_cd_uf = '12' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  148 +
  149 +Insert Into NFE_SERVICOS_URL
  150 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '14', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  151 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '14' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  152 +
  153 +Insert Into NFE_SERVICOS_URL
  154 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefaz.pe.gov.br/nfe-service/services/NfeAutorizacao?wsdl', '15', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  155 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefaz.pe.gov.br/nfe-service/services/NfeAutorizacao?wsdl' and nfse_cd_uf = '15' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  156 +
  157 +Insert Into NFE_SERVICOS_URL
  158 +select SQ_NFSE_CD.NextVal, 'https://nfe.fazenda.pr.gov.br/nfe/NFeAutorizacao3?wsdl', '17', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  159 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.fazenda.pr.gov.br/nfe/NFeAutorizacao3?wsdl' and nfse_cd_uf = '17' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  160 +
  161 +Insert Into NFE_SERVICOS_URL
  162 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '19', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  163 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '19' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  164 +
  165 +Insert Into NFE_SERVICOS_URL
  166 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '21', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  167 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '21' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  168 +
  169 +Insert Into NFE_SERVICOS_URL
  170 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '22', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  171 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '22' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  172 +
  173 +Insert Into NFE_SERVICOS_URL
  174 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefaz.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '23', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  175 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefaz.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '23' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  176 +
  177 +Insert Into NFE_SERVICOS_URL
  178 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '24', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  179 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '24' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  180 +
  181 +Insert Into NFE_SERVICOS_URL
  182 +select SQ_NFSE_CD.NextVal, 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx', '25', 'P', 'RECNFE', '1', '1', Sysdate, '3.10'
  183 +FROM dual WHERE NOT EXISTS (select * from NFE_SERVICOS_URL where nfse_ds_url = 'https://nfe.sefazvirtual.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao.asmx' and nfse_cd_uf = '25' and nfse_ds_tipo = 'P' and nfse_ds_oper_serv = 'RECNFE' and nfse_ds_versao = '3.10');
  184 +