From 15ac8d05141e50c00b239acdc815a78b2f41523c Mon Sep 17 00:00:00 2001 From: harid Date: Fri, 3 Apr 2026 15:36:25 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AA=E0=B9=88=E0=B8=87=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=A2=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B9=84=E0=B8=9B?= =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1?= =?UTF-8?q?=E0=B9=88=E0=B8=87=20C-PM-25,=20C-PM-26=20=E0=B9=83=E0=B8=AB?= =?UTF-8?q?=E0=B9=89=E0=B8=9B=E0=B8=B1=E0=B9=8A=E0=B8=A1=20commandCode=20#?= =?UTF-8?q?2377?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 4711ca2a..da0ed3fe 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -2693,13 +2693,26 @@ export class CommandController extends Controller { const path = commandTypePath(commandCode); if (path == null) throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบประเภทคำสั่งนี้ในระบบ"); - await new CallAPI() + if (!["C-PM-26", "C-PM-25"].includes(commandCode)) { + await new CallAPI() .PostData(request, path, { refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId), status: "REPORT", }) .then(async (res) => {}) .catch(() => {}); + } + else { + await new CallAPI() + .PostData(request, path, { + refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId), + status: "REPORT", + commandTypeId: requestBody.commandTypeId, + commandCode: commandCode, + }) + .then(async (res) => {}) + .catch(() => {}); + } let order = command.commandRecives == null || command.commandRecives.length <= 0 ? 0