no message
This commit is contained in:
parent
da6b3dcc4e
commit
682010fe66
5 changed files with 72 additions and 7 deletions
|
|
@ -63,7 +63,7 @@ export class DevelopmentController extends Controller {
|
||||||
"โครงการ/หลักสูตรการฝึกอบรม: " +
|
"โครงการ/หลักสูตรการฝึกอบรม: " +
|
||||||
requestBody.projectName +
|
requestBody.projectName +
|
||||||
" ปีงบประมาณ: " +
|
" ปีงบประมาณ: " +
|
||||||
requestBody.year +
|
(requestBody.year + 543) +
|
||||||
" มีอยู่ในระบบแล้ว",
|
" มีอยู่ในระบบแล้ว",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -225,7 +225,7 @@ export class DevelopmentController extends Controller {
|
||||||
"โครงการ/หลักสูตรการฝึกอบรม: " +
|
"โครงการ/หลักสูตรการฝึกอบรม: " +
|
||||||
requestBody.projectName +
|
requestBody.projectName +
|
||||||
" ปีงบประมาณ: " +
|
" ปีงบประมาณ: " +
|
||||||
requestBody.year +
|
(requestBody.year + 543) +
|
||||||
" มีอยู่ในระบบแล้ว",
|
" มีอยู่ในระบบแล้ว",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -443,6 +443,15 @@ export class DevelopmentController extends Controller {
|
||||||
if (!getDevelopment) {
|
if (!getDevelopment) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงการ/หลักสูตรการฝึกอบรมนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงการ/หลักสูตรการฝึกอบรมนี้");
|
||||||
}
|
}
|
||||||
return new HttpSuccess(getDevelopment);
|
let _getDevelopment: any = getDevelopment;
|
||||||
|
_getDevelopment.actualPeoples = getDevelopment.developmentActualPeoples;
|
||||||
|
_getDevelopment.plannedPeoples = getDevelopment.developmentPlannedPeoples;
|
||||||
|
_getDevelopment.actualGoals = getDevelopment.developmentActualGoals;
|
||||||
|
_getDevelopment.plannedGoals = getDevelopment.developmentPlannedGoals;
|
||||||
|
delete _getDevelopment.developmentActualPeoples;
|
||||||
|
delete _getDevelopment.developmentPlannedPeoples;
|
||||||
|
delete _getDevelopment.developmentActualGoals;
|
||||||
|
delete _getDevelopment.developmentPlannedGoals;
|
||||||
|
return new HttpSuccess(_getDevelopment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -265,6 +265,22 @@ export class Development extends EntityBase {
|
||||||
})
|
})
|
||||||
addressAcademic: string;
|
addressAcademic: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "datetime",
|
||||||
|
comment: "วันเริ่มต้นการศึกษาดูงาน",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
dateStudyStart: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "datetime",
|
||||||
|
comment: "วันสิ้นสุดการศึกษาดูงาน",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
dateStudyEnd: Date;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "จังหวัด(ข้อมูลวิชาการ)",
|
comment: "จังหวัด(ข้อมูลวิชาการ)",
|
||||||
|
|
@ -376,6 +392,10 @@ export class CreateDevelopment {
|
||||||
@Column()
|
@Column()
|
||||||
provinceActualId: string | null;
|
provinceActualId: string | null;
|
||||||
@Column()
|
@Column()
|
||||||
|
dateStudyStart: Date | null;
|
||||||
|
@Column()
|
||||||
|
dateStudyEnd: Date | null;
|
||||||
|
@Column()
|
||||||
actualPeoples: CreateActualPeople[];
|
actualPeoples: CreateActualPeople[];
|
||||||
@Column()
|
@Column()
|
||||||
plannedPeoples: CreatePlannedPeople[];
|
plannedPeoples: CreatePlannedPeople[];
|
||||||
|
|
@ -461,6 +481,10 @@ export class UpdateDevelopment {
|
||||||
@Column()
|
@Column()
|
||||||
provinceActualId: string | null;
|
provinceActualId: string | null;
|
||||||
@Column()
|
@Column()
|
||||||
|
dateStudyStart: Date | null;
|
||||||
|
@Column()
|
||||||
|
dateStudyEnd: Date | null;
|
||||||
|
@Column()
|
||||||
actualPeoples: CreateActualPeople[];
|
actualPeoples: CreateActualPeople[];
|
||||||
@Column()
|
@Column()
|
||||||
plannedPeoples: CreatePlannedPeople[];
|
plannedPeoples: CreatePlannedPeople[];
|
||||||
|
|
|
||||||
|
|
@ -137,11 +137,11 @@ export class DevelopmentHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
type: "datetime",
|
||||||
comment: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่",
|
comment: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่",
|
||||||
default: null,
|
default: null,
|
||||||
length: 255,
|
|
||||||
})
|
})
|
||||||
dateOrder: string;
|
dateOrder: Date;
|
||||||
}
|
}
|
||||||
export class CreateDevelopmentHistory {
|
export class CreateDevelopmentHistory {
|
||||||
@Column()
|
@Column()
|
||||||
|
|
@ -167,7 +167,7 @@ export class CreateDevelopmentHistory {
|
||||||
@Column()
|
@Column()
|
||||||
order: string | null;
|
order: string | null;
|
||||||
@Column()
|
@Column()
|
||||||
dateOrder: string | null;
|
dateOrder: Date | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class UpdateDevelopmentHistory {
|
export class UpdateDevelopmentHistory {
|
||||||
|
|
@ -194,5 +194,5 @@ export class UpdateDevelopmentHistory {
|
||||||
@Column()
|
@Column()
|
||||||
order: string | null;
|
order: string | null;
|
||||||
@Column()
|
@Column()
|
||||||
dateOrder: string | null;
|
dateOrder: Date | null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableDevelopmentAddDateStudyStart1712135164363 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableDevelopmentAddDateStudyStart1712135164363'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`development\` ADD \`dateStudyStart\` datetime NULL COMMENT 'วันเริ่มต้นการศึกษาดูงาน'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`development\` ADD \`dateStudyEnd\` datetime NULL COMMENT 'วันสิ้นสุดการศึกษาดูงาน'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`dateStudyEnd\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`development\` DROP COLUMN \`dateStudyStart\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableDevelopmentAddDateStudyStart11712135296648 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableDevelopmentAddDateStudyStart11712135296648'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`developmentHistory\` DROP COLUMN \`dateOrder\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`developmentHistory\` ADD \`dateOrder\` datetime NULL COMMENT 'คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`developmentHistory\` DROP COLUMN \`dateOrder\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`developmentHistory\` ADD \`dateOrder\` varchar(255) NULL COMMENT 'คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue