added and modified API
This commit is contained in:
parent
e272d303c7
commit
f7700b09a7
@ -112,7 +112,7 @@ export class ManageClientsService {
|
|||||||
const result = await request.execute('carnetsys.CreateClientData');
|
const result = await request.execute('carnetsys.CreateClientData');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -131,7 +131,7 @@ export class ManageClientsService {
|
|||||||
const result = await request.execute('carnetsys.GetPreparerbyClientID');
|
const result = await request.execute('carnetsys.GetPreparerbyClientID');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -191,7 +191,7 @@ export class ManageClientsService {
|
|||||||
const result = await request.execute('carnetsys.UpdateClient');
|
const result = await request.execute('carnetsys.UpdateClient');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -268,7 +268,7 @@ export class ManageClientsService {
|
|||||||
const result = await request.execute('carnetsys.CreateClientContact');
|
const result = await request.execute('carnetsys.CreateClientContact');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -327,7 +327,7 @@ export class ManageClientsService {
|
|||||||
const result = await request.execute('carnetsys.UpdateClientContacts');
|
const result = await request.execute('carnetsys.UpdateClientContacts');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -385,7 +385,7 @@ export class ManageClientsService {
|
|||||||
const result = await request.execute('carnetsys.UpdateClientlocations');
|
const result = await request.execute('carnetsys.UpdateClientlocations');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -461,7 +461,7 @@ export class ManageClientsService {
|
|||||||
const result = await request.execute('carnetsys.CreateClientLocation');
|
const result = await request.execute('carnetsys.CreateClientLocation');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -516,7 +516,7 @@ export class ManageClientsService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -569,7 +569,7 @@ export class ManageClientsService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -621,7 +621,7 @@ export class ManageClientsService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
|
|||||||
@ -1,100 +1,122 @@
|
|||||||
import { Body, Controller, Get, Param, ParseIntPipe, Patch, Post, Put } from '@nestjs/common';
|
import { BadRequestException, Body, Controller, Get, Param, ParseIntPipe, Patch, Post, Put } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { CreateHoldersDTO, GetHolderContactActivateOrInactivateDTO, GetHolderOrContactDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/oracle/manage-holders/manage-holders.dto';
|
import { CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/oracle/manage-holders/manage-holders.dto';
|
||||||
import { ManageHoldersService } from './manage-holders.service';
|
import { ManageHoldersService } from './manage-holders.service';
|
||||||
|
|
||||||
@Controller('mssql')
|
@Controller('mssql')
|
||||||
export class ManageHoldersController {
|
export class ManageHoldersController {
|
||||||
|
|
||||||
constructor(private readonly manageHoldersService: ManageHoldersService) { }
|
constructor(private readonly manageHoldersService: ManageHoldersService) { }
|
||||||
|
|
||||||
@ApiTags('Manage Holders - Mssql')
|
@ApiTags('Manage Holders - Mssql')
|
||||||
@Post('/CreateHolderData')
|
@Post('/CreateHolderData')
|
||||||
CreateHolders(@Body() body: CreateHoldersDTO) {
|
CreateHolders(@Body() body: CreateHoldersDTO) {
|
||||||
return this.manageHoldersService.CreateHolders(body);
|
return this.manageHoldersService.CreateHolders(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiTags('Manage Holders - Mssql')
|
||||||
|
@Put('/UpdateHolder')
|
||||||
|
UpdateHolder(@Body() body: UpdateHolderDTO) {
|
||||||
|
return this.manageHoldersService.UpdateHolder(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiTags('Manage Holders - Mssql')
|
||||||
|
@Put('/UpdateHolderContact')
|
||||||
|
UpdateHolderContact(@Body() body: UpdateHolderContactDTO) {
|
||||||
|
return this.manageHoldersService.UpdateHolderContact(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiTags('Manage Holders - Mssql')
|
||||||
|
@Get('/GetHolderRecord/:p_spid/:p_holderid')
|
||||||
|
GetHolderMaster(
|
||||||
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
|
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
||||||
|
) {
|
||||||
|
const reqParams: GetHolderDTO = { p_spid, p_holderid };
|
||||||
|
|
||||||
|
return this.manageHoldersService.GetHolderRecord(reqParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiTags('Manage Holders - Mssql')
|
||||||
|
@Get('/GetHolderContacts/:p_spid/:p_holderid')
|
||||||
|
GetHolderContacts(
|
||||||
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
|
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
||||||
|
) {
|
||||||
|
const reqParams: GetHolderDTO = { p_spid, p_holderid };
|
||||||
|
|
||||||
|
return this.manageHoldersService.GetHolderContacts(reqParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiTags('Manage Holders - Mssql')
|
||||||
|
@Patch('/InactivateHolder/:p_spid/:p_holderid/:p_userid')
|
||||||
|
InactivateHolder(
|
||||||
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
|
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
||||||
|
@Param('p_userid') p_userid: string
|
||||||
|
) {
|
||||||
|
|
||||||
@ApiTags('Manage Holders - Mssql')
|
if(!p_userid){
|
||||||
@Put('/UpdateHolder')
|
throw new BadRequestException("Bad Request");
|
||||||
UpdateHolder(@Body() body: UpdateHolderDTO) {
|
}
|
||||||
return this.manageHoldersService.UpdateHolder(body);
|
const reqParams: HolderActivateOrInactivateDTO = { p_spid, p_holderid, p_userid };
|
||||||
}
|
|
||||||
|
return this.manageHoldersService.InactivateHolder(reqParams);
|
||||||
@ApiTags('Manage Holders - Mssql')
|
}
|
||||||
@Put('/UpdateHolderContact')
|
|
||||||
UpdateHolderContact(@Body() body: UpdateHolderContactDTO) {
|
@ApiTags('Manage Holders - Mssql')
|
||||||
return this.manageHoldersService.UpdateHolderContact(body);
|
@Patch('/ReactivateHolder/:p_spid/:p_holderid/:p_userid')
|
||||||
}
|
ReactivateHolder(
|
||||||
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
@ApiTags('Manage Holders - Mssql')
|
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
||||||
@Get('/GetHolderRecord/:p_spid/:p_holderid')
|
@Param('p_userid') p_userid: string
|
||||||
GetHolderMaster(
|
) {
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
if(!p_userid){
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
throw new BadRequestException("Bad Request");
|
||||||
) {
|
}
|
||||||
const reqParams: GetHolderOrContactDTO = { p_spid, p_holderid };
|
|
||||||
|
const reqParams: HolderActivateOrInactivateDTO = { p_spid, p_holderid, p_userid };
|
||||||
return this.manageHoldersService.GetHolderRecord(reqParams);
|
|
||||||
}
|
return this.manageHoldersService.ReactivateHolder(reqParams);
|
||||||
|
}
|
||||||
@ApiTags('Manage Holders - Mssql')
|
|
||||||
@Get('/GetHolderContacts/:p_spid/:p_holderid')
|
@ApiTags('Manage Holders - Mssql')
|
||||||
GetHolderContacts(
|
@Patch('/InactivateHolderContact/:p_spid/:p_holderContactid/:p_userid')
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
InactivateHolderContact(
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
) {
|
@Param('p_holderContactid', ParseIntPipe) p_holderContactid: number,
|
||||||
const reqParams: GetHolderOrContactDTO = { p_spid, p_holderid };
|
@Param('p_userid') p_userid: string
|
||||||
|
) {
|
||||||
return this.manageHoldersService.GetHolderContacts(reqParams);
|
if(!p_userid){
|
||||||
}
|
throw new BadRequestException("Bad Request");
|
||||||
|
}
|
||||||
@ApiTags('Manage Holders - Mssql')
|
|
||||||
@Patch('/InactivateHolder/:p_spid/:p_holderid')
|
const reqParams: HolderContactActivateOrInactivateDTO = {
|
||||||
InactivateHolder(
|
p_spid,
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
p_holderContactid,
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
p_userid
|
||||||
) {
|
};
|
||||||
const reqParams: GetHolderOrContactDTO = { p_spid, p_holderid };
|
|
||||||
|
return this.manageHoldersService.InactivateHolderContact(reqParams);
|
||||||
return this.manageHoldersService.InactivateHolder(reqParams);
|
}
|
||||||
}
|
|
||||||
|
@ApiTags('Manage Holders - Mssql')
|
||||||
@ApiTags('Manage Holders - Mssql')
|
@Patch('/ReactivateHolderContact/:p_spid/:p_holderContactid/:p_userid')
|
||||||
@Patch('/ReactivateHolder/:p_spid/:p_holderid')
|
ReactivateHolderContact(
|
||||||
ReactivateHolder(
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
@Param('p_holderContactid', ParseIntPipe) p_holderContactid: number,
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
@Param('p_userid') p_userid: string
|
||||||
) {
|
) {
|
||||||
const reqParams: GetHolderOrContactDTO = { p_spid, p_holderid };
|
if(!p_userid){
|
||||||
|
throw new BadRequestException("Bad Request");
|
||||||
return this.manageHoldersService.ReactivateHolder(reqParams);
|
}
|
||||||
}
|
|
||||||
|
const reqParams: HolderContactActivateOrInactivateDTO = {
|
||||||
@ApiTags('Manage Holders - Mssql')
|
p_spid,
|
||||||
@Patch('/InactivateHolderContact/:p_spid/:p_holderContactid')
|
p_holderContactid,
|
||||||
InactivateHolderContact(
|
p_userid
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
};
|
||||||
@Param('p_holderContactid', ParseIntPipe) p_holderContactid: number,
|
|
||||||
) {
|
return this.manageHoldersService.ReactivateHolderContact(reqParams);
|
||||||
const reqParams: GetHolderContactActivateOrInactivateDTO = {
|
}
|
||||||
p_spid,
|
|
||||||
p_holderContactid,
|
|
||||||
};
|
|
||||||
|
|
||||||
return this.manageHoldersService.InactivateHolderContact(reqParams);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiTags('Manage Holders - Mssql')
|
|
||||||
@Patch('/ReactivateHolderContact/:p_spid/:p_holderContactid')
|
|
||||||
ReactivateHolderContact(
|
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderContactid: number,
|
|
||||||
) {
|
|
||||||
const reqParams: GetHolderContactActivateOrInactivateDTO = {
|
|
||||||
p_spid,
|
|
||||||
p_holderContactid,
|
|
||||||
};
|
|
||||||
|
|
||||||
return this.manageHoldersService.ReactivateHolderContact(reqParams);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { Connection, Request } from 'mssql';
|
import { Connection, Request } from 'mssql';
|
||||||
import { MssqlDBService } from 'src/db/db.service';
|
import { MssqlDBService } from 'src/db/db.service';
|
||||||
import { CreateHoldersDTO, GetHolderContactActivateOrInactivateDTO, GetHolderOrContactDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/oracle/manage-holders/manage-holders.dto';
|
import { CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/oracle/manage-holders/manage-holders.dto';
|
||||||
import * as mssql from 'mssql';
|
import * as mssql from 'mssql';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -48,7 +48,7 @@ export class ManageHoldersService {
|
|||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.mssqlDBService.getConnection();
|
connection = await this.mssqlDBService.getConnection();
|
||||||
const request:Request = new Request(connection);
|
const request: Request = new Request(connection);
|
||||||
request.input('p_spid', mssql.Int, finalBody.p_spid);
|
request.input('p_spid', mssql.Int, finalBody.p_spid);
|
||||||
request.input('p_clientlocationid', mssql.Int, finalBody.p_clientlocationid);
|
request.input('p_clientlocationid', mssql.Int, finalBody.p_clientlocationid);
|
||||||
request.input('p_holderno', mssql.VarChar(15), finalBody.p_holderno);
|
request.input('p_holderno', mssql.VarChar(15), finalBody.p_holderno);
|
||||||
@ -95,7 +95,7 @@ export class ManageHoldersService {
|
|||||||
const result = await request.execute('carnetsys.CreateHolderData');
|
const result = await request.execute('carnetsys.CreateHolderData');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -105,18 +105,18 @@ export class ManageHoldersService {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GetHolderRecord = async (body: GetHolderOrContactDTO) => {
|
GetHolderRecord = async (body: GetHolderDTO) => {
|
||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.mssqlDBService.getConnection();
|
connection = await this.mssqlDBService.getConnection();
|
||||||
const request:Request = new Request(connection);
|
const request: Request = new Request(connection);
|
||||||
request.input('p_spid', mssql.Int, body.p_spid);
|
request.input('p_spid', mssql.Int, body.p_spid);
|
||||||
request.input('p_holderid', mssql.Int, body.p_holderid);
|
request.input('p_holderid', mssql.Int, body.p_holderid);
|
||||||
|
|
||||||
const result = await request.execute('carnetsys.GetHolderMaster');
|
const result = await request.execute('carnetsys.GetHolderMaster');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -129,7 +129,7 @@ export class ManageHoldersService {
|
|||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.mssqlDBService.getConnection();
|
connection = await this.mssqlDBService.getConnection();
|
||||||
const request:Request = new mssql.Request(connection);
|
const request: Request = new mssql.Request(connection);
|
||||||
|
|
||||||
request.input('p_holderid', mssql.Int, body.p_holderid);
|
request.input('p_holderid', mssql.Int, body.p_holderid);
|
||||||
request.input('p_spid', mssql.Int, body.p_spid);
|
request.input('p_spid', mssql.Int, body.p_spid);
|
||||||
@ -152,7 +152,7 @@ export class ManageHoldersService {
|
|||||||
const result = await request.execute('carnetsys.UpdateHolders');
|
const result = await request.execute('carnetsys.UpdateHolders');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -166,7 +166,7 @@ export class ManageHoldersService {
|
|||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.mssqlDBService.getConnection();
|
connection = await this.mssqlDBService.getConnection();
|
||||||
const request:Request = new mssql.Request(connection);
|
const request: Request = new mssql.Request(connection);
|
||||||
|
|
||||||
request.input('p_holdercontactid', mssql.Int, body.p_holdercontactid);
|
request.input('p_holdercontactid', mssql.Int, body.p_holdercontactid);
|
||||||
request.input('p_spid', mssql.Int, body.p_spid);
|
request.input('p_spid', mssql.Int, body.p_spid);
|
||||||
@ -184,7 +184,7 @@ export class ManageHoldersService {
|
|||||||
const result = await request.execute('carnetsys.UpdateHolderContacts');
|
const result = await request.execute('carnetsys.UpdateHolderContacts');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -193,19 +193,19 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
GetHolderContacts = async (body: GetHolderOrContactDTO) => {
|
GetHolderContacts = async (body: GetHolderDTO) => {
|
||||||
|
|
||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.mssqlDBService.getConnection();
|
connection = await this.mssqlDBService.getConnection();
|
||||||
const request:Request = new Request(connection);
|
const request: Request = new Request(connection);
|
||||||
request.input('p_spid', mssql.Int, body.p_spid);
|
request.input('p_spid', mssql.Int, body.p_spid);
|
||||||
request.input('p_holderid', mssql.Int, body.p_holderid);
|
request.input('p_holderid', mssql.Int, body.p_holderid);
|
||||||
|
|
||||||
const result = await request.execute('carnetsys.GetHolderContacts');
|
const result = await request.execute('carnetsys.GetHolderContacts');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -214,18 +214,21 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
InactivateHolder = async (body: GetHolderOrContactDTO) => {
|
InactivateHolder = async (body: HolderActivateOrInactivateDTO) => {
|
||||||
|
|
||||||
|
console.log(body);
|
||||||
|
|
||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.mssqlDBService.getConnection();
|
connection = await this.mssqlDBService.getConnection();
|
||||||
const request:Request = new Request(connection);
|
const request: Request = new Request(connection);
|
||||||
request.input('p_spid', mssql.Int, body.p_spid);
|
request.input('p_spid', mssql.Int, body.p_spid);
|
||||||
request.input('p_holderid', mssql.Int, body.p_holderid);
|
request.input('p_holderid', mssql.Int, body.p_holderid);
|
||||||
|
request.input('p_userid', mssql.VarChar(100), body.p_userid);
|
||||||
const result = await request.execute('carnetsys.InactivateHolder');
|
const result = await request.execute('carnetsys.InactivateHolder');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -234,18 +237,19 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ReactivateHolder = async (body: GetHolderOrContactDTO) => {
|
ReactivateHolder = async (body: HolderActivateOrInactivateDTO) => {
|
||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.mssqlDBService.getConnection();
|
connection = await this.mssqlDBService.getConnection();
|
||||||
const request:Request = new Request(connection);
|
const request: Request = new Request(connection);
|
||||||
request.input('p_spid', mssql.Int, body.p_spid);
|
request.input('p_spid', mssql.Int, body.p_spid);
|
||||||
request.input('p_holderid', mssql.Int, body.p_holderid);
|
request.input('p_holderid', mssql.Int, body.p_holderid);
|
||||||
|
request.input('p_userid', mssql.VarChar(100), body.p_userid);
|
||||||
|
|
||||||
const result = await request.execute('carnetsys.ReactivateHolder');
|
const result = await request.execute('carnetsys.ReactivateHolder');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -254,18 +258,19 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
InactivateHolderContact = async (body: GetHolderContactActivateOrInactivateDTO) => {
|
InactivateHolderContact = async (body: HolderContactActivateOrInactivateDTO) => {
|
||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.mssqlDBService.getConnection();
|
connection = await this.mssqlDBService.getConnection();
|
||||||
const request:Request = new Request(connection);
|
const request: Request = new Request(connection);
|
||||||
request.input('p_spid', mssql.Int, body.p_spid);
|
request.input('p_spid', mssql.Int, body.p_spid);
|
||||||
request.input('p_holderContactid', mssql.Int, body.p_holderContactid);
|
request.input('p_holderContactid', mssql.Int, body.p_holderContactid);
|
||||||
|
request.input('p_userid', mssql.VarChar(100), body.p_userid);
|
||||||
|
|
||||||
const result = await request.execute('carnetsys.InactivateHolderContact');
|
const result = await request.execute('carnetsys.InactivateHolderContact');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
@ -274,18 +279,19 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ReactivateHolderContact = async (body: GetHolderContactActivateOrInactivateDTO) => {
|
ReactivateHolderContact = async (body: HolderContactActivateOrInactivateDTO) => {
|
||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
connection = await this.mssqlDBService.getConnection();
|
connection = await this.mssqlDBService.getConnection();
|
||||||
const request:Request = new Request(connection);
|
const request: Request = new Request(connection);
|
||||||
request.input('p_spid', mssql.Int, body.p_spid);
|
request.input('p_spid', mssql.Int, body.p_spid);
|
||||||
request.input('p_holderContactid', mssql.Int, body.p_holderContactid);
|
request.input('p_holderContactid', mssql.Int, body.p_holderContactid);
|
||||||
|
request.input('p_userid', mssql.VarChar(100), body.p_userid);
|
||||||
|
|
||||||
const result = await request.execute('carnetsys.ReactivateHolderContact');
|
const result = await request.execute('carnetsys.ReactivateHolderContact');
|
||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
|
|||||||
@ -14,9 +14,9 @@ export class CarnetSequenceController {
|
|||||||
return this.carnetSequenceService.getCarnetSequence(body);
|
return this.carnetSequenceService.getCarnetSequence(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ApiTags('Carnet Sequence - Mssql')
|
@ApiTags('Carnet Sequence - Mssql')
|
||||||
// @Post('/CreateCarnetSequence/')
|
@Post('/CreateCarnetSequence/')
|
||||||
// createCarnetSequence(@Body() body: CreateCarnetSequenceDTO) {
|
createCarnetSequence(@Body() body: CreateCarnetSequenceDTO) {
|
||||||
// return this.carnetSequenceService.createCarnetSequence(body);
|
return this.carnetSequenceService.createCarnetSequence(body);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export class CarnetSequenceService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error executing stored procedure:', error);
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -43,7 +43,7 @@ export class CarnetSequenceService {
|
|||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error executing stored procedure:', error);
|
console.error('Error executing stored procedure:', error);
|
||||||
return { error: error.message }
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import { Body, Controller, Get, Post } from '@nestjs/common';
|
import { Body, Controller, Get, Patch, Post } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { RegionService } from './region.service';
|
import { RegionService } from './region.service';
|
||||||
import { InsertRegionsDto } from 'src/oracle/uscib-managed-sp/region/region.dto';
|
import { InsertRegionsDto, UpdateRegionDto } from 'src/oracle/uscib-managed-sp/region/region.dto';
|
||||||
|
|
||||||
@Controller('mssql')
|
@Controller('mssql')
|
||||||
export class RegionController {
|
export class RegionController {
|
||||||
|
|
||||||
constructor(private readonly regionService:RegionService){}
|
constructor(private readonly regionService: RegionService) { }
|
||||||
|
|
||||||
@ApiTags('Regions - Mssql')
|
@ApiTags('Regions - Mssql')
|
||||||
@Get('/GetRegions')
|
@Get('/GetRegions')
|
||||||
@ -19,4 +19,10 @@ export class RegionController {
|
|||||||
insertRegions(@Body() body: InsertRegionsDto) {
|
insertRegions(@Body() body: InsertRegionsDto) {
|
||||||
return this.regionService.insetNewRegions(body);
|
return this.regionService.insetNewRegions(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiTags('Regions - Mssql')
|
||||||
|
@Patch('/UpdateRegion')
|
||||||
|
updateRegions(@Body() body: UpdateRegionDto) {
|
||||||
|
return this.regionService.updateRegions(body);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { Connection, Request } from 'mssql';
|
import { Connection, Request } from 'mssql';
|
||||||
import { MssqlDBService } from 'src/db/db.service';
|
import { MssqlDBService } from 'src/db/db.service';
|
||||||
import { InsertRegionsDto } from 'src/oracle/uscib-managed-sp/region/region.dto';
|
import { InsertRegionsDto, UpdateRegionDto } from 'src/oracle/uscib-managed-sp/region/region.dto';
|
||||||
import * as mssql from 'mssql';
|
import * as mssql from 'mssql';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -18,7 +18,7 @@ export class RegionService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error executing stored procedure:', error);
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -26,7 +26,7 @@ export class RegionService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async insetNewRegions(body:InsertRegionsDto) {
|
async insetNewRegions(body: InsertRegionsDto) {
|
||||||
|
|
||||||
let connection: Connection;
|
let connection: Connection;
|
||||||
try {
|
try {
|
||||||
@ -38,7 +38,26 @@ export class RegionService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
|
} finally {
|
||||||
|
if (connection) {
|
||||||
|
connection.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async updateRegions(body: UpdateRegionDto){
|
||||||
|
let connection: Connection;
|
||||||
|
try {
|
||||||
|
connection = await this.mssqlDBService.getConnection();
|
||||||
|
const request = new Request(connection);
|
||||||
|
request.input('p_regionID', mssql.Int, body.p_regionID);
|
||||||
|
request.input('P_NAME', mssql.VarChar(mssql.MAX), body.p_name);
|
||||||
|
const result = await request.execute('carnetsys.UpdateRegion');
|
||||||
|
return { data: result.recordset };
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export class SpContactsService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -39,7 +39,7 @@ export class SpContactsService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -58,7 +58,7 @@ export class SpContactsService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -86,8 +86,7 @@ export class SpContactsService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
return { error: error.message }
|
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -105,8 +104,7 @@ export class SpContactsService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
return { error: error.message }
|
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -133,8 +131,7 @@ export class SpContactsService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
return { error: error.message }
|
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
|
|||||||
@ -26,9 +26,9 @@ export class SpController {
|
|||||||
return this.spService.insertNewServiceProvider(body);
|
return this.spService.insertNewServiceProvider(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ApiTags('SP - Mssql')
|
@ApiTags('SP - Mssql')
|
||||||
// @Put('/UpdateServiceProvider')
|
@Put('/UpdateServiceProvider')
|
||||||
// updateServiceProider(@Body() body: UpdateServiceProviderDTO) {
|
updateServiceProider(@Body() body: UpdateServiceProviderDTO) {
|
||||||
// return this.spService.updateServiceProvider(body);
|
return this.spService.updateServiceProvider(body);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export class SpService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -38,7 +38,7 @@ export class SpService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -71,7 +71,7 @@ export class SpService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
@ -105,7 +105,7 @@ export class SpService {
|
|||||||
return { data: result.recordset };
|
return { data: result.recordset };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {error:error.message}
|
return { error: error.message };
|
||||||
} finally {
|
} finally {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
connection.close();
|
connection.close();
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import {
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class HomePageService {
|
export class HomePageService {
|
||||||
constructor(private readonly oracleDBService: OracleDBService) {}
|
constructor(private readonly oracleDBService: OracleDBService) { }
|
||||||
|
|
||||||
async GetHomePageData(P_spid: number) {
|
async GetHomePageData(P_spid: number) {
|
||||||
let connection;
|
let connection;
|
||||||
@ -490,32 +490,32 @@ export class HomePageService {
|
|||||||
|
|
||||||
const GLTABLE_ARRAY = finalBody.p_gltable
|
const GLTABLE_ARRAY = finalBody.p_gltable
|
||||||
? await Promise.all(
|
? await Promise.all(
|
||||||
finalBody.p_gltable.map(async (x: p_gltableDTO) => {
|
finalBody.p_gltable.map(async (x: p_gltableDTO) => {
|
||||||
return await createGLArrayInstance(
|
return await createGLArrayInstance(
|
||||||
connection,
|
connection,
|
||||||
x.ItemNo,
|
x.ItemNo,
|
||||||
x.ItemDescription,
|
x.ItemDescription,
|
||||||
x.ItemValue,
|
x.ItemValue,
|
||||||
x.Noofpieces,
|
x.Noofpieces,
|
||||||
x.ItemWeight,
|
x.ItemWeight,
|
||||||
x.ItemWeightUOM,
|
x.ItemWeightUOM,
|
||||||
x.GoodsOriginCountry,
|
x.GoodsOriginCountry,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
const CARNETCOUNTRYTABLE_ARRAY = finalBody.p_countrytable
|
const CARNETCOUNTRYTABLE_ARRAY = finalBody.p_countrytable
|
||||||
? await Promise.all(
|
? await Promise.all(
|
||||||
finalBody.p_countrytable.map(async (x) => {
|
finalBody.p_countrytable.map(async (x) => {
|
||||||
return await createCarnetCountryArrayInstance(
|
return await createCarnetCountryArrayInstance(
|
||||||
connection,
|
connection,
|
||||||
x.VisitTransitInd,
|
x.VisitTransitInd,
|
||||||
x.CountryCode,
|
x.CountryCode,
|
||||||
x.NoOfTimesEntLeave,
|
x.NoOfTimesEntLeave,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
const GLTABLE_INSTANCE = new GLTABLE(GLTABLE_ARRAY);
|
const GLTABLE_INSTANCE = new GLTABLE(GLTABLE_ARRAY);
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
BadRequestException,
|
||||||
Body,
|
Body,
|
||||||
Controller,
|
Controller,
|
||||||
Get,
|
Get,
|
||||||
@ -11,16 +12,17 @@ import {
|
|||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import {
|
import {
|
||||||
CreateHoldersDTO,
|
CreateHoldersDTO,
|
||||||
GetHolderContactActivateOrInactivateDTO,
|
GetHolderDTO,
|
||||||
GetHolderOrContactDTO,
|
HolderActivateOrInactivateDTO,
|
||||||
|
HolderContactActivateOrInactivateDTO,
|
||||||
UpdateHolderContactDTO,
|
UpdateHolderContactDTO,
|
||||||
UpdateHolderDTO,
|
UpdateHolderDTO
|
||||||
} from './manage-holders.dto';
|
} from './manage-holders.dto';
|
||||||
import { ManageHoldersService } from './manage-holders.service';
|
import { ManageHoldersService } from './manage-holders.service';
|
||||||
|
|
||||||
@Controller('oracle')
|
@Controller('oracle')
|
||||||
export class ManageHoldersController {
|
export class ManageHoldersController {
|
||||||
constructor(private readonly manageHoldersService: ManageHoldersService) {}
|
constructor(private readonly manageHoldersService: ManageHoldersService) { }
|
||||||
|
|
||||||
@ApiTags('Manage Holders - Oracle')
|
@ApiTags('Manage Holders - Oracle')
|
||||||
@Post('/CreateHolderData')
|
@Post('/CreateHolderData')
|
||||||
@ -47,7 +49,7 @@ export class ManageHoldersController {
|
|||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
||||||
) {
|
) {
|
||||||
const reqParams: GetHolderOrContactDTO = { p_spid, p_holderid };
|
const reqParams: GetHolderDTO = { p_spid, p_holderid };
|
||||||
|
|
||||||
return this.manageHoldersService.GetHolderRecord(reqParams);
|
return this.manageHoldersService.GetHolderRecord(reqParams);
|
||||||
}
|
}
|
||||||
@ -58,56 +60,78 @@ export class ManageHoldersController {
|
|||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
||||||
) {
|
) {
|
||||||
const reqParams: GetHolderOrContactDTO = { p_spid, p_holderid };
|
const reqParams: GetHolderDTO = { p_spid, p_holderid };
|
||||||
|
|
||||||
return this.manageHoldersService.GetHolderContacts(reqParams);
|
return this.manageHoldersService.GetHolderContacts(reqParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiTags('Manage Holders - Oracle')
|
@ApiTags('Manage Holders - Oracle')
|
||||||
@Patch('/InactivateHolder/:p_spid/:p_holderid')
|
@Patch('/InactivateHolder/:p_spid/:p_holderid/:p_userid')
|
||||||
InactivateHolder(
|
InactivateHolder(
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
||||||
|
@Param('p_userid') p_userid: string
|
||||||
) {
|
) {
|
||||||
const reqParams: GetHolderOrContactDTO = { p_spid, p_holderid };
|
if (!p_userid) {
|
||||||
|
throw new BadRequestException("Bad Request");
|
||||||
|
}
|
||||||
|
const reqParams: HolderActivateOrInactivateDTO = { p_spid, p_holderid, p_userid };
|
||||||
|
|
||||||
return this.manageHoldersService.InactivateHolder(reqParams);
|
return this.manageHoldersService.InactivateHolder(reqParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiTags('Manage Holders - Oracle')
|
@ApiTags('Manage Holders - Oracle')
|
||||||
@Patch('/ReactivateHolder/:p_spid/:p_holderid')
|
@Patch('/ReactivateHolder/:p_spid/:p_holderid/:p_userid')
|
||||||
ReactivateHolder(
|
ReactivateHolder(
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
@Param('p_holderid', ParseIntPipe) p_holderid: number,
|
||||||
|
@Param('p_userid') p_userid: string
|
||||||
) {
|
) {
|
||||||
const reqParams: GetHolderOrContactDTO = { p_spid, p_holderid };
|
if (!p_userid) {
|
||||||
|
throw new BadRequestException("Bad Request");
|
||||||
|
}
|
||||||
|
|
||||||
|
const reqParams: HolderActivateOrInactivateDTO = { p_spid, p_holderid, p_userid };
|
||||||
|
|
||||||
return this.manageHoldersService.ReactivateHolder(reqParams);
|
return this.manageHoldersService.ReactivateHolder(reqParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiTags('Manage Holders - Oracle')
|
@ApiTags('Manage Holders - Oracle')
|
||||||
@Patch('/InactivateHolderContact/:p_spid/:p_holderContactid')
|
@Patch('/InactivateHolderContact/:p_spid/:p_holderContactid/:p_userid')
|
||||||
InactivateHolderContact(
|
InactivateHolderContact(
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
@Param('p_holderContactid', ParseIntPipe) p_holderContactid: number,
|
@Param('p_holderContactid', ParseIntPipe) p_holderContactid: number,
|
||||||
|
@Param('p_userid') p_userid: string
|
||||||
) {
|
) {
|
||||||
const reqParams: GetHolderContactActivateOrInactivateDTO = {
|
|
||||||
|
if (!p_userid) {
|
||||||
|
throw new BadRequestException("Bad Request");
|
||||||
|
}
|
||||||
|
|
||||||
|
const reqParams: HolderContactActivateOrInactivateDTO = {
|
||||||
p_spid,
|
p_spid,
|
||||||
p_holderContactid,
|
p_holderContactid,
|
||||||
|
p_userid
|
||||||
};
|
};
|
||||||
|
|
||||||
return this.manageHoldersService.InactivateHolderContact(reqParams);
|
return this.manageHoldersService.InactivateHolderContact(reqParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiTags('Manage Holders - Oracle')
|
@ApiTags('Manage Holders - Oracle')
|
||||||
@Patch('/ReactivateHolderContact/:p_spid/:p_holderContactid')
|
@Patch('/ReactivateHolderContact/:p_spid/:p_holderContactid/:p_userid')
|
||||||
ReactivateHolderContact(
|
ReactivateHolderContact(
|
||||||
@Param('p_spid', ParseIntPipe) p_spid: number,
|
@Param('p_spid', ParseIntPipe) p_spid: number,
|
||||||
@Param('p_holderid', ParseIntPipe) p_holderContactid: number,
|
@Param('p_holderid', ParseIntPipe) p_holderContactid: number,
|
||||||
|
@Param('p_userid') p_userid: string
|
||||||
) {
|
) {
|
||||||
const reqParams: GetHolderContactActivateOrInactivateDTO = {
|
if (!p_userid) {
|
||||||
|
throw new BadRequestException("Bad Request");
|
||||||
|
}
|
||||||
|
|
||||||
|
const reqParams: HolderContactActivateOrInactivateDTO = {
|
||||||
p_spid,
|
p_spid,
|
||||||
p_holderContactid,
|
p_holderContactid,
|
||||||
|
p_userid
|
||||||
};
|
};
|
||||||
|
|
||||||
return this.manageHoldersService.ReactivateHolderContact(reqParams);
|
return this.manageHoldersService.ReactivateHolderContact(reqParams);
|
||||||
|
|||||||
@ -450,7 +450,7 @@ export class UpdateHolderContactDTO {
|
|||||||
p_userid: string;
|
p_userid: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetHolderOrContactDTO {
|
export class GetHolderDTO {
|
||||||
@ApiProperty({ required: true })
|
@ApiProperty({ required: true })
|
||||||
@Max(999999999, { message: 'Property p_spid must not exceed 999999999' })
|
@Max(999999999, { message: 'Property p_spid must not exceed 999999999' })
|
||||||
@Min(0, { message: 'Property p_spid must be at least 0 or more' })
|
@Min(0, { message: 'Property p_spid must be at least 0 or more' })
|
||||||
@ -468,7 +468,33 @@ export class GetHolderOrContactDTO {
|
|||||||
p_holderid: number;
|
p_holderid: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetHolderContactActivateOrInactivateDTO {
|
export class HolderActivateOrInactivateDTO {
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@Max(999999999, { message: 'Property p_spid must not exceed 999999999' })
|
||||||
|
@Min(0, { message: 'Property p_spid must be at least 0 or more' })
|
||||||
|
@IsInt({ message: 'Property p_spid allows only whole numbers' })
|
||||||
|
@IsNumber({}, { message: 'Property p_spid must be a number' })
|
||||||
|
@IsDefined({ message: 'Property p_spid is required' })
|
||||||
|
p_spid: number;
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@Max(999999999, { message: 'Property p_holderid must not exceed 999999999' })
|
||||||
|
@Min(0, { message: 'Property p_holderid must be at least 0 or more' })
|
||||||
|
@IsInt({ message: 'Property p_holderid allows only whole numbers' })
|
||||||
|
@IsNumber({}, { message: 'Property p_holderid must be a number' })
|
||||||
|
@IsDefined({ message: 'Property p_holderid is required' })
|
||||||
|
p_holderid: number;
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@Length(0, 100, {
|
||||||
|
message: 'Property p_userid must be between 0 to 100 characters',
|
||||||
|
})
|
||||||
|
@IsString({ message: 'Property p_userid must be a string' })
|
||||||
|
@IsDefined({ message: 'Property p_userid is required' })
|
||||||
|
p_userid: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class HolderContactActivateOrInactivateDTO {
|
||||||
@ApiProperty({ required: true })
|
@ApiProperty({ required: true })
|
||||||
@Max(999999999, { message: 'Property p_spid must not exceed 999999999' })
|
@Max(999999999, { message: 'Property p_spid must not exceed 999999999' })
|
||||||
@Min(0, { message: 'Property p_spid must be at least 0 or more' })
|
@Min(0, { message: 'Property p_spid must be at least 0 or more' })
|
||||||
@ -484,4 +510,12 @@ export class GetHolderContactActivateOrInactivateDTO {
|
|||||||
@IsNumber({}, { message: 'Property p_holderid must be a number' })
|
@IsNumber({}, { message: 'Property p_holderid must be a number' })
|
||||||
@IsDefined({ message: 'Property p_holderid is required' })
|
@IsDefined({ message: 'Property p_holderid is required' })
|
||||||
p_holderContactid: number;
|
p_holderContactid: number;
|
||||||
|
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
@Length(0, 100, {
|
||||||
|
message: 'Property p_userid must be between 0 to 100 characters',
|
||||||
|
})
|
||||||
|
@IsString({ message: 'Property p_userid must be a string' })
|
||||||
|
@IsDefined({ message: 'Property p_userid is required' })
|
||||||
|
p_userid: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,8 +2,9 @@ import { Injectable } from '@nestjs/common';
|
|||||||
import { OracleDBService } from 'src/db/db.service';
|
import { OracleDBService } from 'src/db/db.service';
|
||||||
import {
|
import {
|
||||||
CreateHoldersDTO,
|
CreateHoldersDTO,
|
||||||
GetHolderContactActivateOrInactivateDTO,
|
GetHolderDTO,
|
||||||
GetHolderOrContactDTO,
|
HolderActivateOrInactivateDTO,
|
||||||
|
HolderContactActivateOrInactivateDTO,
|
||||||
p_contactstableDTO,
|
p_contactstableDTO,
|
||||||
UpdateHolderContactDTO,
|
UpdateHolderContactDTO,
|
||||||
UpdateHolderDTO,
|
UpdateHolderDTO,
|
||||||
@ -13,7 +14,7 @@ import { Connection, Result } from 'oracledb';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ManageHoldersService {
|
export class ManageHoldersService {
|
||||||
constructor(private readonly oracleDBService: OracleDBService) {}
|
constructor(private readonly oracleDBService: OracleDBService) { }
|
||||||
|
|
||||||
CreateHolders = async (body: CreateHoldersDTO) => {
|
CreateHolders = async (body: CreateHoldersDTO) => {
|
||||||
const newBody = {
|
const newBody = {
|
||||||
@ -52,7 +53,7 @@ export class ManageHoldersService {
|
|||||||
|
|
||||||
const finalBody: CreateHoldersDTO = { ...newBody, ...reqBody };
|
const finalBody: CreateHoldersDTO = { ...newBody, ...reqBody };
|
||||||
|
|
||||||
let connection:Connection;
|
let connection: Connection;
|
||||||
let p_holdercursor_rows = [];
|
let p_holdercursor_rows = [];
|
||||||
let p_holdercontactcursor_rows = [];
|
let p_holdercontactcursor_rows = [];
|
||||||
try {
|
try {
|
||||||
@ -86,7 +87,7 @@ export class ManageHoldersService {
|
|||||||
MobileNo,
|
MobileNo,
|
||||||
FaxNo,
|
FaxNo,
|
||||||
) {
|
) {
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`SELECT CARNETSYS.CONTACTSARRAY(:FirstName, :LastName, :MiddleInitial, :Title, :EmailAddress, :PhoneNo, :MobileNo, :FaxNo) FROM dual`,
|
`SELECT CARNETSYS.CONTACTSARRAY(:FirstName, :LastName, :MiddleInitial, :Title, :EmailAddress, :PhoneNo, :MobileNo, :FaxNo) FROM dual`,
|
||||||
{
|
{
|
||||||
FirstName,
|
FirstName,
|
||||||
@ -104,26 +105,26 @@ export class ManageHoldersService {
|
|||||||
|
|
||||||
const CONTACTSARRAY = finalBody.p_contactstable
|
const CONTACTSARRAY = finalBody.p_contactstable
|
||||||
? await Promise.all(
|
? await Promise.all(
|
||||||
finalBody.p_contactstable.map(async (x: p_contactstableDTO) => {
|
finalBody.p_contactstable.map(async (x: p_contactstableDTO) => {
|
||||||
return await CREATECONTACTSTABLE_INSTANCE(
|
return await CREATECONTACTSTABLE_INSTANCE(
|
||||||
connection,
|
connection,
|
||||||
x.FirstName,
|
x.FirstName,
|
||||||
x.LastName,
|
x.LastName,
|
||||||
x.MiddleInitial,
|
x.MiddleInitial,
|
||||||
x.Title,
|
x.Title,
|
||||||
x.EmailAddress,
|
x.EmailAddress,
|
||||||
x.PhoneNo,
|
x.PhoneNo,
|
||||||
x.MobileNo,
|
x.MobileNo,
|
||||||
x.FaxNo,
|
x.FaxNo,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
// Create an instance of GLTABLE
|
// Create an instance of GLTABLE
|
||||||
const CONTACTSTABLE_INSTANCE = new CONTACTSTABLE(CONTACTSARRAY);
|
const CONTACTSTABLE_INSTANCE = new CONTACTSTABLE(CONTACTSARRAY);
|
||||||
|
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
MANAGEHOLDER_PKG.CreateHolderData(
|
MANAGEHOLDER_PKG.CreateHolderData(
|
||||||
:p_spid,
|
:p_spid,
|
||||||
@ -319,7 +320,7 @@ export class ManageHoldersService {
|
|||||||
|
|
||||||
const finalBody = { ...newBody, ...reqBody };
|
const finalBody = { ...newBody, ...reqBody };
|
||||||
|
|
||||||
let connection:Connection;
|
let connection: Connection;
|
||||||
let P_cursor_rows = [];
|
let P_cursor_rows = [];
|
||||||
try {
|
try {
|
||||||
connection = await this.oracleDBService.getConnection();
|
connection = await this.oracleDBService.getConnection();
|
||||||
@ -327,7 +328,7 @@ export class ManageHoldersService {
|
|||||||
throw new Error('No DB Connected');
|
throw new Error('No DB Connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
MANAGEHOLDER_PKG.UpdateHolders(
|
MANAGEHOLDER_PKG.UpdateHolders(
|
||||||
:p_holderid,
|
:p_holderid,
|
||||||
@ -459,8 +460,8 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
GetHolderRecord = async (body: GetHolderOrContactDTO) => {
|
GetHolderRecord = async (body: GetHolderDTO) => {
|
||||||
let connection:Connection;
|
let connection: Connection;
|
||||||
let p_cursor_rows = [];
|
let p_cursor_rows = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -469,7 +470,7 @@ export class ManageHoldersService {
|
|||||||
throw new Error('No DB Connected');
|
throw new Error('No DB Connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
MANAGEHOLDER_PKG.GetHolderMaster(
|
MANAGEHOLDER_PKG.GetHolderMaster(
|
||||||
:p_spid,
|
:p_spid,
|
||||||
@ -548,7 +549,7 @@ export class ManageHoldersService {
|
|||||||
|
|
||||||
const finalBody: UpdateHolderContactDTO = { ...newBody, ...reqBody };
|
const finalBody: UpdateHolderContactDTO = { ...newBody, ...reqBody };
|
||||||
|
|
||||||
let connection:Connection;
|
let connection: Connection;
|
||||||
let P_cursor_rows = [];
|
let P_cursor_rows = [];
|
||||||
try {
|
try {
|
||||||
connection = await this.oracleDBService.getConnection();
|
connection = await this.oracleDBService.getConnection();
|
||||||
@ -556,7 +557,7 @@ export class ManageHoldersService {
|
|||||||
throw new Error('No DB Connected');
|
throw new Error('No DB Connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
MANAGEHOLDER_PKG.UpdateHolders(
|
MANAGEHOLDER_PKG.UpdateHolders(
|
||||||
:p_holdercontactid,
|
:p_holdercontactid,
|
||||||
@ -658,8 +659,8 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
GetHolderContacts = async (body: GetHolderOrContactDTO) => {
|
GetHolderContacts = async (body: GetHolderDTO) => {
|
||||||
let connection:Connection;
|
let connection: Connection;
|
||||||
let p_cursor_rows = [];
|
let p_cursor_rows = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -668,7 +669,7 @@ export class ManageHoldersService {
|
|||||||
throw new Error('No DB Connected');
|
throw new Error('No DB Connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
MANAGEHOLDER_PKG.GetHolderContacts(
|
MANAGEHOLDER_PKG.GetHolderContacts(
|
||||||
:p_spid,
|
:p_spid,
|
||||||
@ -716,8 +717,8 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InactivateHolder = async (body: GetHolderOrContactDTO) => {
|
InactivateHolder = async (body: HolderActivateOrInactivateDTO) => {
|
||||||
let connection:Connection;
|
let connection: Connection;
|
||||||
let p_cursor_rows = [];
|
let p_cursor_rows = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -726,11 +727,12 @@ export class ManageHoldersService {
|
|||||||
throw new Error('No DB Connected');
|
throw new Error('No DB Connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
ManageHolder_Pkg.InactivateHolder(
|
ManageHolder_Pkg.InactivateHolder(
|
||||||
:p_spid,
|
:p_spid,
|
||||||
:p_holderid,
|
:p_holderid,
|
||||||
|
:p_userid,
|
||||||
:p_cursor
|
:p_cursor
|
||||||
);
|
);
|
||||||
END;`,
|
END;`,
|
||||||
@ -743,6 +745,10 @@ export class ManageHoldersService {
|
|||||||
val: body.p_holderid,
|
val: body.p_holderid,
|
||||||
type: oracledb.DB_TYPE_NUMBER,
|
type: oracledb.DB_TYPE_NUMBER,
|
||||||
},
|
},
|
||||||
|
p_userid: {
|
||||||
|
val: body.p_userid,
|
||||||
|
type: oracledb.DB_TYPE_NVARCHAR,
|
||||||
|
},
|
||||||
p_cursor: {
|
p_cursor: {
|
||||||
type: oracledb.CURSOR,
|
type: oracledb.CURSOR,
|
||||||
dir: oracledb.BIND_OUT,
|
dir: oracledb.BIND_OUT,
|
||||||
@ -774,8 +780,8 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ReactivateHolder = async (body: GetHolderOrContactDTO) => {
|
ReactivateHolder = async (body: HolderActivateOrInactivateDTO) => {
|
||||||
let connection:Connection;
|
let connection: Connection;
|
||||||
let p_cursor_rows = [];
|
let p_cursor_rows = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -784,11 +790,12 @@ export class ManageHoldersService {
|
|||||||
throw new Error('No DB Connected');
|
throw new Error('No DB Connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
ManageHolder_Pkg.ReactivateHolder(
|
ManageHolder_Pkg.ReactivateHolder(
|
||||||
:p_spid,
|
:p_spid,
|
||||||
:p_holderid,
|
:p_holderid,
|
||||||
|
:p_p_userid,
|
||||||
:p_cursor
|
:p_cursor
|
||||||
);
|
);
|
||||||
END;`,
|
END;`,
|
||||||
@ -801,6 +808,10 @@ export class ManageHoldersService {
|
|||||||
val: body.p_holderid,
|
val: body.p_holderid,
|
||||||
type: oracledb.DB_TYPE_NUMBER,
|
type: oracledb.DB_TYPE_NUMBER,
|
||||||
},
|
},
|
||||||
|
p_userid: {
|
||||||
|
val: body.p_userid,
|
||||||
|
type: oracledb.DB_TYPE_NVARCHAR,
|
||||||
|
},
|
||||||
p_cursor: {
|
p_cursor: {
|
||||||
type: oracledb.CURSOR,
|
type: oracledb.CURSOR,
|
||||||
dir: oracledb.BIND_OUT,
|
dir: oracledb.BIND_OUT,
|
||||||
@ -832,8 +843,8 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InactivateHolderContact = async (body: GetHolderContactActivateOrInactivateDTO) => {
|
InactivateHolderContact = async (body: HolderContactActivateOrInactivateDTO) => {
|
||||||
let connection:Connection;
|
let connection: Connection;
|
||||||
let p_cursor_rows = [];
|
let p_cursor_rows = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -842,11 +853,12 @@ export class ManageHoldersService {
|
|||||||
throw new Error('No DB Connected');
|
throw new Error('No DB Connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
ManageHolder_Pkg.InactivateHolderContact(
|
ManageHolder_Pkg.InactivateHolderContact(
|
||||||
:p_spid,
|
:p_spid,
|
||||||
:p_holderid,
|
:p_holderContactid,
|
||||||
|
:p_userid,
|
||||||
:p_cursor
|
:p_cursor
|
||||||
);
|
);
|
||||||
END;`,
|
END;`,
|
||||||
@ -855,10 +867,14 @@ export class ManageHoldersService {
|
|||||||
val: body.p_spid,
|
val: body.p_spid,
|
||||||
type: oracledb.DB_TYPE_NUMBER,
|
type: oracledb.DB_TYPE_NUMBER,
|
||||||
},
|
},
|
||||||
p_holderid: {
|
p_holderContactid: {
|
||||||
val: body.p_holderContactid,
|
val: body.p_holderContactid,
|
||||||
type: oracledb.DB_TYPE_NUMBER,
|
type: oracledb.DB_TYPE_NUMBER,
|
||||||
},
|
},
|
||||||
|
p_userid: {
|
||||||
|
val: body.p_userid,
|
||||||
|
type: oracledb.DB_TYPE_NVARCHAR,
|
||||||
|
},
|
||||||
p_cursor: {
|
p_cursor: {
|
||||||
type: oracledb.CURSOR,
|
type: oracledb.CURSOR,
|
||||||
dir: oracledb.BIND_OUT,
|
dir: oracledb.BIND_OUT,
|
||||||
@ -890,8 +906,8 @@ export class ManageHoldersService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ReactivateHolderContact = async (body: GetHolderContactActivateOrInactivateDTO) => {
|
ReactivateHolderContact = async (body: HolderContactActivateOrInactivateDTO) => {
|
||||||
let connection:Connection;
|
let connection: Connection;
|
||||||
let p_cursor_rows = [];
|
let p_cursor_rows = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -900,11 +916,12 @@ export class ManageHoldersService {
|
|||||||
throw new Error('No DB Connected');
|
throw new Error('No DB Connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
const result:Result<any> = await connection.execute(
|
const result: Result<any> = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
ManageHolder_Pkg.ReactivateHolderContact(
|
ManageHolder_Pkg.ReactivateHolderContact(
|
||||||
:p_spid,
|
:p_spid,
|
||||||
:p_holderid,
|
:p_holderContactid,
|
||||||
|
:p_userid,
|
||||||
:p_cursor
|
:p_cursor
|
||||||
);
|
);
|
||||||
END;`,
|
END;`,
|
||||||
@ -913,10 +930,14 @@ export class ManageHoldersService {
|
|||||||
val: body.p_spid,
|
val: body.p_spid,
|
||||||
type: oracledb.DB_TYPE_NUMBER,
|
type: oracledb.DB_TYPE_NUMBER,
|
||||||
},
|
},
|
||||||
p_holderid: {
|
p_holderContactid: {
|
||||||
val: body.p_holderContactid,
|
val: body.p_holderContactid,
|
||||||
type: oracledb.DB_TYPE_NUMBER,
|
type: oracledb.DB_TYPE_NUMBER,
|
||||||
},
|
},
|
||||||
|
p_userid: {
|
||||||
|
val: body.p_userid,
|
||||||
|
type: oracledb.DB_TYPE_NVARCHAR,
|
||||||
|
},
|
||||||
p_cursor: {
|
p_cursor: {
|
||||||
type: oracledb.CURSOR,
|
type: oracledb.CURSOR,
|
||||||
dir: oracledb.BIND_OUT,
|
dir: oracledb.BIND_OUT,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user