test เพิ่มฟังก์ชั่นให้ยิงไประบบ exprofile #2190
All checks were successful
Build & Deploy on Dev / build (push) Successful in 59s

This commit is contained in:
harid 2026-01-23 17:32:11 +07:00
parent 38e2ec6586
commit 78778e0eb0
6 changed files with 510 additions and 152 deletions

View file

@ -89,7 +89,7 @@ import { CommandRecive } from "../entities/CommandRecive";
import { EmployeePosMaster } from "../entities/EmployeePosMaster";
import { CreatePosMasterHistoryOfficer, getTopDegrees } from "../services/PositionService";
import { ProfileLeaveService } from "../services/ProfileLeaveService";
import { PostRetireToExprofile } from "./ExRetirementController";
@Route("api/v1/org/profile")
@Tags("Profile")
@Security("bearerAuth")
@ -8194,7 +8194,7 @@ export class ProfileController extends Controller {
"current_holders.orgChild2",
"current_holders.orgChild3",
"current_holders.orgChild4",
"profileSalary",
// "profileSalary",
"profileEducations",
"profileActpositions",
],
@ -10858,6 +10858,41 @@ export class ProfileController extends Controller {
}
await removeProfileInOrganize(profile.id, "OFFICER");
}
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.posLevel?.posLevelName ?? "",
// requestBody.dateLeave ?? new Date(),
// organizeName,
// "ถึงแก่กรรม",
"310190004095X",
"จ.ส.อ.",
"dev",
"hrms",
"2026",
"เจ้าหน้าที่จัดเก็บรายได้",
"อื่นๆ",
"C 3",
new Date(2026, 0, 1),
"สำนักงานเขตบางกอกใหญ่",
"เกษียณ"
);
return new HttpSuccess();
}