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
|
|
@ -70,6 +70,7 @@ import { deleteUser } from "../keycloak";
|
|||
import { ProfileSalaryHistory } from "../entities/ProfileSalaryHistory";
|
||||
import { getTopDegrees } from "../services/PositionService";
|
||||
import HttpStatusCode from "../interfaces/http-status";
|
||||
import { PostRetireToExprofile } from "./ExRetirementController";
|
||||
@Route("api/v1/org/profile-temp")
|
||||
@Tags("ProfileEmployee")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -3547,6 +3548,41 @@ export class ProfileEmployeeTempController 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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue