ปรับ posNo

This commit is contained in:
Bright 2024-11-26 10:42:16 +07:00
parent eef0f87b5c
commit 2b5a236e90
3 changed files with 20 additions and 12 deletions

View file

@ -3773,11 +3773,13 @@ export class ProfileController extends Controller {
.leftJoinAndSelect("profile.current_holders", "current_holders")
.leftJoinAndSelect("current_holders.positions", "positions")
.leftJoinAndSelect("positions.posExecutive", "posExecutive")
.leftJoinAndSelect("current_holders.orgRevision", "orgRevision")
.leftJoinAndSelect("current_holders.orgRoot", "orgRoot")
.leftJoinAndSelect("current_holders.orgChild1", "orgChild1")
.leftJoinAndSelect("current_holders.orgChild2", "orgChild2")
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
.where("current_holders.orgRevisionId = :orgRevisionId", {orgRevisionId: findRevision.id})
.andWhere(
posType != undefined && posType != null && posType != ""
? "posType.posTypeName LIKE :keyword1"
@ -3817,9 +3819,9 @@ export class ProfileController extends Controller {
.andWhere(nodeCondition, {
nodeId: nodeId,
})
.andWhere(`current_holders.orgRevisionId LIKE :orgRevisionId`, {
orgRevisionId: findRevision.id,
})
// .andWhere(`current_holders.orgRevisionId LIKE :orgRevisionId`, {
// orgRevisionId: findRevision.id,
// })
.orderBy("current_holders.posMasterNo", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)
@ -4130,11 +4132,13 @@ export class ProfileController extends Controller {
.leftJoinAndSelect("profile.current_holders", "current_holders")
.leftJoinAndSelect("current_holders.positions", "positions")
.leftJoinAndSelect("positions.posExecutive", "posExecutive")
.leftJoinAndSelect("current_holders.orgRevision", "orgRevision")
.leftJoinAndSelect("current_holders.orgRoot", "orgRoot")
.leftJoinAndSelect("current_holders.orgChild1", "orgChild1")
.leftJoinAndSelect("current_holders.orgChild2", "orgChild2")
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
.where("current_holders.orgRevisionId = :orgRevisionId", {orgRevisionId: findRevision.id})
.andWhere(
_data.root != undefined && _data.root != null
? _data.root[0] != null
@ -4224,9 +4228,9 @@ export class ProfileController extends Controller {
.andWhere(nodeCondition, {
nodeId: nodeId,
})
.andWhere(`current_holders.orgRevisionId LIKE :orgRevisionId`, {
orgRevisionId: findRevision.id,
})
// .andWhere(`current_holders.orgRevisionId LIKE :orgRevisionId`, {
// orgRevisionId: findRevision.id,
// })
.orderBy("current_holders.posMasterNo", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)