From c78548410ba0edd65493edd8f0013d724a5c29c5 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Tue, 20 Feb 2024 15:42:10 +0700 Subject: [PATCH] add body revisionId --- src/controllers/PositionController.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/controllers/PositionController.ts b/src/controllers/PositionController.ts index 93ac9c22..961688b4 100644 --- a/src/controllers/PositionController.ts +++ b/src/controllers/PositionController.ts @@ -840,6 +840,7 @@ export class PositionController extends Controller { @Body() body: { id: string; + revisionId: string; type: number; isAll: boolean; page: number; @@ -855,6 +856,7 @@ export class PositionController extends Controller { if (body.type === 0) { typeCondition = { + orgRevisionId: body.revisionId, orgRootId: body.id, }; if (!body.isAll) { @@ -867,6 +869,7 @@ export class PositionController extends Controller { } } else if (body.type === 1) { typeCondition = { + orgRevisionId: body.revisionId, orgChild1Id: body.id, }; if (!body.isAll) { @@ -879,6 +882,7 @@ export class PositionController extends Controller { } } else if (body.type === 2) { typeCondition = { + orgRevisionId: body.revisionId, orgChild2Id: body.id, }; if (!body.isAll) { @@ -891,6 +895,7 @@ export class PositionController extends Controller { } } else if (body.type === 3) { typeCondition = { + orgRevisionId: body.revisionId, orgChild3Id: body.id, }; if (!body.isAll) { @@ -903,6 +908,7 @@ export class PositionController extends Controller { } } else if (body.type === 4) { typeCondition = { + orgRevisionId: body.revisionId, orgChild4Id: body.id, }; searchShortName = `CONCAT(orgChild4.orgChild4ShortName,posMaster.posMasterNoPrefix,posMaster.posMasterNo,posMaster.posMasterNoSuffix) like '%${body.keyword}%'`;