no message
This commit is contained in:
parent
de8944dbc9
commit
ec036d4c59
1 changed files with 40 additions and 41 deletions
|
|
@ -25,7 +25,6 @@ import { OrgChild3 } from "../entities/OrgChild3";
|
||||||
import { OrgChild4 } from "../entities/OrgChild4";
|
import { OrgChild4 } from "../entities/OrgChild4";
|
||||||
import { PosMaster } from "../entities/PosMaster";
|
import { PosMaster } from "../entities/PosMaster";
|
||||||
import { Position } from "../entities/Position";
|
import { Position } from "../entities/Position";
|
||||||
import CallAPI from "../interfaces/call-api";
|
|
||||||
import { ProfileSalary } from "../entities/ProfileSalary";
|
import { ProfileSalary } from "../entities/ProfileSalary";
|
||||||
import { Profile } from "../entities/Profile";
|
import { Profile } from "../entities/Profile";
|
||||||
import { RequestWithUser } from "../middlewares/user";
|
import { RequestWithUser } from "../middlewares/user";
|
||||||
|
|
@ -1475,16 +1474,16 @@ export class OrganizationController extends Controller {
|
||||||
? await AppDataSource.getRepository(OrgChild1)
|
? await AppDataSource.getRepository(OrgChild1)
|
||||||
.createQueryBuilder("orgChild1")
|
.createQueryBuilder("orgChild1")
|
||||||
.where("orgChild1.orgRootId IN (:...ids)", { ids: orgRootIds })
|
.where("orgChild1.orgRootId IN (:...ids)", { ids: orgRootIds })
|
||||||
.andWhere(
|
// .andWhere(
|
||||||
_data.child1 != undefined && _data.child1 != null
|
// _data.child1 != undefined && _data.child1 != null
|
||||||
? _data.child1[0] != null
|
// ? _data.child1[0] != null
|
||||||
? `orgChild1.id IN (:...node)`
|
// ? `orgChild1.id IN (:...node)`
|
||||||
: `orgChild1.id is null`
|
// : `orgChild1.id is null`
|
||||||
: "1=1",
|
// : "1=1",
|
||||||
{
|
// {
|
||||||
node: _data.child1,
|
// node: _data.child1,
|
||||||
},
|
// },
|
||||||
)
|
// )
|
||||||
.select([
|
.select([
|
||||||
"orgChild1.id",
|
"orgChild1.id",
|
||||||
"orgChild1.isOfficer",
|
"orgChild1.isOfficer",
|
||||||
|
|
@ -1510,16 +1509,16 @@ export class OrganizationController extends Controller {
|
||||||
? await AppDataSource.getRepository(OrgChild2)
|
? await AppDataSource.getRepository(OrgChild2)
|
||||||
.createQueryBuilder("orgChild2")
|
.createQueryBuilder("orgChild2")
|
||||||
.where("orgChild2.orgChild1Id IN (:...ids)", { ids: orgChild1Ids })
|
.where("orgChild2.orgChild1Id IN (:...ids)", { ids: orgChild1Ids })
|
||||||
.andWhere(
|
// .andWhere(
|
||||||
_data.child2 != undefined && _data.child2 != null
|
// _data.child2 != undefined && _data.child2 != null
|
||||||
? _data.child2[0] != null
|
// ? _data.child2[0] != null
|
||||||
? `orgChild2.id IN (:...node)`
|
// ? `orgChild2.id IN (:...node)`
|
||||||
: `orgChild2.id is null`
|
// : `orgChild2.id is null`
|
||||||
: "1=1",
|
// : "1=1",
|
||||||
{
|
// {
|
||||||
node: _data.child2,
|
// node: _data.child2,
|
||||||
},
|
// },
|
||||||
)
|
// )
|
||||||
.select([
|
.select([
|
||||||
"orgChild2.id",
|
"orgChild2.id",
|
||||||
"orgChild2.orgChild2Name",
|
"orgChild2.orgChild2Name",
|
||||||
|
|
@ -1545,16 +1544,16 @@ export class OrganizationController extends Controller {
|
||||||
? await AppDataSource.getRepository(OrgChild3)
|
? await AppDataSource.getRepository(OrgChild3)
|
||||||
.createQueryBuilder("orgChild3")
|
.createQueryBuilder("orgChild3")
|
||||||
.where("orgChild3.orgChild2Id IN (:...ids)", { ids: orgChild2Ids })
|
.where("orgChild3.orgChild2Id IN (:...ids)", { ids: orgChild2Ids })
|
||||||
.andWhere(
|
// .andWhere(
|
||||||
_data.child3 != undefined && _data.child3 != null
|
// _data.child3 != undefined && _data.child3 != null
|
||||||
? _data.child3[0] != null
|
// ? _data.child3[0] != null
|
||||||
? `orgChild3.id IN (:...node)`
|
// ? `orgChild3.id IN (:...node)`
|
||||||
: `orgChild3.id is null`
|
// : `orgChild3.id is null`
|
||||||
: "1=1",
|
// : "1=1",
|
||||||
{
|
// {
|
||||||
node: _data.child3,
|
// node: _data.child3,
|
||||||
},
|
// },
|
||||||
)
|
// )
|
||||||
.select([
|
.select([
|
||||||
"orgChild3.id",
|
"orgChild3.id",
|
||||||
"orgChild3.orgChild3Name",
|
"orgChild3.orgChild3Name",
|
||||||
|
|
@ -1580,16 +1579,16 @@ export class OrganizationController extends Controller {
|
||||||
? await AppDataSource.getRepository(OrgChild4)
|
? await AppDataSource.getRepository(OrgChild4)
|
||||||
.createQueryBuilder("orgChild4")
|
.createQueryBuilder("orgChild4")
|
||||||
.where("orgChild4.orgChild3Id IN (:...ids)", { ids: orgChild3Ids })
|
.where("orgChild4.orgChild3Id IN (:...ids)", { ids: orgChild3Ids })
|
||||||
.andWhere(
|
// .andWhere(
|
||||||
_data.child4 != undefined && _data.child4 != null
|
// _data.child4 != undefined && _data.child4 != null
|
||||||
? _data.child4[0] != null
|
// ? _data.child4[0] != null
|
||||||
? `orgChild4.id IN (:...node)`
|
// ? `orgChild4.id IN (:...node)`
|
||||||
: `orgChild4.id is null`
|
// : `orgChild4.id is null`
|
||||||
: "1=1",
|
// : "1=1",
|
||||||
{
|
// {
|
||||||
node: _data.child4,
|
// node: _data.child4,
|
||||||
},
|
// },
|
||||||
)
|
// )
|
||||||
.select([
|
.select([
|
||||||
"orgChild4.id",
|
"orgChild4.id",
|
||||||
"orgChild4.orgChild4Name",
|
"orgChild4.orgChild4Name",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue