query รักษาการ

This commit is contained in:
kittapath 2024-11-08 11:46:27 +07:00
parent 80a245a033
commit fb40df8a2a

View file

@ -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 {
}