released connection

This commit is contained in:
Kallesh B S 2025-04-30 17:28:09 +05:30
parent 9c3ac93fe2
commit 378b9adf4d
9 changed files with 596 additions and 10 deletions

View File

@ -281,6 +281,15 @@ export class HomePageService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async GetCarnetSummaryData(p_emailaddr: string) {
@ -372,6 +381,15 @@ export class HomePageService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async SaveCarnetApplication(body: SaveCarnetApplicationDTO) {
@ -707,6 +725,15 @@ export class HomePageService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async TransmitApplicationtoProcess(body: TransmitApplicationtoProcessDTO) {
@ -775,6 +802,15 @@ export class HomePageService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async GetCarnetDetailsbyCarnetStatus(
@ -837,5 +873,14 @@ export class HomePageService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
}

View File

@ -339,6 +339,15 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
UpdateClient = async (body: UpdateClientDTO) => {
@ -477,6 +486,15 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
UpdateClientContacts = async (body: UpdateClientContactsDTO) => {
@ -615,6 +633,15 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
UpdateClientLocations = async (body: UpdateClientLocationsDTO) => {
@ -747,6 +774,15 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
CreateClientContact = async (body: CreateAdditionalClientContactsDTO) => {
@ -909,6 +945,15 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
CreateClientLocation = async (body: CreateAdditionalClientLocationsDTO) => {
@ -1069,6 +1114,15 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
GetPreparers = async (body: GetPreparersDTO) => {
@ -1187,6 +1241,15 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
GetPreparerByClientid = async (
@ -1248,6 +1311,15 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
GetPreparerContactsByClientid = async (
@ -1309,6 +1381,15 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
GetPreparerLocByClientid = async (
@ -1370,5 +1451,14 @@ export class ManageClientsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
}

View File

@ -21,7 +21,7 @@ import {
@Injectable()
export class ManageFeeService {
constructor(private readonly oracleDBService: OracleDBService) {}
constructor(private readonly oracleDBService: OracleDBService) { }
// get
@ -80,6 +80,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async GETBONDRATES(body: GetFeeGeneralDTO) {
let connection;
@ -135,6 +144,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async GETCARGORATES(body: GetFeeGeneralDTO) {
let connection;
@ -190,6 +208,16 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async GETCFFEERATES(body: GetFeeGeneralDTO) {
let connection;
@ -245,6 +273,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async GETCSFEERATES(body: GetFeeGeneralDTO) {
let connection;
@ -300,6 +337,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async GETEFFEERATES(body: GetFeeGeneralDTO) {
let connection;
@ -355,6 +401,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async GETFEECOMM(body: GetFeeGeneralDTO) {
let connection;
@ -410,6 +465,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
// post
@ -480,6 +544,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async CREATEBONDRATE(body: CreateBondRateDTO) {
let connection;
@ -556,6 +629,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async CREATECARGORATE(body: CreateCargoRateDTO) {
let connection;
@ -627,6 +709,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async CREATECFFEE(body: CreateCfFeeDTO) {
let connection;
@ -703,6 +794,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async CREATECSFEE(body: CreateCsFeeDTO) {
let connection;
@ -769,6 +869,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async CREATEEFFEE(body: CreateEfFeeDTO) {
let connection;
@ -850,6 +959,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async CREATEFEECOMM(body: CreateFeeCommDTO) {
let connection;
@ -911,6 +1029,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
// update
@ -970,6 +1097,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async UPDATEBONDRATE(body: UpdateBondRateDTO) {
let connection;
@ -1026,6 +1162,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async UPDATECARGORATE(body: UpdateCargoRateDTO) {
let connection;
@ -1082,6 +1227,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async UPDATECFFEE(body: UpdateCfFeeDTO) {
let connection;
@ -1138,6 +1292,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async UPDATECSFEE(body: UpdateCsFeeDTO) {
let connection;
@ -1194,6 +1357,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async UPDATEEFFEE(body: UpdateEfFeeDTO) {
let connection;
@ -1250,6 +1422,15 @@ export class ManageFeeService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async UPDATEFEECOMM(body: UpdateFeeCommBodyDTO) {
let connection;
@ -1310,5 +1491,14 @@ export class ManageFeeService {
return { error: err.message };
// return {error: err.message}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
}

View File

@ -53,7 +53,7 @@ export class ManageHoldersService {
const finalBody: CreateHoldersDTO = { ...newBody, ...reqBody };
let connection: Connection;
let connection: Connection | undefined = undefined;
let p_holdercursor_rows = [];
let p_holdercontactcursor_rows = [];
try {
@ -282,6 +282,15 @@ export class ManageHoldersService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
UpdateHolder = async (body: UpdateHolderDTO) => {
const newBody = {
@ -320,7 +329,7 @@ export class ManageHoldersService {
const finalBody = { ...newBody, ...reqBody };
let connection: Connection;
let connection: Connection | undefined = undefined;
let P_cursor_rows = [];
try {
connection = await this.oracleDBService.getConnection();
@ -459,9 +468,18 @@ export class ManageHoldersService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
GetHolderRecord = async (body: GetHolderDTO) => {
let connection: Connection;
let connection: Connection | undefined = undefined;
let p_cursor_rows = [];
try {
@ -517,6 +535,15 @@ export class ManageHoldersService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
UpdateHolderContact = async (body: UpdateHolderContactDTO) => {
const newBody = {
@ -549,7 +576,7 @@ export class ManageHoldersService {
const finalBody: UpdateHolderContactDTO = { ...newBody, ...reqBody };
let connection: Connection;
let connection: Connection | undefined = undefined;
let P_cursor_rows = [];
try {
connection = await this.oracleDBService.getConnection();
@ -658,9 +685,18 @@ export class ManageHoldersService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
GetHolderContacts = async (body: GetHolderDTO) => {
let connection: Connection;
let connection: Connection | undefined = undefined;
let p_cursor_rows = [];
try {
@ -716,9 +752,18 @@ export class ManageHoldersService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
InactivateHolder = async (body: HolderActivateOrInactivateDTO) => {
let connection: Connection;
let connection: Connection | undefined = undefined;
let p_cursor_rows = [];
try {
@ -779,9 +824,18 @@ export class ManageHoldersService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
ReactivateHolder = async (body: HolderActivateOrInactivateDTO) => {
let connection: Connection;
let connection: Connection | undefined = undefined;
let p_cursor_rows = [];
try {
@ -842,9 +896,18 @@ export class ManageHoldersService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
InactivateHolderContact = async (body: HolderContactActivateOrInactivateDTO) => {
let connection: Connection;
let connection: Connection | undefined = undefined;
let p_cursor_rows = [];
try {
@ -905,9 +968,18 @@ export class ManageHoldersService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
ReactivateHolderContact = async (body: HolderContactActivateOrInactivateDTO) => {
let connection: Connection;
let connection: Connection | undefined = undefined;
let p_cursor_rows = [];
try {
@ -968,5 +1040,14 @@ export class ManageHoldersService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
};
}

View File

@ -72,6 +72,15 @@ export class ParamTableService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async CREATETABLERECORD(body: CreateTableRecordDTO) {
@ -117,6 +126,15 @@ export class ParamTableService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async CREATEPARAMRECORD(body: CreateParamRecordDTO) {
@ -210,6 +228,15 @@ export class ParamTableService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async UPDATEPARAMRECORD(body: UpdateParamRecordDTO) {
@ -298,6 +325,15 @@ export class ParamTableService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async INACTIVATEPARAMRECORD(body: ActivateOrInactivateParamRecordDTO) {
@ -335,6 +371,15 @@ export class ParamTableService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async REACTIVATEPARAMRECORD(body: ActivateOrInactivateParamRecordDTO) {
@ -372,5 +417,14 @@ export class ParamTableService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
}

View File

@ -73,6 +73,15 @@ export class CarnetSequenceService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async getCarnetSequence(body: GetCarnetSequenceDTO) {
@ -126,5 +135,14 @@ export class CarnetSequenceService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
}

View File

@ -50,6 +50,15 @@ export class RegionService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async updateRegions(body: UpdateRegionDto) {
@ -95,6 +104,15 @@ export class RegionService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async getRegions() {

View File

@ -105,6 +105,15 @@ export class SpContactsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async setSPDefaultcontact(body: setSPDefaultcontactDTO) {
@ -137,6 +146,15 @@ export class SpContactsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async updateSPContacts(body: UpdateSPContactsDTO) {
@ -225,6 +243,15 @@ export class SpContactsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async inactivateSPContact(body: inactivateSPContactDTO) {
@ -257,6 +284,15 @@ export class SpContactsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async getSPDefaultcontacts(body: getSPDefaultcontactDTO) {
@ -309,6 +345,15 @@ export class SpContactsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async getSPAllContacts(body: getSPAllContactsDTO) {
@ -362,5 +407,14 @@ export class SpContactsService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
}

View File

@ -127,6 +127,15 @@ export class SpService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async updateServiceProvider(body: UpdateServiceProviderDTO) {
@ -250,6 +259,15 @@ export class SpService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async getAllServiceproviders() {
@ -298,6 +316,15 @@ export class SpService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
async getServiceproviderByID(body: getSelectedServiceproviderDTO) {
@ -350,5 +377,14 @@ export class SpService {
return { error: 'An unknown error occurred' };
}
}
finally {
if (connection) {
try {
await connection.close();
} catch (closeErr) {
console.error('Failed to close connection:', closeErr);
}
}
}
}
}