fixed remove PostRetireToExprofile ย้ายไปรันใน cronjob ที่เดียว

This commit is contained in:
Warunee Tamkoo 2026-05-08 14:37:40 +07:00
parent 09fd606b86
commit 0e8808e371
5 changed files with 178 additions and 254 deletions

View file

@ -70,7 +70,6 @@ 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")
@ -3608,20 +3607,6 @@ export class ProfileEmployeeTempController extends Controller {
].filter(Boolean);
organizeName = names.join(" ");
}
PostRetireToExprofile(
request,
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,
"ถึงแก่กรรม",
);
return new HttpSuccess();
}