commit 5a9bcfa9e030f4fab6a46f38406f7806ee7d21a2 Author: Lucas Date: Fri Jul 13 08:15:19 2018 -0300 1515 - Subir o projeto de flash de venda da GF no repositório (Seguir o modelo padrão) diff --git a/01 - Objetos, Views/01 - Tabelas, Sequences/.davinTI.txt b/01 - Objetos, Views/01 - Tabelas, Sequences/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/01 - Objetos, Views/01 - Tabelas, Sequences/BSC_FATURAMENTO.sql b/01 - Objetos, Views/01 - Tabelas, Sequences/BSC_FATURAMENTO.sql new file mode 100644 index 0000000..92270f4 --- /dev/null +++ b/01 - Objetos, Views/01 - Tabelas, Sequences/BSC_FATURAMENTO.sql @@ -0,0 +1,125 @@ +-- Create table +create table BSC_FATURAMENTO +( + chave_faturamento NUMBER(15) not null, + chave_empresa NUMBER(15) not null, + categoria_pai VARCHAR2(200) not null, + categoria VARCHAR2(300), + chave_produto NUMBER(15), + descricao_produto VARCHAR2(300), + chave_familia NUMBER(15), + quantidade NUMBER(15,2), + valor_venda NUMBER(15,2), + valor_bruto NUMBER(15,2), + referencia DATE, + chave_categoria_pai NUMBER(10), + chave_categoria NUMBER(10) +) +tablespace C5DADOS + pctfree 10 + initrans 1 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); +-- Add comments to the columns +comment on column BSC_FATURAMENTO.chave_faturamento + is 'Chave da tabela'; +comment on column BSC_FATURAMENTO.chave_empresa + is 'Código da loja'; +comment on column BSC_FATURAMENTO.categoria_pai + is 'Descrição da categoria pai'; +comment on column BSC_FATURAMENTO.categoria + is 'Descrição da categoria'; +comment on column BSC_FATURAMENTO.chave_produto + is 'Código do produto'; +comment on column BSC_FATURAMENTO.descricao_produto + is 'Descrição do Produto'; +comment on column BSC_FATURAMENTO.chave_familia + is 'Código da família do produto'; +comment on column BSC_FATURAMENTO.quantidade + is 'Quanitdade vendida'; +comment on column BSC_FATURAMENTO.valor_venda + is 'Valor toral vendido'; +comment on column BSC_FATURAMENTO.valor_bruto + is 'Valor bruto vendido'; +comment on column BSC_FATURAMENTO.referencia + is 'Mês de referência do faturamento'; +comment on column BSC_FATURAMENTO.chave_categoria_pai + is 'Código da categoria pai'; +comment on column BSC_FATURAMENTO.chave_categoria + is 'Código da categoria'; +-- Create/Recreate indexes +create index BSC_FATURAMENTO_IDX on BSC_FATURAMENTO (CHAVE_CATEGORIA) + tablespace C5DADOS + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); +create index BSC_FATURAMENTO_IDX1 on BSC_FATURAMENTO (REFERENCIA) + tablespace C5DADOS + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); +create index BSC_FATURAMENTO_IDX2 on BSC_FATURAMENTO (REFERENCIA, CHAVE_CATEGORIA) + tablespace C5DADOS + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); +create index BSC_FATURAMENTO_IDX3 on BSC_FATURAMENTO (REFERENCIA, CHAVE_EMPRESA) + tablespace C5DADOS + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); +-- Create/Recreate primary, unique and foreign key constraints +alter table BSC_FATURAMENTO + add constraint BSC_FATURAMENTO_PK primary key (CHAVE_FATURAMENTO) + using index + tablespace C5DADOS + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); diff --git a/01 - Objetos, Views/01 - Tabelas, Sequences/BSC_FATURAMENTO_PERDAS.sql b/01 - Objetos, Views/01 - Tabelas, Sequences/BSC_FATURAMENTO_PERDAS.sql new file mode 100644 index 0000000..b5087e7 --- /dev/null +++ b/01 - Objetos, Views/01 - Tabelas, Sequences/BSC_FATURAMENTO_PERDAS.sql @@ -0,0 +1,96 @@ +-- Create table +create table BSC_FATURAMENTO_PERDAS +( + chave_perda NUMBER not null, + chave_empresa NUMBER not null, + categoria_pai VARCHAR2(200), + categoria VARCHAR2(300), + chave_produto NUMBER(15), + descricao_produto VARCHAR2(300), + chave_familia NUMBER(15), + quantidade NUMBER(15,2), + valor_diferenca NUMBER(15,2), + referencia DATE, + chave_categoria_pai NUMBER(10), + chave_categoria NUMBER(10) +) +tablespace C5DADOS + pctfree 10 + initrans 1 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); +-- Add comments to the columns +comment on column BSC_FATURAMENTO_PERDAS.chave_perda + is 'Chave da tabela'; +comment on column BSC_FATURAMENTO_PERDAS.chave_empresa + is 'Chave da loja'; +comment on column BSC_FATURAMENTO_PERDAS.categoria_pai + is 'Descrição da categoria pai'; +comment on column BSC_FATURAMENTO_PERDAS.categoria + is 'Descrição da categoria'; +comment on column BSC_FATURAMENTO_PERDAS.chave_produto + is 'chave do produto'; +comment on column BSC_FATURAMENTO_PERDAS.descricao_produto + is 'Descrição do produto'; +comment on column BSC_FATURAMENTO_PERDAS.chave_familia + is 'Chave da família do produto'; +comment on column BSC_FATURAMENTO_PERDAS.quantidade + is 'Quantidade perdida em unidade'; +comment on column BSC_FATURAMENTO_PERDAS.valor_diferenca + is 'Valor perdido em R$'; +comment on column BSC_FATURAMENTO_PERDAS.referencia + is 'Mês de referência da perda'; +comment on column BSC_FATURAMENTO_PERDAS.chave_categoria_pai + is 'Chave da categoria pai'; +comment on column BSC_FATURAMENTO_PERDAS.chave_categoria + is 'Chave da categoria'; +-- Create/Recreate indexes +create index BSC_PERDAS_IDX1 on BSC_FATURAMENTO_PERDAS (REFERENCIA, CHAVE_EMPRESA) + tablespace C5DADOS + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); +create index BSC_PERDAS_IDX2 on BSC_FATURAMENTO_PERDAS (REFERENCIA, CHAVE_CATEGORIA) + tablespace C5DADOS + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); +-- Create/Recreate primary, unique and foreign key constraints +alter table BSC_FATURAMENTO_PERDAS + add constraint BSC_FATURAMENTO_PERDAS_PK primary key (CHAVE_PERDA) + using index + tablespace C5DADOS + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); diff --git a/01 - Objetos, Views/01 - Tabelas, Sequences/BSC_USUARIO_CATEGORIA.sql b/01 - Objetos, Views/01 - Tabelas, Sequences/BSC_USUARIO_CATEGORIA.sql new file mode 100644 index 0000000..a041a37 --- /dev/null +++ b/01 - Objetos, Views/01 - Tabelas, Sequences/BSC_USUARIO_CATEGORIA.sql @@ -0,0 +1,48 @@ +-- Create table +create table BSC_USUARIO_CATEGORIA +( + chave_usuario_categoria NUMBER(15) not null, + chave_usuario NUMBER(15), + chave_empresa NUMBER(15), + categoria_pai VARCHAR2(200), + categoria VARCHAR2(300) +) +tablespace C5DADOS + pctfree 10 + initrans 1 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); +-- Add comments to the columns +comment on column BSC_USUARIO_CATEGORIA.chave_usuario_categoria + is 'Código da tabela'; +comment on column BSC_USUARIO_CATEGORIA.chave_usuario + is 'Código do usuário'; +comment on column BSC_USUARIO_CATEGORIA.chave_empresa + is 'Código da Empresa'; +comment on column BSC_USUARIO_CATEGORIA.categoria_pai + is 'Categoria pai vinculado'; +comment on column BSC_USUARIO_CATEGORIA.categoria + is 'Categoria vinculado'; +-- Create/Recreate primary, unique and foreign key constraints +alter table BSC_USUARIO_CATEGORIA + add constraint BSC_USUARIO_CATEGORIA_PK primary key (CHAVE_USUARIO_CATEGORIA) + using index + tablespace C5DADOS + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 128K + next 128K + minextents 1 + maxextents unlimited + pctincrease 0 + ); diff --git a/01 - Objetos, Views/02 - Views/.davinTI.txt b/01 - Objetos, Views/02 - Views/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/01 - Objetos, Views/03 - Procedures/.davinTI.txt b/01 - Objetos, Views/03 - Procedures/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/01 - Objetos, Views/04 - Functions/.davinTI.txt b/01 - Objetos, Views/04 - Functions/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/02 - Fluxos/01 - Querys/.davinTI.txt b/02 - Fluxos/01 - Querys/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/02 - Fluxos/02 - Scripts/.davinTI.txt b/02 - Fluxos/02 - Scripts/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/02 - Fluxos/03 - Grupos/.davinTI.txt b/02 - Fluxos/03 - Grupos/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/02 - Fluxos/03 - Grupos/Gerentes.txt b/02 - Fluxos/03 - Grupos/Gerentes.txt new file mode 100644 index 0000000..5b2bfd4 --- /dev/null +++ b/02 - Fluxos/03 - Grupos/Gerentes.txt @@ -0,0 +1,3 @@ +Sigla: gerente_loja +Nome: Gerentes de Loja +Descrição: Grupo que define os gerentes das lojas. \ No newline at end of file diff --git a/02 - Fluxos/03 - Grupos/diretoria.txt b/02 - Fluxos/03 - Grupos/diretoria.txt new file mode 100644 index 0000000..ebe0f04 --- /dev/null +++ b/02 - Fluxos/03 - Grupos/diretoria.txt @@ -0,0 +1,3 @@ +Sigla: diretoria +Nome: Diretoria +Descrição: Grupo de diretores. \ No newline at end of file diff --git a/02 - Fluxos/04 - Desktop/.davinTI.txt b/02 - Fluxos/04 - Desktop/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/02 - Fluxos/05 - Mobile/.davinTI.txt b/02 - Fluxos/05 - Mobile/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/03 - Painéis/.davinTI.txt b/03 - Painéis/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/03 - Painéis/Cadastro Encarregados.xml b/03 - Painéis/Cadastro Encarregados.xml new file mode 100644 index 0000000..c4b0fa8 --- /dev/null +++ b/03 - Painéis/Cadastro Encarregados.xml @@ -0,0 +1,176 @@ + + + + +
+ Indicadores + Flash de Vendas + + + + + + + + + + + + + + + + + + + + + + + + + RAZAO_SOCIAL + ID_SISTEMA_EXTERNO + + + + + + + + + + + + + CATEGORIA_PAI + CATEGORIA_PAI + + + + + + + + + + + + + + + + CATEGORIA + CATEGORIA + + + + + + + + + + + + + + + + + + USUARIO_ID + NOME + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/03 - Painéis/Flash Perdas Web.xml b/03 - Painéis/Flash Perdas Web.xml new file mode 100644 index 0000000..e5666a5 --- /dev/null +++ b/03 - Painéis/Flash Perdas Web.xml @@ -0,0 +1,644 @@ + + + + +
+ Indicadores + Flash de Vendas + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CHAVE_EMPRESA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CATEGORIA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CHAVE_PRODUTO + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/03 - Painéis/Flash Perdas mobile.xml b/03 - Painéis/Flash Perdas mobile.xml new file mode 100644 index 0000000..956edd1 --- /dev/null +++ b/03 - Painéis/Flash Perdas mobile.xml @@ -0,0 +1,24 @@ + + +
+ Form mobile + + + + + + + + + + +
+ +
diff --git a/04 - Relatórios/.davinTI.txt b/04 - Relatórios/.davinTI.txt new file mode 100644 index 0000000..e69de29 diff --git a/04 - Relatórios/AgrupadoresSinteticos.jrxml b/04 - Relatórios/AgrupadoresSinteticos.jrxml new file mode 100644 index 0000000..f4cdf4c --- /dev/null +++ b/04 - Relatórios/AgrupadoresSinteticos.jrxml @@ -0,0 +1,1304 @@ + + + + + + + + + + + + + + + + + 0 then 1 end) dentro, +count(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) fora, +(Select count(case when (a.pontuacao = 0) and (a.naoaplicavel = 'Não') then 1 end) from auditoria_execucao_lista a, auditoria_execucao_questoes b, auditoria_coleta c where c.chave_questao = b.chave_item and cast(a.chave_item_lista as "varchar"(20)) = c.resposta and c.chave_processo = $P{audit}) totalfora + from auditoria_coleta cc, auditoria_execucao_questoes cq, auditoria_execucao_lista cl +where cc.chave_processo = $P{audit} and cc.chave_questao = cq.chave_item and cast(cl.chave_item_lista as "varchar"(20)) = cc.resposta group by rtrim(cq.tag_id3)]]> + + + + + + + + + + + + + + + + + + + + + + + + 0 then 1 end) dentro, +count(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) fora, +sum(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) totfora + from auditoria_coleta cc, auditoria_execucao_questoes cq, auditoria_execucao_lista cl +where cc.chave_processo = $P{audit} and cc.chave_questao = cq.chave_item and cast(cl.chave_item_lista as "varchar"(20)) = cc.resposta group by cq.tag_id]]> + + + + + + + + + + + + + + + + + + + + + + + 0 then 1 end) dentro, +count(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) fora, +sum(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) totfora + from auditoria_coleta cc, auditoria_execucao_questoes cq, auditoria_execucao_lista cl +where cc.chave_processo = $P{audit} and cc.chave_questao = cq.chave_item and cast(cl.chave_item_lista as "varchar"(20)) = cc.resposta group by cq.tag_id, cq.tag_id2 order by 1,2]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.79 ? "OK" : "NÃO OK"]]> + + + + + + + + + 0.79 ? "OK" : "NÃO OK"]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.79 ? "OK" : "NÃO OK"]]> + + + + + + + + + 0.79 ? "OK" : "NÃO OK"]]> + + + + + + + + + + + + + + + <band splitType="Stretch"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.79 ? "OK" : "NÃO OK"]]> + + + + + + + + + 0.79 ? "OK" : "NÃO OK"]]> + + + + + + + + + + + + + + + + + + + + + + + diff --git a/04 - Relatórios/AgrupadoresSinteticos.xml b/04 - Relatórios/AgrupadoresSinteticos.xml new file mode 100644 index 0000000..aa230ee --- /dev/null +++ b/04 - Relatórios/AgrupadoresSinteticos.xml @@ -0,0 +1,77 @@ + + + +
+ Auditoria + Auditoria + + + + + + + + + SELECT distinct E.CHAVE_EXECUCAO, E.DATAHORAABERTURA, C.TITULO, ne.razao_social FROM AUDITORIA_EXECUCAO E + INNER JOIN AUDITORIA C ON C.CHAVE_AUDITORIA = E.CHAVE_AUDITORIA + inner join auditoria_coleta cc on cc.chave_processo = e.chave_execucao + inner join nauth.empresa ne on ne.empresa_id = cc.empresa + ORDER BY CHAVE_EXECUCAO DESC + + + CHAVE_EXECUCAO + TITULO + + + + + + + + + + + + + CHAVE_EXECUCAO + TITULO + DATAHORAABERTURA + RAZAO_SOCIAL + + + + + +