2025-09-17 10:18:44 +05:30
|
|
|
import { Body, Controller, Get, Param, Patch, Post, UseGuards } from '@nestjs/common';
|
|
|
|
|
import { ManageFeeService } from './manage-fee.service';
|
|
|
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
|
|
|
import { JwtAuthGuard } from 'src/guards/jwt-auth.guard';
|
|
|
|
|
import { RolesGuard } from 'src/guards/roles.guard';
|
|
|
|
|
import { Roles } from 'src/decorators/roles.decorator';
|
|
|
|
|
import { CreateBasicFeeDTO, CreateBondRateDTO, CreateCargoRateDTO, CreateCfFeeDTO, CreateCsFeeDTO, CreateEfFeeDTO, CreateFeeCommDTO, GetFeeGeneralDTO, UpdateBasicFeeDTO, UpdateBondRateDTO, UpdateCargoRateDTO, UpdateCfFeeDTO, UpdateCsFeeDTO, UpdateEfFeeDTO, UpdateFeeCommDTO } from 'src/dto/property.dto';
|
|
|
|
|
|
|
|
|
|
@ApiTags('Manage Fee - PG')
|
2025-09-22 17:13:48 +05:30
|
|
|
@UseGuards(JwtAuthGuard, RolesGuard)
|
|
|
|
|
@Roles('psa', 'pua')
|
2025-09-17 10:18:44 +05:30
|
|
|
@Controller('2')
|
|
|
|
|
export class ManageFeeController {
|
|
|
|
|
|
|
|
|
|
constructor(private readonly manageFeeService: ManageFeeService) { }
|
|
|
|
|
|
|
|
|
|
@Get('/GetBasicFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
|
|
|
|
GetBasicFeeRates(@Param() body: GetFeeGeneralDTO) {
|
|
|
|
|
return this.manageFeeService.GETBASICFEERATES(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Post('/CreateBasicFee')
|
|
|
|
|
CreateBasicFee(@Body() body: CreateBasicFeeDTO) {
|
|
|
|
|
return this.manageFeeService.CREATEBASICFEE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Patch('/UpdateBasicFee')
|
|
|
|
|
UpdateBasicFee(@Body() body: UpdateBasicFeeDTO) {
|
|
|
|
|
return this.manageFeeService.UPDATEBASICFEE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// bond rate
|
|
|
|
|
|
|
|
|
|
@Get('/GetBondRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
|
|
|
|
GetBondRates(@Param() body: GetFeeGeneralDTO) {
|
|
|
|
|
return this.manageFeeService.GETBONDRATES(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Post('/CreateBondRate')
|
|
|
|
|
CreateBondRate(@Body() body: CreateBondRateDTO) {
|
|
|
|
|
return this.manageFeeService.CREATEBONDRATE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Patch('/UpdateBondRate')
|
|
|
|
|
UpdateBondRate(@Body() body: UpdateBondRateDTO) {
|
|
|
|
|
return this.manageFeeService.UPDATEBONDRATE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// cargo rate
|
|
|
|
|
|
|
|
|
|
@Get('/GetCargoRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
|
|
|
|
GetCargoRates(@Param() body: GetFeeGeneralDTO) {
|
|
|
|
|
return this.manageFeeService.GETCARGORATES(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Post('/CreateCargoRate')
|
|
|
|
|
CreateCargoRate(@Body() body: CreateCargoRateDTO) {
|
|
|
|
|
return this.manageFeeService.CREATECARGORATE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Patch('/UpdateCargoRate')
|
|
|
|
|
UpdateCargoRate(@Body() body: UpdateCargoRateDTO) {
|
|
|
|
|
return this.manageFeeService.UPDATECARGORATE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// cf fee rate
|
|
|
|
|
|
|
|
|
|
@Get('/GetCfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
|
|
|
|
GetCfFeeRates(@Param() body: GetFeeGeneralDTO) {
|
|
|
|
|
return this.manageFeeService.GETCFFEERATES(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Post('/CreateCfFee')
|
|
|
|
|
CreateCfFee(@Body() body: CreateCfFeeDTO) {
|
|
|
|
|
return this.manageFeeService.CREATECFFEE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Patch('/UpdateCfFee')
|
|
|
|
|
UpdateCfFee(@Body() body: UpdateCfFeeDTO) {
|
|
|
|
|
return this.manageFeeService.UPDATECFFEE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// cs fee rate
|
|
|
|
|
|
|
|
|
|
@Get('/GetCsFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
|
|
|
|
GetCsFeeRates(@Param() body: GetFeeGeneralDTO) {
|
|
|
|
|
return this.manageFeeService.GETCSFEERATES(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Post('/CreateCsFee')
|
|
|
|
|
CreateCsFee(@Body() body: CreateCsFeeDTO) {
|
|
|
|
|
return this.manageFeeService.CREATECSFEE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Patch('/UpdateCsFee')
|
|
|
|
|
UpdateCsFee(@Body() body: UpdateCsFeeDTO) {
|
|
|
|
|
return this.manageFeeService.UPDATECSFEE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ef fee rate
|
|
|
|
|
|
|
|
|
|
@Get('/GetEfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE')
|
|
|
|
|
GetEfFeeRates(@Param() body: GetFeeGeneralDTO) {
|
|
|
|
|
return this.manageFeeService.GETEFFEERATES(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Post('/CreateEfFee')
|
|
|
|
|
CreateEeFee(@Body() body: CreateEfFeeDTO) {
|
|
|
|
|
return this.manageFeeService.CREATEEFFEE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Patch('/UpdateEfFee')
|
|
|
|
|
UpdateEfFee(@Body() body: UpdateEfFeeDTO) {
|
|
|
|
|
return this.manageFeeService.UPDATEEFFEE(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// fee comm
|
|
|
|
|
|
|
|
|
|
@Get('/GetFeeComm/:P_SPID/:P_ACTIVE_INACTIVE')
|
|
|
|
|
GetFeeComm(@Param() body: GetFeeGeneralDTO) {
|
|
|
|
|
return this.manageFeeService.GETFEECOMM(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Post('/CreateFeeComm')
|
|
|
|
|
CreateFeeComm(@Body() body: CreateFeeCommDTO) {
|
|
|
|
|
return this.manageFeeService.CREATEFEECOMM(body);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Patch('/UpdateFeeComm')
|
|
|
|
|
UpdateFeeComm(@Body() body: UpdateFeeCommDTO) {
|
|
|
|
|
return this.manageFeeService.UPDATEFEECOMM(body);
|
|
|
|
|
}
|
|
|
|
|
}
|