From 84a0a02888e61af3f37e9fd648fb164d108199f1 Mon Sep 17 00:00:00 2001 From: zzh Date: Thu, 26 Mar 2026 11:27:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8C=B9=E9=85=8D=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/app.py b/server/app.py index ff38053..fed42dd 100755 --- a/server/app.py +++ b/server/app.py @@ -5071,13 +5071,12 @@ def get_customer_orders(): material = row['material'] or '' order_qty = row['quantity'] or 0 - # 解析客户订单物料信息(格式:物料名称\n规格型号) + # 只取第一行(第一个换行符之前的内容)作为物料名称 material_lines = material.strip().split('\n') order_material_name = material_lines[0].strip() if len(material_lines) > 0 else '' - order_spec_model = material_lines[1].strip() if len(material_lines) > 1 else '' # 查询对账单中已发货数量 - # 匹配策略:根据合同编号,用物料第一行名字判断是否互相包含 + # 匹配策略:根据合同编号,用第一行物料名称判断是否互相包含 shipped_qty = 0 try: if order_material_name: @@ -5091,8 +5090,7 @@ def get_customer_orders(): rec_material = (rec_row['material_name'] or '').strip() rec_qty = rec_row['quantity'] or 0 - # 只用物料第一行名字判断是否互相包含(忽略大小写) - # 客户订单的物料第一行 vs 对账单的物料名称 + # 只用第一行物料名称判断是否互相包含(忽略大小写) if rec_material and ( order_material_name.lower() in rec_material.lower() or rec_material.lower() in order_material_name.lower()