Test
This commit is contained in:
parent
e1d7f6966e
commit
e8ed7c774b
1 changed files with 7 additions and 15 deletions
|
|
@ -4118,21 +4118,13 @@ export class ProfileController extends Controller {
|
|||
queryLike = "profile.position LIKE :keyword";
|
||||
} else if (searchField == "posNo") {
|
||||
queryLike = `
|
||||
IF(current_holders.orgChild4Id IS NOT NULL,
|
||||
CONCAT(orgChild4.orgChild4ShortName, current_holders.posMasterNo), ''
|
||||
) LIKE :keyword OR
|
||||
IF(current_holders.orgChild3Id IS NOT NULL,
|
||||
CONCAT(orgChild3.orgChild3ShortName, current_holders.posMasterNo), ''
|
||||
) LIKE :keyword OR
|
||||
IF(current_holders.orgChild2Id IS NOT NULL,
|
||||
CONCAT(orgChild2.orgChild2ShortName, current_holders.posMasterNo), ''
|
||||
) LIKE :keyword OR
|
||||
IF(current_holders.orgChild1Id IS NOT NULL,
|
||||
CONCAT(orgChild1.orgChild1ShortName, current_holders.posMasterNo), ''
|
||||
) LIKE :keyword OR
|
||||
IF(current_holders.orgChild1Id IS NULL,
|
||||
CONCAT(orgChild1.orgChild1ShortName, current_holders.posMasterNo), ''
|
||||
) LIKE :keyword
|
||||
CASE
|
||||
WHEN current_holders.orgChild4Id IS NOT NULL THEN CONCAT(orgChild4.orgChild4ShortName, current_holders.posMasterNo)
|
||||
WHEN current_holders.orgChild3Id IS NOT NULL THEN CONCAT(orgChild3.orgChild3ShortName, current_holders.posMasterNo)
|
||||
WHEN current_holders.orgChild2Id IS NOT NULL THEN CONCAT(orgChild2.orgChild2ShortName, current_holders.posMasterNo)
|
||||
WHEN current_holders.orgChild1Id IS NOT NULL THEN CONCAT(orgChild1.orgChild1ShortName, current_holders.posMasterNo)
|
||||
ELSE CONCAT(orgRoot.orgRootShortName, current_holders.posMasterNo)
|
||||
END LIKE :keyword
|
||||
`;
|
||||
}
|
||||
let nodeCondition = "1=1";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue