director
This commit is contained in:
parent
7f037eb975
commit
3475224f36
1 changed files with 77 additions and 77 deletions
|
|
@ -1310,36 +1310,36 @@ export class ProfileController extends Controller {
|
|||
orgRootId: posMaster.orgRootId,
|
||||
id: Not(posMaster.current_holderId || ""),
|
||||
};
|
||||
let conditionNow: any = {
|
||||
orgRootId: posMaster.orgRootId,
|
||||
orgChild1Id: posMaster.orgChild1Id,
|
||||
orgChild2Id: posMaster.orgChild2Id,
|
||||
orgChild3Id: posMaster.orgChild3Id,
|
||||
orgChild4Id: posMaster.orgChild4Id,
|
||||
id: Not(posMaster.current_holderId),
|
||||
};
|
||||
if (posMaster.orgChild1Id == null) {
|
||||
} else if (posMaster.orgChild2Id == null) {
|
||||
condition.orgChild1Id = null;
|
||||
} else if (posMaster.orgChild3Id == null) {
|
||||
condition.orgChild2Id = null;
|
||||
} else if (posMaster.orgChild4Id == null) {
|
||||
condition.orgChild3Id = null;
|
||||
} else {
|
||||
condition.orgChild4Id = null;
|
||||
}
|
||||
// let conditionNow: any = {
|
||||
// orgRootId: posMaster.orgRootId,
|
||||
// orgChild1Id: posMaster.orgChild1Id,
|
||||
// orgChild2Id: posMaster.orgChild2Id,
|
||||
// orgChild3Id: posMaster.orgChild3Id,
|
||||
// orgChild4Id: posMaster.orgChild4Id,
|
||||
// id: Not(posMaster.current_holderId),
|
||||
// };
|
||||
// if (posMaster.orgChild1Id == null) {
|
||||
// } else if (posMaster.orgChild2Id == null) {
|
||||
// condition.orgChild1Id = null;
|
||||
// } else if (posMaster.orgChild3Id == null) {
|
||||
// condition.orgChild2Id = null;
|
||||
// } else if (posMaster.orgChild4Id == null) {
|
||||
// condition.orgChild3Id = null;
|
||||
// } else {
|
||||
// condition.orgChild4Id = null;
|
||||
// }
|
||||
if (body.isDirector == true) {
|
||||
condition.isDirector = true;
|
||||
conditionNow.isDirector = true;
|
||||
// conditionNow.isDirector = true;
|
||||
}
|
||||
const [lists, total] = await AppDataSource.getRepository(viewDirectorActing)
|
||||
.createQueryBuilder("viewDirectorActing")
|
||||
// .andWhere(condition)
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere(condition).orWhere(conditionNow);
|
||||
}),
|
||||
)
|
||||
.andWhere(condition)
|
||||
// .andWhere(
|
||||
// new Brackets((qb) => {
|
||||
// qb.orWhere(condition).orWhere(conditionNow);
|
||||
// }),
|
||||
// )
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere(
|
||||
|
|
@ -1426,37 +1426,37 @@ export class ProfileController extends Controller {
|
|||
orgRootId: posMaster.orgRootId,
|
||||
id: Not(posMaster.current_holderId || ""),
|
||||
};
|
||||
let conditionNow: any = {
|
||||
orgRootId: posMaster.orgRootId,
|
||||
orgChild1Id: posMaster.orgChild1Id,
|
||||
orgChild2Id: posMaster.orgChild2Id,
|
||||
orgChild3Id: posMaster.orgChild3Id,
|
||||
orgChild4Id: posMaster.orgChild4Id,
|
||||
id: Not(posMaster.current_holderId),
|
||||
};
|
||||
if (posMaster.orgChild1Id == null) {
|
||||
condition.orgRootId = null;
|
||||
} else if (posMaster.orgChild2Id == null) {
|
||||
condition.orgChild1Id = null;
|
||||
} else if (posMaster.orgChild3Id == null) {
|
||||
condition.orgChild2Id = null;
|
||||
} else if (posMaster.orgChild4Id == null) {
|
||||
condition.orgChild3Id = null;
|
||||
} else {
|
||||
condition.orgChild4Id = null;
|
||||
}
|
||||
// let conditionNow: any = {
|
||||
// orgRootId: posMaster.orgRootId,
|
||||
// orgChild1Id: posMaster.orgChild1Id,
|
||||
// orgChild2Id: posMaster.orgChild2Id,
|
||||
// orgChild3Id: posMaster.orgChild3Id,
|
||||
// orgChild4Id: posMaster.orgChild4Id,
|
||||
// id: Not(posMaster.current_holderId),
|
||||
// };
|
||||
// if (posMaster.orgChild1Id == null) {
|
||||
// condition.orgRootId = null;
|
||||
// } else if (posMaster.orgChild2Id == null) {
|
||||
// condition.orgChild1Id = null;
|
||||
// } else if (posMaster.orgChild3Id == null) {
|
||||
// condition.orgChild2Id = null;
|
||||
// } else if (posMaster.orgChild4Id == null) {
|
||||
// condition.orgChild3Id = null;
|
||||
// } else {
|
||||
// condition.orgChild4Id = null;
|
||||
// }
|
||||
if (body.isDirector == true) {
|
||||
condition.isDirector = true;
|
||||
conditionNow.isDirector = true;
|
||||
// conditionNow.isDirector = true;
|
||||
}
|
||||
const [lists, total] = await AppDataSource.getRepository(viewDirectorActing)
|
||||
.createQueryBuilder("viewDirectorActing")
|
||||
// .andWhere(condition)
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere(condition).orWhere(conditionNow);
|
||||
}),
|
||||
)
|
||||
.andWhere(condition)
|
||||
// .andWhere(
|
||||
// new Brackets((qb) => {
|
||||
// qb.orWhere(condition).orWhere(conditionNow);
|
||||
// }),
|
||||
// )
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere(
|
||||
|
|
@ -1518,37 +1518,37 @@ export class ProfileController extends Controller {
|
|||
orgRootId: posMaster.orgRootId,
|
||||
id: Not(posMaster.current_holderId || ""),
|
||||
};
|
||||
let conditionNow: any = {
|
||||
orgRootId: posMaster.orgRootId,
|
||||
orgChild1Id: posMaster.orgChild1Id,
|
||||
orgChild2Id: posMaster.orgChild2Id,
|
||||
orgChild3Id: posMaster.orgChild3Id,
|
||||
orgChild4Id: posMaster.orgChild4Id,
|
||||
id: Not(posMaster.current_holderId),
|
||||
};
|
||||
if (posMaster.orgChild1Id == null) {
|
||||
condition.orgRootId = null;
|
||||
} else if (posMaster.orgChild2Id == null) {
|
||||
condition.orgChild1Id = null;
|
||||
} else if (posMaster.orgChild3Id == null) {
|
||||
condition.orgChild2Id = null;
|
||||
} else if (posMaster.orgChild4Id == null) {
|
||||
condition.orgChild3Id = null;
|
||||
} else {
|
||||
condition.orgChild4Id = null;
|
||||
}
|
||||
// let conditionNow: any = {
|
||||
// orgRootId: posMaster.orgRootId,
|
||||
// orgChild1Id: posMaster.orgChild1Id,
|
||||
// orgChild2Id: posMaster.orgChild2Id,
|
||||
// orgChild3Id: posMaster.orgChild3Id,
|
||||
// orgChild4Id: posMaster.orgChild4Id,
|
||||
// id: Not(posMaster.current_holderId),
|
||||
// };
|
||||
// if (posMaster.orgChild1Id == null) {
|
||||
// condition.orgRootId = null;
|
||||
// } else if (posMaster.orgChild2Id == null) {
|
||||
// condition.orgChild1Id = null;
|
||||
// } else if (posMaster.orgChild3Id == null) {
|
||||
// condition.orgChild2Id = null;
|
||||
// } else if (posMaster.orgChild4Id == null) {
|
||||
// condition.orgChild3Id = null;
|
||||
// } else {
|
||||
// condition.orgChild4Id = null;
|
||||
// }
|
||||
if (body.isDirector == true) {
|
||||
condition.isDirector = true;
|
||||
conditionNow.isDirector = true;
|
||||
// conditionNow.isDirector = true;
|
||||
}
|
||||
const [lists, total] = await AppDataSource.getRepository(viewDirector)
|
||||
.createQueryBuilder("viewDirector")
|
||||
// .andWhere(condition)
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere(condition).orWhere(conditionNow);
|
||||
}),
|
||||
)
|
||||
.andWhere(condition)
|
||||
// .andWhere(
|
||||
// new Brackets((qb) => {
|
||||
// qb.orWhere(condition).orWhere(conditionNow);
|
||||
// }),
|
||||
// )
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue