diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index cfea4ea2..1f42706b 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -4100,10 +4100,6 @@ export class ProfileController extends Controller { IFNULL(orgRoot.orgRootShortName, ''), IFNULL(current_holders.posMasterNo , '') ) LIKE :keyword`; - // queryLike = `CONCAT( - // IFNULL(orgRoot.orgRootShortName, ''), - // IFNULL(current_holders.posMasterNo , '') - // ) LIKE :keyword`; } let nodeCondition = "1=1"; let nodeAll = ""; @@ -7021,6 +7017,14 @@ export class ProfileController extends Controller { keyword: `%${body.keyword}%`, }, ) + .orWhere( + body.keyword != null && body.keyword != "" + ? "CONCAT(current_holder.prefix,current_holder.firstName,' ',current_holder.lastName) LIKE :keyword" + : "1=1", + { + keyword: `%${body.keyword}%`, + }, + ) .orWhere( body.keyword != null && body.keyword != "" ? "current_holder.position LIKE :keyword" diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index dd14cf4c..1ea3919e 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -2891,6 +2891,14 @@ export class ProfileEmployeeController extends Controller { keyword: `%${body.keyword}%`, }, ) + .orWhere( + body.keyword != null && body.keyword != "" + ? "CONCAT(current_holder.prefix,current_holder.firstName,' ',current_holder.lastName) LIKE :keyword" + : "1=1", + { + keyword: `%${body.keyword}%`, + }, + ) .orWhere( body.keyword != null && body.keyword != "" ? "current_holder.position LIKE :keyword" @@ -2918,7 +2926,7 @@ export class ProfileEmployeeController extends Controller { ) .orWhere( body.keyword != null && body.keyword != "" - ? "posLevel.posLevelName LIKE :keyword" + ? "CONCAT(posType.posTypeShortName,' ',posLevel.posLevelName) LIKE :keyword" : "1=1", { keyword: `%${body.keyword}%`,