added correct param

This commit is contained in:
Kallesh B S 2025-03-21 14:04:28 +05:30
parent 8b8c2202e6
commit dbd040e033
2 changed files with 33 additions and 26 deletions

View File

@ -343,7 +343,7 @@ export class OracleController {
}
@ApiTags('Manage Fee - Oracle')
@Get('/GetBondRates/:id')
@Get('/GetBondRates/:P_SPID/:P_ACTIVE_INACTIVE')
GetBondRates(
@Param('P_SPID', ParseIntPipe) P_SPID: number,
@Param('P_ACTIVE_INACTIVE',) P_ACTIVE_INACTIVE:string
@ -352,7 +352,7 @@ export class OracleController {
}
@ApiTags('Manage Fee - Oracle')
@Get('/GetCargoRates/:id')
@Get('/GetCargoRates/:P_SPID/:P_ACTIVE_INACTIVE')
GetCargoRates(
@Param('P_SPID', ParseIntPipe) P_SPID: number,
@Param('P_ACTIVE_INACTIVE',) P_ACTIVE_INACTIVE:string
@ -361,7 +361,7 @@ export class OracleController {
}
@ApiTags('Manage Fee - Oracle')
@Get('/GetCfFeeRates/:id')
@Get('/GetCfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
GetCfFeeRates(
@Param('P_SPID', ParseIntPipe) P_SPID: number,
@Param('P_ACTIVE_INACTIVE',) P_ACTIVE_INACTIVE:string
@ -370,7 +370,7 @@ export class OracleController {
}
@ApiTags('Manage Fee - Oracle')
@Get('/GetCsFeeRates/:id')
@Get('/GetCsFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
GetCsFeeRates(
@Param('P_SPID', ParseIntPipe) P_SPID: number,
@Param('P_ACTIVE_INACTIVE',) P_ACTIVE_INACTIVE:string
@ -379,7 +379,7 @@ export class OracleController {
}
@ApiTags('Manage Fee - Oracle')
@Get('/GetEfFeeRates/:id')
@Get('/GetEfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
GetEfFeeRates(
@Param('P_SPID', ParseIntPipe) P_SPID: number,
@Param('P_ACTIVE_INACTIVE',) P_ACTIVE_INACTIVE:string
@ -388,10 +388,10 @@ export class OracleController {
}
@ApiTags('Manage Fee - Oracle')
@Get('/GetFeeComm/:id')
@Get('/GetFeeComm/:P_SPID/:P_ACTIVE_INACTIVE')
GetFeeComm(
@Param('P_SPID', ParseIntPipe) P_SPID: number,
@Param('P_ACTIVE_INACTIVE',) P_ACTIVE_INACTIVE:string
@Param('P_ACTIVE_INACTIVE') P_ACTIVE_INACTIVE:string
) {
return this.manageFeeService.GETFEECOMM(P_SPID,P_ACTIVE_INACTIVE)
}

View File

@ -95,11 +95,18 @@ export class OracleService {
async getRegions() {
let connection;
let rows = [];
try {
try {
connection = await this.oracleDBService.getConnection()
if (!connection) {
throw new Error('No DB Connected')
}
catch (err) {
console.log("DB ERROR: ", err);
return { error: "Error while connecting to DB" }
}
// if (!connection) {
// throw new Error('No DB Connected')
// }
const result = await connection.execute(
`BEGIN