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