add report temp
This commit is contained in:
parent
5d185ee60e
commit
3edc66081f
3 changed files with 190 additions and 84 deletions
|
|
@ -1671,7 +1671,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
}
|
||||
const [profiles, total] = await this.profileRepo
|
||||
.createQueryBuilder("profileEmployee")
|
||||
.leftJoinAndSelect("profileEmployee.next_holders", "next_holders")
|
||||
.leftJoinAndSelect("profileEmployee.next_holderTemps", "next_holderTemps")
|
||||
.leftJoinAndSelect("profileEmployee.posLevel", "posLevel")
|
||||
.leftJoinAndSelect("profileEmployee.posType", "posType")
|
||||
.where(
|
||||
|
|
@ -1682,6 +1682,7 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
position: `%${requestBody.position}%`,
|
||||
},
|
||||
)
|
||||
.andWhere("profileEmployee.isLeave IS FALSE")
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.where(
|
||||
|
|
@ -1738,17 +1739,17 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
new Brackets((qb) => {
|
||||
qb.where("profileEmployee.id NOT IN (:...ids)", {
|
||||
ids:
|
||||
orgRevision.employeePosMasters
|
||||
orgRevision.employeeTempPosMasters
|
||||
.filter((x) => x.next_holderId != null)
|
||||
.map((x) => x.next_holderId).length == 0
|
||||
? ["zxc"]
|
||||
: orgRevision.employeePosMasters
|
||||
: orgRevision.employeeTempPosMasters
|
||||
.filter((x) => x.next_holderId != null)
|
||||
.map((x) => x.next_holderId),
|
||||
});
|
||||
}),
|
||||
)
|
||||
.andWhere("profileEmployee.employeeClass = :employeeClass", { employeeClass: "PERM" })
|
||||
.andWhere("profileEmployee.employeeClass = :employeeClass", { employeeClass: "TEMP" })
|
||||
.skip((requestBody.page - 1) * requestBody.pageSize)
|
||||
.take(requestBody.pageSize)
|
||||
.getManyAndCount();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue