test เพิ่มฟังก์ชั่นให้ยิงไประบบ exprofile #2190
All checks were successful
Build & Deploy on Dev / build (push) Successful in 59s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 59s
This commit is contained in:
parent
38e2ec6586
commit
78778e0eb0
6 changed files with 510 additions and 152 deletions
|
|
@ -82,6 +82,7 @@ import { ProfileChildren } from "../entities/ProfileChildren";
|
|||
import { ProfileDuty } from "../entities/ProfileDuty";
|
||||
import { getTopDegrees } from "../services/PositionService";
|
||||
import { ProfileLeaveService } from "../services/ProfileLeaveService";
|
||||
import { PostRetireToExprofile } from "./ExRetirementController";
|
||||
@Route("api/v1/org/profile-employee")
|
||||
@Tags("ProfileEmployee")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -5333,6 +5334,41 @@ export class ProfileEmployeeController extends Controller {
|
|||
if (requestBody.isLeave == true) {
|
||||
await removeProfileInOrganize(profile.id, "EMPLOYEE");
|
||||
}
|
||||
let organizeName = "";
|
||||
if (orgRootRef) {
|
||||
const names = [
|
||||
orgChild4Ref?.orgChild4Name,
|
||||
orgChild3Ref?.orgChild3Name,
|
||||
orgChild2Ref?.orgChild2Name,
|
||||
orgChild1Ref?.orgChild1Name,
|
||||
orgRootRef?.orgRootName,
|
||||
].filter(Boolean);
|
||||
organizeName = names.join(" ");
|
||||
}
|
||||
await PostRetireToExprofile(
|
||||
// profile.citizenId ?? "",
|
||||
// profile.prefix ?? "",
|
||||
// profile.firstName ?? "",
|
||||
// profile.lastName ?? "",
|
||||
// requestBody.dateLeave?.getFullYear().toString() ?? "",
|
||||
// profile.position,
|
||||
// profile.posType?.posTypeName ?? "",
|
||||
// `${profile.posType?.posTypeShortName} ${profile.posLevel?.posLevelName}`,
|
||||
// requestBody.dateLeave ?? new Date(),
|
||||
// organizeName,
|
||||
// "ถึงแก่กรรม",
|
||||
"310190004095X",
|
||||
"จ.ส.อ.",
|
||||
"dev",
|
||||
"hrms",
|
||||
"2026",
|
||||
"เจ้าหน้าที่จัดเก็บรายได้",
|
||||
"อื่นๆ",
|
||||
"C 3",
|
||||
new Date(2026, 0, 1),
|
||||
"สำนักงานเขตบางกอกใหญ่",
|
||||
"เกษียณ"
|
||||
);
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
|
|
@ -5936,7 +5972,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
"current_holders.orgChild2",
|
||||
"current_holders.orgChild3",
|
||||
"current_holders.orgChild4",
|
||||
"profileSalary",
|
||||
// "profileSalary",
|
||||
"profileEducations",
|
||||
],
|
||||
order: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue