refactor table holidayType and holidayDetail
gitea/salix/2040-update_view_holidays This commit looks good
Details
gitea/salix/2040-update_view_holidays This commit looks good
Details
This commit is contained in:
parent
1e8059c9f5
commit
7bb5b19398
|
@ -23,11 +23,11 @@ module.exports = Self => {
|
||||||
beginningYear.setHours(0, 0, 0, 0);
|
beginningYear.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
let holidays = await Self.rawSql(
|
let holidays = await Self.rawSql(
|
||||||
`SELECT lh.dated, lhl.description, lht.name, w.id
|
`SELECT lh.dated, chn.name, cht.name, w.id
|
||||||
FROM vn.holiday lh
|
FROM vn.holiday lh
|
||||||
JOIN vn.workCenter w ON w.id = lh.workcenterFk
|
JOIN vn.workCenter w ON w.id = lh.workcenterFk
|
||||||
LEFT JOIN vn.holidayDetail lhl ON lhl.id = lh.holidayDetailFk
|
LEFT JOIN vn.calendarHolidaysName chn ON chn.id = lh.holidayDetailFk
|
||||||
LEFT JOIN vn.holidayType lht ON lht.id = lh.holidayTypeFk
|
LEFT JOIN vn.calendarHolidaysType cht ON cht.id = lh.holidayTypeFk
|
||||||
WHERE w.warehouseFk = ? AND lh.dated >= ?`, [warehouseFk, beginningYear]);
|
WHERE w.warehouseFk = ? AND lh.dated >= ?`, [warehouseFk, beginningYear]);
|
||||||
|
|
||||||
return holidays.map(holiday => {
|
return holidays.map(holiday => {
|
||||||
|
|
Loading…
Reference in New Issue