แก้ค้นหาตำแหน่งลูกจ้าง
This commit is contained in:
parent
19e23bd8b1
commit
57eb47dee0
1 changed files with 3 additions and 3 deletions
|
|
@ -229,14 +229,14 @@ export class EmployeePositionController extends Controller {
|
|||
async GetEmpPosition(@Query("keyword") keyword?: string, @Query("type") type?: string) {
|
||||
let findData: any;
|
||||
switch (type) {
|
||||
case "posDictName":
|
||||
case "positionName":
|
||||
findData = await this.employeePosDictRepository.find({
|
||||
where: { posDictName: Like(`%${keyword}%`) },
|
||||
relations: ["posType", "posLevel"],
|
||||
});
|
||||
break;
|
||||
|
||||
case "posTypeName":
|
||||
case "positionType":
|
||||
const findEmpTypes: EmployeePosType[] = await this.employeePosTypeRepository.find({
|
||||
where: { posTypeName: Like(`%${keyword}%`) },
|
||||
select: ["id"],
|
||||
|
|
@ -247,7 +247,7 @@ export class EmployeePositionController extends Controller {
|
|||
});
|
||||
break;
|
||||
|
||||
case "posLevelName":
|
||||
case "positionLevel":
|
||||
if (!isNaN(Number(keyword))) {
|
||||
const findEmpLevels: EmployeePosLevel[] = await this.employeePosLevelRepository.find({
|
||||
where: { posLevelName: Number(keyword) },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue