เปลี่ยนปีคศเป็นพศคำสั่งช่วยราชการ (:4845)

This commit is contained in:
Adisak 2026-05-05 12:02:40 +07:00
parent fd7a2af0a1
commit 8ad480baae

View file

@ -805,8 +805,8 @@ export class CommandController extends Controller {
.PostData(request, path + "/delete", {
refIds: [commandRecive.refId],
})
.then(async (res) => {})
.catch(() => {});
.then(async (res) => { })
.catch(() => { });
const commandId = commandRecive.commandId;
await this.commandReciveRepository.delete(commandRecive.id);
@ -849,8 +849,8 @@ export class CommandController extends Controller {
.PostData(request, path + "/delete", {
refIds: [commandRecive.refId],
})
.then(async (res) => {})
.catch(() => {});
.then(async (res) => { })
.catch(() => { });
const commandId = commandRecive.commandId;
await this.commandReciveRepository.delete(commandRecive.id);
@ -893,8 +893,8 @@ export class CommandController extends Controller {
.PostData(request, path + "/delete", {
refIds: [commandRecive.refId],
})
.then(async (res) => {})
.catch(() => {});
.then(async (res) => { })
.catch(() => { });
const commandId = commandRecive.commandId;
await this.commandReciveRepository.delete(commandRecive.id);
@ -1178,8 +1178,8 @@ export class CommandController extends Controller {
.PostData(request, path + "/delete", {
refIds: command.commandRecives.map((x) => x.refId),
})
.then(async (res) => {})
.catch(() => {});
.then(async (res) => { })
.catch(() => { });
await this.commandReciveRepository.delete({ commandId: command.id });
command.status = "CANCEL";
@ -1244,8 +1244,8 @@ export class CommandController extends Controller {
.PostData(request, path + "/delete", {
refIds: command.commandRecives.map((x) => x.refId),
})
.then(async (res) => {})
.catch(() => {});
.then(async (res) => { })
.catch(() => { });
await this.commandSendCCRepository.delete({ commandSendId: In(commandSend.map((x) => x.id)) });
await this.commandReciveRepository.delete({ commandId: command.id });
@ -1434,8 +1434,8 @@ export class CommandController extends Controller {
refIds: command.commandRecives.filter((x) => x.refId != null).map((x) => x.refId),
status: "WAITING",
})
.then(async (res) => {})
.catch(() => {});
.then(async (res) => { })
.catch(() => { });
await this.commandRepository.save(command);
} else {
const path = commandTypePath(command.commandType.code);
@ -1572,7 +1572,7 @@ export class CommandController extends Controller {
);
await this.profileRepository.save(profiles);
}
} catch {}
} catch { }
type = "EMPLOYEE";
try {
@ -1604,7 +1604,7 @@ export class CommandController extends Controller {
);
await this.profileEmployeeRepository.save(profiles);
}
} catch {}
} catch { }
return new HttpSuccess();
}
@ -1670,7 +1670,7 @@ export class CommandController extends Controller {
}),
);
}
} catch {}
} catch { }
type = "EMPLOYEE";
try {
@ -1727,7 +1727,7 @@ export class CommandController extends Controller {
}),
);
}
} catch {}
} catch { }
return new HttpSuccess();
}
@ -1940,7 +1940,7 @@ export class CommandController extends Controller {
.then((x) => {
res = x;
})
.catch((x) => {});
.catch((x) => { });
}
let _command;
@ -2294,7 +2294,7 @@ export class CommandController extends Controller {
.then(async (res) => {
_command = res;
})
.catch(() => {});
.catch(() => { });
let issue =
command.isBangkok == "OFFICE"
@ -2700,8 +2700,8 @@ export class CommandController extends Controller {
refIds: requestBody.persons.filter((x) => x.refId != null).map((x) => x.refId),
status: "REPORT",
})
.then(async (res) => {})
.catch(() => {});
.then(async (res) => { })
.catch(() => { });
}
else {
await new CallAPI()
@ -2711,8 +2711,8 @@ export class CommandController extends Controller {
commandTypeId: requestBody.commandTypeId,
commandCode: commandCode,
})
.then(async (res) => {})
.catch(() => {});
.then(async (res) => { })
.catch(() => { });
}
let order =
command.commandRecives == null || command.commandRecives.length <= 0
@ -3725,7 +3725,7 @@ export class CommandController extends Controller {
// อัพเดท org และ posMasterNo ตลอดไม่ต้องดัก isSit
profile.posMasterNo = getPosMasterNo(posMaster);
profile.org = getOrgFullName(posMaster);
if(!posMaster.isSit){
if (!posMaster.isSit) {
profile.posLevelId = positionNew.posLevelId;
profile.posTypeId = positionNew.posTypeId;
profile.position = positionNew.positionName;
@ -4842,7 +4842,7 @@ export class CommandController extends Controller {
agency: item.officerOrg,
dateStart: item.dateStart,
dateEnd: item.dateEnd,
commandNo: `${item.commandNo}/${item.commandYear}`,
commandNo: `${item.commandNo}/${_commandYear}`,
commandName: item.commandName,
refId: item.refId,
refCommandDate: new Date(),
@ -6927,7 +6927,8 @@ export class CommandController extends Controller {
}
},
relations: { orgRevision: true, orgRoot: true, orgChild1: true, orgChild2: true, orgChild3: true, orgChild4: true }
}); }
});
}
if (posMaster == null)
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้");
@ -7025,7 +7026,7 @@ export class CommandController extends Controller {
// อัพเดท org และ posMasterNo ตลอดไม่ต้องดัก isSit
profile.posMasterNo = getPosMasterNo(posMaster);
profile.org = getOrgFullName(posMaster);
if(!posMaster.isSit){
if (!posMaster.isSit) {
profile.posLevelId = positionNew.posLevelId;
profile.posTypeId = positionNew.posTypeId;
profile.position = positionNew.positionName;
@ -7117,8 +7118,8 @@ export class CommandController extends Controller {
prefix: avatar,
fileName: fileName,
})
.then(() => {})
.catch(() => {});
.then(() => { })
.catch(() => { });
}
}
}),
@ -8229,7 +8230,7 @@ export class CommandController extends Controller {
.then(async (res) => {
_command = res;
})
.catch(() => {});
.catch(() => { });
let issue =
command.isBangkok == "OFFICE"