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

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({
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) },
where: {
posLevelId: In(findEmpLevels.map((x) => x.id)),
posLevel: { posLevelName: 1 },
},
relations: ["posType", "posLevel"],
order: {
posDictName: "ASC",
@ -317,6 +320,7 @@ export class EmployeeTempPositionController extends Controller {
} else {
//กรณีเลือกค้นหาจาก"ระดับชั้นงาน" แต่กรอกไม่ใช่ number ให้ปล่อยมาหมดเลย
findData = await this.employeePosDictRepository.find({
where: { posLevel: { posLevelName: 1 } },
relations: ["posType", "posLevel"],
order: {
posDictName: "ASC",
@ -1941,14 +1945,22 @@ export class EmployeeTempPositionController extends Controller {
) {
await new permission().PermissionCreate(request, "SYS_ORG_TEMP");
const dataMaster = await this.employeeTempPosMasterRepository.findOne({
where: {
where: {
id: requestBody.posMaster,
orgRevision: {
orgRevisionIsCurrent: true,
orgRevisionIsDraft: false
}
orgRevisionIsDraft: false,
},
},
relations: ["positions", "orgRevision", "orgRoot", "orgChild1", "orgChild2", "orgChild3", "orgChild4"],
relations: [
"positions",
"orgRevision",
"orgRoot",
"orgChild1",
"orgChild2",
"orgChild3",
"orgChild4",
],
});
if (!dataMaster) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้");
@ -1958,7 +1970,7 @@ export class EmployeeTempPositionController extends Controller {
let _child2 = dataMaster.orgChild2?.orgChild2Name;
let _child3 = dataMaster.orgChild3?.orgChild3Name;
let _child4 = dataMaster.orgChild4?.orgChild4Name;
const Org =
const Org =
(_child4 == null ? "" : _child4 + "\n") +
(_child3 == null ? "" : _child3 + "\n") +
(_child2 == null ? "" : _child2 + "\n") +

View file

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