feat: #10000 盘点导入优化
This commit is contained in:
parent
38abb92032
commit
82cf33dfcc
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Imports;
|
namespace App\Imports;
|
||||||
|
|
||||||
use App\Events\StockUpdateEvent;
|
|
||||||
use App\Models\DailyStockRecord;
|
use App\Models\DailyStockRecord;
|
||||||
use App\Models\Goods;
|
use App\Models\Goods;
|
||||||
use App\Models\GoodsSku;
|
use App\Models\GoodsSku;
|
||||||
@ -46,7 +45,7 @@ class InventoryImport implements ToCollection, SkipsEmptyRows
|
|||||||
$goodsSku = GoodsSku::query()
|
$goodsSku = GoodsSku::query()
|
||||||
->where('goods_id', $hasGoods[$row[0]]['id'])
|
->where('goods_id', $hasGoods[$row[0]]['id'])
|
||||||
->where('sku_code', $row[4])
|
->where('sku_code', $row[4])
|
||||||
->first(['id']);
|
->first();
|
||||||
if (empty($goodsSku)) {
|
if (empty($goodsSku)) {
|
||||||
Log::warning(json_encode($row, 256) . '=====库存导入未找到');
|
Log::warning(json_encode($row, 256) . '=====库存导入未找到');
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user