Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2024-04-17 10:21:32 +07:00
commit bee26f07a9
26 changed files with 2236 additions and 281 deletions

View file

@ -7,12 +7,46 @@ import { ActualGoal, CreateActualGoal } from "./ActualGoal";
import { CreatePlannedGoal, PlannedGoal } from "./PlannedGoal";
import { DevelopmentHistory } from "./DevelopmentHistory";
import { DevelopmentProjectType } from "./DevelopmentProjectType";
import { DevelopmentProjectTechnique } from "./DevelopmentProjectTechnique";
import { DevelopmentProjectTechniquePlanned } from "./DevelopmentProjectTechniquePlanned";
import { CreateDevelopmentEvaluation, DevelopmentEvaluation } from "./DevelopmentEvaluation";
import { CreateDevelopmentAddress, DevelopmentAddress } from "./DevelopmentAddress";
import { DevelopmentProjectTechniqueActual } from "./DevelopmentProjectTechniqueActual";
import { StrategyChild5 } from "./StrategyChild5";
import { StrategyChild4 } from "./StrategyChild4";
import { StrategyChild3 } from "./StrategyChild3";
import { StrategyChild2 } from "./StrategyChild2";
import { StrategyChild1 } from "./StrategyChild1";
@Entity("development")
export class Development extends EntityBase {
@Column({
nullable: true,
comment: "id หน่วยงาน",
default: null,
})
rootId: string;
@Column({
nullable: true,
comment: "ชื่อหน่วยงาน",
default: null,
})
root: string;
@Column({
nullable: true,
comment: "ชื่อย่อหน่วยงาน",
default: null,
})
orgRootShortName: string;
@Column({
nullable: true,
comment: "id revision",
default: null,
})
orgRevisionId: string;
@Column({
// กำลังดำเนินการ (ONGOING)
// เสร็จสิ้น (FINISH)
@ -141,11 +175,18 @@ export class Development extends EntityBase {
projectNigthHoldActual: number;
@OneToMany(
() => DevelopmentProjectTechnique,
(developmentProjectTechnique: DevelopmentProjectTechnique) =>
developmentProjectTechnique.development,
() => DevelopmentProjectTechniquePlanned,
(developmentProjectTechniquePlanned: DevelopmentProjectTechniquePlanned) =>
developmentProjectTechniquePlanned.development,
)
developmentProjectTechniques: DevelopmentProjectTechnique[];
developmentProjectTechniquePlanneds: DevelopmentProjectTechniquePlanned[];
@OneToMany(
() => DevelopmentProjectTechniqueActual,
(developmentProjectTechniqueActual: DevelopmentProjectTechniqueActual) =>
developmentProjectTechniqueActual.development,
)
developmentProjectTechniqueActuals: DevelopmentProjectTechniqueActual[];
@Column({
nullable: true,
@ -366,12 +407,138 @@ export class Development extends EntityBase {
(developmentHistory: DevelopmentHistory) => developmentHistory.development,
)
developmentHistorys: DevelopmentHistory[];
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild1 เป้าหมายตามแผน",
default: null,
})
strategyChild1PlannedId: string;
@ManyToOne(() => StrategyChild1, (strategyChild1) => strategyChild1.developmentPlanneds)
@JoinColumn({ name: "strategyChild1PlannedId" })
strategyChild1Planned: StrategyChild1;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild2 เป้าหมายตามแผน",
default: null,
})
strategyChild2PlannedId: string;
@ManyToOne(() => StrategyChild2, (strategyChild2) => strategyChild2.developmentPlanneds)
@JoinColumn({ name: "strategyChild2PlannedId" })
strategyChild2Planned: StrategyChild2;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild3 เป้าหมายตามแผน",
default: null,
})
strategyChild3PlannedId: string;
@ManyToOne(() => StrategyChild3, (strategyChild3) => strategyChild3.developmentPlanneds)
@JoinColumn({ name: "strategyChild3PlannedId" })
strategyChild3Planned: StrategyChild3;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild4 เป้าหมายตามแผน",
default: null,
})
strategyChild4PlannedId: string;
@ManyToOne(() => StrategyChild4, (strategyChild4) => strategyChild4.developmentPlanneds)
@JoinColumn({ name: "strategyChild4PlannedId" })
strategyChild4Planned: StrategyChild4;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild5 เป้าหมายตามแผน",
default: null,
})
strategyChild5PlannedId: string;
@ManyToOne(() => StrategyChild5, (strategyChild5) => strategyChild5.developmentPlanneds)
@JoinColumn({ name: "strategyChild5PlannedId" })
strategyChild5Planned: StrategyChild5;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild1 เป้าหมายตามจริง",
default: null,
})
strategyChild1ActualId: string;
@ManyToOne(() => StrategyChild1, (strategyChild1) => strategyChild1.developmentActuals)
@JoinColumn({ name: "strategyChild1ActualId" })
strategyChild1Actual: StrategyChild1;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild2 เป้าหมายตามจริง",
default: null,
})
strategyChild2ActualId: string;
@ManyToOne(() => StrategyChild2, (strategyChild2) => strategyChild2.developmentActuals)
@JoinColumn({ name: "strategyChild2ActualId" })
strategyChild2Actual: StrategyChild2;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild3 เป้าหมายตามจริง",
default: null,
})
strategyChild3ActualId: string;
@ManyToOne(() => StrategyChild3, (strategyChild3) => strategyChild3.developmentActuals)
@JoinColumn({ name: "strategyChild3ActualId" })
strategyChild3Actual: StrategyChild3;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild4 เป้าหมายตามจริง",
default: null,
})
strategyChild4ActualId: string;
@ManyToOne(() => StrategyChild4, (strategyChild4) => strategyChild4.developmentActuals)
@JoinColumn({ name: "strategyChild4ActualId" })
strategyChild4Actual: StrategyChild4;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง strategyChild5 เป้าหมายตามจริง",
default: null,
})
strategyChild5ActualId: string;
@ManyToOne(() => StrategyChild5, (strategyChild5) => strategyChild5.developmentActuals)
@JoinColumn({ name: "strategyChild5ActualId" })
strategyChild5Actual: StrategyChild5;
}
export class CreateDevelopment {
@Column()
year: number;
@Column()
projectName: string;
@Column()
root: string;
@Column()
rootId: string;
@Column()
orgRootShortName: string;
@Column()
orgRevisionId: string;
@Column()
strategyChildPlannedId: string;
@Column()
strategyChildPlannedNode: number;
@Column()
strategyChildActualId: string;
@Column()
strategyChildActualNode: number;
}
export class UpdateDevelopment1 {
@ -383,6 +550,22 @@ export class UpdateDevelopment1 {
reason: string | null;
@Column()
objective: string | null;
@Column()
root: string;
@Column()
rootId: string;
@Column()
orgRootShortName: string;
@Column()
orgRevisionId: string;
@Column()
strategyChildPlannedId: string;
@Column()
strategyChildPlannedNode: number;
@Column()
strategyChildActualId: string;
@Column()
strategyChildActualNode: number;
}
export class UpdateDevelopment2_1 {
@Column()
@ -400,6 +583,8 @@ export class UpdateDevelopment3 {
@Column()
developmentProjectTypes?: string[];
@Column()
projectModal?: number | null;
@Column()
isBackPlanned?: boolean | null;
@Column()
isHoldPlanned?: boolean | null;
@ -410,6 +595,8 @@ export class UpdateDevelopment3 {
@Column()
projectNigthHoldPlanned?: number | null;
@Column()
developmentProjectTechniquePlanneds?: string[];
@Column()
isBackActual?: boolean | null;
@Column()
isHoldActual?: boolean | null;
@ -420,13 +607,11 @@ export class UpdateDevelopment3 {
@Column()
projectNigthHoldActual?: number | null;
@Column()
developmentProjectTechniques?: string[];
@Column()
projectModal?: number | null;
developmentProjectTechniqueActuals?: string[];
}
export class UpdateDevelopment4 {
@Column()
developmentEvaluations: CreateDevelopmentEvaluation[];
// @Column()
// developmentEvaluations: CreateDevelopmentEvaluation[];
@Column()
project: string | null;
@Column()
@ -479,8 +664,4 @@ export class UpdateDevelopment5 {
addressAcademic: string | null;
@Column()
provinceActualId: string | null;
@Column()
dateStudyStart: Date | null;
@Column()
dateStudyEnd: Date | null;
}

View file

@ -8,6 +8,42 @@ import { EmployeePosLevel } from "./EmployeePosLevel";
@Entity("developmentHistory")
export class DevelopmentHistory extends EntityBase {
@Column({
nullable: true,
comment: "id หน่วยงาน",
default: null,
})
rootId: string;
@Column({
nullable: true,
comment: "ชื่อหน่วยงาน",
default: null,
})
root: string;
@Column({
nullable: true,
comment: "ชื่อย่อหน่วยงาน",
default: null,
})
orgRootShortName: string;
@Column({
nullable: true,
comment: "id revision",
default: null,
})
orgRevisionId: string;
@Column({
nullable: true,
comment: "id profile",
length: 40,
default: null,
})
profileId: string;
@Column({
nullable: true,
comment: "ประเภทราชการ",
@ -127,6 +163,14 @@ export class DevelopmentHistory extends EntityBase {
@JoinColumn({ name: "developmentId" })
development: Development;
@Column({
nullable: true,
comment: "จำนวนวันที่อบรม",
default: null,
length: 255,
})
trainingDays: string;
@Column({
nullable: true,
comment: "เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ",
@ -142,6 +186,12 @@ export class DevelopmentHistory extends EntityBase {
default: null,
})
dateOrder: Date;
@Column({
comment: "บันทึกลงทะเบียนประวัติ",
default: false,
})
isDone: boolean;
}
export class CreateDevelopmentHistory {
@Column()

View file

@ -2,8 +2,8 @@ import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Development } from "./Development";
@Entity("developmentProjectTechnique")
export class DevelopmentProjectTechnique extends EntityBase {
@Entity("developmentProjectTechniqueActual")
export class DevelopmentProjectTechniqueActual extends EntityBase {
@Column({
// TRAINING = การอบรม
// MEETING = การประชุม
@ -28,12 +28,12 @@ export class DevelopmentProjectTechnique extends EntityBase {
@ManyToOne(
() => Development,
(development: Development) => development.developmentProjectTechniques,
(development: Development) => development.developmentProjectTechniqueActuals,
)
@JoinColumn({ name: "developmentId" })
development: Development;
}
export class CreateDevelopmentProjectTechnique {
export class CreateDevelopmentProjectTechniqueActual {
@Column()
name: number;
}

View file

@ -0,0 +1,39 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Development } from "./Development";
@Entity("developmentProjectTechniquePlanned")
export class DevelopmentProjectTechniquePlanned extends EntityBase {
@Column({
// TRAINING = การอบรม
// MEETING = การประชุม
// SEMINAR = การสัมมนา
// STUDY_TOUR = การศึกษาดูงาน
// ACADEMIC_SEMINAR = การสัมมนาทางวิชาการ
// WORKSHOP = การสัมมนาเชิงปฏิบัติการ
// SPECIAL_LECTURE = การบรรยายพิเศษ
// STUDY_TRAINING = การฝึกศึกษา
nullable: true,
comment: "เทคนิควิธีการที่ใช้ในการพัฒนา",
default: null,
})
name: string;
@Column({
nullable: true,
comment: "โครงการ/หลักสูตรการฝึกอบรม",
default: null,
})
developmentId: string;
@ManyToOne(
() => Development,
(development: Development) => development.developmentProjectTechniquePlanneds,
)
@JoinColumn({ name: "developmentId" })
development: Development;
}
export class CreateDevelopmentProjectTechniquePlanned {
@Column()
name: number;
}

View file

@ -5,6 +5,34 @@ import { PosType } from "./PosType";
@Entity("developmentScholarship")
export class DevelopmentScholarship extends EntityBase {
@Column({
nullable: true,
comment: "id หน่วยงาน",
default: null,
})
rootId: string;
@Column({
nullable: true,
comment: "ชื่อหน่วยงาน",
default: null,
})
root: string;
@Column({
nullable: true,
comment: "ชื่อย่อหน่วยงาน",
default: null,
})
orgRootShortName: string;
@Column({
nullable: true,
comment: "id revision",
default: null,
})
orgRevisionId: string;
@Column({
nullable: true,
comment: "id profile",
@ -213,7 +241,7 @@ export class DevelopmentScholarship extends EntityBase {
@Column({
nullable: true,
type: "date",
type: "datetime",
comment: "ลงวันที่(หนังสือ)",
default: null,
})
@ -221,7 +249,7 @@ export class DevelopmentScholarship extends EntityBase {
@Column({
nullable: true,
type: "date",
type: "datetime",
comment: "หนังสืออนุมัติเมื่อวันที่",
default: null,
})
@ -272,7 +300,7 @@ export class DevelopmentScholarship extends EntityBase {
@Column({
nullable: true,
type: "date",
type: "datetime",
comment: "ลงวันที่(เลขที่สัญญา)",
default: null,
})
@ -288,7 +316,7 @@ export class DevelopmentScholarship extends EntityBase {
@Column({
nullable: true,
type: "date",
type: "datetime",
comment: "ลงวันที่(เลขที่หนังสือรายงานตัวกลับ)",
default: null,
})
@ -296,7 +324,7 @@ export class DevelopmentScholarship extends EntityBase {
@Column({
nullable: true,
type: "date",
type: "datetime",
comment: "รายงานตัวกลับวันที่",
default: null,
})
@ -429,8 +457,63 @@ export class DevelopmentScholarship extends EntityBase {
default: null,
})
totalPeriod: string;
@Column({
// ในแผนฯ (INPLAN)
// นอกแผนฯ (OUTPLAN)
nullable: true,
comment: "ในแผนฯ",
length: 40,
default: null,
})
planType: string;
@Column({
comment: "ไม่ใช้งบประมาณ",
default: false,
})
isNoUseBudget: boolean;
@Column({
nullable: true,
type: "datetime",
comment: "กลับเข้ารับราชการตั้งแต่",
default: null,
})
governmentDate: Date;
@Column({
comment: "สำเร็จการศึกษาตามที่หลักสูตรกำหนด",
default: false,
})
isGraduated: boolean;
@Column({
nullable: true,
type: "datetime",
comment: "ตั้งแต่",
default: null,
})
graduatedDate: Date;
@Column({
comment: "เสร็จสิ้นการศึกษาตามที่หลักสูตรกำหนดแล้วแต่ยังไม่สำเร็จการศึกษา",
default: false,
})
isNoGraduated: boolean;
@Column({
nullable: true,
comment: "เนื่องจาก",
default: null,
})
graduatedReason: string;
}
export class CreateDevelopmentScholarship {
rootId: string | null;
root: string | null;
orgRootShortName: string | null;
orgRevisionId: string | null;
profileId: string | null;
rank?: string | null;
prefix: string | null;
@ -481,9 +564,15 @@ export class CreateDevelopmentScholarship {
studyAbroadStartDate: Date | null;
studyAbroadEndDate: Date | null;
totalPeriod: string | null;
planType: string | null;
isNoUseBudget: boolean | null;
}
export class UpdateDevelopmentScholarship {
rootId: string | null;
root: string | null;
orgRootShortName: string | null;
orgRevisionId: string | null;
profileId: string | null;
rank?: string | null;
prefix: string | null;
@ -534,4 +623,14 @@ export class UpdateDevelopmentScholarship {
studyAbroadStartDate: Date | null;
studyAbroadEndDate: Date | null;
totalPeriod: string | null;
planType: string | null;
isNoUseBudget: boolean | null;
}
export class UpdateDevelopmentScholarshipUser {
governmentDate: Date | null;
isGraduated: boolean | null;
graduatedDate: Date | null;
isNoGraduated: boolean | null;
graduatedReason: string | null;
}

View file

@ -4,7 +4,7 @@ import { StrategyChild2 } from "./StrategyChild2";
import { StrategyChild3 } from "./StrategyChild3";
import { StrategyChild4 } from "./StrategyChild4";
import { StrategyChild5 } from "./StrategyChild5";
import { Development } from "./Development";
@Entity("strategyChild1")
export class StrategyChild1 extends EntityBase {
@ -28,6 +28,10 @@ export class StrategyChild1 extends EntityBase {
@OneToMany(() => StrategyChild5, (strategyChild5) => strategyChild5.strategyChild1)
strategyChild5s: StrategyChild5[];
@OneToMany(() => Development, (development) => development.strategyChild1Planned)
developmentPlanneds: Development[];
@OneToMany(() => Development, (development) => development.strategyChild1Actual)
developmentActuals: Development[];
}
export class CreateStrategyChild1 {

View file

@ -4,7 +4,7 @@ import { StrategyChild1 } from "./StrategyChild1";
import { StrategyChild3 } from "./StrategyChild3";
import { StrategyChild4 } from "./StrategyChild4";
import { StrategyChild5 } from "./StrategyChild5";
import { Development } from "./Development";
@Entity("strategyChild2")
export class StrategyChild2 extends EntityBase {
@ -21,7 +21,7 @@ export class StrategyChild2 extends EntityBase {
comment: "คีย์นอก(FK)ของตาราง strategyChild1",
})
strategyChild1Id: string;
@ManyToOne(() => StrategyChild1, (strategyChild1) => strategyChild1.strategyChild2s)
@JoinColumn({ name: "strategyChild1Id" })
strategyChild1: StrategyChild1;
@ -35,9 +35,11 @@ export class StrategyChild2 extends EntityBase {
@OneToMany(() => StrategyChild5, (strategyChild5) => strategyChild5.strategyChild2)
strategyChild5s: StrategyChild5[];
}
@OneToMany(() => Development, (development) => development.strategyChild2Planned)
developmentPlanneds: Development[];
@OneToMany(() => Development, (development) => development.strategyChild2Actual)
developmentActuals: Development[];
}
export class CreateStrategyChild2 {
@Column()

View file

@ -4,7 +4,7 @@ import { StrategyChild1 } from "./StrategyChild1";
import { StrategyChild2 } from "./StrategyChild2";
import { StrategyChild4 } from "./StrategyChild4";
import { StrategyChild5 } from "./StrategyChild5";
import { Development } from "./Development";
@Entity("strategyChild3")
export class StrategyChild3 extends EntityBase {
@ -42,12 +42,16 @@ export class StrategyChild3 extends EntityBase {
@OneToMany(() => StrategyChild5, (strategyChild5) => strategyChild5.strategyChild3)
strategyChild5s: StrategyChild5[];
}
@OneToMany(() => Development, (development) => development.strategyChild3Planned)
developmentPlanneds: Development[];
@OneToMany(() => Development, (development) => development.strategyChild3Actual)
developmentActuals: Development[];
}
export class CreateStrategyChild3 {
@Column()
strategyChild3Name: string;
@Column("uuid")
strategyChild2Id: string;
}

View file

@ -4,7 +4,7 @@ import { StrategyChild1 } from "./StrategyChild1";
import { StrategyChild2 } from "./StrategyChild2";
import { StrategyChild3 } from "./StrategyChild3";
import { StrategyChild5 } from "./StrategyChild5";
import { Development } from "./Development";
@Entity("strategyChild4")
export class StrategyChild4 extends EntityBase {
@ -48,8 +48,12 @@ export class StrategyChild4 extends EntityBase {
@OneToMany(() => StrategyChild5, (strategyChild5) => strategyChild5.strategyChild4)
strategyChild5s: StrategyChild5[];
}
@OneToMany(() => Development, (development) => development.strategyChild4Planned)
developmentPlanneds: Development[];
@OneToMany(() => Development, (development) => development.strategyChild4Actual)
developmentActuals: Development[];
}
export class CreateStrategyChild4 {
@Column()

View file

@ -4,7 +4,7 @@ import { StrategyChild1 } from "./StrategyChild1";
import { StrategyChild2 } from "./StrategyChild2";
import { StrategyChild3 } from "./StrategyChild3";
import { StrategyChild4 } from "./StrategyChild4";
import { Development } from "./Development";
@Entity("strategyChild5")
export class StrategyChild5 extends EntityBase {
@ -56,8 +56,11 @@ export class StrategyChild5 extends EntityBase {
@JoinColumn({ name: "strategyChild4Id" })
strategyChild4: StrategyChild4;
}
@OneToMany(() => Development, (development) => development.strategyChild5Planned)
developmentPlanneds: Development[];
@OneToMany(() => Development, (development) => development.strategyChild5Actual)
developmentActuals: Development[];
}
export class CreateStrategyChild5 {
@Column()