#873 (1),(3)
This commit is contained in:
parent
9e4f18a1d6
commit
d5d65db580
2 changed files with 19 additions and 0 deletions
|
|
@ -1087,6 +1087,9 @@ export class EmployeePositionController extends Controller {
|
||||||
.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")
|
.leftJoinAndSelect("posMaster.orgRevision", "orgRevision")
|
||||||
|
.leftJoinAndSelect("posMaster.positions", "positions")
|
||||||
|
.leftJoinAndSelect("positions.posType", "posType")
|
||||||
|
.leftJoinAndSelect("positions.posLevel", "posLevel")
|
||||||
.where(conditions)
|
.where(conditions)
|
||||||
.orWhere(
|
.orWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
|
|
@ -1132,6 +1135,21 @@ export class EmployeePositionController extends Controller {
|
||||||
.andWhere(revisionCondition);
|
.andWhere(revisionCondition);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
.orWhere(
|
||||||
|
new Brackets((qb) => {
|
||||||
|
qb.andWhere(
|
||||||
|
body.keyword != null && body.keyword != ""
|
||||||
|
? `CONCAT(posType.posTypeShortName,' ',posLevel.posLevelName) like '%${body.keyword}%'`
|
||||||
|
: "1=1",
|
||||||
|
{
|
||||||
|
keyword: `%${body.keyword}%`,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.andWhere(checkChildConditions)
|
||||||
|
.andWhere(typeCondition)
|
||||||
|
.andWhere(revisionCondition);
|
||||||
|
}),
|
||||||
|
)
|
||||||
.orderBy("posMaster.posMasterOrder", "ASC")
|
.orderBy("posMaster.posMasterOrder", "ASC")
|
||||||
.skip((body.page - 1) * body.pageSize)
|
.skip((body.page - 1) * body.pageSize)
|
||||||
.take(body.pageSize)
|
.take(body.pageSize)
|
||||||
|
|
|
||||||
|
|
@ -864,6 +864,7 @@ export class ProfileEmployeeTempController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(record, body);
|
Object.assign(record, body);
|
||||||
|
record.prefixMain = record.prefix;
|
||||||
record.createdUserId = request.user.sub;
|
record.createdUserId = request.user.sub;
|
||||||
record.createdFullName = request.user.name;
|
record.createdFullName = request.user.name;
|
||||||
record.createdAt = new Date();
|
record.createdAt = new Date();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue