ออกคำสั่งวินัย

This commit is contained in:
kittapath 2025-03-12 22:43:45 +07:00
parent cff267383b
commit acba2db63f
2 changed files with 49 additions and 40 deletions

View file

@ -3473,6 +3473,9 @@ export class CommandController extends Controller {
const dataDis = new ProfileDiscipline();
const metaDis = {
date: item.commandDateAffect,
refCommandDate: item.commandDateSign,
refCommandNo: item.commandNo,
createdUserId: req.user.sub,
createdFullName: req.user.name,
lastUpdateUserId: req.user.sub,
@ -3481,7 +3484,7 @@ export class CommandController extends Controller {
lastUpdatedAt: new Date(),
};
Object.assign(dataDis, { ...body, ...metaDis });
Object.assign(dataDis, { ...item, ...metaDis });
const historyDis = new ProfileDisciplineHistory();
Object.assign(historyDis, { ...dataDis, id: undefined });
@ -3670,8 +3673,11 @@ export class CommandController extends Controller {
};
Object.assign(dataDis, {
...body,
...item,
...metaDis,
date: item.commandDateAffect,
refCommandDate: item.commandDateSign,
refCommandNo: item.commandNo,
profileEmployeeId: item.profileId,
profileId: undefined,
});
@ -3899,8 +3905,11 @@ export class CommandController extends Controller {
};
Object.assign(dataDis, {
...body,
...item,
...metaDis,
date: item.commandDateAffect,
refCommandDate: item.commandDateSign,
refCommandNo: item.commandNo,
profileEmployeeId: item.profileId,
profileId: undefined,
});
@ -5059,7 +5068,7 @@ export class CommandController extends Controller {
commandName: body.refIds[0].commandName,
remark: body.refIds[0].remark,
};
const dataAct = new ProfileActposition();
Object.assign(dataAct, metaAct);
const historyAct = new ProfileActpositionHistory();