fix order

This commit is contained in:
Bright 2025-02-19 17:47:38 +07:00
parent 7908473d1f
commit fbdce54a12
2 changed files with 4 additions and 4 deletions

View file

@ -1704,7 +1704,7 @@ export class ProfileEmployeeController extends Controller {
@Query() nodeId?: string,
@Query() isAll?: boolean,
@Query() retireType?: string,
@Query() sortBy: string = "posMasterNo",
@Query() sortBy: string = "current_holders.posMasterNo",
@Query() sort: "ASC"|"DESC" = "ASC",
) {
let _data = await new permission().PermissionOrgList(request, "SYS_REGISTRY_EMP");
@ -1863,7 +1863,7 @@ export class ProfileEmployeeController extends Controller {
// orgRevisionId: findRevision.id,
// })
// .orderBy("current_holders.posMasterNo", "ASC")
.orderBy(`current_holders.${sortBy}`, sort)
.orderBy(`${sortBy}`, sort)
.skip((page - 1) * pageSize)
.take(pageSize)
.getManyAndCount();