list ปลัด และรองปลัดใน popup ผู้บังคับบัญชา และผู้มีอำนาจเพิ่ม
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m20s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m20s
This commit is contained in:
parent
f8bb9e7cab
commit
81288f8db3
2 changed files with 49 additions and 9 deletions
|
|
@ -2998,12 +2998,35 @@ export class ProfileController extends Controller {
|
|||
// console.log(condition);
|
||||
// console.log("------------------");
|
||||
// console.log(conditionNow);
|
||||
|
||||
// Task #2342 list ปลัด และรองปลัดใน popup ผู้บังคับบัญชา และผู้มีอำนาจเพิ่ม
|
||||
let conditionisDeputy: any = {
|
||||
isDeputy: true,
|
||||
isDirector: true,
|
||||
orgChild1Id: IsNull(),
|
||||
orgChild2Id: IsNull(),
|
||||
orgChild3Id: IsNull(),
|
||||
orgChild4Id: IsNull(),
|
||||
id: Not(posMaster.current_holderId),
|
||||
};
|
||||
const orgRoot = await this.orgRootRepo.findOne({
|
||||
select: { id: true, isDeputy: true },
|
||||
where: {
|
||||
id: Not(posMaster.orgRootId ?? ""),
|
||||
isDeputy: true,
|
||||
orgRevision: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false },
|
||||
},
|
||||
});
|
||||
|
||||
if (body.isAct == true) {
|
||||
const [lists, total] = await AppDataSource.getRepository(viewDirectorActing)
|
||||
.createQueryBuilder("viewDirectorActing")
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere(condition).orWhere(conditionNow);
|
||||
if (orgRoot && orgRoot.isDeputy) {
|
||||
qb.orWhere(conditionisDeputy);
|
||||
}
|
||||
}),
|
||||
)
|
||||
.andWhere("viewDirectorActing.isProbation = :isProbation", { isProbation: false })
|
||||
|
|
@ -3069,6 +3092,9 @@ export class ProfileController extends Controller {
|
|||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere(condition).orWhere(conditionNow);
|
||||
if (orgRoot && orgRoot.isDeputy) {
|
||||
qb.orWhere(conditionisDeputy);
|
||||
}
|
||||
}),
|
||||
)
|
||||
.andWhere("viewDirector.isProbation = :isProbation", { isProbation: false })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue