no message

This commit is contained in:
kittapath 2024-10-02 11:12:28 +07:00
parent 000bc2aad9
commit 1bccf8f87d

View file

@ -877,6 +877,9 @@ export class CommandController extends Controller {
commandNo: command.commandNo,
commandYear: command.commandYear,
templateDoc: command.positionDetail,
amount: x.amount,
positionSalaryAmount: x.positionSalaryAmount,
mouthSalaryAmount: x.mouthSalaryAmount,
})),
})
.then(async (res) => {})
@ -982,7 +985,7 @@ export class CommandController extends Controller {
async PostPerson(
@Body()
requestBody: {
commandTypeId?: string;
commandTypeId?: string | null;
commandNo?: string | null;
commandYear?: number | null;
commandId?: string | null;
@ -1019,6 +1022,9 @@ export class CommandController extends Controller {
command = _command;
} else {
command = Object.assign(new Command(), requestBody);
if (!requestBody.commandTypeId) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบประเภทคำสั่ง");
}
const commandType = await this.commandTypeRepository.findOne({
where: { id: requestBody.commandTypeId },
});