????

Your IP : 13.59.235.245


Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/api/dist/xtdt/controller/
Upload File :
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/api/dist/xtdt/controller/doanh-nghiep.controller.js

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DoanhNghiepController = void 0;
const openapi = require("@nestjs/swagger");
const common_1 = require("@nestjs/common");
const crud_1 = require("@rewiko/crud");
const swagger_1 = require("@nestjs/swagger");
const service_1 = require("../service");
const entity_1 = require("../entity");
const auth_guard_1 = require("../../auth/auth.guard");
let DoanhNghiepController = class DoanhNghiepController {
    constructor(service) {
        this.service = service;
    }
    async getThongKeDnTrongKCN() {
        return this.service.getThongKeDNTrongKCN();
    }
    async getThongKeDnTrongCCN() {
        return this.service.getThongKeDNTrongCCN();
    }
    async getThongKeDnTrongNgoai() {
        return this.service.getThongKeDNTrongNgoai();
    }
    get base() {
        return this;
    }
    async getOneBase(crudReq) {
        return await this.service.getOne(crudReq);
    }
};
__decorate([
    (0, common_1.Get)('thong-ke-dn-kcn'),
    openapi.ApiResponse({ status: 200, type: Number }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], DoanhNghiepController.prototype, "getThongKeDnTrongKCN", null);
__decorate([
    (0, common_1.Get)('thong-ke-dn-ccn'),
    openapi.ApiResponse({ status: 200, type: Number }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], DoanhNghiepController.prototype, "getThongKeDnTrongCCN", null);
__decorate([
    (0, common_1.Get)('thong-ke-dn-ngoai'),
    openapi.ApiResponse({ status: 200, type: Number }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], DoanhNghiepController.prototype, "getThongKeDnTrongNgoai", null);
__decorate([
    (0, crud_1.Override)('getOneBase'),
    openapi.ApiResponse({ status: 200, type: require("../entity/doanh-nghiep.entity").DoanhNghiepDTO }),
    __param(0, (0, crud_1.ParsedRequest)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [Object]),
    __metadata("design:returntype", Promise)
], DoanhNghiepController.prototype, "getOneBase", null);
DoanhNghiepController = __decorate([
    (0, crud_1.Crud)({
        model: { type: entity_1.DoanhNghiep },
        routes: {
            createOneBase: { decorators: [(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)('JwtBearerToken')] },
            createManyBase: { decorators: [(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)('JwtBearerToken')] },
            updateOneBase: { decorators: [(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)('JwtBearerToken')] },
            replaceOneBase: { decorators: [(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)('JwtBearerToken')] },
            deleteOneBase: { decorators: [(0, common_1.UseGuards)(auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)('JwtBearerToken')] },
        },
        query: {
            join: {
                quocGia: {},
                dnThongTinThues: {},
                'dnThongTinThues.dnThueDats': {
                    alias: 'dnThueDats'
                },
                'dnThongTinThues.dnThueDats.quyHoachSDD': {
                    alias: 'quyHoachSDD'
                },
                'dnThongTinThues.dnThueDats.quyHoachSDD.diemDauTu': {
                    alias: 'diemDauTu'
                },
                'dnThongTinThues.dnThueDats.quyHoachSDD.ranhGioiKhu': {
                    alias: 'ranhGioiKhu'
                }
            }
        },
        params: {
            id: {
                type: 'number',
                primary: true,
                field: 'objectId',
            }
        }
    }),
    (0, swagger_1.ApiTags)('Doanh nghiệp'),
    (0, common_1.Controller)('DoanhNghiep'),
    __metadata("design:paramtypes", [service_1.DoanhNghiepService])
], DoanhNghiepController);
exports.DoanhNghiepController = DoanhNghiepController;