ผูกสิดข้อมูลหลัก
This commit is contained in:
parent
f9fce4ba25
commit
92b2291c4b
15 changed files with 702 additions and 514 deletions
|
|
@ -10,7 +10,6 @@ import {
|
|||
Body,
|
||||
Path,
|
||||
Request,
|
||||
Example,
|
||||
SuccessResponse,
|
||||
Response,
|
||||
Query,
|
||||
|
|
@ -18,9 +17,9 @@ import {
|
|||
import { AppDataSource } from "../database/data-source";
|
||||
import HttpSuccess from "../interfaces/http-success";
|
||||
import HttpError from "../interfaces/http-error";
|
||||
import { Like, Not, In, Brackets } from "typeorm";
|
||||
import { In, Brackets } from "typeorm";
|
||||
import HttpStatusCode from "../interfaces/http-status";
|
||||
import { KpiLink, createKpiLink, updateKpiLink } from "../entities/kpiLink";
|
||||
import { KpiLink, createKpiLink } from "../entities/kpiLink";
|
||||
import { KpiGroup } from "../entities/kpiGroup";
|
||||
import { KpiCapacity } from "../entities/kpiCapacity";
|
||||
import { Position } from "../entities/position";
|
||||
|
|
@ -165,7 +164,8 @@ export class kpiLinkController extends Controller {
|
|||
* @param id
|
||||
*/
|
||||
@Get("{id}")
|
||||
async KpiLinkById(@Path() id: string) {
|
||||
async KpiLinkById(@Request() request: RequestWithUser, @Path() id: string) {
|
||||
let _data = await new permission().PermissionList(request, "SYS_EVA_COMPETENCY");
|
||||
const kpiLink = await this.kpiLinkRepository.findOne({
|
||||
where: { id: id },
|
||||
relations: ["positions", "kpiCapacitys", "kpiGroup"],
|
||||
|
|
@ -224,10 +224,12 @@ export class kpiLinkController extends Controller {
|
|||
*/
|
||||
@Get()
|
||||
async listKpiLink(
|
||||
@Request() request: RequestWithUser,
|
||||
@Query("page") page: number = 1,
|
||||
@Query("pageSize") pageSize: number = 10,
|
||||
@Query("keyword") keyword?: string,
|
||||
) {
|
||||
let _data = await new permission().PermissionList(request, "SYS_EVA_COMPETENCY");
|
||||
const [_kpiLink, _total] = await AppDataSource.getRepository(KpiLink)
|
||||
.createQueryBuilder("kpiLink")
|
||||
.leftJoinAndSelect("kpiLink.kpiGroup", "kpiGroup")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue