feat: #10000 盘点导入优化

This commit is contained in:
赵世界 2022-09-16 10:50:48 +08:00
parent 38abb92032
commit 82cf33dfcc

View File

@ -2,7 +2,6 @@
namespace App\Imports;
use App\Events\StockUpdateEvent;
use App\Models\DailyStockRecord;
use App\Models\Goods;
use App\Models\GoodsSku;
@ -46,7 +45,7 @@ class InventoryImport implements ToCollection, SkipsEmptyRows
$goodsSku = GoodsSku::query()
->where('goods_id', $hasGoods[$row[0]]['id'])
->where('sku_code', $row[4])
->first(['id']);
->first();
if (empty($goodsSku)) {
Log::warning(json_encode($row, 256) . '=====库存导入未找到');
continue;