-
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
1 parent
c534052
commit bb218a9
Showing
27 changed files
with
504 additions
and
181 deletions.
There are no files selected for viewing
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,19 @@ | ||
export class DetalheADTO{ | ||
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 | ||
} |
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,6 @@ | ||
export class DetalheBDTO{ | ||
id_detalhe_b:number; | ||
id_detalhe_a :number; | ||
nsr:string; | ||
data_vencimento: Date; | ||
} |
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,19 @@ | ||
|
||
export class HeaderArquivoDTO{ | ||
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; | ||
} |
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,12 @@ | ||
|
||
export class HeaderLoteDTO{ | ||
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; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,26 +1,42 @@ | ||
import { EntityHelper } from "src/utils/entity-helper"; | ||
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; | ||
|
||
import { EntityHelper } from './../../utils/entity-helper'; | ||
@Entity() | ||
class DetalheA extends EntityHelper{ | ||
export class DetalheA extends EntityHelper{ | ||
@PrimaryGeneratedColumn() | ||
id_detalhe_a:number; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
id_header_lote :number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
lote_servico :string; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
id_cliente_favorecido :number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
tipo_finalidade_conta :string; | ||
@Column({ type: Date, unique: false, nullable: true }) | ||
dt_vencimento: Date; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
tipo_moeda :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
qtde_moeda :number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
valor_lancamento: number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
num_doc_lancamento :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
qtde_parcelas :number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
indicador_bloqueio :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
indicador_forma_parcelamento :string; | ||
@Column({ type: Date, unique: false, nullable: true }) | ||
periodo_vencimento:Date; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
num_parcela :number; | ||
@Column({ type: Date, unique: false, nullable: true }) | ||
data_efetivacao: Date; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { EntityHelper } from "src/utils/entity-helper"; | ||
import { Column, Entity , PrimaryGeneratedColumn} from 'typeorm'; | ||
|
||
@Entity() | ||
class DetalheB extends EntityHelper{ | ||
export class DetalheB extends EntityHelper{ | ||
@PrimaryGeneratedColumn() | ||
id_detalhe_b:number; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
id_detalhe_a :number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
nsr:string; | ||
@Column({ type: Date, unique: false, nullable: true }) | ||
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 |
---|---|---|
@@ -1,31 +1,38 @@ | ||
import { EntityHelper } from "src/utils/entity-helper"; | ||
import { Column, Entity , PrimaryGeneratedColumn} from 'typeorm'; | ||
|
||
@Entity() | ||
class HeaderArquivo extends EntityHelper{ | ||
export class HeaderArquivo extends EntityHelper{ | ||
@PrimaryGeneratedColumn() | ||
id_header_arquivo:number; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
tipo_arquivo :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
cod_banco :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
tipo_inscricao:string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
num_inscricao :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
cod_convenio :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
param_transmissao :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
agencia :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
dv_agencia:string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
num_conta :string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
dv_conta:string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
nome_empresa:string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
dt_geracao: Date; | ||
@Column({ arg0: { type: 'timestamp' } }) | ||
@Column({ type: String, unique: false, nullable: true }) | ||
hr_geracao: Date; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
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 |
---|---|---|
@@ -1,18 +1,24 @@ | ||
import { EntityHelper } from "src/utils/entity-helper"; | ||
import { Column, Entity , PrimaryGeneratedColumn} from 'typeorm'; | ||
|
||
@Entity() | ||
class HeaderLote extends EntityHelper{ | ||
export class HeaderLote extends EntityHelper{ | ||
@PrimaryGeneratedColumn() | ||
id_header_lote:number; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
id_header_arquivo:number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
lote_servico:string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
tipo_inscricao:string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
num_inscricao:string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
cod_convenio_banco:string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
tipo_compromisso:string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
param_transmissao:string; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
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,7 @@ | ||
export class ArquivoRemssaListener{ | ||
|
||
//var arquivo = insertHeaderArquivo() | ||
|
||
//envioSftp(arquivo); | ||
|
||
} |
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,42 @@ | ||
import { Injectable, Logger } from '@nestjs/common'; | ||
import { InjectRepository } from '@nestjs/typeorm'; | ||
import { EntityCondition } from 'src/utils/types/entity-condition.type'; | ||
import { NullableType } from 'src/utils/types/nullable.type'; | ||
import { | ||
Repository, | ||
UpdateResult | ||
} from 'typeorm'; | ||
import { DetalheA } from '../entity/detalhe-a.entity'; | ||
import { DetalheADTO } from '../dto/detalhe-a.dto'; | ||
|
||
|
||
@Injectable() | ||
export class DetalheARepository { | ||
private logger: Logger = new Logger('DetalheARepository', { timestamp: true }); | ||
|
||
constructor( | ||
@InjectRepository(DetalheA) | ||
private DetalheARepository: Repository<DetalheA>, | ||
) { } | ||
|
||
public async save(dto: DetalheADTO): Promise<DetalheA> { | ||
return await this.DetalheARepository.save(dto); | ||
} | ||
|
||
public async findOne( | ||
fields: EntityCondition<DetalheA> | EntityCondition<DetalheA>[], | ||
): Promise<NullableType<DetalheA>> { | ||
return await this.DetalheARepository.findOne({ | ||
where: fields, | ||
}); | ||
} | ||
|
||
public async findMany( | ||
fields: EntityCondition<DetalheA> | EntityCondition<DetalheA>[], | ||
): Promise<DetalheA[]> { | ||
return await this.DetalheARepository.find({ | ||
where: fields, | ||
}); | ||
} | ||
|
||
} |
Oops, something went wrong.