fix ระบบทะเบียนประวัติ (ทุกสถานภาพ) >> เงินเดือน (ข้อมูลประเภทคำสั่งไม่แสดง) #1433
This commit is contained in:
parent
38e1f62ca5
commit
ea8d60fda0
3 changed files with 30 additions and 5 deletions
|
|
@ -632,6 +632,11 @@ export class ProfileSalaryController extends Controller {
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
};
|
};
|
||||||
const _null: any = null;
|
const _null: any = null;
|
||||||
|
if (body.commandCode && !body.commandName) {
|
||||||
|
if (body.commandCode == "7") body.commandName = "เงินพิเศษอื่น ๆ"
|
||||||
|
else if (body.commandCode == "6") body.commandName = "เลื่อนเงินเดือนกรณีอื่น ๆ"
|
||||||
|
else if (body.commandCode == "5") body.commandName = "เลื่อนเงินเดือนตามปกติ"
|
||||||
|
}
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
Object.assign(history, { ...data, id: undefined });
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
@ -706,7 +711,11 @@ export class ProfileSalaryController extends Controller {
|
||||||
await new permission().PermissionOrgUserUpdate(req, "SYS_REGISTRY_OFFICER", record.profileId);
|
await new permission().PermissionOrgUserUpdate(req, "SYS_REGISTRY_OFFICER", record.profileId);
|
||||||
const before = structuredClone(record);
|
const before = structuredClone(record);
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
|
if (body.commandCode && !body.commandName) {
|
||||||
|
if (body.commandCode == "7") body.commandName = "เงินพิเศษอื่น ๆ"
|
||||||
|
else if (body.commandCode == "6") body.commandName = "เลื่อนเงินเดือนกรณีอื่น ๆ"
|
||||||
|
else if (body.commandCode == "5") body.commandName = "เลื่อนเงินเดือนตามปกติ"
|
||||||
|
}
|
||||||
Object.assign(record, body);
|
Object.assign(record, body);
|
||||||
Object.assign(history, { ...record, id: undefined });
|
Object.assign(history, { ...record, id: undefined });
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,11 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
};
|
};
|
||||||
|
if (body.commandCode && !body.commandName) {
|
||||||
|
if (body.commandCode == "7") body.commandName = "เงินพิเศษอื่น ๆ"
|
||||||
|
else if (body.commandCode == "6") body.commandName = "เลื่อนเงินเดือนกรณีอื่น ๆ"
|
||||||
|
else if (body.commandCode == "5") body.commandName = "เลื่อนเงินเดือนตามปกติ"
|
||||||
|
}
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
Object.assign(history, { ...data, id: undefined });
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
@ -395,7 +399,11 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
);
|
);
|
||||||
const before = structuredClone(record);
|
const before = structuredClone(record);
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
|
if (body.commandCode && !body.commandName) {
|
||||||
|
if (body.commandCode == "7") body.commandName = "เงินพิเศษอื่น ๆ"
|
||||||
|
else if (body.commandCode == "6") body.commandName = "เลื่อนเงินเดือนกรณีอื่น ๆ"
|
||||||
|
else if (body.commandCode == "5") body.commandName = "เลื่อนเงินเดือนตามปกติ"
|
||||||
|
}
|
||||||
Object.assign(record, body);
|
Object.assign(record, body);
|
||||||
Object.assign(history, { ...record, id: undefined });
|
Object.assign(history, { ...record, id: undefined });
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,11 @@ export class ProfileSalaryEmployeeTempController extends Controller {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
};
|
};
|
||||||
|
if (body.commandCode && !body.commandName) {
|
||||||
|
if (body.commandCode == "7") body.commandName = "เงินพิเศษอื่น ๆ"
|
||||||
|
else if (body.commandCode == "6") body.commandName = "เลื่อนเงินเดือนกรณีอื่น ๆ"
|
||||||
|
else if (body.commandCode == "5") body.commandName = "เลื่อนเงินเดือนตามปกติ"
|
||||||
|
}
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
Object.assign(history, { ...data, id: undefined });
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
@ -150,7 +154,11 @@ export class ProfileSalaryEmployeeTempController extends Controller {
|
||||||
if (!record) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
if (!record) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||||
const before = structuredClone(record);
|
const before = structuredClone(record);
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
|
if (body.commandCode && !body.commandName) {
|
||||||
|
if (body.commandCode == "7") body.commandName = "เงินพิเศษอื่น ๆ"
|
||||||
|
else if (body.commandCode == "6") body.commandName = "เลื่อนเงินเดือนกรณีอื่น ๆ"
|
||||||
|
else if (body.commandCode == "5") body.commandName = "เลื่อนเงินเดือนตามปกติ"
|
||||||
|
}
|
||||||
Object.assign(record, body);
|
Object.assign(record, body);
|
||||||
Object.assign(history, { ...record, id: undefined });
|
Object.assign(history, { ...record, id: undefined });
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue