response aligned to match same as oracle
This commit is contained in:
parent
cecfa1030a
commit
7ea099d611
@ -6,7 +6,7 @@ import {
|
|||||||
AddGenerallistItemsDTO,
|
AddGenerallistItemsDTO,
|
||||||
CA_UpdateHolderDTO,
|
CA_UpdateHolderDTO,
|
||||||
CapturePaymentDTO,
|
CapturePaymentDTO,
|
||||||
CarnetProcessingCenterDTO, CarnetProcessingCenterDTO2, CopyCarnetDTO, CreateApplicationDTO, DeleteGenerallistItemsDTO, EditGenerallistItemsDTO, GetCarnetControlCenterDTO, GetExtendedSectionDTO, GetOrderDetailsDTO, GetPaymentHistoryDTO, InitiatePaymentDTO, PrintCarnetDTO, PrintGLDTO, SaveCarnetApplicationDTO, SaveExtensionApplicationDTO, SaveHistoryDTO, TransmitApplicationtoProcessDTO,
|
CarnetProcessingCenterDTO, CarnetProcessingCenterDTO2, CopyCarnetDTO, CreateApplicationDTO, DeleteGenerallistItemsDTO, EditGenerallistItemsDTO, GetCarnetControlCenterDTO, GetCarnetDetailsbyCarnetStatusDTO, GetExtendedSectionDTO, GetOrderDetailsDTO, GetPaymentHistoryDTO, InitiatePaymentDTO, PrintCarnetDTO, PrintGLDTO, SaveCarnetApplicationDTO, SaveExtensionApplicationDTO, SaveHistoryDTO, TransmitApplicationtoProcessDTO,
|
||||||
UpdateExpGoodsAuthRepDTO,
|
UpdateExpGoodsAuthRepDTO,
|
||||||
UpdateShippingDetailsDTO
|
UpdateShippingDetailsDTO
|
||||||
} from 'src/dto/property.dto';
|
} from 'src/dto/property.dto';
|
||||||
@ -31,6 +31,7 @@ export class CarnetApplicationController {
|
|||||||
|
|
||||||
// [ CARNETAPPLICATION_PKG ]
|
// [ CARNETAPPLICATION_PKG ]
|
||||||
|
|
||||||
|
// not used
|
||||||
// @Post('SaveCarnetApplication')
|
// @Post('SaveCarnetApplication')
|
||||||
// async CreateClientData(@Body() body: SaveCarnetApplicationDTO) {
|
// async CreateClientData(@Body() body: SaveCarnetApplicationDTO) {
|
||||||
// return this.carnetApplicationService.SaveCarnetApplication(body);
|
// return this.carnetApplicationService.SaveCarnetApplication(body);
|
||||||
@ -63,11 +64,6 @@ export class CarnetApplicationController {
|
|||||||
return this.carnetApplicationService.AddGenerallistItems(body);
|
return this.carnetApplicationService.AddGenerallistItems(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('AddCountries')
|
|
||||||
AddCountries(@Body() body: AddCountriesDTO) {
|
|
||||||
return this.carnetApplicationService.AddCountries(body);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Put('EditGenerallistItems')
|
@Put('EditGenerallistItems')
|
||||||
EditGenerallistItems(@Body() body: EditGenerallistItemsDTO) {
|
EditGenerallistItems(@Body() body: EditGenerallistItemsDTO) {
|
||||||
return this.carnetApplicationService.EditGenerallistItems(body);
|
return this.carnetApplicationService.EditGenerallistItems(body);
|
||||||
@ -78,6 +74,11 @@ export class CarnetApplicationController {
|
|||||||
return this.carnetApplicationService.DeleteGenerallistItems(body);
|
return this.carnetApplicationService.DeleteGenerallistItems(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Post('AddCountries')
|
||||||
|
AddCountries(@Body() body: AddCountriesDTO) {
|
||||||
|
return this.carnetApplicationService.AddCountries(body);
|
||||||
|
}
|
||||||
|
|
||||||
@Patch('UpdateShippingDetails')
|
@Patch('UpdateShippingDetails')
|
||||||
UpdateShippingDetails(@Body() body: UpdateShippingDetailsDTO) {
|
UpdateShippingDetails(@Body() body: UpdateShippingDetailsDTO) {
|
||||||
return this.carnetApplicationService.UpdateShippingDetails(body);
|
return this.carnetApplicationService.UpdateShippingDetails(body);
|
||||||
@ -91,7 +92,7 @@ export class CarnetApplicationController {
|
|||||||
// // processing [ PROCESSINGCENTER_PKG ]
|
// // processing [ PROCESSINGCENTER_PKG ]
|
||||||
|
|
||||||
@Patch('ProcessCarnet')
|
@Patch('ProcessCarnet')
|
||||||
ProcessOriginalCarnet(@Body() body: CarnetProcessingCenterDTO) {
|
ProcessCarnet(@Body() body: CarnetProcessingCenterDTO) {
|
||||||
return this.carnetApplicationService.ProcessCarnet(body);
|
return this.carnetApplicationService.ProcessCarnet(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +107,6 @@ export class CarnetApplicationController {
|
|||||||
return this.carnetApplicationService.VoidCarnet(body);
|
return this.carnetApplicationService.VoidCarnet(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Patch('CopyCarnet')
|
@Patch('CopyCarnet')
|
||||||
CopyCarnet(@Body() body: CopyCarnetDTO) {
|
CopyCarnet(@Body() body: CopyCarnetDTO) {
|
||||||
return this.carnetApplicationService.CopyCarnet(body);
|
return this.carnetApplicationService.CopyCarnet(body);
|
||||||
@ -182,6 +182,12 @@ export class CarnetApplicationController {
|
|||||||
return this.carnetApplicationService.GetShipPaymentDetailstoEdit(body);
|
return this.carnetApplicationService.GetShipPaymentDetailstoEdit(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get('GetCarnetDetailsbyCarnetStatus/:P_SPID/:P_USERID/:P_CARNETSTATUS')
|
||||||
|
@Roles('pca', 'psa', 'pua')
|
||||||
|
GetCarnetDetailsbyCarnetStatus(@Param() params: GetCarnetDetailsbyCarnetStatusDTO) {
|
||||||
|
return this.carnetApplicationService.GetCarnetDetailsbyCarnetStatus(params);
|
||||||
|
}
|
||||||
|
|
||||||
// [PRINT_PKG]
|
// [PRINT_PKG]
|
||||||
@Post('PrintCarnet')
|
@Post('PrintCarnet')
|
||||||
@HttpCode(200)
|
@HttpCode(200)
|
||||||
|
|||||||
@ -21,7 +21,8 @@ import {
|
|||||||
InitiatePaymentDTO,
|
InitiatePaymentDTO,
|
||||||
GetOrderDetailsDTO,
|
GetOrderDetailsDTO,
|
||||||
GetPaymentHistoryDTO,
|
GetPaymentHistoryDTO,
|
||||||
SaveHistoryDTO
|
SaveHistoryDTO,
|
||||||
|
GetCarnetDetailsbyCarnetStatusDTO
|
||||||
} from 'src/dto/property.dto';
|
} from 'src/dto/property.dto';
|
||||||
import { BadRequestException } from 'src/exceptions/badRequest.exception';
|
import { BadRequestException } from 'src/exceptions/badRequest.exception';
|
||||||
import { PoolClient } from 'pg';
|
import { PoolClient } from 'pg';
|
||||||
@ -516,7 +517,7 @@ export class CarnetApplicationService {
|
|||||||
await client.query(`CLOSE ${cursorName}`);
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
await client.query('COMMIT');
|
await client.query('COMMIT');
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
@ -1000,7 +1001,7 @@ export class CarnetApplicationService {
|
|||||||
await client.query(`CLOSE ${cursorName}`);
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
await client.query('COMMIT');
|
await client.query('COMMIT');
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
@ -1032,7 +1033,39 @@ export class CarnetApplicationService {
|
|||||||
await client.query(`CLOSE ${cursorName}`);
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
await client.query('COMMIT');
|
await client.query('COMMIT');
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
if (client) await client.query('ROLLBACK');
|
||||||
|
handlePgError(error, CarnetApplicationService.name)
|
||||||
|
} finally {
|
||||||
|
releasePgClient(client)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async GetGoodsItemstoEdit(body: GetCarnetControlCenterDTO) {
|
||||||
|
let client: PoolClient | null = null;
|
||||||
|
|
||||||
|
const cursorName = 'p_cursor';
|
||||||
|
|
||||||
|
try {
|
||||||
|
client = await this.pgDBService.getConnection();
|
||||||
|
|
||||||
|
await client.query('BEGIN');
|
||||||
|
|
||||||
|
const callProcQuery = `
|
||||||
|
CALL "CARNETSYS".carnetcontrolcenter_pkg_getgoodsitemstoedit($1, $2, $3, $4)
|
||||||
|
`;
|
||||||
|
await client.query(callProcQuery, [body.P_SPID, body.P_USERID, body.P_HEADERID, cursorName]);
|
||||||
|
|
||||||
|
// 🚫 DON'T quote the cursor name in FETCH
|
||||||
|
const fetchResult = await client.query(`FETCH ALL FROM ${cursorName}`);
|
||||||
|
|
||||||
|
// 🚫 DON'T quote the cursor name in CLOSE
|
||||||
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
|
await client.query('COMMIT');
|
||||||
|
|
||||||
|
return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
@ -1064,7 +1097,7 @@ export class CarnetApplicationService {
|
|||||||
await client.query(`CLOSE ${cursorName}`);
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
await client.query('COMMIT');
|
await client.query('COMMIT');
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
@ -1096,7 +1129,7 @@ export class CarnetApplicationService {
|
|||||||
await client.query(`CLOSE ${cursorName}`);
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
await client.query('COMMIT');
|
await client.query('COMMIT');
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
@ -1106,7 +1139,8 @@ export class CarnetApplicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async GetGoodsItemstoEdit(body: GetCarnetControlCenterDTO) {
|
async GetCarnetDetailsbyCarnetStatus(body: GetCarnetDetailsbyCarnetStatusDTO) {
|
||||||
|
|
||||||
let client: PoolClient | null = null;
|
let client: PoolClient | null = null;
|
||||||
|
|
||||||
const cursorName = 'p_cursor';
|
const cursorName = 'p_cursor';
|
||||||
@ -1117,9 +1151,9 @@ export class CarnetApplicationService {
|
|||||||
await client.query('BEGIN');
|
await client.query('BEGIN');
|
||||||
|
|
||||||
const callProcQuery = `
|
const callProcQuery = `
|
||||||
CALL "CARNETSYS".carnetcontrolcenter_pkg_getgoodsitemstoedit($1, $2, $3, $4)
|
CALL "CARNETSYS".carnetcontrolcenter_pkg_getcarnetdetails($1, $2, $3, $4)
|
||||||
`;
|
`;
|
||||||
await client.query(callProcQuery, [body.P_SPID, body.P_USERID, body.P_HEADERID, cursorName]);
|
await client.query(callProcQuery, [body.P_SPID, body.P_USERID, body.P_CARNETSTATUS, cursorName]);
|
||||||
|
|
||||||
// 🚫 DON'T quote the cursor name in FETCH
|
// 🚫 DON'T quote the cursor name in FETCH
|
||||||
const fetchResult = await client.query(`FETCH ALL FROM ${cursorName}`);
|
const fetchResult = await client.query(`FETCH ALL FROM ${cursorName}`);
|
||||||
@ -1128,6 +1162,8 @@ export class CarnetApplicationService {
|
|||||||
await client.query(`CLOSE ${cursorName}`);
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
await client.query('COMMIT');
|
await client.query('COMMIT');
|
||||||
|
|
||||||
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -1664,7 +1700,7 @@ export class CarnetApplicationService {
|
|||||||
await client.query(`CLOSE ${cursorName}`);
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
await client.query('COMMIT');
|
await client.query('COMMIT');
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
|
|||||||
@ -103,7 +103,7 @@ export class ManageClientsService {
|
|||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
statusCode: 201,
|
statusCode: 200,
|
||||||
message: ResponseStatus.updated,
|
message: ResponseStatus.updated,
|
||||||
...toUpperCaseKeys(fetchResult?.rows)[0]
|
...toUpperCaseKeys(fetchResult?.rows)[0]
|
||||||
};
|
};
|
||||||
@ -155,7 +155,7 @@ export class ManageClientsService {
|
|||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
statusCode: 201,
|
statusCode: 200,
|
||||||
message: ResponseStatus.updated,
|
message: ResponseStatus.updated,
|
||||||
...toUpperCaseKeys(fetchResult?.rows)[0]
|
...toUpperCaseKeys(fetchResult?.rows)[0]
|
||||||
};
|
};
|
||||||
@ -206,7 +206,7 @@ export class ManageClientsService {
|
|||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
statusCode: 201,
|
statusCode: 200,
|
||||||
message: ResponseStatus.updated,
|
message: ResponseStatus.updated,
|
||||||
...toUpperCaseKeys(fetchResult?.rows)[0]
|
...toUpperCaseKeys(fetchResult?.rows)[0]
|
||||||
};
|
};
|
||||||
@ -528,7 +528,7 @@ export class ManageClientsService {
|
|||||||
|
|
||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows)[0] ?? [];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
|
|||||||
@ -15,125 +15,125 @@ export class ManageFeeController {
|
|||||||
constructor(private readonly manageFeeService: ManageFeeService) { }
|
constructor(private readonly manageFeeService: ManageFeeService) { }
|
||||||
|
|
||||||
@Get('/GetBasicFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
@Get('/GetBasicFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
||||||
GetBasicFeeRates(@Param() body: GetFeeGeneralDTO) {
|
GETBASICFEERATES(@Param() body: GetFeeGeneralDTO) {
|
||||||
return this.manageFeeService.GETBASICFEERATES(body);
|
return this.manageFeeService.GETBASICFEERATES(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('/CreateBasicFee')
|
@Post('/CreateBasicFee')
|
||||||
CreateBasicFee(@Body() body: CreateBasicFeeDTO) {
|
CREATEBASICFEE(@Body() body: CreateBasicFeeDTO) {
|
||||||
return this.manageFeeService.CREATEBASICFEE(body);
|
return this.manageFeeService.CREATEBASICFEE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch('/UpdateBasicFee')
|
@Patch('/UpdateBasicFee')
|
||||||
UpdateBasicFee(@Body() body: UpdateBasicFeeDTO) {
|
UPDATEBASICFEE(@Body() body: UpdateBasicFeeDTO) {
|
||||||
return this.manageFeeService.UPDATEBASICFEE(body);
|
return this.manageFeeService.UPDATEBASICFEE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// bond rate
|
// bond rate
|
||||||
|
|
||||||
@Get('/GetBondRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
@Get('/GetBondRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
||||||
GetBondRates(@Param() body: GetFeeGeneralDTO) {
|
GETBONDRATES(@Param() body: GetFeeGeneralDTO) {
|
||||||
return this.manageFeeService.GETBONDRATES(body);
|
return this.manageFeeService.GETBONDRATES(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('/CreateBondRate')
|
@Post('/CreateBondRate')
|
||||||
CreateBondRate(@Body() body: CreateBondRateDTO) {
|
CREATEBONDRATE(@Body() body: CreateBondRateDTO) {
|
||||||
return this.manageFeeService.CREATEBONDRATE(body);
|
return this.manageFeeService.CREATEBONDRATE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Patch('/UpdateBondRate')
|
@Patch('/UpdateBondRate')
|
||||||
UpdateBondRate(@Body() body: UpdateBondRateDTO) {
|
UPDATEBONDRATE(@Body() body: UpdateBondRateDTO) {
|
||||||
return this.manageFeeService.UPDATEBONDRATE(body);
|
return this.manageFeeService.UPDATEBONDRATE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// cargo rate
|
// cargo rate
|
||||||
|
|
||||||
@Get('/GetCargoRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
@Get('/GetCargoRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
||||||
GetCargoRates(@Param() body: GetFeeGeneralDTO) {
|
GETCARGORATES(@Param() body: GetFeeGeneralDTO) {
|
||||||
return this.manageFeeService.GETCARGORATES(body);
|
return this.manageFeeService.GETCARGORATES(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Post('/CreateCargoRate')
|
@Post('/CreateCargoRate')
|
||||||
CreateCargoRate(@Body() body: CreateCargoRateDTO) {
|
CREATECARGORATE(@Body() body: CreateCargoRateDTO) {
|
||||||
return this.manageFeeService.CREATECARGORATE(body);
|
return this.manageFeeService.CREATECARGORATE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Patch('/UpdateCargoRate')
|
@Patch('/UpdateCargoRate')
|
||||||
UpdateCargoRate(@Body() body: UpdateCargoRateDTO) {
|
UPDATECARGORATE(@Body() body: UpdateCargoRateDTO) {
|
||||||
return this.manageFeeService.UPDATECARGORATE(body);
|
return this.manageFeeService.UPDATECARGORATE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// cf fee rate
|
// cf fee rate
|
||||||
|
|
||||||
@Get('/GetCfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
@Get('/GetCfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
||||||
GetCfFeeRates(@Param() body: GetFeeGeneralDTO) {
|
GETCFFEERATES(@Param() body: GetFeeGeneralDTO) {
|
||||||
return this.manageFeeService.GETCFFEERATES(body);
|
return this.manageFeeService.GETCFFEERATES(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Post('/CreateCfFee')
|
@Post('/CreateCfFee')
|
||||||
CreateCfFee(@Body() body: CreateCfFeeDTO) {
|
CREATECFFEE(@Body() body: CreateCfFeeDTO) {
|
||||||
return this.manageFeeService.CREATECFFEE(body);
|
return this.manageFeeService.CREATECFFEE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch('/UpdateCfFee')
|
@Patch('/UpdateCfFee')
|
||||||
UpdateCfFee(@Body() body: UpdateCfFeeDTO) {
|
UPDATECFFEE(@Body() body: UpdateCfFeeDTO) {
|
||||||
return this.manageFeeService.UPDATECFFEE(body);
|
return this.manageFeeService.UPDATECFFEE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// cs fee rate
|
// cs fee rate
|
||||||
|
|
||||||
@Get('/GetCsFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
@Get('/GetCsFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
||||||
GetCsFeeRates(@Param() body: GetFeeGeneralDTO) {
|
GETCSFEERATES(@Param() body: GetFeeGeneralDTO) {
|
||||||
return this.manageFeeService.GETCSFEERATES(body);
|
return this.manageFeeService.GETCSFEERATES(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('/CreateCsFee')
|
@Post('/CreateCsFee')
|
||||||
CreateCsFee(@Body() body: CreateCsFeeDTO) {
|
CREATECSFEE(@Body() body: CreateCsFeeDTO) {
|
||||||
return this.manageFeeService.CREATECSFEE(body);
|
return this.manageFeeService.CREATECSFEE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch('/UpdateCsFee')
|
@Patch('/UpdateCsFee')
|
||||||
UpdateCsFee(@Body() body: UpdateCsFeeDTO) {
|
UPDATECSFEE(@Body() body: UpdateCsFeeDTO) {
|
||||||
return this.manageFeeService.UPDATECSFEE(body);
|
return this.manageFeeService.UPDATECSFEE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ef fee rate
|
// ef fee rate
|
||||||
|
|
||||||
@Get('/GetEfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
@Get('/GetEfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
||||||
GetEfFeeRates(@Param() body: GetFeeGeneralDTO) {
|
GETEFFEERATES(@Param() body: GetFeeGeneralDTO) {
|
||||||
return this.manageFeeService.GETEFFEERATES(body);
|
return this.manageFeeService.GETEFFEERATES(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('/CreateEfFee')
|
@Post('/CreateEfFee')
|
||||||
CreateEeFee(@Body() body: CreateEfFeeDTO) {
|
CREATEEFFEE(@Body() body: CreateEfFeeDTO) {
|
||||||
return this.manageFeeService.CREATEEFFEE(body);
|
return this.manageFeeService.CREATEEFFEE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch('/UpdateEfFee')
|
@Patch('/UpdateEfFee')
|
||||||
UpdateEfFee(@Body() body: UpdateEfFeeDTO) {
|
UPDATEEFFEE(@Body() body: UpdateEfFeeDTO) {
|
||||||
return this.manageFeeService.UPDATEEFFEE(body);
|
return this.manageFeeService.UPDATEEFFEE(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// fee comm
|
// fee comm
|
||||||
|
|
||||||
@Get('/GetFeeComm/:P_SPID/:P_ACTIVE_INACTIVE')
|
@Get('/GetFeeComm/:P_SPID/:P_ACTIVE_INACTIVE')
|
||||||
GetFeeComm(@Param() body: GetFeeGeneralDTO) {
|
GETFEECOMM(@Param() body: GetFeeGeneralDTO) {
|
||||||
return this.manageFeeService.GETFEECOMM(body);
|
return this.manageFeeService.GETFEECOMM(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Post('/CreateFeeComm')
|
@Post('/CreateFeeComm')
|
||||||
CreateFeeComm(@Body() body: CreateFeeCommDTO) {
|
CREATEFEECOMM(@Body() body: CreateFeeCommDTO) {
|
||||||
return this.manageFeeService.CREATEFEECOMM(body);
|
return this.manageFeeService.CREATEFEECOMM(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Patch('/UpdateFeeComm')
|
@Patch('/UpdateFeeComm')
|
||||||
UpdateFeeComm(@Body() body: UpdateFeeCommDTO) {
|
UPDATEFEECOMM(@Body() body: UpdateFeeCommDTO) {
|
||||||
return this.manageFeeService.UPDATEFEECOMM(body);
|
return this.manageFeeService.UPDATEFEECOMM(body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,16 +72,16 @@ export class ManageHolderController {
|
|||||||
return this.manageHoldersService.UpdateHolder(body);
|
return this.manageHoldersService.UpdateHolder(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get('/GetHolderRecord/:P_SPID/:P_HOLDERID')
|
||||||
|
GetHolderRecord(@Param() body: GetHolderDTO) {
|
||||||
|
return this.manageHoldersService.GetHolderRecord(body);
|
||||||
|
}
|
||||||
|
|
||||||
@Put('/UpdateHolderContact')
|
@Put('/UpdateHolderContact')
|
||||||
UpdateHolderContact(@Body() body: UpdateHolderContactDTO) {
|
UpdateHolderContact(@Body() body: UpdateHolderContactDTO) {
|
||||||
return this.manageHoldersService.UpdateHolderContact(body);
|
return this.manageHoldersService.UpdateHolderContact(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('/GetHolderRecord/:P_SPID/:P_HOLDERID')
|
|
||||||
GetHolderMaster(@Param() body: GetHolderDTO) {
|
|
||||||
return this.manageHoldersService.GetHolderRecord(body);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get('/GetHolderContacts/:P_SPID/:P_HOLDERID')
|
@Get('/GetHolderContacts/:P_SPID/:P_HOLDERID')
|
||||||
GetHolderContacts(@Param() body: GetHolderDTO) {
|
GetHolderContacts(@Param() body: GetHolderDTO) {
|
||||||
return this.manageHoldersService.GetHolderContacts(body);
|
return this.manageHoldersService.GetHolderContacts(body);
|
||||||
|
|||||||
@ -9,6 +9,40 @@ export class ManageHolderService {
|
|||||||
|
|
||||||
constructor(private readonly pgDBService: PgDBService) { }
|
constructor(private readonly pgDBService: PgDBService) { }
|
||||||
|
|
||||||
|
SearchHolder = async (body: { P_SPID: number, P_USERID: string, P_HOLDERID: number | null, P_HOLDERNAME: string | null }) => {
|
||||||
|
let client: PoolClient | null = null;
|
||||||
|
|
||||||
|
const cursorName = 'p_cursor';
|
||||||
|
|
||||||
|
try {
|
||||||
|
client = await this.pgDBService.getConnection();
|
||||||
|
|
||||||
|
await client.query('BEGIN');
|
||||||
|
|
||||||
|
const callProcQuery = `
|
||||||
|
CALL "CARNETSYS".manageholder_pkg_searchholder($1, $2, $3, $4, $5)
|
||||||
|
`;
|
||||||
|
await client.query(callProcQuery, [body.P_SPID, body.P_HOLDERID, body.P_HOLDERNAME, body.P_USERID, cursorName]);
|
||||||
|
|
||||||
|
// 🚫 DON'T quote the cursor name in FETCH
|
||||||
|
const fetchResult = await client.query(`FETCH ALL FROM ${cursorName}`);
|
||||||
|
|
||||||
|
// 🚫 DON'T quote the cursor name in CLOSE
|
||||||
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
|
await client.query('COMMIT');
|
||||||
|
|
||||||
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
|
return toUpperCaseKeys(fetchResult.rows);
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
if (client) await client.query('ROLLBACK');
|
||||||
|
handlePgError(error, ManageHolderService.name)
|
||||||
|
} finally {
|
||||||
|
releasePgClient(client)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async CreateHolders(body: CreateHoldersDTO) {
|
async CreateHolders(body: CreateHoldersDTO) {
|
||||||
let client: PoolClient | null = null;
|
let client: PoolClient | null = null;
|
||||||
|
|
||||||
@ -177,7 +211,7 @@ export class ManageHolderService {
|
|||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
statusCode: 201,
|
statusCode: 200,
|
||||||
message: ResponseStatus.updated,
|
message: ResponseStatus.updated,
|
||||||
...toUpperCaseKeys(fetchResult?.rows)[0]
|
...toUpperCaseKeys(fetchResult?.rows)[0]
|
||||||
};
|
};
|
||||||
@ -214,7 +248,7 @@ export class ManageHolderService {
|
|||||||
|
|
||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows)[0]??[];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
@ -263,7 +297,7 @@ export class ManageHolderService {
|
|||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
statusCode: 201,
|
statusCode: 200,
|
||||||
message: ResponseStatus.updated,
|
message: ResponseStatus.updated,
|
||||||
...toUpperCaseKeys(fetchResult?.rows)[0]
|
...toUpperCaseKeys(fetchResult?.rows)[0]
|
||||||
};
|
};
|
||||||
@ -462,37 +496,4 @@ export class ManageHolderService {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SearchHolder = async (body: { P_SPID: number, P_USERID: string, P_HOLDERID: number | null, P_HOLDERNAME: string | null }) => {
|
|
||||||
let client: PoolClient | null = null;
|
|
||||||
|
|
||||||
const cursorName = 'p_cursor';
|
|
||||||
|
|
||||||
try {
|
|
||||||
client = await this.pgDBService.getConnection();
|
|
||||||
|
|
||||||
await client.query('BEGIN');
|
|
||||||
|
|
||||||
const callProcQuery = `
|
|
||||||
CALL "CARNETSYS".manageholder_pkg_searchholder($1, $2, $3, $4, $5)
|
|
||||||
`;
|
|
||||||
await client.query(callProcQuery, [body.P_SPID, body.P_HOLDERID, body.P_HOLDERNAME, body.P_USERID, cursorName]);
|
|
||||||
|
|
||||||
// 🚫 DON'T quote the cursor name in FETCH
|
|
||||||
const fetchResult = await client.query(`FETCH ALL FROM ${cursorName}`);
|
|
||||||
|
|
||||||
// 🚫 DON'T quote the cursor name in CLOSE
|
|
||||||
await client.query(`CLOSE ${cursorName}`);
|
|
||||||
await client.query('COMMIT');
|
|
||||||
|
|
||||||
checkPgUserDefinedErrors(fetchResult);
|
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
if (client) await client.query('ROLLBACK');
|
|
||||||
handlePgError(error, ManageHolderService.name)
|
|
||||||
} finally {
|
|
||||||
releasePgClient(client)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ export class ParamTableController {
|
|||||||
type: String,
|
type: String,
|
||||||
description: 'The type of the parameter',
|
description: 'The type of the parameter',
|
||||||
})
|
})
|
||||||
getParamValues(@Query() body: getParamValuesDTO) {
|
GETPARAMVALUES(@Query() body: getParamValuesDTO) {
|
||||||
return this.paramTableService.GETPARAMVALUES(body);
|
return this.paramTableService.GETPARAMVALUES(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ export class ParamTableController {
|
|||||||
type: String,
|
type: String,
|
||||||
description: 'The type of the parameter',
|
description: 'The type of the parameter',
|
||||||
})
|
})
|
||||||
getAllParamValues(@Query() body: getParamValuesDTO) {
|
GETALLPARAMVALUES(@Query() body: getParamValuesDTO) {
|
||||||
return this.paramTableService.GETALLPARAMVALUES(body);
|
return this.paramTableService.GETALLPARAMVALUES(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,27 +60,27 @@ export class ParamTableController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Post('/CreateTableRecord')
|
@Post('/CreateTableRecord')
|
||||||
createTableRecord(@Body() body: CreateTableRecordDTO) {
|
CREATETABLERECORD(@Body() body: CreateTableRecordDTO) {
|
||||||
return this.paramTableService.CREATETABLERECORD(body);
|
return this.paramTableService.CREATETABLERECORD(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('/CreateParamRecord')
|
@Post('/CreateParamRecord')
|
||||||
createParamRecord(@Body() body: CreateParamRecordDTO) {
|
CREATEPARAMRECORD(@Body() body: CreateParamRecordDTO) {
|
||||||
return this.paramTableService.CREATEPARAMRECORD(body);
|
return this.paramTableService.CREATEPARAMRECORD(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch('/UpdateParamRecord')
|
@Patch('/UpdateParamRecord')
|
||||||
UpdateParamRecord(@Body() body: UpdateParamRecordDTO) {
|
UPDATEPARAMRECORD(@Body() body: UpdateParamRecordDTO) {
|
||||||
return this.paramTableService.UPDATEPARAMRECORD(body);
|
return this.paramTableService.UPDATEPARAMRECORD(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch('/InActivateParamRecord')
|
@Patch('/InActivateParamRecord')
|
||||||
inActivateParamRecord(@Body() body: ActivateOrInactivateParamRecordDTO) {
|
INACTIVATEPARAMRECORD(@Body() body: ActivateOrInactivateParamRecordDTO) {
|
||||||
return this.paramTableService.INACTIVATEPARAMRECORD(body);
|
return this.paramTableService.INACTIVATEPARAMRECORD(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch('/ReActivateParamRecord')
|
@Patch('/ReActivateParamRecord')
|
||||||
reActivateParamRecord(@Body() body: ActivateOrInactivateParamRecordDTO) {
|
REACTIVATEPARAMRECORD(@Body() body: ActivateOrInactivateParamRecordDTO) {
|
||||||
return this.paramTableService.REACTIVATEPARAMRECORD(body);
|
return this.paramTableService.REACTIVATEPARAMRECORD(body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export class SpContactsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Get('/GetSPDefaultContact/:P_SPID')
|
@Get('/GetSPDefaultContact/:P_SPID')
|
||||||
getSPDefaultcontact(@Param() param: SPID_DTO) {
|
getSPDefaultcontacts(@Param() param: SPID_DTO) {
|
||||||
return this.spContactsService.getSPDefaultcontacts(param);
|
return this.spContactsService.getSPDefaultcontacts(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export class SpController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Put('/UpdateServiceProvider')
|
@Put('/UpdateServiceProvider')
|
||||||
updateServiceProider(@Body() body: UpdateServiceProviderDTO) {
|
updateServiceProvider(@Body() body: UpdateServiceProviderDTO) {
|
||||||
return this.spService.updateServiceProvider(body);
|
return this.spService.updateServiceProvider(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ export class SpController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Get('/GetSelectedServiceprovider/:P_SPID')
|
@Get('/GetSelectedServiceprovider/:P_SPID')
|
||||||
getSelectedServiceprovider(@Param() param: SPID_DTO) {
|
getServiceproviderByID(@Param() param: SPID_DTO) {
|
||||||
return this.spService.getServiceproviderByID(param);
|
return this.spService.getServiceproviderByID(param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,7 +125,7 @@ export class SpService {
|
|||||||
|
|
||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return { statusCode: 201, message: ResponseStatus.created, ...toUpperCaseKeys(fetchResult?.rows)[0] || {} };
|
return { statusCode: 200, message: ResponseStatus.updated, ...toUpperCaseKeys(fetchResult?.rows)[0] || {} };
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
@ -192,7 +192,7 @@ export class SpService {
|
|||||||
await client.query(`CLOSE ${cursorName}`);
|
await client.query(`CLOSE ${cursorName}`);
|
||||||
await client.query('COMMIT');
|
await client.query('COMMIT');
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
return toUpperCaseKeys(fetchResult.rows)[0]??[];
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
|
|||||||
@ -63,13 +63,13 @@ export class UserMaintenanceController {
|
|||||||
@Get('GetClientloginsBySPID/:P_SPID')
|
@Get('GetClientloginsBySPID/:P_SPID')
|
||||||
@Roles('psa')
|
@Roles('psa')
|
||||||
async GetClientloginsBySPID(@Param() params: SPID_DTO) {
|
async GetClientloginsBySPID(@Param() params: SPID_DTO) {
|
||||||
return await this.userMaintenanceService.GetSPLogins(params);
|
return await this.userMaintenanceService.GetClientloginsBySPID(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('GetClientloginsByClientID/:P_SPID/:P_CLIENTID')
|
@Get('GetClientloginsByClientID/:P_SPID/:P_CLIENTID')
|
||||||
@Roles('psa')
|
@Roles('psa')
|
||||||
async GetClientloginsByClientID(@Param() params: SPID_CLIENTID_DTO) {
|
async GetClientloginsByClientID(@Param() params: SPID_CLIENTID_DTO) {
|
||||||
return await this.userMaintenanceService.GetSPLogins(params);
|
return await this.userMaintenanceService.GetClientloginsByClientID(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('CreateClientLogins')
|
@Post('CreateClientLogins')
|
||||||
@ -91,11 +91,4 @@ export class UserMaintenanceController {
|
|||||||
return this.userMaintenanceService.GetCarnetSummaryData(params);
|
return this.userMaintenanceService.GetCarnetSummaryData(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// [carnetcontrolcenter_pkg]
|
|
||||||
|
|
||||||
@Get('GetCarnetDetailsbyCarnetStatus/:P_SPID/:P_USERID/:P_CARNETSTATUS')
|
|
||||||
@Roles('pca', 'psa', 'pua')
|
|
||||||
GetCarnetDetailsbyCarnetStatus(@Param() params: GetCarnetDetailsbyCarnetStatusDTO) {
|
|
||||||
return this.userMaintenanceService.GetCarnetDetailsbyCarnetStatus(params);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,10 +64,10 @@ export class UserMaintenanceService {
|
|||||||
checkPgUserDefinedErrors(userDetailsResult);
|
checkPgUserDefinedErrors(userDetailsResult);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
roleDetails: toUpperCaseKeys(roleResult.rows),
|
roleDetails: toUpperCaseKeys(roleResult.rows).map(x => x.ROLENAME),
|
||||||
menuDetails: toUpperCaseKeys(menuResult.rows),
|
menuDetails: toUpperCaseKeys(menuResult.rows).map(x => x.MENUNAME),
|
||||||
menuPageDetails: toUpperCaseKeys(menuPageResult.rows),
|
menuPageDetails: toUpperCaseKeys(menuPageResult.rows),
|
||||||
userDetails: toUpperCaseKeys(userDetailsResult.rows),
|
userDetails: toUpperCaseKeys(userDetailsResult.rows)[0],
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
@ -107,11 +107,13 @@ export class UserMaintenanceService {
|
|||||||
|
|
||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
return {
|
// return {
|
||||||
statusCode: 201,
|
// statusCode: 201,
|
||||||
message: ResponseStatus.lockedUserDone,
|
// message: ResponseStatus.lockedUserDone,
|
||||||
...toUpperCaseKeys(fetchResult?.rows)[0]
|
// ...toUpperCaseKeys(fetchResult?.rows)[0]
|
||||||
};
|
// };
|
||||||
|
|
||||||
|
return toUpperCaseKeys(fetchResult?.rows)
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (client) await client.query('ROLLBACK');
|
if (client) await client.query('ROLLBACK');
|
||||||
@ -447,7 +449,7 @@ export class UserMaintenanceService {
|
|||||||
checkPgUserDefinedErrors(fetchResult);
|
checkPgUserDefinedErrors(fetchResult);
|
||||||
|
|
||||||
if (fetchResult?.rows.length > 0) {
|
if (fetchResult?.rows.length > 0) {
|
||||||
return [toUpperCaseKeys(fetchResult.rows)[0]]
|
return toUpperCaseKeys(fetchResult.rows)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return [];
|
return [];
|
||||||
@ -552,38 +554,5 @@ export class UserMaintenanceService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async GetCarnetDetailsbyCarnetStatus(body: GetCarnetDetailsbyCarnetStatusDTO) {
|
|
||||||
|
|
||||||
let client: PoolClient | null = null;
|
|
||||||
|
|
||||||
const cursorName = 'p_cursor';
|
|
||||||
|
|
||||||
try {
|
|
||||||
client = await this.pgDBService.getConnection();
|
|
||||||
|
|
||||||
await client.query('BEGIN');
|
|
||||||
|
|
||||||
const callProcQuery = `
|
|
||||||
CALL "CARNETSYS".carnetcontrolcenter_pkg_getcarnetdetails($1, $2, $3, $4)
|
|
||||||
`;
|
|
||||||
await client.query(callProcQuery, [body.P_SPID, body.P_USERID, body.P_CARNETSTATUS, cursorName]);
|
|
||||||
|
|
||||||
// 🚫 DON'T quote the cursor name in FETCH
|
|
||||||
const fetchResult = await client.query(`FETCH ALL FROM ${cursorName}`);
|
|
||||||
|
|
||||||
// 🚫 DON'T quote the cursor name in CLOSE
|
|
||||||
await client.query(`CLOSE ${cursorName}`);
|
|
||||||
await client.query('COMMIT');
|
|
||||||
|
|
||||||
checkPgUserDefinedErrors(fetchResult);
|
|
||||||
|
|
||||||
return toUpperCaseKeys(fetchResult.rows);
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
if (client) await client.query('ROLLBACK');
|
|
||||||
handlePgError(error, UserMaintenanceService.name)
|
|
||||||
} finally {
|
|
||||||
releasePgClient(client)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user