This commit is contained in:
Kittapath 2024-05-13 15:38:56 +07:00
parent a9f0458f1b
commit 9a7adc4eb5
2 changed files with 37 additions and 5 deletions

View file

@ -256,12 +256,12 @@ export class ProfileEmployeeController extends Controller {
: "1=1",
)
.andWhere(
type !== undefined && type !== null && type !== ""
? "profileEmployee.employeeClass LIKE :type"
type !== undefined && type !== null && type !== ""
? "profileEmployee.employeeClass LIKE :type"
: "1=1",
{
type: `%${type}%`,
}
type: type == null || type == undefined ? null : `${type.trim().toUpperCase()}`,
},
)
.skip((page - 1) * pageSize)
.take(pageSize)
@ -296,7 +296,7 @@ export class ProfileEmployeeController extends Controller {
posTypeId: _data.posType == null ? null : _data.posType.id,
position: _data.position,
posNo: shortName,
employeeClass: _data.employeeClass == null ? null : _data.employeeClass
employeeClass: _data.employeeClass == null ? null : _data.employeeClass,
};
}),
);