fix bug แก้ชื่อ
This commit is contained in:
parent
291d3199d2
commit
fcbbdbf4d1
16 changed files with 50 additions and 232 deletions
|
|
@ -60,7 +60,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
.leftJoinAndSelect("posMaster.positions", "positions")
|
.leftJoinAndSelect("posMaster.positions", "positions")
|
||||||
.leftJoinAndSelect("positions.posExecutive", "posExecutive")
|
.leftJoinAndSelect("positions.posExecutive", "posExecutive")
|
||||||
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
||||||
.leftJoinAndSelect("current_holder.profileDiscipline", "profileDiscipline")
|
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
||||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||||
.where({
|
.where({
|
||||||
|
|
@ -219,7 +219,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
result: null,
|
result: null,
|
||||||
duration: null,
|
duration: null,
|
||||||
isPunish:
|
isPunish:
|
||||||
item.current_holder.profileDiscipline.filter(
|
item.current_holder.profileDisciplines.filter(
|
||||||
(x: any) =>
|
(x: any) =>
|
||||||
new Date(
|
new Date(
|
||||||
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||||
|
|
@ -278,7 +278,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
.leftJoinAndSelect("employeePosMaster.orgChild4", "orgChild4")
|
.leftJoinAndSelect("employeePosMaster.orgChild4", "orgChild4")
|
||||||
.leftJoinAndSelect("employeePosMaster.positions", "positions")
|
.leftJoinAndSelect("employeePosMaster.positions", "positions")
|
||||||
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
||||||
.leftJoinAndSelect("current_holder.profileDiscipline", "profileDiscipline")
|
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
||||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||||
.where({
|
.where({
|
||||||
|
|
@ -426,7 +426,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
result: null,
|
result: null,
|
||||||
duration: null,
|
duration: null,
|
||||||
isPunish:
|
isPunish:
|
||||||
item.current_holder.profileDiscipline.filter(
|
item.current_holder.profileDisciplines.filter(
|
||||||
(x: any) =>
|
(x: any) =>
|
||||||
new Date(
|
new Date(
|
||||||
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ export class ProfileController extends Controller {
|
||||||
@Request() request: RequestWithUser,
|
@Request() request: RequestWithUser,
|
||||||
@Body() body: CreateProfileAllFields,
|
@Body() body: CreateProfileAllFields,
|
||||||
) {
|
) {
|
||||||
const profileExist = await this.profileRepo.findOneBy({ citizenId: body.citizenId })
|
const profileExist = await this.profileRepo.findOneBy({ citizenId: body.citizenId });
|
||||||
if (profileExist) {
|
if (profileExist) {
|
||||||
return new HttpSuccess(profileExist.id);
|
return new HttpSuccess(profileExist.id);
|
||||||
}
|
}
|
||||||
|
|
@ -755,11 +755,11 @@ export class ProfileController extends Controller {
|
||||||
? null
|
? null
|
||||||
: profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id);
|
: profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id);
|
||||||
|
|
||||||
const position = await this.positionRepository.findOne({
|
const position = await this.positionRepository.findOne({
|
||||||
relations: ["posExecutive"],
|
relations: ["posExecutive"],
|
||||||
where: {
|
where: {
|
||||||
posMasterId: posMaster?.id
|
posMasterId: posMaster?.id,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const _profile: any = {
|
const _profile: any = {
|
||||||
|
|
@ -777,15 +777,16 @@ export class ProfileController extends Controller {
|
||||||
posTypeName: profile.posType == null ? null : profile.posType.posTypeName,
|
posTypeName: profile.posType == null ? null : profile.posType.posTypeName,
|
||||||
posTypeRank: profile.posType == null ? null : profile.posType.posTypeRank,
|
posTypeRank: profile.posType == null ? null : profile.posType.posTypeRank,
|
||||||
posTypeId: profile.posType == null ? null : profile.posType.id,
|
posTypeId: profile.posType == null ? null : profile.posType.id,
|
||||||
posExecutiveName: position == null || position.posExecutive == null
|
posExecutiveName:
|
||||||
? null
|
position == null || position.posExecutive == null
|
||||||
: position.posExecutive.posExecutiveName,
|
? null
|
||||||
posExecutivePriority: position == null || position.posExecutive == null
|
: position.posExecutive.posExecutiveName,
|
||||||
? null
|
posExecutivePriority:
|
||||||
: position.posExecutive.posExecutivePriority,
|
position == null || position.posExecutive == null
|
||||||
posExecutiveId: position == null || position.posExecutive == null
|
? null
|
||||||
? null
|
: position.posExecutive.posExecutivePriority,
|
||||||
: position.posExecutive.id,
|
posExecutiveId:
|
||||||
|
position == null || position.posExecutive == null ? null : position.posExecutive.id,
|
||||||
rootId:
|
rootId:
|
||||||
profile.current_holders == null ||
|
profile.current_holders == null ||
|
||||||
profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.orgRoot ==
|
profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.orgRoot ==
|
||||||
|
|
@ -1725,7 +1726,7 @@ export class ProfileController extends Controller {
|
||||||
.leftJoinAndSelect("posMaster.positions", "positions")
|
.leftJoinAndSelect("posMaster.positions", "positions")
|
||||||
.leftJoinAndSelect("positions.posExecutive", "posExecutive")
|
.leftJoinAndSelect("positions.posExecutive", "posExecutive")
|
||||||
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
||||||
.leftJoinAndSelect("current_holder.profileDiscipline", "profileDiscipline")
|
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
||||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||||
.where((qb) => {
|
.where((qb) => {
|
||||||
|
|
@ -1886,7 +1887,7 @@ export class ProfileController extends Controller {
|
||||||
result: null,
|
result: null,
|
||||||
duration: null,
|
duration: null,
|
||||||
isPunish:
|
isPunish:
|
||||||
item.current_holder.profileDiscipline.filter(
|
item.current_holder.profileDisciplines.filter(
|
||||||
(x: any) =>
|
(x: any) =>
|
||||||
new Date(
|
new Date(
|
||||||
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||||
|
|
@ -1933,14 +1934,14 @@ export class ProfileController extends Controller {
|
||||||
const posMaster = await this.posMasterRepo.findOne({
|
const posMaster = await this.posMasterRepo.findOne({
|
||||||
where: {
|
where: {
|
||||||
current_holderId: profile.id,
|
current_holderId: profile.id,
|
||||||
orgRevisionId: revisionId
|
orgRevisionId: revisionId,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
const position = await this.positionRepository.findOne({
|
const position = await this.positionRepository.findOne({
|
||||||
relations: ["posExecutive"],
|
relations: ["posExecutive"],
|
||||||
where: {
|
where: {
|
||||||
posMasterId: posMaster?.id
|
posMasterId: posMaster?.id,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const _profile = {
|
const _profile = {
|
||||||
|
|
@ -1957,15 +1958,16 @@ export class ProfileController extends Controller {
|
||||||
posTypeName: profile.posType == null ? null : profile.posType.posTypeName,
|
posTypeName: profile.posType == null ? null : profile.posType.posTypeName,
|
||||||
posTypeRank: profile.posType == null ? null : profile.posType.posTypeRank,
|
posTypeRank: profile.posType == null ? null : profile.posType.posTypeRank,
|
||||||
posTypeId: profile.posType == null ? null : profile.posType.id,
|
posTypeId: profile.posType == null ? null : profile.posType.id,
|
||||||
posExecutiveName: position == null || position.posExecutive == null
|
posExecutiveName:
|
||||||
? null
|
position == null || position.posExecutive == null
|
||||||
: position.posExecutive.posExecutiveName,
|
? null
|
||||||
posExecutivePriority: position == null || position.posExecutive == null
|
: position.posExecutive.posExecutiveName,
|
||||||
? null
|
posExecutivePriority:
|
||||||
: position.posExecutive.posExecutivePriority,
|
position == null || position.posExecutive == null
|
||||||
posExecutiveId: position == null || position.posExecutive == null
|
? null
|
||||||
? null
|
: position.posExecutive.posExecutivePriority,
|
||||||
: position.posExecutive.id,
|
posExecutiveId:
|
||||||
|
position == null || position.posExecutive == null ? null : position.posExecutive.id,
|
||||||
rootId:
|
rootId:
|
||||||
profile.current_holders == null ||
|
profile.current_holders == null ||
|
||||||
profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null ||
|
profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null ||
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ export class ProfileDisciplineController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete("{disciplineId}")
|
@Delete("{disciplineId}")
|
||||||
public async deleteTraning(@Path() disciplineId: string) {
|
public async deleteDiscipline(@Path() disciplineId: string) {
|
||||||
await this.disciplineHistoryRepository.delete({
|
await this.disciplineHistoryRepository.delete({
|
||||||
profileDisciplineId: disciplineId,
|
profileDisciplineId: disciplineId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ export class ProfileDisciplineEmployeeController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete("{disciplineId}")
|
@Delete("{disciplineId}")
|
||||||
public async deleteTraning(@Path() disciplineId: string) {
|
public async deleteDiscipline(@Path() disciplineId: string) {
|
||||||
await this.disciplineHistoryRepository.delete({
|
await this.disciplineHistoryRepository.delete({
|
||||||
profileDisciplineId: disciplineId,
|
profileDisciplineId: disciplineId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ export class ProfileDutyController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete("{dutyId}")
|
@Delete("{dutyId}")
|
||||||
public async deleteTraning(@Path() dutyId: string) {
|
public async deleteDuty(@Path() dutyId: string) {
|
||||||
await this.dutyHistoryRepository.delete({
|
await this.dutyHistoryRepository.delete({
|
||||||
profileDutyId: dutyId,
|
profileDutyId: dutyId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ export class ProfileDutyEmployeeController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete("{dutyId}")
|
@Delete("{dutyId}")
|
||||||
public async deleteTraning(@Path() dutyId: string) {
|
public async deleteDuty(@Path() dutyId: string) {
|
||||||
await this.dutyHistoryRepository.delete({
|
await this.dutyHistoryRepository.delete({
|
||||||
profileDutyId: dutyId,
|
profileDutyId: dutyId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -975,7 +975,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
.leftJoinAndSelect("employeePosMaster.orgChild4", "orgChild4")
|
.leftJoinAndSelect("employeePosMaster.orgChild4", "orgChild4")
|
||||||
.leftJoinAndSelect("employeePosMaster.positions", "positions")
|
.leftJoinAndSelect("employeePosMaster.positions", "positions")
|
||||||
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
||||||
.leftJoinAndSelect("current_holder.profileDiscipline", "profileDiscipline")
|
.leftJoinAndSelect("current_holder.profileDisciplines", "profileDisciplines")
|
||||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||||
.where((qb) => {
|
.where((qb) => {
|
||||||
|
|
@ -1128,7 +1128,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
result: null,
|
result: null,
|
||||||
duration: null,
|
duration: null,
|
||||||
isPunish:
|
isPunish:
|
||||||
item.current_holder.profileDiscipline.filter(
|
item.current_holder.profileDisciplines.filter(
|
||||||
(x: any) =>
|
(x: any) =>
|
||||||
new Date(
|
new Date(
|
||||||
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
`${new Date(x.date).getFullYear()}-${String(new Date(x.date).getMonth() + 1).padStart(2, "0")}-${String(new Date(x.date).getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ export class ProfileLeaveController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete("{leaveId}")
|
@Delete("{leaveId}")
|
||||||
public async deleteTraning(@Path() leaveId: string) {
|
public async deleteLeave(@Path() leaveId: string) {
|
||||||
await this.leaveHistoryRepo.delete({
|
await this.leaveHistoryRepo.delete({
|
||||||
profileLeaveId: leaveId,
|
profileLeaveId: leaveId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ export class ProfileLeaveEmployeeController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete("{leaveId}")
|
@Delete("{leaveId}")
|
||||||
public async deleteTraning(@Path() leaveId: string) {
|
public async deleteLeave(@Path() leaveId: string) {
|
||||||
await this.leaveHistoryRepo.delete({
|
await this.leaveHistoryRepo.delete({
|
||||||
profileLeaveId: leaveId,
|
profileLeaveId: leaveId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ export class ProfileOtherController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete("{otherId}")
|
@Delete("{otherId}")
|
||||||
public async deleteTraning(@Path() otherId: string) {
|
public async deleteOther(@Path() otherId: string) {
|
||||||
await this.otherHistoryRepository.delete({
|
await this.otherHistoryRepository.delete({
|
||||||
profileOtherId: otherId,
|
profileOtherId: otherId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ export class ProfileOtherEmployeeController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete("{otherId}")
|
@Delete("{otherId}")
|
||||||
public async deleteTraning(@Path() otherId: string) {
|
public async deleteOther(@Path() otherId: string) {
|
||||||
await this.otherHistoryRepository.delete({
|
await this.otherHistoryRepository.delete({
|
||||||
profileOtherId: otherId,
|
profileOtherId: otherId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import { PosMaster } from "./PosMaster";
|
||||||
import { PosLevel } from "./PosLevel";
|
import { PosLevel } from "./PosLevel";
|
||||||
import { PosType } from "./PosType";
|
import { PosType } from "./PosType";
|
||||||
import { ProfileSalary } from "./ProfileSalary";
|
import { ProfileSalary } from "./ProfileSalary";
|
||||||
import { ProfileDiscipline } from "./ProfileDiscipline";
|
|
||||||
import { ProfileCertificate } from "./ProfileCertificate";
|
import { ProfileCertificate } from "./ProfileCertificate";
|
||||||
import { ProfileEducation } from "./ProfileEducation";
|
import { ProfileEducation } from "./ProfileEducation";
|
||||||
import { ProfileTraining } from "./ProfileTraining";
|
import { ProfileTraining } from "./ProfileTraining";
|
||||||
|
|
@ -22,6 +21,7 @@ import { Province } from "./Province";
|
||||||
import { SubDistrict } from "./SubDistrict";
|
import { SubDistrict } from "./SubDistrict";
|
||||||
import { District } from "./District";
|
import { District } from "./District";
|
||||||
import { ProfileAvatar } from "./ProfileAvatar";
|
import { ProfileAvatar } from "./ProfileAvatar";
|
||||||
|
import { ProfileDiscipline } from "./ProfileDiscipline";
|
||||||
|
|
||||||
@Entity("profile")
|
@Entity("profile")
|
||||||
export class Profile extends EntityBase {
|
export class Profile extends EntityBase {
|
||||||
|
|
@ -267,7 +267,7 @@ export class Profile extends EntityBase {
|
||||||
profileSalary: ProfileSalary[];
|
profileSalary: ProfileSalary[];
|
||||||
|
|
||||||
@OneToMany(() => ProfileDiscipline, (profileDiscipline) => profileDiscipline.profile)
|
@OneToMany(() => ProfileDiscipline, (profileDiscipline) => profileDiscipline.profile)
|
||||||
profileDiscipline: ProfileDiscipline[];
|
profileDisciplines: ProfileDiscipline[];
|
||||||
|
|
||||||
@OneToMany(() => ProfileCertificate, (profileCertificate) => profileCertificate.profile)
|
@OneToMany(() => ProfileCertificate, (profileCertificate) => profileCertificate.profile)
|
||||||
profileCertificates: ProfileCertificate[];
|
profileCertificates: ProfileCertificate[];
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export class ProfileDiscipline extends EntityBase {
|
||||||
)
|
)
|
||||||
profileDisciplineHistories: ProfileDisciplineHistory[];
|
profileDisciplineHistories: ProfileDisciplineHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileDiscipline)
|
@ManyToOne(() => Profile, (profile) => profile.profileDisciplines)
|
||||||
@JoinColumn({ name: "profileId" })
|
@JoinColumn({ name: "profileId" })
|
||||||
profile: Profile;
|
profile: Profile;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,106 +0,0 @@
|
||||||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
|
||||||
import { EntityBase } from "./base/Base";
|
|
||||||
import { ProfileEmployee } from "./ProfileEmployee";
|
|
||||||
import { ProfileDisciplineEmployeeHistory } from "./ProfileDisciplineEmployeeHistory";
|
|
||||||
|
|
||||||
@Entity("profileDisciplineEmployee")
|
|
||||||
export class ProfileDisciplineEmployee extends EntityBase {
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: "datetime",
|
|
||||||
comment: "วันที่",
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 40,
|
|
||||||
comment: "ไอดีโปรไฟล์",
|
|
||||||
type: "uuid",
|
|
||||||
})
|
|
||||||
profileId: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
comment: "สถานะการใช้งาน",
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
isActive: boolean;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
comment: "ระดับความผิด",
|
|
||||||
type: "text",
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
level: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
comment: "รายละเอียด",
|
|
||||||
type: "text",
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
detail: 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: "ล้างมลทิน",
|
|
||||||
type: "text",
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
unStigma: string;
|
|
||||||
|
|
||||||
@OneToMany(
|
|
||||||
() => ProfileDisciplineEmployeeHistory,
|
|
||||||
(profileDisciplineHistory) => profileDisciplineHistory.histories,
|
|
||||||
)
|
|
||||||
profileDisciplineHistories: ProfileDisciplineEmployeeHistory[];
|
|
||||||
|
|
||||||
@ManyToOne(() => ProfileEmployee, (profile) => profile.profileDiscipline)
|
|
||||||
@JoinColumn({ name: "profileId" })
|
|
||||||
profile: ProfileEmployee;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class CreateProfileDisciplineEmployee {
|
|
||||||
@Column()
|
|
||||||
date: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
profileId: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
level: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandDate: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandNo: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
unStigma: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type UpdateProfileDisciplineEmployee = Partial<CreateProfileDisciplineEmployee>;
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
|
||||||
import { EntityBase } from "./base/Base";
|
|
||||||
import { ProfileDisciplineEmployee } from "./ProfileDisciplineEmployee";
|
|
||||||
|
|
||||||
@Entity("profileDisciplineEmployeeHistory")
|
|
||||||
export class ProfileDisciplineEmployeeHistory extends EntityBase {
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: "datetime",
|
|
||||||
comment: "วันที่",
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 40,
|
|
||||||
comment: "ล้างมลทิน",
|
|
||||||
type: "uuid",
|
|
||||||
})
|
|
||||||
profileDisciplineId: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
comment: "สถานะการใช้งาน",
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
isActive: boolean;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
comment: "ระดับความผิด",
|
|
||||||
type: "text",
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
level: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
comment: "รายละเอียด",
|
|
||||||
type: "text",
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
detail: 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: "ล้างมลทิน",
|
|
||||||
type: "text",
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
unStigma: string;
|
|
||||||
|
|
||||||
@ManyToOne(
|
|
||||||
() => ProfileDisciplineEmployee,
|
|
||||||
(profileDiscipline) => profileDiscipline.profileDisciplineHistories,
|
|
||||||
)
|
|
||||||
@JoinColumn({ name: "profileDisciplineId" })
|
|
||||||
histories: ProfileDisciplineEmployee;
|
|
||||||
}
|
|
||||||
|
|
@ -4,7 +4,6 @@ import { EmployeePosLevel } from "./EmployeePosLevel";
|
||||||
import { EmployeePosType } from "./EmployeePosType";
|
import { EmployeePosType } from "./EmployeePosType";
|
||||||
import { EmployeePosMaster } from "./EmployeePosMaster";
|
import { EmployeePosMaster } from "./EmployeePosMaster";
|
||||||
import { ProfileSalaryEmployee } from "./ProfileSalaryEmployee";
|
import { ProfileSalaryEmployee } from "./ProfileSalaryEmployee";
|
||||||
import { ProfileDisciplineEmployee } from "./ProfileDisciplineEmployee";
|
|
||||||
import { ProfileCertificate } from "./ProfileCertificate";
|
import { ProfileCertificate } from "./ProfileCertificate";
|
||||||
import { ProfileTraining } from "./ProfileTraining";
|
import { ProfileTraining } from "./ProfileTraining";
|
||||||
import { ProfileInsignia } from "./ProfileInsignia";
|
import { ProfileInsignia } from "./ProfileInsignia";
|
||||||
|
|
@ -216,9 +215,6 @@ export class ProfileEmployee extends EntityBase {
|
||||||
@OneToMany(() => ProfileSalaryEmployee, (v) => v.profile)
|
@OneToMany(() => ProfileSalaryEmployee, (v) => v.profile)
|
||||||
profileSalary: ProfileSalaryEmployee[];
|
profileSalary: ProfileSalaryEmployee[];
|
||||||
|
|
||||||
@OneToMany(() => ProfileDisciplineEmployee, (v) => v.profile)
|
|
||||||
profileDiscipline: ProfileDisciplineEmployee[];
|
|
||||||
|
|
||||||
@OneToMany(() => ProfileCertificate, (v) => v.profileEmployee)
|
@OneToMany(() => ProfileCertificate, (v) => v.profileEmployee)
|
||||||
profileCertificates: ProfileCertificate[];
|
profileCertificates: ProfileCertificate[];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue