diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 69686bdc..c511f19a 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -7335,10 +7335,10 @@ export class ProfileController extends Controller { .orWhere(`posType.posTypeName LIKE :keyword`, { keyword: `%${body.keyword}%`, }) - .where("profile.isLeave = false") .orWhere(conditionFullName, { keyword: `%${body.keyword}%`, }) + .andWhere("profile.isLeave = false") .orderBy("profile.citizenId", "ASC") .skip((body.page - 1) * body.pageSize) .take(body.pageSize) diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 552a5c96..785a1fa3 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -3191,7 +3191,7 @@ export class ProfileEmployeeController extends Controller { .orWhere(conditionFullName, { keyword: `%${body.keyword}%`, }) - .where("profileEmployee.isLeave = false") + .andWhere("profileEmployee.isLeave = false") .orderBy("profileEmployee.citizenId", "ASC") .skip((body.page - 1) * body.pageSize) .take(body.pageSize)