7152-devToTest_2414 #2228

Merged
alexm merged 636 commits from 7152-devToTest_2414 into test 2024-03-28 08:26:34 +00:00
1 changed files with 8 additions and 8 deletions
Showing only changes of commit 7a9f2bd79c - Show all commits

View File

@ -37,14 +37,14 @@ module.exports = Self => {
if (!machine) throw new Error(`plate ${plate} does not exist`);
await models.MachineWorker.updateAll(
{
or: [{workerFk: userId}, {machineFk: machine.id}],
and: [{outTime: null }]
},
{outTime: Date.vnNew()},
myOptions
);
await models.MachineWorker.updateAll(
{
or: [{workerFk: userId}, {machineFk: machine.id}],
and: [{outTime: null }]
},
{outTime: Date.vnNew()},
myOptions
);
await models.MachineWorker.create({machineFk: machine.id, workerFk: userId}, myOptions);