add dpis controller

This commit is contained in:
Suphonchai Phoonsawat 2024-10-07 14:53:27 +07:00
parent 497decefe4
commit 4852131651
74 changed files with 606 additions and 336 deletions

View file

@ -1,8 +1,8 @@
import { Entity, Column} from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
@Entity("amphurImport")
export class AmphurImport extends EntityBase{
export class AmphurImport extends EntityBase {
@Column({
nullable: true,
length: 255,

View file

@ -1,4 +1,4 @@
import { Entity, Column} from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
@Entity("educationLevel")

View file

@ -1,8 +1,8 @@
import { Entity, Column} from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
@Entity("educationMis")
export class EducationMis extends EntityBase{
export class EducationMis extends EntityBase {
@Column({
nullable: true,
length: 255,

View file

@ -40,7 +40,7 @@ export class PosDict extends EntityBase {
comment: "ตำแหน่งทางการบริหาร",
default: null,
})
posExecutiveId?: string|null;
posExecutiveId?: string | null;
@Column({
nullable: true,
@ -101,7 +101,7 @@ export class CreatePosDict {
@Column()
isSpecial: boolean;
@Column()
positionIsSelected?: boolean | null;
}

View file

@ -1,4 +1,4 @@
import { Entity, Column} from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
@Entity("prefixe")

View file

@ -28,11 +28,21 @@ export class ProfileChangePosition extends EntityBase {
@Column({ nullable: true, comment: "ข้อมูลหน่วยงานเดิม เลขที่", default: null })
positionNumberOld: string;
@Column({ nullable: true, comment: "ข้อมูลหน่วยงานเดิม เงินเดือน", type: "double", default: null })
@Column({
nullable: true,
comment: "ข้อมูลหน่วยงานเดิม เงินเดือน",
type: "double",
default: null,
})
amountOld: number;
@Column({ nullable: true, type: "datetime", comment: "ดำรงตำแหน่งในระดับปัจจุบันเมื่อ", default: null })
dateCurrent: Date
@Column({
nullable: true,
type: "datetime",
comment: "ดำรงตำแหน่งในระดับปัจจุบันเมื่อ",
default: null,
})
dateCurrent: Date;
@Column({ nullable: true, comment: "profile Id", default: null })
profileId: string;
@ -133,8 +143,6 @@ export class ProfileChangePosition extends EntityBase {
@Column({ nullable: true, comment: "ชื่อระดับตำแหน่ง", default: null })
posLevelName: string;
@Column({ nullable: true, comment: "ชื่อหน่วยงาน root old", default: null })
rootOld: string;
@ -198,7 +206,12 @@ export class ProfileChangePosition extends EntityBase {
@Column({ nullable: true, comment: "สถานะ", type: "text", default: null })
status: string;
@Column({nullable: true, length: 40, comment: "คีย์นอก(FK)ของตาราง ChangePosition", default: null })
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง ChangePosition",
default: null,
})
changePositionId: string;
@ManyToOne(() => ChangePosition, (v) => v.profileChangePosition)
@ -209,7 +222,7 @@ export class ProfileChangePosition extends EntityBase {
//เพิ่มรายชื่อผู้ที่ย้ายสับเปลี่ยนตำแหน่ง
export class CreateProfileChangePosition {
changePositionId: string;
profiles: ProfileItem[]
profiles: ProfileItem[];
}
export class ProfileItem {
@ -226,7 +239,7 @@ export class ProfileItem {
organizationOld: string | null;
organizationPositionOld?: string | null;
amountOld: number | null;
educationOld: string | null;
educationOld: string | null;
rootOld: string | null;
rootOldId: string | null;
rootShortNameOld: string | null;
@ -253,11 +266,11 @@ export class ProfileItem {
export type UpdateProfileChangePosition = {
educationOld: string;
posMasterNoOld: number;
positionTypeOld: string;
positionTypeOld: string;
positionLevelOld: string;
organizationPositionOld: string;
amountOld: number;
dateCurrent : Date;
dateCurrent: Date;
reason: string | null;
};
@ -275,4 +288,4 @@ export type SelectProfileChangePosition = {
posTypeName: string;
posLevelId: string | null;
posLevelName: string;
};
};

View file

@ -87,7 +87,7 @@ export class ProfileChildren extends EntityBase {
export type CreateProfileChildren = {
profileId: string;
childrenCareer: string | null;
childrenFirstName: string | null;
childrenFirstName: string | null;
childrenLastName: string | null;
childrenPrefix: string | null;
childrenLive: boolean | null;

View file

@ -1,7 +1,7 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileEmployee } from "./ProfileEmployee"
import { ProfileEmployeeEmploymentHistory } from "./ProfileEmployeeEmploymentHistory"
import { ProfileEmployee } from "./ProfileEmployee";
import { ProfileEmployeeEmploymentHistory } from "./ProfileEmployeeEmploymentHistory";
@Entity("profileEmployeeEmployment")
export class ProfileEmployeeEmployment extends EntityBase {
@ -27,14 +27,13 @@ export class ProfileEmployeeEmployment extends EntityBase {
default: null,
})
profileEmployeeId: string;
@ManyToOne(() => ProfileEmployee, (v) => v.profileEmployeeEmployment)
@JoinColumn({ name: "profileEmployeeId" })
profileEmployee: ProfileEmployee;
@OneToMany(() => ProfileEmployeeEmploymentHistory, (v) => v.profileEmployeeEmployment)
histories: ProfileEmployeeEmploymentHistory[];
}
export class CreateEmploymentProfileEmployee {
@ -45,4 +44,4 @@ export class CreateEmploymentProfileEmployee {
export class UpdateEmploymentProfileEmployee {
date: Date | null;
command: string | null;
}
}

View file

@ -1,6 +1,6 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileEmployeeEmployment } from "./ProfileEmployeeEmployment"
import { ProfileEmployeeEmployment } from "./ProfileEmployeeEmployment";
@Entity("profileEmployeeEmploymentHistory")
export class ProfileEmployeeEmploymentHistory extends EntityBase {
@ -18,7 +18,7 @@ export class ProfileEmployeeEmploymentHistory extends EntityBase {
default: null,
})
command: string;
@Column({
nullable: true,
length: 40,
@ -30,5 +30,4 @@ export class ProfileEmployeeEmploymentHistory extends EntityBase {
@ManyToOne(() => ProfileEmployeeEmployment, (v) => v.histories)
@JoinColumn({ name: "profileEmployeeEmploymentId" })
profileEmployeeEmployment: ProfileEmployeeEmployment;
}
}

View file

@ -4,70 +4,69 @@ import { ProfileEmployee } from "./ProfileEmployee";
@Entity("profileEmployeeInformationHistory")
export class ProfileEmployeeInformationHistory extends EntityBase {
@Column({
nullable: true,
comment: "กลุ่มงาน",
default: null,
})
positionEmployeeGroupId: string;
@Column({
nullable: true,
comment: "สายงาน",
default: null,
})
positionEmployeeLineId: string;
@Column({
nullable: true,
comment: "ชื่อตำแหน่งทางสายงาน",
default: null,
})
positionEmployeePositionId: string;
@Column({
nullable: true,
comment: "สังกัด",
default: null,
})
employeeOc: string;
@Column({
nullable: true,
comment: "ประเภทบุคคล",
default: null,
})
employeeTypeIndividual: string;
@Column({
nullable: true,
comment: "ค่าจ้าง",
default: null,
})
employeeWage: string;
@Column({
nullable: true,
comment: "เงินเพิ่มการครองชีพชั่วคราว",
default: null,
})
employeeMoneyIncrease: string;
@Column({
nullable: true,
comment: "เงินช่วยเหลือการครองชีพชั่วคราว",
default: null,
})
employeeMoneyAllowance: string;
@Column({
nullable: true,
comment: "เงินสมทบประกันสังคม(ลูกจ้าง)",
default: null,
})
employeeMoneyEmployee: string;
@Column({
nullable: true,
comment: "เงินสมทบประกันสังคม(นายจ้าง)",

View file

@ -6,7 +6,6 @@ import { ProfileFamilyCoupleHistory } from "./ProfileFamilyCoupleHistory";
@Entity("profileFamilyCouple")
export class ProfileFamilyCouple extends EntityBase {
@Column({
nullable: true,
default: null,
@ -100,7 +99,6 @@ export class ProfileFamilyCouple extends EntityBase {
@ManyToOne(() => ProfileEmployee, (v) => v.profileFamilyCouple)
@JoinColumn({ name: "profileEmployeeId" })
profileEmployee: ProfileEmployee;
}
export type CreateProfileFamilyCouple = {
@ -114,7 +112,7 @@ export type CreateProfileFamilyCouple = {
coupleCitizenId: string | null;
coupleLive: boolean | null;
relationship: string | null;
}
};
export type CreateProfileEmployeeFamilyCouple = {
profileEmployeeId: string;
@ -127,7 +125,7 @@ export type CreateProfileEmployeeFamilyCouple = {
coupleCitizenId: string | null;
coupleLive: boolean | null;
relationship: string | null;
}
};
export type UpdateProfileFamilyCouple = {
// couple?: boolean | null;

View file

@ -61,7 +61,7 @@ export class ProfileFamilyCoupleHistory extends EntityBase {
comment: "มีชีวิตคู่สมรส",
})
coupleLive: boolean;
@Column({
nullable: true,
comment: "ความสัมพันธ์",
@ -69,7 +69,7 @@ export class ProfileFamilyCoupleHistory extends EntityBase {
default: null,
})
relationship: string;
@Column({
nullable: true,
length: 40,

View file

@ -6,7 +6,6 @@ import { ProfileFamilyFatherHistory } from "./ProfileFamilyFatherHistory";
@Entity("profileFamilyFather")
export class ProfileFamilyFather extends EntityBase {
@Column({
nullable: true,
default: null,
@ -76,7 +75,6 @@ export class ProfileFamilyFather extends EntityBase {
@ManyToOne(() => ProfileEmployee, (v) => v.profileFamilyFather)
@JoinColumn({ name: "profileEmployeeId" })
profileEmployee: ProfileEmployee;
}
export type CreateProfileFamilyFather = {
@ -87,7 +85,7 @@ export type CreateProfileFamilyFather = {
fatherCareer: string | null;
fatherCitizenId: string | null;
fatherLive: boolean | null;
}
};
export type CreateProfileEmployeeFamilyFather = {
profileEmployeeId: string;
@ -97,7 +95,7 @@ export type CreateProfileEmployeeFamilyFather = {
fatherCareer: string | null;
fatherCitizenId: string | null;
fatherLive: boolean | null;
}
};
export type UpdateProfileFamilyFather = {
fatherPrefix?: string | null;

View file

@ -6,7 +6,6 @@ import { ProfileFamilyMotherHistory } from "./ProfileFamilyMotherHistory";
@Entity("profileFamilyMother")
export class ProfileFamilyMother extends EntityBase {
@Column({
nullable: true,
default: null,
@ -76,7 +75,6 @@ export class ProfileFamilyMother extends EntityBase {
@ManyToOne(() => ProfileEmployee, (v) => v.profileFamilyMother)
@JoinColumn({ name: "profileEmployeeId" })
profileEmployee: ProfileEmployee;
}
export type CreateProfileFamilyMother = {
@ -87,9 +85,9 @@ export type CreateProfileFamilyMother = {
motherCareer: string | null;
motherCitizenId: string | null;
motherLive: boolean | null;
}
};
export type CreateProfileEmployeeFamilyMother= {
export type CreateProfileEmployeeFamilyMother = {
profileEmployeeId: string;
motherPrefix: string | null;
motherFirstName: string | null;
@ -97,9 +95,9 @@ export type CreateProfileEmployeeFamilyMother= {
motherCareer: string | null;
motherCitizenId: string | null;
motherLive: boolean | null;
}
};
export type UpdateProfileFamilyMother= {
export type UpdateProfileFamilyMother = {
motherPrefix: string | null;
motherFirstName: string | null;
motherLastName: string | null;

View file

@ -1,10 +1,4 @@
import {
Entity,
Column,
JoinColumn,
ManyToOne,
Double,
} from "typeorm";
import { Entity, Column, JoinColumn, ManyToOne, Double } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileSalary } from "./ProfileSalary";

View file

@ -1,8 +1,8 @@
import { Entity, Column} from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
@Entity("provinceImport")
export class ProvinceImport extends EntityBase{
export class ProvinceImport extends EntityBase {
@Column({
nullable: true,
length: 255,

View file

@ -1,4 +1,4 @@
import { Entity, Column} from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
@Entity("rank")

View file

@ -43,7 +43,7 @@ export class CreateSubDistrict {
@Column()
districtId: string;
@Column()
zipCode: string;
}

View file

@ -1,8 +1,8 @@
import { Entity, Column} from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
@Entity("subDistrictImport")
export class SubDistrictImport extends EntityBase{
export class SubDistrictImport extends EntityBase {
@Column({
nullable: true,
length: 255,