Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 58s

This commit is contained in:
harid 2025-11-27 19:42:59 +07:00
commit 3958bedcb2
4 changed files with 49 additions and 2 deletions

View file

@ -132,6 +132,8 @@ export class EducationLevelController extends Controller {
"id",
"name",
"rank",
"educationLevel",
"isHigh",
"createdAt",
"lastUpdatedAt",
"createdFullName",
@ -157,6 +159,8 @@ export class EducationLevelController extends Controller {
"id",
"name",
"rank",
"educationLevel",
"isHigh",
"createdAt",
"lastUpdatedAt",
"createdFullName",

View file

@ -17,6 +17,21 @@ export class EducationLevel extends EntityBase {
default: null,
})
rank: number;
@Column({
nullable: true,
comment: "ขีดจำกัดวุฒิการศึกษา",
length: 50,
default: null,
})
educationLevel?: string;
@Column({
nullable: true,
comment: "วุฒิการศึกษาสูงสุด",
default: null,
})
isHigh?: boolean;
}
export class CreateEducationLevel {
@ -25,6 +40,12 @@ export class CreateEducationLevel {
@Column()
rank: number;
@Column()
educationLevel?: string;
@Column()
isHigh?: boolean;
}
export type UpdateEducationLevel = Partial<CreateEducationLevel>;

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableEducationLeaveAddFields1764244579743 implements MigrationInterface {
name = 'UpdateTableEducationLeaveAddFields1764244579743'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`educationLevel\` ADD \`educationLevel\` varchar(50) NULL COMMENT 'ขีดจำกัดวุฒิการศึกษา'`);
await queryRunner.query(`ALTER TABLE \`educationLevel\` ADD \`isHigh\` tinyint NULL COMMENT 'วุฒิการศึกษาสูงสุด'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`educationLevel\` DROP COLUMN \`isHigh\``);
await queryRunner.query(`ALTER TABLE \`educationLevel\` DROP COLUMN \`educationLevel\``);
}
}

View file

@ -445,7 +445,6 @@ async function handler_command_noti(msg: amqp.ConsumeMessage): Promise<boolean>
isSendNotification: true,
}))
: [];
const payloadStr = await PayloadSendNoti(command.id);
const profilesSendRequest = new CallAPI()
.PostData(
@ -475,7 +474,14 @@ async function handler_command_noti(msg: amqp.ConsumeMessage): Promise<boolean>
console.error("Full error object:", error);
});
await Promise.all([profilesNotiRequest, profilesSendRequest]);
/*เฉพาะคำสั่ง C-PM-10 ให้ตัด profilesNotiRequest ที่ส่ง noti ครั้งแรกออก*/
if (command && command.commandType && ["C-PM-10"].includes(command.commandType.code)) {
await Promise.all([profilesSendRequest]);
}
else {
await Promise.all([profilesNotiRequest, profilesSendRequest]);
}
console.log("[AMQ] Send Notification Success");
return true;