ส่งรายชื่อไปออกคำสั่ง C-PM-25, C-PM-26 ให้ปั๊ม commandCode #2377
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m3s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m3s
This commit is contained in:
parent
97e5b8abc3
commit
15ac8d0514
1 changed files with 14 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue