หมายเหตุออกคำสั่ง

This commit is contained in:
kittapath 2024-11-04 17:12:00 +07:00
parent 4a036a5dd9
commit 999e77582e

View file

@ -1389,10 +1389,10 @@ export class CommandController extends Controller {
where: { id }, where: { id },
relations: ["commandSigns"], relations: ["commandSigns"],
order: { order: {
commandSigns:{ commandSigns: {
createdAt: "ASC" createdAt: "ASC",
} },
}, },
}); });
if (!command) { if (!command) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้"); throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้");
@ -1488,8 +1488,8 @@ export class CommandController extends Controller {
commandSign.lastUpdateFullName = request.user.name; commandSign.lastUpdateFullName = request.user.name;
commandSign.lastUpdatedAt = new Date(); commandSign.lastUpdatedAt = new Date();
await this.commandSignRepository.save(commandSign); await this.commandSignRepository.save(commandSign);
if(commandSign.isSignatory == true) if (commandSign.isSignatory == true)
await this.PutSelectPending(commandSign.commandId, { sign: true }, request); await this.PutSelectPending(commandSign.commandId, { sign: true }, request);
return new HttpSuccess(); return new HttpSuccess();
} }
@ -1517,6 +1517,8 @@ export class CommandController extends Controller {
prefix: string | null; prefix: string | null;
firstName: string | null; firstName: string | null;
lastName: string | null; lastName: string | null;
remarkVertical?: string | null;
remarkHorizontal?: string | null;
}[]; }[];
}, },
@Request() request: RequestWithUser, @Request() request: RequestWithUser,
@ -1601,6 +1603,14 @@ export class CommandController extends Controller {
let commandRecive = new CommandRecive(); let commandRecive = new CommandRecive();
commandRecive = Object.assign(new CommandRecive(), item); commandRecive = Object.assign(new CommandRecive(), item);
commandRecive.order = order; commandRecive.order = order;
// commandRecive.amount = "xxxxxxxxxx";
// commandRecive.positionSalaryAmount = "xxxxxxxxxx";
// commandRecive.mouthSalaryAmount = "xxxxxxxxxx";
commandRecive.remarkVertical =
item.remarkVertical == null ? null_ : item.remarkVertical;
commandRecive.remarkHorizontal =
item.remarkHorizontal == null ? null_ : item.remarkHorizontal;
commandRecive.order = order;
commandRecive.commandId = command.id; commandRecive.commandId = command.id;
commandRecive.createdUserId = request.user.sub; commandRecive.createdUserId = request.user.sub;
commandRecive.createdFullName = request.user.name; commandRecive.createdFullName = request.user.name;