hotFix: workerTimeControl use department.hasToRefill
This commit is contained in:
parent
9182549b47
commit
8328dd6f4c
|
@ -149,7 +149,8 @@ module.exports = Self => {
|
||||||
FROM tmp.timeControlError tce
|
FROM tmp.timeControlError tce
|
||||||
JOIN vn.workerTimeControl wtc ON wtc.id = tce.id
|
JOIN vn.workerTimeControl wtc ON wtc.id = tce.id
|
||||||
)sub ON sub.userFk = tb.userFk
|
)sub ON sub.userFk = tb.userFk
|
||||||
WHERE sub.userFK IS NULL
|
WHERE d.hasToRefill
|
||||||
|
AND sub.userFK IS NULL
|
||||||
AND IFNULL(?, u.id) = u.id
|
AND IFNULL(?, u.id) = u.id
|
||||||
AND b.companyCodeFk = 'VNL'
|
AND b.companyCodeFk = 'VNL'
|
||||||
AND w.businessFk
|
AND w.businessFk
|
||||||
|
@ -163,7 +164,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
const sql = ParameterizedSQL.join(stmts, ';');
|
const sql = ParameterizedSQL.join(stmts, ';');
|
||||||
const days = await conn.executeStmt(sql, myOptions);
|
const days = await conn.executeStmt(sql, myOptions);
|
||||||
|
console.log(days[index][0]);
|
||||||
let previousWorkerFk = days[index][0].workerFk;
|
let previousWorkerFk = days[index][0].workerFk;
|
||||||
let previousReceiver = days[index][0].receiver;
|
let previousReceiver = days[index][0].receiver;
|
||||||
|
|
||||||
|
@ -356,7 +357,7 @@ module.exports = Self => {
|
||||||
previousReceiver = day.receiver;
|
previousReceiver = day.receiver;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const stmts = [];
|
const stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
|
Loading…
Reference in New Issue