#6276 createNewWarehouse methods migrated from silex to salix #1850
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue