From 2ee38fb4001f21e484bdda439d8be39cb0345967 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 19 Oct 2026 18:26:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8B=86=E5=8D=95=E8=84=9A=E6=9C=AC):=20?= =?UTF-8?q?=E4=BA=92=E6=96=A5=E6=97=A7=E7=94=9F=E6=95=88=E5=8D=95=E6=97=B6?= =?UTF-8?q?=E6=8E=92=E9=99=A4=E6=BA=90=E5=8D=95=E8=87=AA=E8=BA=AB=EF=BC=88?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=BC=94=E7=BB=83=E5=8F=91=E7=8E=B0=E6=BA=90?= =?UTF-8?q?=E5=8D=95=E8=A2=AB=E8=AF=AF=E7=BD=AE=20status=3D3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/scripts/split-multi-customer-quote-sheets.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/scripts/split-multi-customer-quote-sheets.ts b/server/scripts/split-multi-customer-quote-sheets.ts index 5e9fb18..de3f35c 100644 --- a/server/scripts/split-multi-customer-quote-sheets.ts +++ b/server/scripts/split-multi-customer-quote-sheets.ts @@ -14,8 +14,8 @@ * ⚠️ 本库业务表启用 **RLS**:不带 `app.branch_code` 时查询恒为 0 行(2026-10-18 实测)。 * 所以所有查询/写入都必须在 `withTenant()` 内执行。 */ -import { pool } from '../src/db'; -import { newSheetCode } from '../src/services/quoteSheetService'; +import { pool } from '../dist/db'; +import { newSheetCode } from '../dist/services/quoteSheetService'; const argv = process.argv.slice(2); const execute = argv.includes('--execute'); @@ -209,11 +209,11 @@ async function main() { ); await client.query( `UPDATE ${schema}.customer_quote_sheets SET status = 3, updated_at = NOW() - WHERE status = 1 AND quote_sheet_code <> $1 + WHERE status = 1 AND quote_sheet_code <> $1 AND quote_sheet_code <> $3 AND quote_sheet_code IN ( SELECT quote_sheet_code FROM ${schema}.customer_quote_sheet_customers WHERE customer_code = $2 )`, - [nextCode, extra] + [nextCode, extra, row.code] ); createdCodes.push(`${extra}=${nextCode}`); }