แก้ไขเงินเดือน
This commit is contained in:
parent
f79704c7a7
commit
bf12751bfa
10 changed files with 969 additions and 582 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { SalaryPeriod } from "./SalaryPeriod";
|
||||
import { SalaryProfile } from "./SalaryProfile";
|
||||
|
||||
@Entity("salaryOrg")
|
||||
export class SalaryOrg extends EntityBase {
|
||||
|
|
@ -7,49 +9,58 @@ export class SalaryOrg extends EntityBase {
|
|||
comment: "",
|
||||
length: 40,
|
||||
})
|
||||
salaryPreiodId: string;
|
||||
salaryPeriodId: string;
|
||||
|
||||
@Column({
|
||||
comment:"",
|
||||
comment: "สถานะ",
|
||||
})
|
||||
status: string;
|
||||
|
||||
@Column({
|
||||
comment:"",
|
||||
comment: "id หน่วยงาน",
|
||||
length: 40,
|
||||
})
|
||||
rootId : string;
|
||||
rootId: string;
|
||||
|
||||
@Column({
|
||||
comment:"สถานะ",
|
||||
comment: "จำนวนคนทั้งหมด",
|
||||
})
|
||||
total : number;
|
||||
total: number;
|
||||
|
||||
@Column({
|
||||
comment:"15%ของจำนวนคน",
|
||||
comment: "15%ของจำนวนคน",
|
||||
})
|
||||
fifteenPercent : number;
|
||||
fifteenPercent: number;
|
||||
|
||||
@Column({
|
||||
comment: "กลุ่ม GROUP1->กลุ่ม1 GROUP2->กลุ่ม2",
|
||||
length: 10,
|
||||
})
|
||||
group: string;
|
||||
|
||||
@ManyToOne(() => SalaryPeriod, (salaryPeriod) => salaryPeriod.salaryOrgs)
|
||||
@JoinColumn({ name: "salaryPeriodId" })
|
||||
salaryPeriod: SalaryPeriod;
|
||||
|
||||
@OneToMany(() => SalaryProfile, (salaryProfile) => salaryProfile.salaryOrg)
|
||||
salaryProfiles: SalaryProfile[];
|
||||
}
|
||||
|
||||
export class CreateSalaryOrg {
|
||||
|
||||
@Column("uuid")
|
||||
salaryPreiodId: string;
|
||||
salaryPeriodId: string;
|
||||
|
||||
@Column()
|
||||
status: string;
|
||||
|
||||
@Column("uuid")
|
||||
rootId : string;
|
||||
rootId: string;
|
||||
|
||||
@Column()
|
||||
total : number;
|
||||
total: number;
|
||||
|
||||
@Column()
|
||||
fifteenPercent : number;
|
||||
|
||||
fifteenPercent: number;
|
||||
}
|
||||
|
||||
export type UpdateSalaryOrg = Partial<CreateSalaryOrg>;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { SalaryOrg } from "./SalaryOrg";
|
||||
|
||||
@Entity("salaryPeriod")
|
||||
export class SalaryPeriod extends EntityBase {
|
||||
|
|
@ -29,10 +30,11 @@ export class SalaryPeriod extends EntityBase {
|
|||
})
|
||||
status?: string;
|
||||
|
||||
@OneToMany(() => SalaryOrg, (salaryOrg) => salaryOrg.salaryPeriod)
|
||||
salaryOrgs: SalaryOrg[];
|
||||
}
|
||||
|
||||
export class CreateSalaryPeriod {
|
||||
|
||||
@Column()
|
||||
period: string;
|
||||
|
||||
|
|
@ -41,11 +43,9 @@ export class CreateSalaryPeriod {
|
|||
|
||||
@Column()
|
||||
effectiveDate: Date;
|
||||
|
||||
}
|
||||
|
||||
export class UpdateSalaryPeriod {
|
||||
|
||||
@Column()
|
||||
period: string;
|
||||
|
||||
|
|
@ -54,5 +54,4 @@ export class UpdateSalaryPeriod {
|
|||
|
||||
@Column()
|
||||
effectiveDate: Date;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { SalaryOrg } from "./SalaryOrg";
|
||||
|
||||
@Entity("salaryProfile")
|
||||
export class SalaryProfile extends EntityBase {
|
||||
|
|
@ -34,9 +35,41 @@ export class SalaryProfile extends EntityBase {
|
|||
lastName: string;
|
||||
|
||||
@Column({
|
||||
comment:"เลขที่ตำแหน่ง",
|
||||
nullable: true,
|
||||
comment: "เลขบัตรประชาชน",
|
||||
length: 100,
|
||||
default: null,
|
||||
})
|
||||
posNumber : number;
|
||||
citizenId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ)",
|
||||
length: 100,
|
||||
default: null,
|
||||
})
|
||||
posMasterNoPrefix: string;
|
||||
|
||||
@Column({
|
||||
comment: "เลขที่ตำแหน่ง เป็นตัวเลข",
|
||||
})
|
||||
posMasterNo: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "Suffix หลังเลขที่ตำแหน่ง เช่น ช.",
|
||||
length: 100,
|
||||
default: null,
|
||||
})
|
||||
posMasterNoSuffix: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน",
|
||||
length: 100,
|
||||
default: null,
|
||||
})
|
||||
orgShortName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -48,21 +81,32 @@ export class SalaryProfile extends EntityBase {
|
|||
|
||||
@Column({
|
||||
comment: "ประเภทตำแหน่ง",
|
||||
length: 40,
|
||||
length: 100,
|
||||
})
|
||||
posTypeId: string;
|
||||
posType: string;
|
||||
|
||||
@Column({
|
||||
comment: "ระดับตำแหน่ง",
|
||||
length: 40,
|
||||
length: 100,
|
||||
})
|
||||
posLevelId: string;
|
||||
posLevel: string;
|
||||
|
||||
@Column({
|
||||
comment: "ตำแหน่งทางการบริหาร",
|
||||
length: 255,
|
||||
})
|
||||
posExecutive: string;
|
||||
|
||||
@Column({
|
||||
comment: "เงินเดือนฐาน",
|
||||
})
|
||||
amount: number;
|
||||
|
||||
@Column({
|
||||
comment: "เงินพิเศษ",
|
||||
})
|
||||
amountSpecial: number;
|
||||
|
||||
@Column({
|
||||
comment: "จำนวนเงินที่ใช้เลื่อน",
|
||||
})
|
||||
|
|
@ -75,8 +119,9 @@ export class SalaryProfile extends EntityBase {
|
|||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทการเลื่อน NONE->ไม่ได้เลื่อน HAFT->ครึ่งขั้น FULL->1ขั้น FULLHAFT->1.5ขั้น group กลุ่ม GROUP1->กลุ่ม1 GROUP2->กลุ่ม2",
|
||||
length: 255,
|
||||
comment:
|
||||
"ประเภทการเลื่อน(ขั้น) PENDING->รายชื่อคนครอง NONE->ไม่ได้เลื่อน HAFT->ครึ่งขั้น FULL->1ขั้น FULLHAFT->1.5ขั้น",
|
||||
length: 20,
|
||||
default: null,
|
||||
})
|
||||
type: string;
|
||||
|
|
@ -151,77 +196,81 @@ export class SalaryProfile extends EntityBase {
|
|||
})
|
||||
child4: string;
|
||||
|
||||
@ManyToOne(() => SalaryOrg, (salaryOrg) => salaryOrg.salaryProfiles)
|
||||
@JoinColumn({ name: "salaryOrgId" })
|
||||
salaryOrg: SalaryOrg;
|
||||
}
|
||||
|
||||
export class CreateSalaryProfile {
|
||||
@Column("uuid")
|
||||
id: string;
|
||||
|
||||
@Column("uuid")
|
||||
salaryOrgId: string;
|
||||
|
||||
@Column()
|
||||
prefix: string;
|
||||
|
||||
@Column()
|
||||
firstName: string;
|
||||
|
||||
@Column()
|
||||
lastName: string;
|
||||
|
||||
@Column()
|
||||
posNumber : number;
|
||||
|
||||
@Column()
|
||||
position: string;
|
||||
|
||||
@Column("uuid")
|
||||
posTypeId: string;
|
||||
|
||||
@Column("uuid")
|
||||
posLevelId: string;
|
||||
|
||||
@Column()
|
||||
amount: number;
|
||||
|
||||
@Column()
|
||||
amountUse: number;
|
||||
|
||||
@Column()
|
||||
positionSalaryAmount: number;
|
||||
|
||||
@Column()
|
||||
type: string;
|
||||
|
||||
@Column("uuid")
|
||||
rootId: string;
|
||||
|
||||
@Column()
|
||||
root: string;
|
||||
|
||||
@Column("uuid")
|
||||
child1Id: string;
|
||||
|
||||
@Column()
|
||||
child1: string;
|
||||
|
||||
@Column("uuid")
|
||||
child2Id: string;
|
||||
|
||||
@Column()
|
||||
child2: string;
|
||||
|
||||
@Column("uuid")
|
||||
child3Id: string;
|
||||
|
||||
@Column()
|
||||
child3: string;
|
||||
|
||||
@Column("uuid")
|
||||
child4Id: string;
|
||||
|
||||
@Column()
|
||||
child4: string;
|
||||
|
||||
@Column()
|
||||
type: string;
|
||||
|
||||
@Column()
|
||||
prefix: string;
|
||||
|
||||
@Column()
|
||||
firstName: string;
|
||||
|
||||
@Column()
|
||||
lastName: string;
|
||||
|
||||
@Column()
|
||||
citizenId: string;
|
||||
|
||||
@Column()
|
||||
posMasterNoPrefix: string;
|
||||
|
||||
@Column()
|
||||
posMasterNo: number;
|
||||
|
||||
@Column()
|
||||
posMasterNoSuffix: string;
|
||||
|
||||
@Column()
|
||||
orgShortName: string;
|
||||
|
||||
@Column()
|
||||
position: string;
|
||||
|
||||
@Column()
|
||||
posType: string;
|
||||
|
||||
@Column()
|
||||
posLevel: string;
|
||||
|
||||
@Column()
|
||||
amount: number;
|
||||
|
||||
@Column("uuid")
|
||||
rootId: string;
|
||||
|
||||
@Column()
|
||||
root: string;
|
||||
|
||||
@Column("uuid")
|
||||
child1Id: string;
|
||||
|
||||
@Column()
|
||||
child1: string;
|
||||
|
||||
@Column("uuid")
|
||||
child2Id: string;
|
||||
|
||||
@Column()
|
||||
child2: string;
|
||||
|
||||
@Column("uuid")
|
||||
child3Id: string;
|
||||
|
||||
@Column()
|
||||
child3: string;
|
||||
|
||||
@Column("uuid")
|
||||
child4Id: string;
|
||||
|
||||
@Column()
|
||||
child4: string;
|
||||
}
|
||||
|
||||
export type UpdateSalaryProfile = Partial<CreateSalaryProfile>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue