feat: update commissionWorkCenterFk where is not calculated
gitea/salix/pipeline/head This commit is unstable
Details
gitea/salix/pipeline/head This commit is unstable
Details
This commit is contained in:
parent
6f7a4fc5ff
commit
d9a12fd203
|
@ -0,0 +1,10 @@
|
||||||
|
UPDATE `vn`.`route` r
|
||||||
|
JOIN(SELECT r.id, wl.workcenterFk
|
||||||
|
FROM `vn`.`route` r
|
||||||
|
JOIN `vn`.`routeLog` rl ON rl.originFk = r.id
|
||||||
|
JOIN `vn`.`workerLabour` wl ON wl.workerFk = rl.userFk
|
||||||
|
AND r.created BETWEEN wl.started AND IFNULL(wl.ended, r.created)
|
||||||
|
WHERE r.created BETWEEN '2021-12-01' AND CURDATE()
|
||||||
|
AND rl.action = 'insert'
|
||||||
|
)sub ON sub.id = r.id
|
||||||
|
SET r.commissionWorkCenterFk = sub.workcenterFk;
|
Loading…
Reference in New Issue