ตำแหน่งลูกจ้าง

This commit is contained in:
mamoss 2025-05-06 15:04:31 +07:00
parent abbf39ff6b
commit ea90dfd16e
2 changed files with 19 additions and 6 deletions

View file

@ -299,7 +299,10 @@ export class EmployeeTempPositionController extends Controller {
}); });
} }
findData = await this.employeePosDictRepository.find({ findData = await this.employeePosDictRepository.find({
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) }, where: {
posLevelId: In(findEmpLevels.map((x) => x.id)),
posLevel: { posLevelName: 1 },
},
relations: ["posType", "posLevel"], relations: ["posType", "posLevel"],
order: { order: {
posDictName: "ASC", posDictName: "ASC",
@ -317,6 +320,7 @@ export class EmployeeTempPositionController extends Controller {
} else { } else {
//กรณีเลือกค้นหาจาก"ระดับชั้นงาน" แต่กรอกไม่ใช่ number ให้ปล่อยมาหมดเลย //กรณีเลือกค้นหาจาก"ระดับชั้นงาน" แต่กรอกไม่ใช่ number ให้ปล่อยมาหมดเลย
findData = await this.employeePosDictRepository.find({ findData = await this.employeePosDictRepository.find({
where: { posLevel: { posLevelName: 1 } },
relations: ["posType", "posLevel"], relations: ["posType", "posLevel"],
order: { order: {
posDictName: "ASC", posDictName: "ASC",
@ -1945,10 +1949,18 @@ export class EmployeeTempPositionController extends Controller {
id: requestBody.posMaster, id: requestBody.posMaster,
orgRevision: { orgRevision: {
orgRevisionIsCurrent: true, orgRevisionIsCurrent: true,
orgRevisionIsDraft: false orgRevisionIsDraft: false,
} },
}, },
relations: ["positions", "orgRevision", "orgRoot", "orgChild1", "orgChild2", "orgChild3", "orgChild4"], relations: [
"positions",
"orgRevision",
"orgRoot",
"orgChild1",
"orgChild2",
"orgChild3",
"orgChild4",
],
}); });
if (!dataMaster) { if (!dataMaster) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้"); throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้");

View file

@ -3354,6 +3354,7 @@ export class ImportDataController extends Controller {
// } // }
// }); // });
} }
console.log(">>>>>>>>>>>>>>>>>>> " + _item.citizenId);
order = 1; order = 1;
} }
return new HttpSuccess(); return new HttpSuccess();