sort posno
This commit is contained in:
parent
2ebb3e9b2b
commit
517aa1495a
3 changed files with 59 additions and 14 deletions
|
|
@ -103,9 +103,17 @@ export class PermissionOrgController extends Controller {
|
|||
} else if (searchField == "posNo") {
|
||||
queryLike = `CONCAT(
|
||||
IFNULL(orgChild4.orgChild4ShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword OR CONCAT(
|
||||
IFNULL(orgChild3.orgChild3ShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword OR CONCAT(
|
||||
IFNULL(orgChild2.orgChild2ShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword OR CONCAT(
|
||||
IFNULL(orgChild1.orgChild1ShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword OR CONCAT(
|
||||
IFNULL(orgRoot.orgRootShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword`;
|
||||
|
|
@ -130,6 +138,7 @@ export class PermissionOrgController extends Controller {
|
|||
keyword: `%${searchKeyword}%`,
|
||||
},
|
||||
)
|
||||
.orderBy("current_holders.posMasterNo", "ASC")
|
||||
.skip((page - 1) * pageSize)
|
||||
.take(pageSize)
|
||||
.getManyAndCount();
|
||||
|
|
@ -275,9 +284,17 @@ export class PermissionOrgController extends Controller {
|
|||
} else if (requestBody.searchField == "posNo") {
|
||||
queryLike = `CONCAT(
|
||||
IFNULL(orgChild4.orgChild4ShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword OR CONCAT(
|
||||
IFNULL(orgChild3.orgChild3ShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword OR CONCAT(
|
||||
IFNULL(orgChild2.orgChild2ShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword OR CONCAT(
|
||||
IFNULL(orgChild1.orgChild1ShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword OR CONCAT(
|
||||
IFNULL(orgRoot.orgRootShortName, ''),
|
||||
IFNULL(current_holders.posMasterNo , '')
|
||||
) LIKE :keyword`;
|
||||
|
|
@ -308,6 +325,7 @@ export class PermissionOrgController extends Controller {
|
|||
keyword: `%${requestBody.searchKeyword}%`,
|
||||
},
|
||||
)
|
||||
.orderBy("current_holders.posMasterNo", "ASC")
|
||||
.skip((requestBody.page - 1) * requestBody.pageSize)
|
||||
.take(requestBody.pageSize)
|
||||
.getManyAndCount();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue