คอัพเดทคะแนน

This commit is contained in:
Kittapath 2024-06-19 13:57:24 +07:00
parent 751341a11c
commit 3d0f2c3245
2 changed files with 51 additions and 5 deletions

View file

@ -156,13 +156,37 @@ export class KpiUserEvaluation extends EntityBase {
})
capacityPoint: number;
@Column({
type: "double",
nullable: true,
default: null,
comment: "คะแนนประเมินองค์ประกอบที่ 1",
})
totalPoint1: number;
@Column({
type: "double",
nullable: true,
default: null,
comment: "คะแนนประเมินองค์ประกอบที่ 2.1",
})
totalPoint2_1: number;
@Column({
type: "double",
nullable: true,
default: null,
comment: "คะแนนประเมินองค์ประกอบที่ 2.2",
})
totalPoint2_2: number;
@Column({
type: "double",
nullable: true,
default: null,
comment: "คะแนนประเมิน",
})
totalPoint: number;
summaryPoint: number;
@Column({
nullable: true,
@ -251,13 +275,13 @@ export class updateKpiUserCheckEvaluation {
export class updateKpiUserPointEvaluation {
@Column()
plannedPoint: number | null;
totalPoint1?: number | null;
@Column()
rolePoint: number | null;
totalPoint2_1?: number | null;
@Column()
specialPoint: number | null;
totalPoint2_2?: number | null;
@Column()
capacityPoint: number | null;
summaryPoint?: number | null;
}
export class updateKpiUserReqEditEvaluation {

View file

@ -0,0 +1,22 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableKpiAddPoint1718780152397 implements MigrationInterface {
name = 'UpdateTableKpiAddPoint1718780152397'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`totalPoint\``);
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`totalPoint1\` double NULL COMMENT 'คะแนนประเมินองค์ประกอบที่ 1'`);
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`totalPoint2_1\` double NULL COMMENT 'คะแนนประเมินองค์ประกอบที่ 2.1'`);
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`totalPoint2_2\` double NULL COMMENT 'คะแนนประเมินองค์ประกอบที่ 2.2'`);
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`summaryPoint\` double NULL COMMENT 'คะแนนประเมิน'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`summaryPoint\``);
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`totalPoint2_2\``);
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`totalPoint2_1\``);
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` DROP COLUMN \`totalPoint1\``);
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` ADD \`totalPoint\` double NULL COMMENT 'คะแนนประเมิน'`);
}
}