refactor: refs #6276 align rows
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
9afc3840c7
commit
7a9f2bd79c
|
@ -37,14 +37,14 @@ module.exports = Self => {
|
||||||
|
|
||||||
if (!machine) throw new Error(`plate ${plate} does not exist`);
|
if (!machine) throw new Error(`plate ${plate} does not exist`);
|
||||||
|
|
||||||
await models.MachineWorker.updateAll(
|
await models.MachineWorker.updateAll(
|
||||||
{
|
{
|
||||||
or: [{workerFk: userId}, {machineFk: machine.id}],
|
or: [{workerFk: userId}, {machineFk: machine.id}],
|
||||||
and: [{outTime: null }]
|
and: [{outTime: null }]
|
||||||
},
|
},
|
||||||
{outTime: Date.vnNew()},
|
{outTime: Date.vnNew()},
|
||||||
myOptions
|
myOptions
|
||||||
);
|
);
|
||||||
|
|
||||||
await models.MachineWorker.create({machineFk: machine.id, workerFk: userId}, myOptions);
|
await models.MachineWorker.create({machineFk: machine.id, workerFk: userId}, myOptions);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue