From fb40df8a2aabfda1090969c69cff574312a70a51 Mon Sep 17 00:00:00 2001 From: kittapath Date: Fri, 8 Nov 2024 11:46:27 +0700 Subject: [PATCH] =?UTF-8?q?query=20=E0=B8=A3=E0=B8=B1=E0=B8=81=E0=B8=A9?= =?UTF-8?q?=E0=B8=B2=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/WorkflowController.ts | 34 +++++++++++---------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/controllers/WorkflowController.ts b/src/controllers/WorkflowController.ts index 909da84c..236fdcac 100644 --- a/src/controllers/WorkflowController.ts +++ b/src/controllers/WorkflowController.ts @@ -740,10 +740,8 @@ export class WorkflowController extends Controller { throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบตำแหน่งผู้ใช้งาน"); let condition: any = { - where: { - isDirector: true, - orgRootId: posMasterUser.orgRootId, - }, + isDirector: true, + orgRootId: posMasterUser.orgRootId, }; if (type.trim().toLowerCase() == "OPERATE") { @@ -759,14 +757,12 @@ export class WorkflowController extends Controller { posMasterUser.current_holder.posLevel.posLevelName == "ชำนาญการ") ) { condition = { - where: { - isDirector: true, - orgRootId: posMasterUser.orgRootId, - orgChild1Id: IsNull(), - orgChild2Id: IsNull(), - orgChild3Id: IsNull(), - orgChild4Id: IsNull(), - }, + isDirector: true, + orgRootId: posMasterUser.orgRootId, + orgChild1Id: IsNull(), + orgChild2Id: IsNull(), + orgChild3Id: IsNull(), + orgChild4Id: IsNull(), }; } else if ( (posMasterUser.current_holder.posType.posTypeName == "ทั่วไป" && @@ -777,14 +773,12 @@ export class WorkflowController extends Controller { posMasterUser.current_holder.posLevel.posLevelName == "ต้น") ) { condition = { - where: { - isDirector: true, - isDeputy: true, - orgChild1Id: IsNull(), - orgChild2Id: IsNull(), - orgChild3Id: IsNull(), - orgChild4Id: IsNull(), - }, + isDirector: true, + isDeputy: true, + orgChild1Id: IsNull(), + orgChild2Id: IsNull(), + orgChild3Id: IsNull(), + orgChild4Id: IsNull(), }; } else { }