ส่งรายชื่อไปออกคำสั่ง C-PM-25, C-PM-26 ให้ปั๊ม commandCode #2377
This commit is contained in:
parent
97e5b8abc3
commit
66d776e7eb
1 changed files with 14 additions and 1 deletions
|
|
@ -2693,13 +2693,26 @@ export class CommandController extends Controller {
|
||||||
|
|
||||||
const path = commandTypePath(commandCode);
|
const path = commandTypePath(commandCode);
|
||||||
if (path == null) throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบประเภทคำสั่งนี้ในระบบ");
|
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, {
|
.PostData(request, path, {
|
||||||
refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId),
|
refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId),
|
||||||
status: "REPORT",
|
status: "REPORT",
|
||||||
})
|
})
|
||||||
.then(async (res) => {})
|
.then(async (res) => {})
|
||||||
.catch(() => {});
|
.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 =
|
let order =
|
||||||
command.commandRecives == null || command.commandRecives.length <= 0
|
command.commandRecives == null || command.commandRecives.length <= 0
|
||||||
? 0
|
? 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue