cronjob ส่งข้อมูลผู้เกษียณไปให้ระบบพ้นราชการ #2330
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m17s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m17s
This commit is contained in:
parent
e6c3e80a3d
commit
93d4857ea1
4 changed files with 175 additions and 12 deletions
|
|
@ -104,6 +104,7 @@ import { PostRetireToExprofile } from "./ExRetirementController";
|
|||
import { LeaveType } from "../entities/LeaveType";
|
||||
import { KeycloakAttributeService } from "../services/KeycloakAttributeService";
|
||||
import { reOrderCommandRecivesAndDelete } from "../services/CommandService";
|
||||
import { RetirementService } from "../services/RetirementService";
|
||||
@Route("api/v1/org/command")
|
||||
@Tags("Command")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -1608,8 +1609,7 @@ export class CommandController extends Controller {
|
|||
|
||||
return new HttpSuccess();
|
||||
}
|
||||
// @Get("XXX")
|
||||
async cronjobUpdateRetirementStatus(/*@Request() request: RequestWithUser*/) {
|
||||
async cronjobUpdateRetirementStatus() {
|
||||
const adminToken = (await getToken()) ?? "";
|
||||
const today = new Date();
|
||||
today.setUTCHours(0, 0, 0, 0);
|
||||
|
|
@ -1887,6 +1887,21 @@ export class CommandController extends Controller {
|
|||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* API ทดสอบ cronjobPostRetireToExprofile
|
||||
* @summary ทดสอบส่งข้อมูลผู้เกษียณไปยังระบบพ้นราชการ (Exprofile)
|
||||
*/
|
||||
@Get("cronjob/cronjobPostRetireToExprofile")
|
||||
async runCronjobPostRetireToExprofile() {
|
||||
try {
|
||||
const retirementService = new RetirementService();
|
||||
const result = await retirementService.cronjobPostRetireToExprofile();
|
||||
return new HttpSuccess(result);
|
||||
} catch (error: any) {
|
||||
throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, error.message || "เกิดข้อผิดพลาด");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* API รายละเอียดรายการคำสั่ง tab4 คำสั่ง
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue