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