From 320dd4616cb3c50bce8d318ee3a79a086ef1aa4d Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Thu, 15 May 2025 09:30:13 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=8A=E0=B8=B7?= =?UTF-8?q?=E0=B9=88=E0=B8=ADresponse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/WorkflowController.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/WorkflowController.ts b/src/controllers/WorkflowController.ts index c9190cf9..921c4184 100644 --- a/src/controllers/WorkflowController.ts +++ b/src/controllers/WorkflowController.ts @@ -1296,13 +1296,13 @@ export class WorkflowController extends Controller { .skip((body.page - 1) * body.pageSize) .take(body.pageSize) .getManyAndCount(); - lists.map((x) => ({ + const data = lists.map((x) => ({ ...x, posExecutiveNameOrg: x.posExecutiveName + (x.orgChild4 ?? x.orgChild3 ?? x.orgChild2 ?? x.orgChild1 ?? x.orgRoot ?? ""), })); - return new HttpSuccess({ data: lists, total }); + return new HttpSuccess({ data: data, total }); } else { const [lists, total] = await AppDataSource.getRepository(viewDirector) .createQueryBuilder("viewDirector") @@ -1374,13 +1374,13 @@ export class WorkflowController extends Controller { .skip((body.page - 1) * body.pageSize) .take(body.pageSize) .getManyAndCount(); - lists.map((x) => ({ + const data = lists.map((x) => ({ ...x, posExecutiveNameOrg: x.posExecutiveName + (x.orgChild4 ?? x.orgChild3 ?? x.orgChild2 ?? x.orgChild1 ?? x.orgRoot ?? ""), })); - return new HttpSuccess({ data: lists, total }); + return new HttpSuccess({ data: data, total }); } }