fixed
This commit is contained in:
parent
190a5d665a
commit
d4be644d41
4 changed files with 77 additions and 77 deletions
|
|
@ -7052,16 +7052,16 @@ export class ImportDataController extends Controller {
|
||||||
salaryTemp.lastUpdateUserId = req.user?.sub || "";
|
salaryTemp.lastUpdateUserId = req.user?.sub || "";
|
||||||
salaryTemp.lastUpdateFullName = req.user?.name || "System Administrator";
|
salaryTemp.lastUpdateFullName = req.user?.name || "System Administrator";
|
||||||
|
|
||||||
// 12,15,16 isGovernment = false & dateGovernment = salaryTemp.commandDateAffect
|
// // 12,15,16 isGovernment = false & dateGovernment = salaryTemp.commandDateAffect
|
||||||
if (["12", "15", "16"].includes(salaryTemp.commandCode ?? "")) {
|
// if (["12", "15", "16"].includes(salaryTemp.commandCode ?? "")) {
|
||||||
salaryTemp.isGovernment = false;
|
// salaryTemp.isGovernment = false;
|
||||||
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
|
// salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
|
||||||
}
|
// }
|
||||||
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = salaryTemp.commandDateAffect
|
// // 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = salaryTemp.commandDateAffect
|
||||||
else if (["1", "2", "3", "4", "10", "11", "20"].includes(salaryTemp.commandCode ?? "")) {
|
// else if (["1", "2", "3", "4", "10", "11", "20"].includes(salaryTemp.commandCode ?? "")) {
|
||||||
salaryTemp.isGovernment = true;
|
// salaryTemp.isGovernment = true;
|
||||||
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
|
// salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
|
||||||
}
|
// }
|
||||||
|
|
||||||
salaryTemps.push(salaryTemp);
|
salaryTemps.push(salaryTemp);
|
||||||
}
|
}
|
||||||
|
|
@ -7312,16 +7312,16 @@ export class ImportDataController extends Controller {
|
||||||
salaryTemp.lastUpdateUserId = req.user?.sub || "";
|
salaryTemp.lastUpdateUserId = req.user?.sub || "";
|
||||||
salaryTemp.lastUpdateFullName = req.user?.name || "System Administrator";
|
salaryTemp.lastUpdateFullName = req.user?.name || "System Administrator";
|
||||||
|
|
||||||
// 12,15,16 isGovernment = false & dateGovernment = salaryTemp.commandDateAffect
|
// // 12,15,16 isGovernment = false & dateGovernment = salaryTemp.commandDateAffect
|
||||||
if (["12", "15", "16"].includes(salaryTemp.commandCode ?? "")) {
|
// if (["12", "15", "16"].includes(salaryTemp.commandCode ?? "")) {
|
||||||
salaryTemp.isGovernment = false;
|
// salaryTemp.isGovernment = false;
|
||||||
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
|
// salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
|
||||||
}
|
// }
|
||||||
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = salaryTemp.commandDateAffect
|
// // 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = salaryTemp.commandDateAffect
|
||||||
else if (["1", "2", "3", "4", "10", "11", "20"].includes(salaryTemp.commandCode ?? "")) {
|
// else if (["1", "2", "3", "4", "10", "11", "20"].includes(salaryTemp.commandCode ?? "")) {
|
||||||
salaryTemp.isGovernment = true;
|
// salaryTemp.isGovernment = true;
|
||||||
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
|
// salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
|
||||||
}
|
// }
|
||||||
salaryTemps.push(salaryTemp);
|
salaryTemps.push(salaryTemp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -919,16 +919,16 @@ export class ProfileSalaryController extends Controller {
|
||||||
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
|
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
|
||||||
}
|
}
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
// 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
// // 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
||||||
if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
// if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
||||||
data.isGovernment = false;
|
// data.isGovernment = false;
|
||||||
if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
||||||
}
|
// }
|
||||||
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
// // 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
||||||
else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
// else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
||||||
data.isGovernment = true;
|
// data.isGovernment = true;
|
||||||
if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
||||||
}
|
// }
|
||||||
|
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
Object.assign(history, { ...data, id: undefined });
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
@ -1054,16 +1054,16 @@ export class ProfileSalaryController extends Controller {
|
||||||
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
|
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
|
||||||
}
|
}
|
||||||
Object.assign(record, body);
|
Object.assign(record, body);
|
||||||
// 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
// // 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
||||||
if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
// if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
||||||
record.isGovernment = false;
|
// record.isGovernment = false;
|
||||||
if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect;
|
||||||
}
|
// }
|
||||||
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
// // 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
||||||
else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
// else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
||||||
record.isGovernment = true;
|
// record.isGovernment = true;
|
||||||
if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect;
|
||||||
}
|
// }
|
||||||
|
|
||||||
Object.assign(history, { ...record, id: undefined });
|
Object.assign(history, { ...record, id: undefined });
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -403,16 +403,16 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
|
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
|
||||||
}
|
}
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
// 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
// // 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
||||||
if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
// if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
||||||
data.isGovernment = false;
|
// data.isGovernment = false;
|
||||||
if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
||||||
}
|
// }
|
||||||
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
// // 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
||||||
else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
// else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
||||||
data.isGovernment = true;
|
// data.isGovernment = true;
|
||||||
if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
||||||
}
|
// }
|
||||||
|
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
Object.assign(history, { ...data, id: undefined });
|
Object.assign(history, { ...data, id: undefined });
|
||||||
|
|
@ -548,16 +548,16 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
|
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
|
||||||
}
|
}
|
||||||
Object.assign(record, body);
|
Object.assign(record, body);
|
||||||
// 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
// // 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
||||||
if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
// if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
||||||
record.isGovernment = false;
|
// record.isGovernment = false;
|
||||||
if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect ?? null;
|
// if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect ?? null;
|
||||||
}
|
// }
|
||||||
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
// // 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
||||||
else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
// else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
||||||
record.isGovernment = true;
|
// record.isGovernment = true;
|
||||||
if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect ?? null;
|
// if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect ?? null;
|
||||||
}
|
// }
|
||||||
Object.assign(history, { ...record, id: undefined });
|
Object.assign(history, { ...record, id: undefined });
|
||||||
|
|
||||||
history.profileSalaryId = salaryId;
|
history.profileSalaryId = salaryId;
|
||||||
|
|
|
||||||
|
|
@ -1233,13 +1233,13 @@ export class ProfileSalaryTempController extends Controller {
|
||||||
isDelete: false,
|
isDelete: false,
|
||||||
};
|
};
|
||||||
Object.assign(data, { ...body, ...meta });
|
Object.assign(data, { ...body, ...meta });
|
||||||
if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
// if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
||||||
data.isGovernment = false;
|
// data.isGovernment = false;
|
||||||
if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
||||||
} else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
// } else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
||||||
data.isGovernment = true;
|
// data.isGovernment = true;
|
||||||
if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
|
||||||
}
|
// }
|
||||||
await this.salaryRepo.save(data, { data: req });
|
await this.salaryRepo.save(data, { data: req });
|
||||||
setLogDataDiff(req, { before, after: data });
|
setLogDataDiff(req, { before, after: data });
|
||||||
|
|
||||||
|
|
@ -1516,16 +1516,16 @@ export class ProfileSalaryTempController extends Controller {
|
||||||
const before = structuredClone(record);
|
const before = structuredClone(record);
|
||||||
|
|
||||||
Object.assign(record, body);
|
Object.assign(record, body);
|
||||||
// 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
// // 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
|
||||||
if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
// if (["12", "15", "16"].includes(body.commandCode ?? "")) {
|
||||||
record.isGovernment = false;
|
// record.isGovernment = false;
|
||||||
if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect;
|
||||||
}
|
// }
|
||||||
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
// // 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
|
||||||
else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
// else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
|
||||||
record.isGovernment = true;
|
// record.isGovernment = true;
|
||||||
if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect;
|
// if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect;
|
||||||
}
|
// }
|
||||||
|
|
||||||
record.isEdit = true;
|
record.isEdit = true;
|
||||||
record.lastUpdateUserId = req.user.sub;
|
record.lastUpdateUserId = req.user.sub;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue