fix import temp profile salary add isGovernment & dateGovernment

This commit is contained in:
Warunee Tamkoo 2026-04-28 16:31:08 +07:00
parent 3163b701c9
commit 2a5fba2dfc

View file

@ -6878,7 +6878,7 @@ export class ImportDataController extends Controller {
jsDate.getHours(), jsDate.getHours(),
jsDate.getMinutes(), jsDate.getMinutes(),
jsDate.getSeconds(), jsDate.getSeconds(),
jsDate.getMilliseconds() jsDate.getMilliseconds(),
); );
} }
return jsDate; return jsDate;
@ -6902,7 +6902,7 @@ export class ImportDataController extends Controller {
jsDate.getHours(), jsDate.getHours(),
jsDate.getMinutes(), jsDate.getMinutes(),
jsDate.getSeconds(), jsDate.getSeconds(),
jsDate.getMilliseconds() jsDate.getMilliseconds(),
); );
} }
return jsDate; return jsDate;
@ -7052,6 +7052,29 @@ 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
if (
salaryTemp.commandCode === "12" ||
salaryTemp.commandCode === "15" ||
salaryTemp.commandCode === "16"
) {
salaryTemp.isGovernment = false;
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
}
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = salaryTemp.commandDateAffect
else if (
salaryTemp.commandCode === "1" ||
salaryTemp.commandCode === "2" ||
salaryTemp.commandCode === "3" ||
salaryTemp.commandCode === "4" ||
salaryTemp.commandCode === "10" ||
salaryTemp.commandCode === "11" ||
salaryTemp.commandCode === "20"
) {
salaryTemp.isGovernment = true;
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
}
salaryTemps.push(salaryTemp); salaryTemps.push(salaryTemp);
} }
@ -7127,7 +7150,7 @@ export class ImportDataController extends Controller {
jsDate.getHours(), jsDate.getHours(),
jsDate.getMinutes(), jsDate.getMinutes(),
jsDate.getSeconds(), jsDate.getSeconds(),
jsDate.getMilliseconds() jsDate.getMilliseconds(),
); );
} }
return jsDate; return jsDate;
@ -7151,7 +7174,7 @@ export class ImportDataController extends Controller {
jsDate.getHours(), jsDate.getHours(),
jsDate.getMinutes(), jsDate.getMinutes(),
jsDate.getSeconds(), jsDate.getSeconds(),
jsDate.getMilliseconds() jsDate.getMilliseconds(),
); );
} }
return jsDate; return jsDate;
@ -7301,6 +7324,28 @@ 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
if (
salaryTemp.commandCode === "12" ||
salaryTemp.commandCode === "15" ||
salaryTemp.commandCode === "16"
) {
salaryTemp.isGovernment = false;
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
}
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = salaryTemp.commandDateAffect
else if (
salaryTemp.commandCode === "1" ||
salaryTemp.commandCode === "2" ||
salaryTemp.commandCode === "3" ||
salaryTemp.commandCode === "4" ||
salaryTemp.commandCode === "10" ||
salaryTemp.commandCode === "11" ||
salaryTemp.commandCode === "20"
) {
salaryTemp.isGovernment = true;
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
}
salaryTemps.push(salaryTemp); salaryTemps.push(salaryTemp);
} }