update
This commit is contained in:
parent
3230ace376
commit
e71103781c
3 changed files with 20 additions and 6 deletions
|
|
@ -78,8 +78,15 @@ import { ViewColumn, ViewEntity } from "typeorm";
|
|||
position ON employeePosMaster.id = position.posMasterId
|
||||
LEFT JOIN
|
||||
posExecutive ON position.posExecutiveId = posExecutive.id
|
||||
LEFT JOIN
|
||||
profileDiscipline ON profileDiscipline.profileId = profileEmployee.id
|
||||
LEFT JOIN (
|
||||
SELECT *
|
||||
FROM profileDisciplineEmployee pd1
|
||||
WHERE pd1.date = (
|
||||
SELECT MAX(pd2.date)
|
||||
FROM profileDisciplineEmployee pd2
|
||||
WHERE pd2.profileId = pd1.profileId
|
||||
)
|
||||
) AS profileDiscipline ON profileDiscipline.profileId = profileEmployee.id
|
||||
LEFT JOIN
|
||||
profileLeave ON profileLeave.profileId = profileEmployee.id
|
||||
LEFT JOIN
|
||||
|
|
|
|||
|
|
@ -75,8 +75,15 @@ import { ViewColumn, ViewEntity } from "typeorm";
|
|||
position ON posMaster.id = position.posMasterId
|
||||
LEFT JOIN
|
||||
posExecutive ON position.posExecutiveId = posExecutive.id
|
||||
LEFT JOIN
|
||||
profileDiscipline ON profileDiscipline.profileId = profile.id
|
||||
LEFT JOIN (
|
||||
SELECT *
|
||||
FROM profileDiscipline pd1
|
||||
WHERE pd1.date = (
|
||||
SELECT MAX(pd2.date)
|
||||
FROM profileDiscipline pd2
|
||||
WHERE pd2.profileId = pd1.profileId
|
||||
)
|
||||
) AS profileDiscipline ON profileDiscipline.profileId = profile.id
|
||||
LEFT JOIN
|
||||
profileLeave ON profileLeave.profileId = profile.id
|
||||
LEFT JOIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue