ส่งรายชื่อไปออกคำสั่ง C-PM-25, C-PM-26 ให้ปั๊ม commandCode #2377
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m3s

This commit is contained in:
harid 2026-04-03 15:36:25 +07:00
parent 97e5b8abc3
commit 15ac8d0514

View file

@ -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