no message
This commit is contained in:
parent
432c3f6851
commit
5f97ab1ac7
3 changed files with 10 additions and 9 deletions
|
|
@ -1066,6 +1066,7 @@ export class PositionController extends Controller {
|
||||||
.leftJoinAndSelect("posMaster.orgChild4", "orgChild4")
|
.leftJoinAndSelect("posMaster.orgChild4", "orgChild4")
|
||||||
.leftJoinAndSelect("posMaster.current_holder", "current_holder")
|
.leftJoinAndSelect("posMaster.current_holder", "current_holder")
|
||||||
.leftJoinAndSelect("posMaster.next_holder", "next_holder")
|
.leftJoinAndSelect("posMaster.next_holder", "next_holder")
|
||||||
|
.leftJoinAndSelect("posMaster.orgRevision", "orgRevision")
|
||||||
.where(conditions)
|
.where(conditions)
|
||||||
.orWhere(
|
.orWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
|
|
@ -1085,7 +1086,7 @@ export class PositionController extends Controller {
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
qb.andWhere(
|
qb.andWhere(
|
||||||
body.keyword != null && body.keyword != ""
|
body.keyword != null && body.keyword != ""
|
||||||
? `CONCAT(current_holder.prefix, current_holder.firstName, current_holder.lastName) like '%${body.keyword}%'`
|
? `CASE WHEN orgRevision.orgRevisionIsDraft = true THEN CONCAT(next_holder.prefix, next_holder.firstName,' ', next_holder.lastName) ELSE CONCAT(current_holder.prefix, current_holder.firstName,' ' , current_holder.lastName) END LIKE '%${body.keyword}%'`
|
||||||
: "1=1",
|
: "1=1",
|
||||||
{
|
{
|
||||||
keyword: `%${body.keyword}%`,
|
keyword: `%${body.keyword}%`,
|
||||||
|
|
|
||||||
|
|
@ -384,7 +384,7 @@ export class ProfileController extends Controller {
|
||||||
.andWhere(
|
.andWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
qb.where("next_holders.id IS NULL").orWhere("next_holders.id NOT IN (:...ids)", {
|
qb.where("next_holders.id IS NULL").orWhere("next_holders.id NOT IN (:...ids)", {
|
||||||
ids: orgRevision.posMasters.map((x) => x.id),
|
ids: orgRevision.posMasters.map((x) => x.next_holderId),
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -79,25 +79,25 @@ export class PosDict extends EntityBase {
|
||||||
|
|
||||||
export class CreatePosDict {
|
export class CreatePosDict {
|
||||||
@Column()
|
@Column()
|
||||||
posDictName: string;
|
posDictName: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
posDictField: string;
|
posDictField: string | null;
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
posTypeId: string;
|
posTypeId: string | null;
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
posLevelId: string;
|
posLevelId: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
posExecutiveId?: string;
|
posExecutiveId?: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
posDictExecutiveField: string;
|
posDictExecutiveField: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
posDictArea: string;
|
posDictArea: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isSpecial: boolean;
|
isSpecial: boolean;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue