Merge branch 'develop' into adiDev
This commit is contained in:
commit
fe7dcd6815
8 changed files with 70 additions and 17 deletions
|
|
@ -240,7 +240,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
@Get("{id}")
|
||||
async GetKpiUserEvaluationById(@Path() id: string) {
|
||||
const kpiUserEvaluation = await this.kpiUserEvalutionRepository.findOne({
|
||||
relations:["kpiPeriod"],
|
||||
relations: ["kpiPeriod"],
|
||||
where: { id: id },
|
||||
});
|
||||
if (!kpiUserEvaluation) {
|
||||
|
|
@ -257,6 +257,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
lastName: kpiUserEvaluation.lastName,
|
||||
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
||||
evaluationResults: kpiUserEvaluation.evaluationResults,
|
||||
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
||||
createdAt: kpiUserEvaluation.createdAt,
|
||||
evaluatorId: kpiUserEvaluation.evaluatorId,
|
||||
commanderId: kpiUserEvaluation.commanderId,
|
||||
|
|
@ -267,8 +268,9 @@ export class KpiUserEvaluationController extends Controller {
|
|||
capacityPoint: kpiUserEvaluation.capacityPoint,
|
||||
kpiPeriodId: kpiUserEvaluation.kpiPeriodId,
|
||||
year: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.year,
|
||||
durationKPI: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
||||
}
|
||||
durationKPI:
|
||||
kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
||||
};
|
||||
return new HttpSuccess(mapData);
|
||||
}
|
||||
|
||||
|
|
@ -289,7 +291,7 @@ export class KpiUserEvaluationController extends Controller {
|
|||
) {
|
||||
const [kpiUserEvaluation, total] = await AppDataSource.getRepository(KpiUserEvaluation)
|
||||
.createQueryBuilder("kpiUserEvaluation")
|
||||
.leftJoinAndSelect("kpiUserEvaluation.kpiPeriod", "kpiPeriod")
|
||||
.leftJoinAndSelect("kpiUserEvaluation.kpiPeriod", "kpiPeriod")
|
||||
.andWhere(kpiPeriodId ? "kpiPeriodId LIKE :kpiPeriodId" : "1=1", {
|
||||
kpiPeriodId: kpiPeriodId,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -238,6 +238,9 @@ export class KpiUserSpecialController extends Controller {
|
|||
achievement3: getKpiUserSpecial.achievement3,
|
||||
achievement4: getKpiUserSpecial.achievement4,
|
||||
achievement5: getKpiUserSpecial.achievement5,
|
||||
startDate: getKpiUserSpecial.startDate,
|
||||
endDate: getKpiUserSpecial.endDate,
|
||||
documentInfoEvidence: getKpiUserSpecial.documentInfoEvidence,
|
||||
};
|
||||
|
||||
return new HttpSuccess(mapKpiUserSpecial);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export class KpiSpecial extends EntityBase {
|
|||
comment: "หน่วยนับ",
|
||||
default: null,
|
||||
})
|
||||
unit: number;
|
||||
unit: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -166,7 +166,7 @@ export class CreateKpiSpecial {
|
|||
@Column()
|
||||
target: string;
|
||||
@Column()
|
||||
unit: number;
|
||||
unit: string;
|
||||
@Column()
|
||||
weight: number;
|
||||
@Column()
|
||||
|
|
@ -191,7 +191,7 @@ export class UpdateKpiSpecial {
|
|||
@Column()
|
||||
achievement2: string;
|
||||
@Column()
|
||||
achievement3: string ;
|
||||
achievement3: string;
|
||||
@Column()
|
||||
achievement4: string;
|
||||
@Column()
|
||||
|
|
@ -199,7 +199,7 @@ export class UpdateKpiSpecial {
|
|||
@Column()
|
||||
target: string;
|
||||
@Column()
|
||||
unit: number;
|
||||
unit: string;
|
||||
@Column()
|
||||
weight: number;
|
||||
@Column()
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ export class KpiUserEvaluation extends EntityBase {
|
|||
length: 40,
|
||||
comment:
|
||||
"ผลการประเมิน ดังนี้ PENDING = รอดำเนินการ, PASSED = ผ่านการประเมิน, NOTPASSED = ไม่ผ่านการประเมิน",
|
||||
default: null,
|
||||
default: "PENDING",
|
||||
})
|
||||
evaluationResults: string;
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ export class KpiUserEvaluation extends EntityBase {
|
|||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คำขอแก้ไข",
|
||||
default: null,
|
||||
default: "NEW",
|
||||
})
|
||||
evaluationReqEdit: string;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export class KpiUserSpecial extends EntityBase {
|
|||
comment: "หน่วยนับ",
|
||||
default: null,
|
||||
})
|
||||
unit: number;
|
||||
unit: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -185,7 +185,7 @@ export class CreateKpiUserSpecial {
|
|||
@Column()
|
||||
target: string;
|
||||
@Column()
|
||||
unit: number;
|
||||
unit: string;
|
||||
@Column()
|
||||
weight: number;
|
||||
@Column()
|
||||
|
|
@ -196,9 +196,9 @@ export class CreateKpiUserSpecial {
|
|||
kpiUserEvaluationId: string;
|
||||
@Column()
|
||||
documentInfoEvidence: string;
|
||||
@Column()
|
||||
@Column({ nullable: true })
|
||||
startDate: Date;
|
||||
@Column()
|
||||
@Column({ nullable: true })
|
||||
endDate: Date;
|
||||
@Column()
|
||||
period: string;
|
||||
|
|
@ -224,7 +224,7 @@ export class UpdateKpiUserSpecial {
|
|||
@Column()
|
||||
target: string;
|
||||
@Column()
|
||||
unit: number;
|
||||
unit: string;
|
||||
@Column()
|
||||
weight: number;
|
||||
@Column()
|
||||
|
|
@ -235,9 +235,9 @@ export class UpdateKpiUserSpecial {
|
|||
kpiUserEvaluationId: string;
|
||||
@Column()
|
||||
documentInfoEvidence: string;
|
||||
@Column()
|
||||
@Column({ nullable: true })
|
||||
startDate: Date;
|
||||
@Column()
|
||||
@Column({ nullable: true })
|
||||
endDate: Date;
|
||||
@Column()
|
||||
period: string;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableKpiUserEvaluationAddEvaluationReqEdit11715228658780 implements MigrationInterface {
|
||||
name = 'UpdateTableKpiUserEvaluationAddEvaluationReqEdit11715228658780'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationResults\` \`evaluationResults\` varchar(40) NULL COMMENT 'ผลการประเมิน ดังนี้ PENDING = รอดำเนินการ, PASSED = ผ่านการประเมิน, NOTPASSED = ไม่ผ่านการประเมิน' DEFAULT 'PENDING'`);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationReqEdit\` \`evaluationReqEdit\` varchar(40) NULL COMMENT 'คำขอแก้ไข' DEFAULT 'NEW'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationReqEdit\` \`evaluationReqEdit\` varchar(40) NULL COMMENT 'คำขอแก้ไข'`);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluation\` CHANGE \`evaluationResults\` \`evaluationResults\` varchar(40) NULL COMMENT 'ผลการประเมิน ดังนี้ PENDING = รอดำเนินการ, PASSED = ผ่านการประเมิน, NOTPASSED = ไม่ผ่านการประเมิน'`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableKpiUserEvaluationAddEvaluationReqEdit21715229248848 implements MigrationInterface {
|
||||
name = 'UpdateTableKpiUserEvaluationAddEvaluationReqEdit21715229248848'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserSpecial\` DROP COLUMN \`unit\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserSpecial\` ADD \`unit\` varchar(255) NULL COMMENT 'หน่วยนับ'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserSpecial\` DROP COLUMN \`unit\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiUserSpecial\` ADD \`unit\` int NULL COMMENT 'หน่วยนับ'`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableKpiUserEvaluationAddEvaluationReqEdit31715229338637 implements MigrationInterface {
|
||||
name = 'UpdateTableKpiUserEvaluationAddEvaluationReqEdit31715229338637'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiSpecial\` DROP COLUMN \`unit\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiSpecial\` ADD \`unit\` varchar(255) NULL COMMENT 'หน่วยนับ'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`kpiSpecial\` DROP COLUMN \`unit\``);
|
||||
await queryRunner.query(`ALTER TABLE \`kpiSpecial\` ADD \`unit\` int NULL COMMENT 'หน่วยนับ'`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue