mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
commit
2788ac3abd
@ -82,6 +82,7 @@ class InventoryImport implements ToCollection, SkipsEmptyRows
|
|||||||
->pluck('id')
|
->pluck('id')
|
||||||
->toArray();
|
->toArray();
|
||||||
$downSkuIds = array_diff($onSkuIds, $updateIds);
|
$downSkuIds = array_diff($onSkuIds, $updateIds);
|
||||||
|
if ($downSkuIds) {
|
||||||
$goodsSkus = GoodsSku::query()->whereIn('id', $downSkuIds)
|
$goodsSkus = GoodsSku::query()->whereIn('id', $downSkuIds)
|
||||||
->get(['id', 'yesterday_num', 'stock'])
|
->get(['id', 'yesterday_num', 'stock'])
|
||||||
->toArray();
|
->toArray();
|
||||||
@ -91,6 +92,7 @@ class InventoryImport implements ToCollection, SkipsEmptyRows
|
|||||||
'stock' => 0,
|
'stock' => 0,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sleep(2);
|
sleep(2);
|
||||||
event(new StockUpdateEvent($onSkuIds, 1));
|
event(new StockUpdateEvent($onSkuIds, 1));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user