หาคนเกษียณตามปี
This commit is contained in:
parent
58274b479c
commit
f2efb44336
3 changed files with 29 additions and 29 deletions
|
|
@ -5032,7 +5032,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
|
||||
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
|
||||
.leftJoinAndSelect("current_holders.positions", "positions")
|
||||
.where("YEAR(profileEmployee.dateRetire) = :year", { year })
|
||||
// calculate range: start = 2 Oct of (year-1), end = 1 Oct of year (inclusive)
|
||||
.where("profile.dateRetire BETWEEN :start AND :end", {
|
||||
start: `${year - 1}-10-02`,
|
||||
end: `${year}-10-01`,
|
||||
})
|
||||
.getMany();
|
||||
|
||||
if (!profiles || profiles.length === 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue