Alterado end point api/v1/delivery/schedule para mostrar a capacidade e saldo da capacidade com 3 casas decimais e criado peso adicional para mostrar a data de entrega na abertura da venda
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
/*
|
||||
https://docs.nestjs.com/providers#services
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { connectionOptions } from 'src/configs/typeorm.config';
|
||||
import { Connection } from 'typeorm';
|
||||
|
||||
@Injectable()
|
||||
export class SellerService {
|
||||
|
||||
async getSellers(){
|
||||
const connection = new Connection(connectionOptions);
|
||||
await connection.connect();
|
||||
const queryRunner = connection.createQueryRunner();
|
||||
await queryRunner.connect();
|
||||
try {
|
||||
const sellers = await queryRunner.query('SELECT PCUSUARI.CODUSUR as "sellerId" ' +
|
||||
' ,PCUSUARI.NOME as "name" ' +
|
||||
' FROM PCUSUARI ' +
|
||||
' WHERE PCUSUARI.DTTERMINO IS NULL ' +
|
||||
' AND PCUSUARI.DTEXCLUSAO IS NULL ' +
|
||||
' AND PCUSUARI.TIPOVEND NOT IN (\'P\') ');
|
||||
|
||||
return sellers;
|
||||
} finally {
|
||||
await queryRunner.release();
|
||||
await connection.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
https://docs.nestjs.com/providers#services
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { connectionOptions } from 'src/configs/typeorm.config';
|
||||
import { Connection } from 'typeorm';
|
||||
|
||||
@Injectable()
|
||||
export class SellerService {
|
||||
|
||||
async getSellers(){
|
||||
const connection = new Connection(connectionOptions);
|
||||
await connection.connect();
|
||||
const queryRunner = connection.createQueryRunner();
|
||||
await queryRunner.connect();
|
||||
try {
|
||||
const sellers = await queryRunner.query('SELECT PCUSUARI.CODUSUR as "sellerId" ' +
|
||||
' ,PCUSUARI.NOME as "name" ' +
|
||||
' FROM PCUSUARI ' +
|
||||
' WHERE PCUSUARI.DTTERMINO IS NULL ' +
|
||||
' AND PCUSUARI.DTEXCLUSAO IS NULL ' +
|
||||
' AND PCUSUARI.TIPOVEND NOT IN (\'P\') ');
|
||||
|
||||
return sellers;
|
||||
} finally {
|
||||
await queryRunner.release();
|
||||
await connection.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user