Merge branch 'develop' into adiDev
This commit is contained in:
commit
a86f385ebd
13 changed files with 87 additions and 26 deletions
|
|
@ -267,8 +267,8 @@ export class ProfileSalaryController extends Controller {
|
|||
},
|
||||
{ profileId: profile.id, commandCode: IsNull() },
|
||||
],
|
||||
// order: { order: "ASC" },
|
||||
order: { commandDateAffect: "ASC" },
|
||||
order: { order: "ASC" },
|
||||
// order: { commandDateAffect: "ASC" },
|
||||
});
|
||||
return new HttpSuccess(record);
|
||||
}
|
||||
|
|
@ -313,8 +313,8 @@ export class ProfileSalaryController extends Controller {
|
|||
},
|
||||
{ profileId: profileId, commandCode: IsNull() },
|
||||
],
|
||||
// order: { order: "ASC" },
|
||||
order: { commandDateAffect: "ASC" },
|
||||
order: { order: "ASC" },
|
||||
// order: { commandDateAffect: "ASC" },
|
||||
});
|
||||
return new HttpSuccess(record);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -800,27 +800,28 @@ export class WorkflowController extends Controller {
|
|||
keyword: string;
|
||||
page: number;
|
||||
pageSize: number;
|
||||
profileId?: string | null;
|
||||
},
|
||||
) {
|
||||
let userId = "";
|
||||
// if (xxx) {
|
||||
// } else {
|
||||
// const posMasterUser = await this.posMasterRepo.findOne({
|
||||
// where: {
|
||||
// orgRevision: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false },
|
||||
// current_holder: { keycloak: request.user.sub },
|
||||
// },
|
||||
// relations: ["current_holder", "current_holder.posType", "current_holder.posLevel"],
|
||||
// });
|
||||
// }
|
||||
let posMasterUser: PosMaster = new PosMaster();
|
||||
if (body.profileId) {
|
||||
posMasterUser = (await this.posMasterRepo.findOne({
|
||||
where: {
|
||||
orgRevision: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false },
|
||||
current_holderId: body.profileId,
|
||||
},
|
||||
relations: ["current_holder", "current_holder.posType", "current_holder.posLevel"],
|
||||
})) as PosMaster;
|
||||
} else {
|
||||
posMasterUser = (await this.posMasterRepo.findOne({
|
||||
where: {
|
||||
orgRevision: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false },
|
||||
current_holder: { keycloak: request.user.sub },
|
||||
},
|
||||
relations: ["current_holder", "current_holder.posType", "current_holder.posLevel"],
|
||||
})) as PosMaster;
|
||||
}
|
||||
|
||||
const posMasterUser = await this.posMasterRepo.findOne({
|
||||
where: {
|
||||
orgRevision: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false },
|
||||
current_holder: { keycloak: request.user.sub },
|
||||
},
|
||||
relations: ["current_holder", "current_holder.posType", "current_holder.posLevel"],
|
||||
});
|
||||
if (!posMasterUser || !posMasterUser.orgRootId)
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบตำแหน่งผู้ใช้งาน");
|
||||
|
||||
|
|
@ -846,10 +847,15 @@ export class WorkflowController extends Controller {
|
|||
// orgChild3Id: IsNull(),
|
||||
// orgChild4Id: IsNull(),
|
||||
};
|
||||
condition.orgChild1Id = IsNull();
|
||||
condition.orgChild2Id = IsNull();
|
||||
condition.orgChild3Id = IsNull();
|
||||
condition.orgChild4Id = IsNull();
|
||||
if (posMasterUser.orgChild4Id == null) {
|
||||
condition.orgChild4Id = IsNull();
|
||||
} else if (posMasterUser.orgChild3Id == null) {
|
||||
condition.orgChild3Id = IsNull();
|
||||
} else if (posMasterUser.orgChild2Id == null) {
|
||||
condition.orgChild2Id = IsNull();
|
||||
} else if (posMasterUser.orgChild1Id == null) {
|
||||
condition.orgChild1Id = IsNull();
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
(posMasterUser.current_holder.posType.posTypeName == "ทั่วไป" &&
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ export class CreateProfileAbility {
|
|||
dateStart: Date | null;
|
||||
dateEnd: Date | null;
|
||||
field: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export class CreateProfileAbilityEmployee {
|
||||
|
|
@ -109,6 +110,7 @@ export class CreateProfileAbilityEmployee {
|
|||
dateStart: Date | null;
|
||||
dateEnd: Date | null;
|
||||
field: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileAbility = {
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ export class CreateProfileAssistance {
|
|||
document: string | null;
|
||||
refCommandDate?: string | null;
|
||||
commandId?: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export class CreateProfileAssistanceEmployee {
|
||||
|
|
@ -120,6 +121,7 @@ export class CreateProfileAssistanceEmployee {
|
|||
document: string | null;
|
||||
refCommandDate?: string | null;
|
||||
commandId?: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileAssistance = {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,12 @@ export class ProfileCertificate extends EntityBase {
|
|||
})
|
||||
issuer: string;
|
||||
|
||||
@Column({
|
||||
comment: "แนบไฟล์เอกสาร",
|
||||
default: false,
|
||||
})
|
||||
isUpload: boolean;
|
||||
|
||||
@OneToMany(
|
||||
() => ProfileCertificateHistory,
|
||||
(profileCertificateHistory) => profileCertificateHistory.histories,
|
||||
|
|
@ -84,6 +90,7 @@ export class CreateProfileCertificate {
|
|||
certificateNo: string | null;
|
||||
certificateType: string | null;
|
||||
issuer: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export class CreateProfileEmployeeCertificate {
|
||||
|
|
@ -93,6 +100,7 @@ export class CreateProfileEmployeeCertificate {
|
|||
certificateNo: string | null;
|
||||
certificateType: string | null;
|
||||
issuer: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileCertificate = {
|
||||
|
|
@ -101,4 +109,5 @@ export type UpdateProfileCertificate = {
|
|||
certificateNo?: string | null;
|
||||
certificateType?: string | null;
|
||||
issuer?: string | null;
|
||||
isUpload?: boolean | null;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ export class ProfileCertificateHistory extends EntityBase {
|
|||
})
|
||||
issuer: string;
|
||||
|
||||
@Column({
|
||||
comment: "แนบไฟล์เอกสาร",
|
||||
default: false,
|
||||
})
|
||||
isUpload: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
|
|||
|
|
@ -70,6 +70,12 @@ export class ProfileDiscipline extends EntityBase {
|
|||
})
|
||||
unStigma: string;
|
||||
|
||||
@Column({
|
||||
comment: "แนบไฟล์เอกสาร",
|
||||
default: false,
|
||||
})
|
||||
isUpload: boolean;
|
||||
|
||||
@OneToMany(
|
||||
() => ProfileDisciplineHistory,
|
||||
(profileDisciplineHistory) => profileDisciplineHistory.histories,
|
||||
|
|
@ -93,6 +99,7 @@ export class CreateProfileDiscipline {
|
|||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
unStigma: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export class CreateProfileEmployeeDiscipline {
|
||||
|
|
@ -103,6 +110,7 @@ export class CreateProfileEmployeeDiscipline {
|
|||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
unStigma: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileDiscipline = {
|
||||
|
|
@ -113,4 +121,5 @@ export type UpdateProfileDiscipline = {
|
|||
refCommandDate?: Date | null;
|
||||
refCommandNo?: string | null;
|
||||
unStigma?: string | null;
|
||||
isUpload?: boolean | null;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -59,6 +59,12 @@ export class ProfileDisciplineHistory extends EntityBase {
|
|||
})
|
||||
unStigma: string;
|
||||
|
||||
@Column({
|
||||
comment: "แนบไฟล์เอกสาร",
|
||||
default: false,
|
||||
})
|
||||
isUpload: boolean;
|
||||
|
||||
@ManyToOne(
|
||||
() => ProfileDiscipline,
|
||||
(profileDiscipline) => profileDiscipline.profileDisciplineHistories,
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ export class CreateProfileDuty {
|
|||
reference: string | null;
|
||||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export class CreateProfileEmployeeDuty {
|
||||
|
|
@ -106,6 +107,7 @@ export class CreateProfileEmployeeDuty {
|
|||
reference: string | null;
|
||||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileDuty = {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ export class CreateProfileHonor {
|
|||
refCommandNo: string | null;
|
||||
type: string | null;
|
||||
isDate: boolean | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export class CreateProfileEmployeeHonor {
|
||||
|
|
@ -115,6 +116,7 @@ export class CreateProfileEmployeeHonor {
|
|||
refCommandNo: string | null;
|
||||
type: string | null;
|
||||
isDate: boolean | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileHonor = {
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ export class CreateProfileInsignia {
|
|||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
note: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export class CreateProfileEmployeeInsignia {
|
||||
|
|
@ -179,6 +180,7 @@ export class CreateProfileEmployeeInsignia {
|
|||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
note: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileInsignia = {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,12 @@ export class ProfileNopaid extends EntityBase {
|
|||
})
|
||||
refCommandNo: string;
|
||||
|
||||
@Column({
|
||||
comment: "แนบไฟล์เอกสาร",
|
||||
default: false,
|
||||
})
|
||||
isUpload: boolean;
|
||||
|
||||
@OneToMany(() => ProfileNopaidHistory, (profileNopaidHistory) => profileNopaidHistory.histories)
|
||||
profileNopaidHistories: ProfileNopaidHistory[];
|
||||
|
||||
|
|
@ -81,6 +87,7 @@ export class CreateProfileNopaid {
|
|||
reference: string | null;
|
||||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export class CreateProfileEmployeeNopaid {
|
||||
|
|
@ -90,6 +97,7 @@ export class CreateProfileEmployeeNopaid {
|
|||
reference: string | null;
|
||||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
isUpload?: boolean | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileNopaid = {
|
||||
|
|
@ -98,4 +106,5 @@ export type UpdateProfileNopaid = {
|
|||
reference?: string | null;
|
||||
refCommandDate?: Date | null;
|
||||
refCommandNo?: string | null;
|
||||
isUpload?: boolean | null;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ export class ProfileNopaidHistory extends EntityBase {
|
|||
})
|
||||
refCommandNo: string;
|
||||
|
||||
@Column({
|
||||
comment: "แนบไฟล์เอกสาร",
|
||||
default: false,
|
||||
})
|
||||
isUpload: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue