บัญชี2 ยังไม่เสร็จ
This commit is contained in:
parent
f6bf6ef536
commit
a157089097
2 changed files with 116 additions and 21 deletions
|
|
@ -725,16 +725,16 @@ export class OrganizationController extends Controller {
|
|||
where: { orgRootId: orgRoot.id },
|
||||
}),
|
||||
totalPositionCurrentUse: await this.posMasterRepository.count({
|
||||
where: { orgRootId: orgRoot.id, profileIdCurrentHolder: Not(IsNull()) && Not("") },
|
||||
where: { orgRootId: orgRoot.id, profileIdCurrentHolder: Not(IsNull()) || Not("") },
|
||||
}),
|
||||
totalPositionCurrentVacant: await this.posMasterRepository.count({
|
||||
where: { orgRootId: orgRoot.id, profileIdCurrentHolder: IsNull() && "" },
|
||||
where: { orgRootId: orgRoot.id, profileIdCurrentHolder: IsNull() || "" },
|
||||
}),
|
||||
totalPositionNextUse: await this.posMasterRepository.count({
|
||||
where: { orgRootId: orgRoot.id, profileIdNextHolder: Not(IsNull()) && Not("") },
|
||||
where: { orgRootId: orgRoot.id, profileIdNextHolder: Not(IsNull()) || Not("") },
|
||||
}),
|
||||
totalPositionNextVacant: await this.posMasterRepository.count({
|
||||
where: { orgRootId: orgRoot.id, profileIdNextHolder: IsNull() && "" },
|
||||
where: { orgRootId: orgRoot.id, profileIdNextHolder: IsNull() || "" },
|
||||
}),
|
||||
|
||||
children: await Promise.all(
|
||||
|
|
@ -763,20 +763,20 @@ export class OrganizationController extends Controller {
|
|||
totalPositionCurrentUse: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild1Id: orgChild1.id,
|
||||
profileIdCurrentHolder: Not(IsNull()) && Not(""),
|
||||
profileIdCurrentHolder: Not(IsNull()) || Not(""),
|
||||
},
|
||||
}),
|
||||
totalPositionCurrentVacant: await this.posMasterRepository.count({
|
||||
where: { orgChild1Id: orgChild1.id, profileIdCurrentHolder: IsNull() && "" },
|
||||
where: { orgChild1Id: orgChild1.id, profileIdCurrentHolder: IsNull() || "" },
|
||||
}),
|
||||
totalPositionNextUse: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild1Id: orgChild1.id,
|
||||
profileIdNextHolder: Not(IsNull()) && Not(""),
|
||||
profileIdNextHolder: Not(IsNull()) || Not(""),
|
||||
},
|
||||
}),
|
||||
totalPositionNextVacant: await this.posMasterRepository.count({
|
||||
where: { orgChild1Id: orgChild1.id, profileIdNextHolder: IsNull() && "" },
|
||||
where: { orgChild1Id: orgChild1.id, profileIdNextHolder: IsNull() || "" },
|
||||
}),
|
||||
children: await Promise.all(
|
||||
orgChild2Data
|
||||
|
|
@ -804,23 +804,23 @@ export class OrganizationController extends Controller {
|
|||
totalPositionCurrentUse: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild2Id: orgChild2.id,
|
||||
profileIdCurrentHolder: Not(IsNull()) && Not(""),
|
||||
profileIdCurrentHolder: Not(IsNull()) || Not(""),
|
||||
},
|
||||
}),
|
||||
totalPositionCurrentVacant: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild2Id: orgChild2.id,
|
||||
profileIdCurrentHolder: IsNull() && "",
|
||||
profileIdCurrentHolder: IsNull() || "",
|
||||
},
|
||||
}),
|
||||
totalPositionNextUse: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild2Id: orgChild2.id,
|
||||
profileIdNextHolder: Not(IsNull()) && Not(""),
|
||||
profileIdNextHolder: Not(IsNull()) || Not(""),
|
||||
},
|
||||
}),
|
||||
totalPositionNextVacant: await this.posMasterRepository.count({
|
||||
where: { orgChild2Id: orgChild2.id, profileIdNextHolder: IsNull() && "" },
|
||||
where: { orgChild2Id: orgChild2.id, profileIdNextHolder: IsNull() || "" },
|
||||
}),
|
||||
children: await Promise.all(
|
||||
orgChild3Data
|
||||
|
|
@ -848,25 +848,25 @@ export class OrganizationController extends Controller {
|
|||
totalPositionCurrentUse: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild3Id: orgChild3.id,
|
||||
profileIdCurrentHolder: Not(IsNull()) && Not(""),
|
||||
profileIdCurrentHolder: Not(IsNull()) || Not(""),
|
||||
},
|
||||
}),
|
||||
totalPositionCurrentVacant: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild3Id: orgChild3.id,
|
||||
profileIdCurrentHolder: IsNull() && "",
|
||||
profileIdCurrentHolder: IsNull() || "",
|
||||
},
|
||||
}),
|
||||
totalPositionNextUse: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild3Id: orgChild3.id,
|
||||
profileIdNextHolder: Not(IsNull()) && Not(""),
|
||||
profileIdNextHolder: Not(IsNull()) || Not(""),
|
||||
},
|
||||
}),
|
||||
totalPositionNextVacant: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild3Id: orgChild3.id,
|
||||
profileIdNextHolder: IsNull() && "",
|
||||
profileIdNextHolder: IsNull() || "",
|
||||
},
|
||||
}),
|
||||
children: await Promise.all(
|
||||
|
|
@ -895,26 +895,26 @@ export class OrganizationController extends Controller {
|
|||
totalPositionCurrentUse: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild4Id: orgChild4.id,
|
||||
profileIdCurrentHolder: Not(IsNull()) && Not(""),
|
||||
profileIdCurrentHolder: Not(IsNull()) || Not(""),
|
||||
},
|
||||
}),
|
||||
totalPositionCurrentVacant:
|
||||
await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild4Id: orgChild4.id,
|
||||
profileIdCurrentHolder: IsNull() && "",
|
||||
profileIdCurrentHolder: IsNull() || "",
|
||||
},
|
||||
}),
|
||||
totalPositionNextUse: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild4Id: orgChild4.id,
|
||||
profileIdNextHolder: Not(IsNull()) && Not(""),
|
||||
profileIdNextHolder: Not(IsNull()) || Not(""),
|
||||
},
|
||||
}),
|
||||
totalPositionNextVacant: await this.posMasterRepository.count({
|
||||
where: {
|
||||
orgChild4Id: orgChild4.id,
|
||||
profileIdNextHolder: IsNull() && "",
|
||||
profileIdNextHolder: IsNull() || "",
|
||||
},
|
||||
}),
|
||||
})),
|
||||
|
|
@ -1254,7 +1254,7 @@ export class OrganizationController extends Controller {
|
|||
.createQueryBuilder("orgRevision")
|
||||
.where("orgRevision.orgRevisionIsDraft = true")
|
||||
.andWhere("orgRevision.orgRevisionIsCurrent = false")
|
||||
.andWhere("DATE(orgRevision.orgPublishDate) = :today", { today })
|
||||
// .andWhere("DATE(orgRevision.orgPublishDate) = :today", { today })
|
||||
.getOne();
|
||||
if (!orgRevisionDraft) {
|
||||
return new HttpSuccess();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue