ค้นหาเฉพาะกิ่ง

This commit is contained in:
kittapath 2024-09-04 12:09:23 +07:00
parent 1d0b35983b
commit af5cd2d17e
3 changed files with 53 additions and 22 deletions

View file

@ -1206,14 +1206,9 @@ export class ProfileEmployeeTempController extends Controller {
: `profile.dateRetire IS NOT NULL`
: "1=1",
)
.andWhere(
type !== undefined && type !== null && type !== ""
? "profileEmployee.employeeClass LIKE :type"
: "1=1",
{
type: type == null || type == undefined ? null : `${type.trim().toUpperCase()}`,
},
)
.andWhere("profileEmployee.employeeClass LIKE :type", {
type: "TEMP",
})
.skip((page - 1) * pageSize)
.take(pageSize)
.getManyAndCount();