ส่งรายชื่ออกคำสั่งวินัย เพิ่ม CommandCode, CommandId #2377
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m10s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m10s
This commit is contained in:
parent
a36ec74e84
commit
9782871c9c
1 changed files with 4 additions and 1 deletions
|
|
@ -2618,6 +2618,7 @@ export class CommandController extends Controller {
|
|||
const now = new Date();
|
||||
let command = new Command();
|
||||
let commandCode: string = "";
|
||||
let commandSysId: string = "";
|
||||
let _null: any = null;
|
||||
let userProfile: any = null;
|
||||
if (
|
||||
|
|
@ -2637,6 +2638,7 @@ export class CommandController extends Controller {
|
|||
if (!_command) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบคำสั่งนี้ในระบบ");
|
||||
}
|
||||
commandSysId = _command.commandType.commandSysId;
|
||||
commandCode = _command.commandType.code;
|
||||
command = _command;
|
||||
} else {
|
||||
|
|
@ -2651,6 +2653,7 @@ export class CommandController extends Controller {
|
|||
if (!commandType) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบประเภทคำสั่งนี้ในระบบ");
|
||||
}
|
||||
commandSysId = commandType.commandSysId;
|
||||
commandCode = commandType.code;
|
||||
command.detailHeader = commandType.detailHeader;
|
||||
command.detailBody = commandType.detailBody;
|
||||
|
|
@ -2795,7 +2798,7 @@ export class CommandController extends Controller {
|
|||
|
||||
const path = commandTypePath(commandCode);
|
||||
if (path == null) throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบประเภทคำสั่งนี้ในระบบ");
|
||||
if (!["C-PM-26", "C-PM-25"].includes(commandCode)) {
|
||||
if (commandSysId && commandSysId.toLocaleUpperCase().trim() !== "DISCIPLINE") {
|
||||
await new CallAPI()
|
||||
.PostData(request, path, {
|
||||
refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue