From 64a82cf1354ab38e973836f772e1ffb063c481ef Mon Sep 17 00:00:00 2001 From: chenxi Date: Wed, 30 Sep 2026 14:48:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=A1=E7=A0=81+=E4=BB=93=E5=BA=93=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=B8=BA=E5=95=86=E5=93=81=E7=BC=96=E7=A0=81+?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E7=AE=80=E7=A7=B0=EF=BC=88=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E5=B9=B6=E5=85=A5=E8=A1=8C=E5=90=8C=E6=AD=A5=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E5=B9=B6=E9=87=8D=E7=AE=977/8=E6=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Commands/ImportProductMonthlyWeightedAverageBase.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/ImportProductMonthlyWeightedAverageBase.php b/app/Console/Commands/ImportProductMonthlyWeightedAverageBase.php index 6eeeb1cf6..d9e2a6d3b 100644 --- a/app/Console/Commands/ImportProductMonthlyWeightedAverageBase.php +++ b/app/Console/Commands/ImportProductMonthlyWeightedAverageBase.php @@ -95,7 +95,8 @@ class ImportProductMonthlyWeightedAverageBase extends Command $payload[$rowKey] = [ 'report_month' => $month->toDateString(), 'row_key' => $rowKey, - 'barcode_warehouse' => $item['warehouse_short_name'] . $item['product_code'], + // 条码+仓库 = 商品编码 + 仓库简称 + 'barcode_warehouse' => $item['product_code'] . $item['warehouse_short_name'], 'warehouse_short_name' => $item['warehouse_short_name'], 'product_code' => $item['product_code'], 'opening_unit_price' => null, @@ -116,7 +117,7 @@ class ImportProductMonthlyWeightedAverageBase extends Command $payload[$rowKey] = [ 'report_month' => $month->toDateString(), 'row_key' => $rowKey, - 'barcode_warehouse' => '南昌樵舍仓' . $code, + 'barcode_warehouse' => $code . '南昌樵舍仓', 'warehouse_short_name' => '南昌樵舍仓', 'product_code' => $code, 'opening_unit_price' => null, @@ -252,7 +253,8 @@ class ImportProductMonthlyWeightedAverageBase extends Command $previousStatus = trim((string) ($cells[15] ?? '')); yield [ - 'barcode_warehouse' => trim((string) ($cells[1] ?? '')) ?: $shortName . $productCode, + // 条码+仓库统一为「仓库简称 + 商品编码」,不再沿用表1 里的单元格写法。 + 'barcode_warehouse' => $shortName . $productCode, 'warehouse_short_name' => $shortName, 'product_code' => mb_strtoupper($productCode), 'opening_unit_price' => $price === '' ? null : round((float) str_replace(',', '', $price), 2),