From d0fd04071520dbccbcb7d6b92d3b54e0ba01b3f2 Mon Sep 17 00:00:00 2001 From: limeng <1131177064@qq.com> Date: Thu, 10 Sep 2026 14:02:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8A=E4=BB=A3=E5=8F=91=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=EF=BC=9A=E6=8E=A5=E5=85=A5=E9=92=89=E9=92=89=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=EF=BC=88=E5=85=A8=E9=83=A8=E5=B7=B2=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=89+=20=E6=A0=87=E7=AD=BE=20+=20=E5=95=86=E5=93=81?= =?UTF-8?q?=E7=BC=96=E7=A0=81=20+=20=E6=98=8E=E7=BB=86=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E4=B8=8ESQL=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 按流程状态=已完成同步全部记录(去掉收款人过滤) - 明细表「收款费用明细」JSON 解码并按行展开为多行 - 新增「标签」列:收款人=宁波顾家望业家居有限公司→刘萧代发,其余→1688代发 - 「料号」列改为「商品编码」(值留空) - 仓库改为数据库层分页 + SQL 聚合,避免大数据量拖垮页面 Co-Authored-By: Claude Opus 4.8 --- app/Http/Controllers/Business/Pages.php | 4 ++-- config/upstream_mirrors.php | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Business/Pages.php b/app/Http/Controllers/Business/Pages.php index 962ab187..abe012ad 100644 --- a/app/Http/Controllers/Business/Pages.php +++ b/app/Http/Controllers/Business/Pages.php @@ -1808,7 +1808,7 @@ class Pages extends Controller fputcsv($csv, [ 'ID', '款式编码', '商品编码', '商品名称', '商品简称', '规格 / 颜色', '品牌', '类目', '供应商', '销售价', '成本价', '普通商品采购价', - '工作平台价格', '工作平台价格生效日期', '1688代发单价', + '工作平台价格', '工作平台价格生效日期', '定价状态', '变价前价格', '变价后价格', '差额', '变价时间', '数据来源', '市场价', '商品状态', '库存同步', '业务更新时间', ]); @@ -1839,7 +1839,7 @@ class Pages extends Controller $row->purchase_price, $row->work_platform_price ?? null, $this->priceChangeDate($row->work_platform_price_effect_time ?? null), - $row->purchase_order_unit_price, + $row->pricing_status ?? '未定价', $row->price_change_before_price ?? null, $row->price_change_after_price ?? null, $row->price_change_diff_amount ?? null, diff --git a/config/upstream_mirrors.php b/config/upstream_mirrors.php index bb07e994..5e6da04c 100644 --- a/config/upstream_mirrors.php +++ b/config/upstream_mirrors.php @@ -127,8 +127,8 @@ return [ // JianSun 旧业务库的商品价格记录表。页面按商品编码取最近一条有效记录, // 不改动普通商品自身的采购价与成本价口径。 'product_price_changes' => [ - 'dataset_key' => 'jiansun.dbo.op_priceRecord', - 'target_table' => 'js_op_price_record', + 'dataset_key' => 'jiansun.dbo.pm_priceAdjustment_log', + 'target_table' => 'js_pm_price_adjustment_log', ], // 工作平台采购价格按 SKU 补充到普通商品资料;页面只读取共享镜像。 @@ -474,6 +474,23 @@ return [ ], ], + // 变价明细(采购价变价历史):skucode 对应 ops_jst_sku.sku_id(商品编码)。 + // 页面按商品编码取最近一条 priceType=1(变价)记录,填变价前/后/差额/时间。 + // 无可靠修改时间(createTime 多为空),按 Id 追加,周期全量校准修正历史。 + 'jiansun.dbo.pm_priceAdjustment_log' => [ + 'source_key' => 'jiansun', + 'schema' => 'dbo', + 'object' => 'pm_priceAdjustment_log', + 'target' => 'js_pm_price_adjustment_log', + 'keys' => ['Id'], + 'watermark' => null, + 'columns' => ['Id', 'skucode', 'priceType', 'originalPrice', 'afterPrice', 'diffPrice', 'effectStartTime', 'effectEndTime', 'createTime'], + 'indexes' => [ + ['skucode(64)', 'effectStartTime', 'Id'], + ['Id'], + ], + ], + // 工作平台 2.0:快递资料及其网点、打款账户。页面只读取共享镜像, // 首次使用前需由刷新节点显式执行对应数据集的 --full 同步。 'jiansun.dbo.wp_express' => [