fix SalaryEmployee ลบไฟล์ รวมไฟล์ เพิ่ม field
This commit is contained in:
parent
42bad7b302
commit
3b5096c005
7 changed files with 55 additions and 920 deletions
|
|
@ -277,7 +277,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
|||
.leftJoinAndSelect("employeePosMaster.orgChild3", "orgChild3")
|
||||
.leftJoinAndSelect("employeePosMaster.orgChild4", "orgChild4")
|
||||
.leftJoinAndSelect("employeePosMaster.positions", "positions")
|
||||
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
||||
.leftJoinAndSelect("current_holder.profileSalarys", "profileSalarys")
|
||||
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||
|
|
@ -370,9 +370,9 @@ export class OrganizationUnauthorizeController extends Controller {
|
|||
}
|
||||
|
||||
const amount =
|
||||
item.current_holder == null || item.current_holder.profileSalary.length == 0
|
||||
item.current_holder == null || item.current_holder.profileSalarys.length == 0
|
||||
? null
|
||||
: item.current_holder.profileSalary.sort((a: any, b: any) => b.date - a.date)[0].amount;
|
||||
: item.current_holder.profileSalarys.sort((a: any, b: any) => b.date - a.date)[0].amount;
|
||||
let datePeriodStart = new Date(
|
||||
`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, "0")}-${String(new Date().getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -73,9 +73,12 @@ export class ProfileEmployeeController extends Controller {
|
|||
if (body.posTypeId && !(await this.posTypeRepo.findOneBy({ id: body.posTypeId }))) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลประเภทตำแหน่งนี้");
|
||||
}
|
||||
|
||||
|
||||
if (body.citizenId.length !== 13) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "กรุณากรอกข้อมูลรหัสบัตรประจำตัวประชาชนให้ครบ 13 หลัก");
|
||||
throw new HttpError(
|
||||
HttpStatus.NOT_FOUND,
|
||||
"กรุณากรอกข้อมูลรหัสบัตรประจำตัวประชาชนให้ครบ 13 หลัก",
|
||||
);
|
||||
}
|
||||
|
||||
if (body.citizenId) {
|
||||
|
|
@ -95,16 +98,16 @@ export class ProfileEmployeeController extends Controller {
|
|||
citizenIdDigits[11] * 2;
|
||||
const calStp2 = cal % 11;
|
||||
let chkDigit = 11 - calStp2;
|
||||
if(chkDigit === 10){
|
||||
if (chkDigit === 10) {
|
||||
chkDigit = 1;
|
||||
}else if(chkDigit === 11){
|
||||
} else if (chkDigit === 11) {
|
||||
chkDigit = chkDigit % 10;
|
||||
}
|
||||
// else if(chkDigit === 11){
|
||||
// chkDigit = cal % 10;
|
||||
// }
|
||||
|
||||
if(citizenIdDigits[12] !== chkDigit){
|
||||
|
||||
if (citizenIdDigits[12] !== chkDigit) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
||||
}
|
||||
}
|
||||
|
|
@ -155,7 +158,10 @@ export class ProfileEmployeeController extends Controller {
|
|||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลประเภทตำแหน่งนี้");
|
||||
}
|
||||
if (body.citizenId && body.citizenId.length !== 13) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "กรุณากรอกข้อมูลรหัสบัตรประจำตัวประชาชนให้ครบ 13 หลัก");
|
||||
throw new HttpError(
|
||||
HttpStatus.NOT_FOUND,
|
||||
"กรุณากรอกข้อมูลรหัสบัตรประจำตัวประชาชนให้ครบ 13 หลัก",
|
||||
);
|
||||
}
|
||||
|
||||
if (body.citizenId) {
|
||||
|
|
@ -175,16 +181,16 @@ export class ProfileEmployeeController extends Controller {
|
|||
citizenIdDigits[11] * 2;
|
||||
const calStp2 = cal % 11;
|
||||
let chkDigit = 11 - calStp2;
|
||||
if(chkDigit === 10){
|
||||
if (chkDigit === 10) {
|
||||
chkDigit = 1;
|
||||
}else if(chkDigit === 11){
|
||||
} else if (chkDigit === 11) {
|
||||
chkDigit = chkDigit % 10;
|
||||
}
|
||||
// else if(chkDigit === 11){
|
||||
// chkDigit = cal % 10;
|
||||
// }
|
||||
|
||||
if(citizenIdDigits[12] !== chkDigit){
|
||||
|
||||
if (citizenIdDigits[12] !== chkDigit) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง");
|
||||
}
|
||||
}
|
||||
|
|
@ -1047,7 +1053,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
.leftJoinAndSelect("employeePosMaster.orgChild3", "orgChild3")
|
||||
.leftJoinAndSelect("employeePosMaster.orgChild4", "orgChild4")
|
||||
.leftJoinAndSelect("employeePosMaster.positions", "positions")
|
||||
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
||||
.leftJoinAndSelect("current_holder.profileSalarys", "profileSalarys")
|
||||
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||
|
|
@ -1145,9 +1151,9 @@ export class ProfileEmployeeController extends Controller {
|
|||
}
|
||||
|
||||
const amount =
|
||||
item.current_holder == null || item.current_holder.profileSalary.length == 0
|
||||
item.current_holder == null || item.current_holder.profileSalarys.length == 0
|
||||
? null
|
||||
: item.current_holder.profileSalary.sort((a: any, b: any) => b.date - a.date)[0].amount;
|
||||
: item.current_holder.profileSalarys.sort((a: any, b: any) => b.date - a.date)[0].amount;
|
||||
let datePeriodStart = new Date(
|
||||
`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, "0")}-${String(new Date().getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ import {
|
|||
import { AppDataSource } from "../database/data-source";
|
||||
import {
|
||||
CreateProfileSalaryEmployee,
|
||||
ProfileSalaryEmployee,
|
||||
ProfileSalary,
|
||||
UpdateProfileSalaryEmployee,
|
||||
} from "../entities/ProfileSalaryEmployee";
|
||||
} from "../entities/ProfileSalary";
|
||||
import HttpSuccess from "../interfaces/http-success";
|
||||
import HttpStatus from "../interfaces/http-status";
|
||||
import HttpError from "../interfaces/http-error";
|
||||
|
|
@ -31,13 +31,13 @@ import { LessThan, MoreThan } from "typeorm";
|
|||
@Security("bearerAuth")
|
||||
export class ProfileSalaryEmployeeController extends Controller {
|
||||
private profileRepo = AppDataSource.getRepository(ProfileEmployee);
|
||||
private salaryRepo = AppDataSource.getRepository(ProfileSalaryEmployee);
|
||||
private salaryRepo = AppDataSource.getRepository(ProfileSalary);
|
||||
private salaryHistoryRepo = AppDataSource.getRepository(ProfileSalaryHistory);
|
||||
|
||||
@Get("{profileId}")
|
||||
public async getSalary(@Path() profileId: string) {
|
||||
const record = await this.salaryRepo.find({
|
||||
where: { profileId: profileId },
|
||||
where: { profileEmployeeId: profileId },
|
||||
order: { order: "ASC" },
|
||||
});
|
||||
return new HttpSuccess(record);
|
||||
|
|
@ -56,22 +56,22 @@ export class ProfileSalaryEmployeeController extends Controller {
|
|||
@Request() req: RequestWithUser,
|
||||
@Body() body: CreateProfileSalaryEmployee,
|
||||
) {
|
||||
if (!body.profileId) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "กรุณากรอก profileId");
|
||||
if (!body.profileEmployeeId) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "กรุณากรอก profileEmployeeId");
|
||||
}
|
||||
|
||||
const profile = await this.profileRepo.findOneBy({ id: body.profileId });
|
||||
const profile = await this.profileRepo.findOneBy({ id: body.profileEmployeeId });
|
||||
|
||||
if (!profile) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||
}
|
||||
|
||||
const dest_item = await this.salaryRepo.findOne({
|
||||
where: { profileId: body.profileId },
|
||||
where: { profileId: body.profileEmployeeId },
|
||||
order: { order: "DESC" },
|
||||
});
|
||||
|
||||
const data = new ProfileSalaryEmployee();
|
||||
const data = new ProfileSalary();
|
||||
|
||||
const meta = {
|
||||
order: dest_item == null ? 1 : dest_item.order + 1,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { EntityBase } from "./base/Base";
|
|||
import { EmployeePosLevel } from "./EmployeePosLevel";
|
||||
import { EmployeePosType } from "./EmployeePosType";
|
||||
import { EmployeePosMaster } from "./EmployeePosMaster";
|
||||
import { ProfileSalaryEmployee } from "./ProfileSalaryEmployee";
|
||||
import { ProfileSalary } from "./ProfileSalary";
|
||||
import { ProfileCertificate } from "./ProfileCertificate";
|
||||
import { ProfileTraining } from "./ProfileTraining";
|
||||
import { ProfileInsignia } from "./ProfileInsignia";
|
||||
|
|
@ -236,8 +236,8 @@ export class ProfileEmployee extends EntityBase {
|
|||
@OneToMany(() => EmployeePosMaster, (v) => v.next_holder)
|
||||
next_holders: EmployeePosMaster[];
|
||||
|
||||
@OneToMany(() => ProfileSalaryEmployee, (v) => v.profile)
|
||||
profileSalary: ProfileSalaryEmployee[];
|
||||
@OneToMany(() => ProfileSalary, (v) => v.profile)
|
||||
profileSalarys: ProfileSalary[];
|
||||
|
||||
@OneToMany(() => ProfileCertificate, (v) => v.profileEmployee)
|
||||
profileCertificates: ProfileCertificate[];
|
||||
|
|
|
|||
|
|
@ -175,9 +175,26 @@ export class CreateProfileSalaryEmployee {
|
|||
mouthSalaryAmount?: Double | null;
|
||||
posNo: string | null;
|
||||
position: string | null;
|
||||
positionLine: string | null;
|
||||
positionPathSide: string | null;
|
||||
positionExecutive: string | null;
|
||||
// positionLine: string | null;
|
||||
// positionPathSide: string | null;
|
||||
// positionExecutive: string | null;
|
||||
positionType: string | null;
|
||||
positionLevel: string | null;
|
||||
refCommandNo: string | null;
|
||||
templateDoc: string | null;
|
||||
}
|
||||
|
||||
export class UpdateProfileSalaryEmployee {
|
||||
profileEmployeeId: string | null;
|
||||
date?: Date | null;
|
||||
amount?: Double | null;
|
||||
positionSalaryAmount?: Double | null;
|
||||
mouthSalaryAmount?: Double | null;
|
||||
posNo: string | null;
|
||||
position: string | null;
|
||||
// positionLine: string | null;
|
||||
// positionPathSide: string | null;
|
||||
// positionExecutive: string | null;
|
||||
positionType: string | null;
|
||||
positionLevel: string | null;
|
||||
refCommandNo: string | null;
|
||||
|
|
|
|||
|
|
@ -1,448 +0,0 @@
|
|||
import { Entity, Column, OneToMany, JoinColumn, ManyToOne, Double } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { ProfileSalaryEmployeeHistory } from "./ProfileSalaryEmployeeHistory";
|
||||
import { ProfileEmployee } from "./ProfileEmployee";
|
||||
|
||||
@Entity("profileSalaryEmployee")
|
||||
export class ProfileSalaryEmployee extends EntityBase {
|
||||
@Column({
|
||||
comment: "วันที่",
|
||||
type: "datetime",
|
||||
nullable: true,
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
comment: "เงินเดือนฐาน",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินประจำตำแหน่ง",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินค่าตอบแทนรายเดือน",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@Column({
|
||||
comment: "สถานะการใช้งาน",
|
||||
default: false,
|
||||
})
|
||||
isActive: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ตำแหน่ง (รายละเอียด)",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
salaryClass: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เอกสารอ้างอิง",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
salaryRef: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id เลขที่ตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
posNoId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id เลขที่ตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id สังกัด",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
ocId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ตำแหน่งทางการบริหาร",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionExecutiveId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ด้านทางการบริหาร",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionExecutiveSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionLevelId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id สายงาน",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionLineId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ด้าน/สาขา",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionPathSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ประเภทตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionTypeId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ชื่อย่อหน่วยงาน",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
organizationShortNameId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id กลุ่มงาน",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeeGroupId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ระดับชั้นงาน",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeeLevelId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeePositionId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ด้านของตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeePositionSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id เลขที่ตำแหน่งลูกจ้าง",
|
||||
default: null,
|
||||
})
|
||||
posNoEmployee: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "เอกสารอ้างอิง (ลงวันที่)",
|
||||
default: null,
|
||||
})
|
||||
refCommandDate: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เอกสารอ้างอิง (เลขที่คำสั่ง)",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
refCommandNo: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ลำดับ",
|
||||
default: null,
|
||||
})
|
||||
order: number;
|
||||
|
||||
// @Column({
|
||||
// comment: "เลขที่คำสั่ง",
|
||||
// type: "text",
|
||||
// })
|
||||
// commandNo: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทคำสั่ง",
|
||||
type: "text",
|
||||
})
|
||||
commandTypeName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทตำแหน่งกรณีพิเศษ",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
salaryStatus: string;
|
||||
|
||||
@OneToMany(
|
||||
() => ProfileSalaryEmployeeHistory,
|
||||
(profileSalaryHistory) => profileSalaryHistory.histories,
|
||||
)
|
||||
profileSalaryHistories: ProfileSalaryEmployeeHistory[];
|
||||
|
||||
@ManyToOne(() => ProfileEmployee, (profile) => profile.profileSalary)
|
||||
@JoinColumn({ name: "profileId" })
|
||||
profile: ProfileEmployee;
|
||||
}
|
||||
|
||||
export class CreateProfileSalaryEmployee {
|
||||
@Column({
|
||||
type: "datetime",
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
// @Column()
|
||||
// isActive: boolean;
|
||||
|
||||
// @Column()
|
||||
// salaryClass: string | null;
|
||||
|
||||
// @Column()
|
||||
// salaryRef: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// posNoId: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionId: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// ocId: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionExecutiveId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionExecutiveSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLineId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionPathSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionTypeId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// organizationShortNameId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeGroupId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionSideId : string | null;
|
||||
|
||||
// @Column()
|
||||
// posNoEmployee : string | null;
|
||||
|
||||
// @Column()
|
||||
// refCommandDate: Date | null;
|
||||
|
||||
// @Column()
|
||||
// refCommandNo: string | null;
|
||||
|
||||
// @Column()
|
||||
// order: number | null;
|
||||
|
||||
// @Column()
|
||||
// commandNo: string;
|
||||
|
||||
// @Column()
|
||||
// commandTypeName: string;
|
||||
|
||||
// @Column()
|
||||
// salaryStatus: string | null;
|
||||
}
|
||||
|
||||
export class UpdateProfileSalaryEmployee {
|
||||
@Column({
|
||||
type: "datetime",
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
// @Column()
|
||||
// isActive: boolean;
|
||||
|
||||
// @Column()
|
||||
// salaryClass: string;
|
||||
|
||||
// @Column()
|
||||
// salaryRef: string;
|
||||
|
||||
// @Column("uuid")
|
||||
// posNoId: string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionId: string;
|
||||
|
||||
// @Column("uuid")
|
||||
// ocId: string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionExecutiveId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionExecutiveSideId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLevelId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLineId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionPathSideId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionTypeId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// organizationShortNameId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeGroupId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeLevelId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionId : string;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionSideId : string;
|
||||
|
||||
// @Column()
|
||||
// posNoEmployee : string;
|
||||
|
||||
// @Column()
|
||||
// refCommandDate: Date;
|
||||
|
||||
// @Column()
|
||||
// refCommandNo: string;
|
||||
|
||||
// @Column()
|
||||
// order: number;
|
||||
|
||||
// @Column()
|
||||
// commandNo: string;
|
||||
|
||||
// @Column()
|
||||
// commandTypeName: string;
|
||||
|
||||
// @Column()
|
||||
// salaryStatus: string;
|
||||
}
|
||||
|
|
@ -1,440 +0,0 @@
|
|||
import { Entity, Column, JoinColumn, ManyToOne, Double } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { ProfileSalaryEmployee } from "./ProfileSalaryEmployee";
|
||||
|
||||
@Entity("profileSalaryEmployeeHistory")
|
||||
export class ProfileSalaryEmployeeHistory extends EntityBase {
|
||||
@Column({
|
||||
comment: "วันที่",
|
||||
type: "datetime",
|
||||
nullable: true,
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
comment: "เงินเดือนฐาน",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินประจำตำแหน่ง",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
comment: "เงินค่าตอบแทนรายเดือน",
|
||||
default: 0,
|
||||
nullable: true,
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@Column({
|
||||
comment: "สถานะการใช้งาน",
|
||||
default: false,
|
||||
})
|
||||
isActive: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ตำแหน่ง (รายละเอียด)",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
salaryClass: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เอกสารอ้างอิง",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
salaryRef: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id เลขที่ตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
posNoId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id เลขที่ตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id สังกัด",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
ocId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ตำแหน่งทางการบริหาร",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionExecutiveId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ด้านทางการบริหาร",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionExecutiveSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionLevelId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id สายงาน",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionLineId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ด้าน/สาขา",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionPathSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ประเภทตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionTypeId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ชื่อย่อหน่วยงาน",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
organizationShortNameId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id กลุ่มงาน",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeeGroupId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ระดับชั้นงาน",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeeLevelId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeePositionId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id ด้านของตำแหน่ง",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
positionEmployeePositionSideId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "Id เลขที่ตำแหน่งลูกจ้าง",
|
||||
default: null,
|
||||
})
|
||||
posNoEmployee: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "เอกสารอ้างอิง (ลงวันที่)",
|
||||
default: null,
|
||||
})
|
||||
refCommandDate: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เอกสารอ้างอิง (เลขที่คำสั่ง)",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
refCommandNo: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ลำดับ",
|
||||
default: null,
|
||||
})
|
||||
order: number;
|
||||
|
||||
@Column({
|
||||
comment: "เลขที่คำสั่ง",
|
||||
type: "text",
|
||||
})
|
||||
commandNo: string;
|
||||
|
||||
@Column({
|
||||
comment: "ประเภทคำสั่ง",
|
||||
type: "text",
|
||||
})
|
||||
commandTypeName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทตำแหน่งกรณีพิเศษ",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
salaryStatus: string;
|
||||
|
||||
@ManyToOne(() => ProfileSalaryEmployee, (profileSalary) => profileSalary.profileSalaryHistories)
|
||||
@JoinColumn({ name: "profileSalaryId" })
|
||||
histories: ProfileSalaryEmployee;
|
||||
}
|
||||
|
||||
export class CreateProfileSalaryEmployeeHistory {
|
||||
@Column({
|
||||
type: "datetime",
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
// @Column()
|
||||
// isActive: boolean;
|
||||
|
||||
// @Column()
|
||||
// salaryClass: string | null;
|
||||
|
||||
// @Column()
|
||||
// salaryRef: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// posNoId: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionId: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// ocId: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionExecutiveId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionExecutiveSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLineId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionPathSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionTypeId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// organizationShortNameId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeGroupId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionSideId : string | null;
|
||||
|
||||
// @Column()
|
||||
// posNoEmployee : string | null;
|
||||
|
||||
// @Column()
|
||||
// refCommandDate: Date | null;
|
||||
|
||||
// @Column()
|
||||
// refCommandNo: string | null;
|
||||
|
||||
// @Column()
|
||||
// order: number | null;
|
||||
|
||||
// @Column()
|
||||
// commandNo: string;
|
||||
|
||||
// @Column()
|
||||
// commandTypeName: string;
|
||||
|
||||
// @Column()
|
||||
// salaryStatus: string | null;
|
||||
}
|
||||
|
||||
export class UpdateProfileSalaryEmployeeHistory {
|
||||
@Column({
|
||||
type: "datetime",
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
amount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
positionSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
// @Column()
|
||||
// isActive: boolean;
|
||||
|
||||
// @Column()
|
||||
// salaryClass: string | null;
|
||||
|
||||
// @Column()
|
||||
// salaryRef: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// posNoId: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionId: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// ocId: string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionExecutiveId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionExecutiveSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionLineId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionPathSideId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionTypeId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// organizationShortNameId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeGroupId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeeLevelId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionId : string | null;
|
||||
|
||||
// @Column("uuid")
|
||||
// positionEmployeePositionSideId : string | null;
|
||||
|
||||
// @Column()
|
||||
// posNoEmployee : string | null;
|
||||
|
||||
// @Column()
|
||||
// refCommandDate: Date | null;
|
||||
|
||||
// @Column()
|
||||
// refCommandNo: string | null;
|
||||
|
||||
// @Column()
|
||||
// order: number | null;
|
||||
|
||||
// @Column()
|
||||
// commandNo: string;
|
||||
|
||||
// @Column()
|
||||
// commandTypeName: string;
|
||||
|
||||
// @Column()
|
||||
// salaryStatus: string | null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue