-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/#196-integracao-views-jae
- Loading branch information
Showing
28 changed files
with
215 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
import { EntityHelper } from './../../utils/entity-helper'; | ||
@Entity() | ||
class DetalheA extends EntityHelper{ | ||
id_detalhe_a:number; | ||
id_header_lote :number; | ||
lote_servico :string; | ||
id_cliente_favorecido :number; | ||
tipo_finalidade_conta :string; | ||
dt_vencimento: Date; | ||
tipo_moeda :string; | ||
qtde_moeda :number; | ||
valor_lancamento: number; | ||
num_doc_lancamento :string; | ||
qtde_parcelas :number; | ||
indicador_bloqueio :string; | ||
indicador_forma_parcelamento :string; | ||
periodo_vencimento:Date; | ||
num_parcela :number; | ||
data_efetivacao: Date; | ||
valor_real_efetivado:number | ||
} | ||
|
||
function Entity(): (target: typeof DetalheA) => void | typeof DetalheA { | ||
throw new Error("Function not implemented."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { EntityHelper } from "src/utils/entity-helper"; | ||
|
||
@Entity() | ||
class DetalheB extends EntityHelper{ | ||
id_detalhe_b:number; | ||
id_detalhe_a :number; | ||
nsr:string; | ||
data_vencimento: Date; | ||
} | ||
|
||
function Entity(): (target: typeof DetalheB) => void | typeof DetalheB { | ||
throw new Error("Function not implemented."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { EntityHelper } from "src/utils/entity-helper"; | ||
|
||
@Entity() | ||
class HeaderArquivo extends EntityHelper{ | ||
id_header_arquivo:number; | ||
tipo_arquivo :string; | ||
cod_banco :string; | ||
tipo_inscricao:string; | ||
num_inscricao :string; | ||
cod_convenio :string; | ||
param_transmissao :string; | ||
agencia :string; | ||
dv_agencia:string; | ||
num_conta :string; | ||
dv_conta:string; | ||
nome_empresa:string; | ||
dt_geracao: Date; | ||
@Column({ arg0: { type: 'timestamp' } }) | ||
hr_geracao: Date; | ||
id_transacao:number; | ||
} | ||
|
||
|
||
function Entity(): (target: typeof HeaderArquivo) => void | typeof HeaderArquivo { | ||
throw new Error("Function not implemented."); | ||
} | ||
|
||
function Column(arg0: { arg0: { type: string; }; }): (target: HeaderArquivo, propertyKey: "hr_geracao") => void { | ||
throw new Error("Function not implemented."); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { EntityHelper } from "src/utils/entity-helper"; | ||
|
||
@Entity() | ||
class HeaderLote extends EntityHelper{ | ||
id_header_lote:number; | ||
id_header_arquivo:number; | ||
lote_servico:string; | ||
tipo_inscricao:string; | ||
num_inscricao:string; | ||
cod_convenio_banco:string; | ||
tipo_compromisso:string; | ||
param_transmissao:string; | ||
id_pagadora:number; | ||
} | ||
|
||
function Entity(): (target: typeof HeaderLote) => void | typeof HeaderLote { | ||
throw new Error("Function not implemented."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { EntityHelper } from "src/utils/entity-helper"; | ||
|
||
|
||
@Entity() | ||
class ItemTransacao extends EntityHelper{ | ||
id_item_transacao:number; | ||
dt_transacao: Date; | ||
dt_processamentoDate; | ||
dt_capturaDate; | ||
modo:string; | ||
nome_consorcio:string; | ||
id_tipo_pagamento:number; | ||
tipo_transacao:string; | ||
valor_item_transacao:number; | ||
id_transacao:number; | ||
} | ||
|
||
function Entity(): (target: typeof ItemTransacao) => void | typeof ItemTransacao { | ||
throw new Error("Function not implemented."); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { EntityHelper } from '../../utils/entity-helper'; | ||
@Entity() | ||
class TransacaoClienteItem extends EntityHelper{ | ||
id_item_transacao:number; | ||
id_cliente_favorecido:number; | ||
} | ||
|
||
function Entity(): (target: typeof TransacaoClienteItem) => void | typeof TransacaoClienteItem { | ||
throw new Error('Function not implemented.'); | ||
} |
File renamed without changes.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class TransacaoListener{ | ||
|
||
private transacaoService:TransacaoService; | ||
|
||
//rodar as 09:00 e as 14:00 | ||
function JobTransaction(){ | ||
transacaoService.insereTransacoes(); | ||
} | ||
|
||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//metodo de insert cliente favorecido |
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class Pagador { | ||
|
||
|
||
function getPagador(tipo:string):Pagador{//Saber se é fase 4 ou CCT pra pegar o pagador | ||
//Se o tipo for CCT pagador 2 | ||
//Senao 1 | ||
|
||
} | ||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { UsersService } from 'src/users/users.service'; | ||
import { ClienteFavorecido } from './../entitys/cliente-favorecido.entity'; | ||
|
||
class ClienteFavorecidoService{ | ||
|
||
private clienteFavorecido: ClienteFavorecidoRepository; | ||
|
||
private userService: UsersService; | ||
|
||
function insertClienteFavorecido(){ | ||
|
||
// userService.get | ||
|
||
for{ | ||
//veirificar se o usuario já existe na base | ||
ClienteFavorecido.findByCpfCnj(cpf_cnpj); | ||
|
||
|
||
// de/para -> user / Cliente | ||
|
||
//se não existir | ||
|
||
clienteFavorecido.insere(); | ||
|
||
//Se exitir | ||
ClienteFavorecido.atualiza(); | ||
} | ||
} | ||
|
||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
class TransacaoService{ | ||
|
||
|
||
private transacoesRepository: TransacoesRepository; | ||
|
||
private itemTransacaoRepository: ItemTransacoesRepository; | ||
|
||
private clienteFavorecidoService: ClienteFavorecidoService; | ||
|
||
private pagadorService: PagadorService; | ||
|
||
function insereTransacoes(){ | ||
//metodo de inserir cliente Favorecido | ||
var listaCliente = clienteFavorecidoService.insere(); | ||
//TransacoesFernanda buscar | ||
var transacoesFernanda = buscar; | ||
|
||
//percorrer todas a transações e inserir na tabela transacao | ||
for(transacaoFernada : transacoesFernanda) { | ||
|
||
//metodo de consultar o pagador | ||
var pagador = pagadorService.getPagador(2):Pagador; | ||
transacao.idPagador = idPagador; | ||
transacao.nome = transacaoFernanda.nome; | ||
//preencher o objeto transacao e inserir na base (id_pagador parte desse obj) | ||
|
||
var id_transacao = transacoesRepository.insert(transacao) | ||
|
||
//buscar todas as ordens de pagamento por idTransacaoFernanda | ||
var ordensPgto = buscarOrder(transacaoFernada.idTransacaoFernanda); | ||
for(ordemPgto:ordensPgto){ | ||
|
||
var id_cliente_favorecido = listaCliente.findByCPFCNPJ(ordemPgto.cpf_enpj); | ||
itemTransacao.id_cliente_favorecido = id_cliente_favorecido; | ||
//insere o item detalhamento | ||
itemTransacao.id_transacao = id_transacao; | ||
itemTransacao.idClientFavorecido = idClienteFavorecido; | ||
itemTransacao.dt_transacao = ordemPgto.dt_transacao; | ||
|
||
itemTransacaoRepository.insere(itemTransacao); | ||
} | ||
|
||
} | ||
|
||
} | ||
} |