diff --git a/src/controllers/ProfileSalaryTempController.ts b/src/controllers/ProfileSalaryTempController.ts index a26f39f1..d9a98af4 100644 --- a/src/controllers/ProfileSalaryTempController.ts +++ b/src/controllers/ProfileSalaryTempController.ts @@ -176,6 +176,56 @@ export class ProfileSalaryTempController extends Controller { searchKeyword != null && searchKeyword != "" ? `posLevel.posLevelName like '%${searchKeyword}%'` : "1=1", + ) + .orWhere( + searchKeyword != null && searchKeyword != "" + ? `CONCAT( + orgRoot.orgRootShortName, + current_holders.posMasterNo + ) like '%${searchKeyword}%'` + : "1=1", + ) + .orWhere( + searchKeyword != null && searchKeyword != "" + ? `CONCAT( + orgRoot.orgRootShortName, + orgChild1.orgChild1ShortName, + current_holders.posMasterNo + ) like '%${searchKeyword}%'` + : "1=1", + ) + .orWhere( + searchKeyword != null && searchKeyword != "" + ? `CONCAT( + orgRoot.orgRootShortName, + orgChild1.orgChild1ShortName, + orgChild2.orgChild2ShortName, + current_holders.posMasterNo + ) like '%${searchKeyword}%'` + : "1=1", + ) + .orWhere( + searchKeyword != null && searchKeyword != "" + ? `CONCAT( + orgRoot.orgRootShortName, + orgChild1.orgChild1ShortName, + orgChild2.orgChild2ShortName, + orgChild3.orgChild3ShortName, + current_holders.posMasterNo + ) like '%${searchKeyword}%'` + : "1=1", + ) + .orWhere( + searchKeyword != null && searchKeyword != "" + ? `CONCAT( + orgRoot.orgRootShortName, + orgChild1.orgChild1ShortName, + orgChild2.orgChild2ShortName, + orgChild3.orgChild3ShortName, + orgChild4.orgChild4ShortName, + current_holders.posMasterNo + ) like '%${searchKeyword}%'` + : "1=1", ); }), ) @@ -201,7 +251,7 @@ export class ProfileSalaryTempController extends Controller { .skip((page - 1) * pageSize) .take(pageSize) .getManyAndCount(); - + const data = await Promise.all( record.map((_data) => { const posExecutive =