From 191ca586c587a796f5a93468a4a7090ce9e71f56 Mon Sep 17 00:00:00 2001 From: Bright Date: Thu, 25 Sep 2025 18:07:18 +0700 Subject: [PATCH] =?UTF-8?q?API=20=E0=B8=AD=E0=B8=B1=E0=B8=9E=E0=B9=80?= =?UTF-8?q?=E0=B8=94=E0=B8=97=E0=B8=AA=E0=B8=96=E0=B8=B2=E0=B8=99=E0=B8=B0?= =?UTF-8?q?=20CANCEL=20=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88?= =?UTF-8?q?=E0=B8=87=E0=B8=A2=E0=B8=81=E0=B9=80=E0=B8=A5=E0=B8=B4=E0=B8=81?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD?= =?UTF-8?q?=E0=B8=81,=20=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88?= =?UTF-8?q?=E0=B8=87=E0=B8=A2=E0=B8=81=E0=B9=80=E0=B8=A5=E0=B8=B4=E0=B8=81?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD?= =?UTF-8?q?=E0=B8=81=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=87=20#1409?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 8046056a..04de1aef 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -3012,6 +3012,29 @@ export class CommandController extends Controller { return new HttpSuccess(_data); } + /** + * API อัพเดทสถานะ CANCEL คำสั่งยกเลิกการลาออก, คำสั่งยกเลิกการลาออกลูกจ้าง + * + * @summary API อัพเดทสถานะ CANCEL คำสั่งยกเลิกการลาออก, คำสั่งยกเลิกการลาออกลูกจ้าง + * + */ + @Post("cancel-resign") + public async command41Excecute( + @Request() req: RequestWithUser, + @Body() + body: { + commandId: string[]; + }, + ) { + const commands = await this.commandRepository.find({ where: { id: In(body.commandId) } }); + const data = commands.map((_data) => ({ + ..._data, + status: "CANCEL", + })); + await this.commandRepository.save(data); + return new HttpSuccess(); + } + @Post("excexute/salary-current") public async newSalaryAndUpdateCurrent( @Request() req: RequestWithUser,