-
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.
- Loading branch information
Showing
27 changed files
with
548 additions
and
319 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,10 +1,21 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { BigqueryService } from './bigquery.service'; | ||
import { ConfigModule } from '@nestjs/config'; | ||
import { BigqueryOrdemPagamentoService } from './services/bigquery-ordem-pagamento.service'; | ||
import { BigqueryOrdemPagamentoRepository } from './repositories/bigquery-ordem-pagamento.repository'; | ||
import { SettingsModule } from 'src/settings/settings.module'; | ||
|
||
@Module({ | ||
imports: [ConfigModule], | ||
providers: [BigqueryService], | ||
exports: [BigqueryService], | ||
imports: [ConfigModule, SettingsModule], | ||
providers: [ | ||
BigqueryService, | ||
BigqueryOrdemPagamentoService, | ||
BigqueryOrdemPagamentoRepository, | ||
], | ||
exports: [ | ||
BigqueryService, | ||
BigqueryOrdemPagamentoService, | ||
BigqueryOrdemPagamentoRepository, | ||
], | ||
}) | ||
export class BigqueryModule {} | ||
export class BigqueryModule { } |
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 |
---|---|---|
@@ -1,7 +1,97 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { CnabService } from './service/cnab.service'; | ||
import { HeaderArquivoService } from './service/header-arquivo.service'; | ||
import { HeaderLoteRepository } from './repository/header-lote.repository'; | ||
import { HeaderLoteService } from './service/header-lote.service'; | ||
import { DetalheAService } from './service/detalhe-a.service'; | ||
import { DetalheARepository } from './repository/detalhe-a.repository'; | ||
import { DetalheBService } from './service/detalhe-b.service'; | ||
import { DetalheBRepository } from './repository/detalhe-b.repository'; | ||
import { ClienteFavorecidoService } from './service/cliente-favorecido.service'; | ||
import { ClienteFavorecidoRepository } from './repository/cliente-favorecido.repository'; | ||
import { PagadorService } from './service/pagador.service'; | ||
import { PagadorRepository } from './repository/pagador.repository'; | ||
import { ArquivoPublicacaoRepository } from './repository/arquivo-publicacao.repository'; | ||
import { TransacaoService } from './service/transacao.service'; | ||
import { TransacaoRepository } from './repository/transacao.repository'; | ||
import { ItemTransacaoService } from './service/item-transacao.service'; | ||
import { ItemTransacaoRepository } from './repository/item-transacao.repository'; | ||
import { SftpModule } from 'src/sftp/sftp.module'; | ||
import { HeaderArquivoRepository } from './repository/header-arquivo.repository'; | ||
import { Cnab104Service } from './service/cnab-104.service'; | ||
import { BanksModule } from 'src/banks/banks.module'; | ||
import { TypeOrmModule } from '@nestjs/typeorm'; | ||
import { HeaderArquivo } from './entity/header-arquivo.entity'; | ||
import { HeaderLote } from './entity/header-lote.entity'; | ||
import { DetalheA } from './entity/detalhe-a.entity'; | ||
import { DetalheB } from './entity/detalhe-b.entiy'; | ||
import { ClienteFavorecido } from './entity/cliente-favorecido.entity'; | ||
import { ArquivoPublicacao } from './entity/arquivo-publicacao.entity'; | ||
import { Transacao } from './entity/transacao.entity'; | ||
import { ItemTransacao } from './entity/item-transacao.entity'; | ||
import { Pagador } from './entity/pagador.entity'; | ||
import { UsersModule } from 'src/users/users.module'; | ||
import { BigqueryModule } from 'src/bigquery/bigquery.module'; | ||
|
||
@Module({ | ||
providers: [CnabService], | ||
imports: [ | ||
UsersModule, | ||
SftpModule, | ||
BanksModule, | ||
BigqueryModule, | ||
TypeOrmModule.forFeature([ | ||
HeaderArquivo, | ||
HeaderLote, | ||
DetalheA, | ||
DetalheB, | ||
ClienteFavorecido, | ||
ArquivoPublicacao, | ||
Transacao, | ||
ItemTransacao, | ||
Pagador, | ||
]) | ||
], | ||
providers: [ | ||
CnabService, | ||
Cnab104Service, | ||
HeaderArquivoService, | ||
HeaderArquivoRepository, | ||
HeaderLoteRepository, | ||
HeaderLoteService, | ||
DetalheAService, | ||
DetalheARepository, | ||
DetalheBService, | ||
DetalheBRepository, | ||
ClienteFavorecidoService, | ||
ClienteFavorecidoRepository, | ||
PagadorService, | ||
PagadorRepository, | ||
ArquivoPublicacaoRepository, | ||
TransacaoService, | ||
TransacaoRepository, | ||
ItemTransacaoService, | ||
ItemTransacaoRepository, | ||
], | ||
exports: [ | ||
CnabService, | ||
Cnab104Service, | ||
HeaderArquivoService, | ||
HeaderArquivoRepository, | ||
HeaderLoteRepository, | ||
HeaderLoteService, | ||
DetalheAService, | ||
DetalheARepository, | ||
DetalheBService, | ||
DetalheBRepository, | ||
ClienteFavorecidoService, | ||
ClienteFavorecidoRepository, | ||
PagadorService, | ||
PagadorRepository, | ||
ArquivoPublicacaoRepository, | ||
TransacaoService, | ||
TransacaoRepository, | ||
ItemTransacaoService, | ||
ItemTransacaoRepository, | ||
] | ||
}) | ||
export class CnabModule { } |
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
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 |
---|---|---|
@@ -1,37 +1,78 @@ | ||
import { IsNotEmpty, ValidateIf } from "class-validator"; | ||
|
||
function isCreate(object: ArquivoPublicacaoDTO): boolean { | ||
return object.id === undefined; | ||
} | ||
|
||
export class ArquivoPublicacaoDTO { | ||
constructor(dto?: ArquivoPublicacaoDTO) { | ||
if (dto) { | ||
Object.assign(this, dto); | ||
} | ||
constructor(dto?: ArquivoPublicacaoDTO) { | ||
if (dto) { | ||
Object.assign(this, dto); | ||
} | ||
id_arquivo_publicacao: number; | ||
|
||
id_header_arquivo: number; | ||
id_transacao: number; | ||
id_header_lote: number; | ||
dt_geracao_remessa: Date; | ||
hr_geracao_remessa: Date; | ||
dt_geracao_retorno: Date; | ||
hr_geracao_retorno: Date; | ||
|
||
lote_servico: string; | ||
nome_pagador: string; | ||
agencia_pagador: string; | ||
dv_agencia_pagador: string; | ||
conta_pagador: string; | ||
dv_conta_pagador: string; | ||
|
||
nome_cliente?: string; | ||
cpf_cnpj_cliente?: string; | ||
cod_banco_cliente?: string; | ||
agencia_cliente?: string; | ||
dv_agencia_cliente?: string; | ||
conta_corrente_cliente?: string; | ||
dv_conta_corrente_cliente?: string; | ||
|
||
dt_vencimento?: Date; | ||
valor_lancamento?: number; | ||
data_efetivacao?: Date; | ||
valor_real_efetivado?: number; | ||
ocorrencias: string; | ||
} | ||
} | ||
id: number; | ||
|
||
idHeaderArquivo: number; | ||
idTransacao: number; | ||
idHeaderLote: number; | ||
dataGeracaoRemessa: Date; | ||
horaGeracaoRemessa: Date; | ||
dataGeracaoRetorno: Date; | ||
horaGeracaoRetorno: Date; | ||
|
||
|
||
loteServico: string; | ||
nomePagador: string; | ||
agenciaPagador: string; | ||
dvAgenciaPagador: string; | ||
contaPagador: string; | ||
dvContaPagador: string; | ||
|
||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
nomeCliente?: string; | ||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
cpfCnpjCliente?: string; | ||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
codBancoCliente?: string; | ||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
agenciaCliente?: string; | ||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
dvAgenciaCliente?: string; | ||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
contaCorrenteCliente?: string; | ||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
dvContaCorrenteCliente?: string; | ||
|
||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
dataVencimento?: Date; | ||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
valorLancamento?: number; | ||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
dataEfetivacao?: Date; | ||
|
||
@ValidateIf(isCreate) | ||
@IsNotEmpty() | ||
valorRealEfetivado?: number; | ||
|
||
ocorrencias: string; | ||
} |
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
Oops, something went wrong.