修复匹配逻辑
This commit is contained in:
parent
5e220be272
commit
84a0a02888
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user