แก้ไขข้อมูลตำแหน่ง

This commit is contained in:
mamoss 2025-03-19 17:51:01 +07:00
parent 06fb09afa2
commit fc5f28ee36
7 changed files with 1403 additions and 1 deletions

View file

@ -49,7 +49,7 @@ export class CommandCodeController extends Controller {
"createdFullName",
"lastUpdateFullName",
],
order: { code: "ASC" },
order: { id: "ASC" },
});
return new HttpSuccess(_commandCode);
}

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,7 @@ import { CommandRecive } from "./CommandRecive";
import { ProfileSalary } from "./ProfileSalary";
import { ProfileSalaryHistory } from "./ProfileSalaryHistory";
import { CommandSign } from "./CommandSign";
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
@Entity("command")
export class Command extends EntityBase {
@ -167,6 +168,9 @@ export class Command extends EntityBase {
@OneToMany(() => ProfileSalary, (profileSalary) => profileSalary.command)
profileSalarys: ProfileSalary[];
@OneToMany(() => ProfileSalaryTemp, (profileSalaryTemp) => profileSalaryTemp.command)
profileSalaryTemps: ProfileSalaryTemp[];
@OneToMany(() => ProfileSalaryHistory, (profileSalaryHistory) => profileSalaryHistory.command)
profileSalaryHistorys: ProfileSalaryHistory[];
}

View file

@ -47,6 +47,7 @@ import { CommandSign } from "./CommandSign";
import { RoleKeycloak } from "./RoleKeycloak";
import { ProfileActposition } from "./ProfileActposition";
import { ProfileAssistance } from "./ProfileAssistance";
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
@Entity("profile")
export class Profile extends EntityBase {
@ -411,6 +412,13 @@ export class Profile extends EntityBase {
})
leaveType: string;
@Column({
comment: "สถานะการตรวจสอบ",
length: 40,
default: "PENDING",
})
statusCheckEdit: string;
@OneToMany(() => PosMaster, (posMaster) => posMaster.current_holder)
current_holders: PosMaster[];
@ -420,6 +428,9 @@ export class Profile extends EntityBase {
@OneToMany(() => ProfileSalary, (profileSalary) => profileSalary.profile)
profileSalary: ProfileSalary[];
@OneToMany(() => ProfileSalaryTemp, (profileSalaryTemp) => profileSalaryTemp.profile)
profileSalaryTemp: ProfileSalaryTemp[];
@OneToMany(() => ProfileDiscipline, (profileDiscipline) => profileDiscipline.profile)
profileDisciplines: ProfileDiscipline[];

View file

@ -36,6 +36,7 @@ import { DevelopmentRequest } from "./DevelopmentRequest";
import { RoleKeycloak } from "./RoleKeycloak";
import { StateOperatorUser } from "./StateOperatorUser";
import { EmployeeTempPosMaster } from "./EmployeeTempPosMaster";
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
@Entity("profileEmployee")
export class ProfileEmployee extends EntityBase {
@ -663,6 +664,13 @@ export class ProfileEmployee extends EntityBase {
})
leaveType: string;
@Column({
comment: "สถานะการตรวจสอบ",
length: 40,
default: "PENDING",
})
statusCheckEdit: string;
@OneToMany(() => ProfileEmployeeInformationHistory, (v) => v.profileEmployeeInformation)
information_histories: ProfileEmployeeInformationHistory[];
@ -684,6 +692,9 @@ export class ProfileEmployee extends EntityBase {
@OneToMany(() => ProfileSalary, (v) => v.profileEmployee)
profileSalary: ProfileSalary[];
@OneToMany(() => ProfileSalaryTemp, (v) => v.profileEmployee)
profileSalaryTemp: ProfileSalaryTemp[];
@OneToMany(() => ProfileCertificate, (v) => v.profileEmployee)
profileCertificates: ProfileCertificate[];

View file

@ -4,6 +4,7 @@ import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
import { ProfileSalaryHistory } from "./ProfileSalaryHistory";
import { Command } from "./Command";
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
@Entity("profileSalary")
export class ProfileSalary extends EntityBase {
@ -262,6 +263,9 @@ export class ProfileSalary extends EntityBase {
@OneToMany(() => ProfileSalaryHistory, (profileSalaryHistory) => profileSalaryHistory.histories)
profileSalaryHistories: ProfileSalaryHistory[];
@OneToMany(() => ProfileSalaryTemp, (profileSalaryTemp) => profileSalaryTemp.profileSalary)
profileSalaryTemps: ProfileSalaryTemp[];
@ManyToOne(() => Profile, (profile) => profile.profileSalary)
@JoinColumn({ name: "profileId" })
profile: Profile;

View file

@ -0,0 +1,359 @@
import { Entity, Column, OneToMany, JoinColumn, ManyToOne, Double } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
import { Command } from "./Command";
import { ProfileSalary } from "./ProfileSalary";
@Entity("profileSalaryTemp")
export class ProfileSalaryTemp extends EntityBase {
@Column({
nullable: true,
comment: "ข้อมูลที่ลบ",
default: null,
})
isDelete: boolean;
@Column({
nullable: true,
comment: "ข้อมูลที่แก้ไข",
default: null,
})
isEdit: boolean;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง profile",
type: "uuid",
default: null,
})
profileId: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง ProfileEmployee",
default: null,
})
profileEmployeeId: string;
@Column({
nullable: true,
comment: "เรียงลำดับใหมาตามการนำเข้า",
default: null,
})
order: number;
@Column({
nullable: true,
comment: "เลขที่คำสั่ง",
default: null,
})
commandNo: string;
@Column({
nullable: true,
comment: "ปีที่ออกคำสั่ง",
default: null,
})
commandYear: number;
@Column({
comment: "คำสั่งวันที่",
type: "datetime",
nullable: true,
})
commandDateSign: Date;
@Column({
comment: "คำสั่งมีผลวันที่",
type: "datetime",
nullable: true,
})
commandDateAffect: Date;
@Column({
nullable: true,
comment: "รหัสประเภทของคำสั่ง",
default: null,
})
commandCode: string;
@Column({
nullable: true,
comment: "ชื่อประเภทคำสั่ง",
default: null,
})
commandName: string;
@Column({
nullable: true,
length: 40,
comment: "ตัวย่อเลขที่ตำแหน่ง",
default: null,
})
posNoAbb: string;
@Column({
nullable: true,
length: 40,
comment: "เลขที่ตำแหน่ง",
default: null,
})
posNo: string;
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่ง",
default: null,
})
positionName: string;
@Column({
nullable: true,
length: 255,
comment: "ประเภทตำแหน่ง",
default: null,
})
positionType: string;
@Column({
nullable: true,
length: 255,
comment: "ระดับตำแหน่ง",
default: null,
})
positionLevel: string;
@Column({
nullable: true,
comment: "ระดับของเก่าที่ยังไม่เทียบเท่าแบบแท่ง",
default: null,
})
positionCee: string;
@Column({
nullable: true,
comment: "root name",
default: null,
})
orgRoot: string;
@Column({
nullable: true,
comment: "child1 name",
default: null,
})
orgChild1: string;
@Column({
nullable: true,
comment: "child2 name",
default: null,
})
orgChild2: string;
@Column({
nullable: true,
comment: "child3 name",
default: null,
})
orgChild3: string;
@Column({
nullable: true,
comment: "child4 name",
default: null,
})
orgChild4: string;
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่งทางการบริหาร",
default: null,
})
positionExecutive: string;
@Column({
comment: "เงินเดือนฐาน",
default: 0,
nullable: true,
type: "double",
})
amount: Double;
@Column({
comment: "เงินพิเศษ",
default: 0,
nullable: true,
type: "double",
})
amountSpecial: Double;
@Column({
comment: "เงินประจำตำแหน่ง",
default: 0,
nullable: true,
type: "double",
})
positionSalaryAmount: Double;
@Column({
comment: "เงินค่าตอบแทนรายเดือน",
default: 0,
nullable: true,
type: "double",
})
mouthSalaryAmount: Double;
@Column({
nullable: true,
length: 255,
comment: "หมายเหตุ",
default: null,
})
remark: string;
@Column({
nullable: true,
comment: "refId",
default: null,
})
refId: number;
@Column({
comment: "วันที่",
type: "datetime",
nullable: true,
})
dateGovernment: Date;
@Column({
nullable: true,
comment: "เข้ารับราชการ",
default: null,
})
isGovernment: boolean;
@Column({
nullable: true,
comment: "ข้อมูลจาก Entry",
default: null,
})
isEntry: boolean;
@Column({
nullable: true,
length: 255,
comment: "ด้านของตำแหน่ง",
default: null,
})
positionPathSide: string;
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่งในสายงาน",
default: null,
})
positionLine: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง command",
default: null,
})
commandId: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง profileSalary",
default: null,
})
salaryId: string;
@ManyToOne(() => ProfileSalary, (profileSalary) => profileSalary.profileSalaryTemps)
@JoinColumn({ name: "salaryId" })
profileSalary: ProfileSalary;
@ManyToOne(() => Command, (command) => command.profileSalaryTemps)
@JoinColumn({ name: "commandId" })
command: Command;
@ManyToOne(() => Profile, (profile) => profile.profileSalaryTemp)
@JoinColumn({ name: "profileId" })
profile: Profile;
@ManyToOne(() => ProfileEmployee, (profileEmployee) => profileEmployee.profileSalaryTemp)
@JoinColumn({ name: "profileEmployeeId" })
profileEmployee: ProfileEmployee;
}
export class CreateProfileSalaryTemp {
type: string;
profileId?: string | null;
profileEmployeeId?: string | null;
commandCode?: string | null;
commandNo?: string | null;
commandYear?: number | null;
commandDateAffect?: Date | null;
commandDateSign?: Date | null;
posNoAbb: string | null;
posNo: string | null;
positionName: string | null;
positionType: string | null;
positionLevel: string | null;
positionLine?: string | null;
positionPathSide?: string | null;
positionExecutive: string | null;
amount?: Double | null;
amountSpecial?: Double | null;
positionSalaryAmount?: Double | null;
mouthSalaryAmount?: Double | null;
orgRoot?: string | null;
orgChild1?: string | null;
orgChild2?: string | null;
orgChild3?: string | null;
orgChild4?: string | null;
remark: string | null;
commandId?: string | null;
isGovernment?: boolean | null;
positionCee?: string | null;
commandName?: string | null;
}
export type UpdateProfileSalaryTemp = {
type: string;
commandCode?: string | null;
commandNo?: string | null;
commandYear?: number | null;
commandDateAffect?: Date | null;
commandDateSign?: Date | null;
posNoAbb: string | null;
posNo: string | null;
positionName: string | null;
positionType: string | null;
positionLevel: string | null;
positionLine?: string | null;
positionPathSide?: string | null;
positionExecutive: string | null;
amount?: Double | null;
amountSpecial?: Double | null;
positionSalaryAmount?: Double | null;
mouthSalaryAmount?: Double | null;
orgRoot?: string | null;
orgChild1?: string | null;
orgChild2?: string | null;
orgChild3?: string | null;
orgChild4?: string | null;
remark: string | null;
commandId?: string | null;
isGovernment?: boolean | null;
positionCee?: string | null;
commandName?: string | null;
};