From 708402c7fbd6160d643e04c8ba723ee7b514fa86 Mon Sep 17 00:00:00 2001 From: houhuan Date: Mon, 30 Mar 2026 13:34:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=AE=A2=E5=8D=95=E5=A4=84=E7=90=86):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=A8=E7=A2=A7=E6=9C=88=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E9=A2=84=E5=A4=84=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在特殊供应商服务中添加 process_yang_biyue 方法,用于处理经手人为"杨碧月"的订单。该方法能够自动识别相关列并进行数据清洗,生成标准格式的预处理文件。 同时优化订单服务的处理流程,在 process_excel 方法中集成特殊供应商预处理检查,通过 _check_special_preprocess 方法识别杨碧月订单并执行列映射转换,确保数据能够被后续标准流程正确处理。 --- app/services/order_service.py | 94 ++++- app/services/special_suppliers_service.py | 68 ++++ config.ini | 1 + logs/app.core.excel.converter.log | 50 +++ ...excel.handlers.unit_converter_handlers.log | 41 +++ logs/app.core.excel.merger.log | 18 + logs/app.core.excel.processor.log | 344 ++++++++++++++++++ logs/app.core.excel.validators.log | 56 +++ logs/app.services.order_service.log | 32 ++ 9 files changed, 698 insertions(+), 6 deletions(-) diff --git a/app/services/order_service.py b/app/services/order_service.py index 9a287d0..a67e6d9 100644 --- a/app/services/order_service.py +++ b/app/services/order_service.py @@ -4,6 +4,7 @@ 提供订单处理服务,协调Excel处理和订单合并流程。 """ +import os from typing import Dict, List, Optional, Tuple, Union, Any, Callable from ..config.settings import ConfigManager @@ -45,7 +46,7 @@ class OrderService: def process_excel(self, file_path: Optional[str] = None, progress_cb: Optional[Callable[[int], None]] = None) -> Optional[str]: """ - 处理Excel文件,生成采购单 + 处理Excel订单文件,生成标准采购单 Args: file_path: Excel文件路径,如果为None则处理最新的文件 @@ -53,12 +54,93 @@ class OrderService: Returns: 输出采购单文件路径,如果处理失败则返回None """ - if file_path: - logger.info(f"OrderService开始处理指定Excel文件: {file_path}") - return self.excel_processor.process_specific_file(file_path, progress_cb=progress_cb) - else: + if not file_path: + file_path = self.excel_processor.get_latest_excel() + if not file_path: + logger.warning("未找到可处理的Excel文件") + return None logger.info("OrderService开始处理最新Excel文件") - return self.excel_processor.process_latest_file(progress_cb=progress_cb) + else: + logger.info(f"OrderService开始处理指定Excel文件: {file_path}") + + # 检查是否需要特殊的供应商预处理(如杨碧月) + try: + from .special_suppliers_service import SpecialSuppliersService + special_service = SpecialSuppliersService(self.config) + + # 尝试识别并预处理(注意:这里不再传入 progress_cb 避免无限递归或重复进度条, + # 或者我们在 special_service 内部逻辑中处理完后直接返回结果) + # 为了避免循环调用,我们在 SpecialSuppliersService 内部不再调用 process_excel, + # 而是让 process_excel 识别后自己决定是否处理预处理后的文件。 + + # 我们新增一个 check_and_preprocess 方法 + preprocessed_path = self._check_special_preprocess(file_path) + if preprocessed_path: + logger.info(f"检测到特殊供应商,已生成预处理文件: {preprocessed_path}") + file_path = preprocessed_path + except Exception as e: + logger.error(f"检查特殊预处理时出错: {e}") + + return self.excel_processor.process_specific_file(file_path, progress_cb=progress_cb) + + def _check_special_preprocess(self, file_path: str) -> Optional[str]: + """检查并执行特殊的预处理""" + try: + from app.core.utils.file_utils import smart_read_excel + import pandas as pd + + # 仅读取前几行进行识别 + df_head = smart_read_excel(file_path, nrows=50) + + # 1. 检查“杨碧月” + handler_col = None + for col in df_head.columns: + if '经手人' in str(col): + handler_col = col + break + + if handler_col is not None and df_head[handler_col].astype(str).str.contains('杨碧月').any(): + logger.info("识别到杨碧月订单,执行预处理...") + # 重新读取完整数据 + df = smart_read_excel(file_path) + column_map = { + '商品条码': '商品条码', '商品名称': '商品名称', '规格': '规格', + '单位': '单位', '数量': '数量', '单价': '单价', '金额': '金额' + } + found_cols = {} + # 优先级排序,确保更精确的匹配 + for target_zh, std_name in column_map.items(): + for col in df.columns: + col_str = str(col) + if target_zh == col_str: # 精确匹配优先 + found_cols[col] = std_name + break + if std_name not in found_cols.values(): + for col in df.columns: + col_str = str(col) + if target_zh in col_str: # 模糊匹配 + found_cols[col] = std_name + break + + if len(found_cols) >= 4: + df_clean = df[list(found_cols.keys())].copy() + df_clean = df_clean.rename(columns=found_cols) + + # 确保数量和价格是数值 + # 这里的列名已经改回中文了 + for c in ['数量', '单价', '金额']: + if c in df_clean.columns: + df_clean[c] = pd.to_numeric(df_clean[c], errors='coerce').fillna(0) + + df_clean = df_clean.dropna(subset=['商品条码']) + out_dir = os.path.dirname(file_path) + final_path = os.path.join(out_dir, "预处理之后.xlsx") + df_clean.to_excel(final_path, index=False) + return final_path + + except Exception as e: + logger.warning(f"预处理识别失败: {e}") + return None def get_purchase_orders(self) -> List[str]: """ diff --git a/app/services/special_suppliers_service.py b/app/services/special_suppliers_service.py index a394ddc..1f9e250 100644 --- a/app/services/special_suppliers_service.py +++ b/app/services/special_suppliers_service.py @@ -20,6 +20,74 @@ class SpecialSuppliersService: self.config_manager = config_manager self.order_service = OrderService(config_manager) + def process_yang_biyue(self, src_path: str, progress_cb: Optional[Callable[[int, str], None]] = None) -> Optional[str]: + """ + 处理杨碧月经手的订单(预处理) + """ + try: + if progress_cb: progress_cb(10, "正在进行杨碧月订单预处理...") + from app.core.utils.file_utils import smart_read_excel + + # 读取原始数据 + df = smart_read_excel(src_path) + + # 检查是否包含“杨碧月” + handler_col = None + for col in df.columns: + if '经手人' in str(col): + handler_col = col + break + + if handler_col is None or not df[handler_col].astype(str).str.contains('杨碧月').any(): + logger.info("未在订单中找到经手人'杨碧月',跳过特殊预处理") + return None + + if progress_cb: progress_cb(30, "识别到杨碧月订单,正在清洗列数据...") + + # 定义列映射关系 + column_map = { + '商品条码': 'barcode', + '商品名称': 'name', + '商品规格': 'specification', + '单位': 'unit', + '数量': 'quantity', + '含税单价': 'unit_price', + '含税金额': 'total_price' + } + + # 提取并重命名列 + found_cols = {} + for target_zh, std_name in column_map.items(): + for col in df.columns: + if target_zh in str(col): + found_cols[col] = std_name + break + + if len(found_cols) < 4: + logger.error(f"杨碧月订单列匹配不足: 找到 {list(found_cols.values())}") + return None + + df_clean = df[list(found_cols.keys())].copy() + df_clean = df_clean.rename(columns=found_cols) + + # 过滤掉空的条码行 + df_clean = df_clean.dropna(subset=['barcode']) + + # 保存预处理文件 + out_dir = os.path.dirname(src_path) + final_path = os.path.join(out_dir, "预处理之后.xlsx") + df_clean.to_excel(final_path, index=False) + + if progress_cb: progress_cb(60, "预处理文件已保存,开始标准转换流程...") + + # 调用标准处理流程 + result = self.order_service.process_excel(final_path, progress_cb=lambda p: progress_cb(60 + int(p*0.4), "生成采购单中...") if progress_cb else None) + return result + + except Exception as e: + logger.error(f"处理杨碧月订单出错: {e}") + return None + def process_rongcheng_yigou(self, src_path: str, progress_cb: Optional[Callable[[int, str], None]] = None) -> Optional[str]: """ 处理蓉城易购订单 diff --git a/config.ini b/config.ini index d5d07ad..fb0569c 100644 --- a/config.ini +++ b/config.ini @@ -28,3 +28,4 @@ purchase_order = 银豹-采购单模板.xls [App] version = 2026.03.30.1036 + diff --git a/logs/app.core.excel.converter.log b/logs/app.core.excel.converter.log index b8f538b..1281d76 100644 --- a/logs/app.core.excel.converter.log +++ b/logs/app.core.excel.converter.log @@ -7100,3 +7100,53 @@ 2026-03-30 10:21:52,771 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 2026-03-30 10:21:52,772 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 2026-03-30 10:21:52,772 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2026-03-30 13:28:54,450 - app.core.excel.converter - INFO - 成功加载条码映射配置,共62项 +2026-03-30 13:28:54,734 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2026-03-30 13:28:54,735 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2026-03-30 13:28:54,736 - app.core.excel.converter - INFO - 解析二级规格: 1*18 -> 1*18 +2026-03-30 13:28:54,736 - app.core.excel.converter - INFO - 解析二级规格: 1*45 -> 1*45 +2026-03-30 13:28:54,737 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:28:54,738 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:28:54,738 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:28:54,739 - app.core.excel.converter - INFO - 解析二级规格: 1*35 -> 1*35 +2026-03-30 13:28:54,739 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:28:54,740 - app.core.excel.converter - INFO - 解析二级规格: 1*30 -> 1*30 +2026-03-30 13:28:54,741 - app.core.excel.converter - INFO - 解析二级规格: 1*50 -> 1*50 +2026-03-30 13:28:54,741 - app.core.excel.converter - INFO - 解析二级规格: 1*50 -> 1*50 +2026-03-30 13:28:54,742 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:29:24,575 - app.core.excel.converter - INFO - 成功加载条码映射配置,共62项 +2026-03-30 13:29:24,579 - app.core.excel.converter - INFO - 成功加载条码映射配置,共62项 +2026-03-30 13:29:24,888 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2026-03-30 13:29:24,888 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2026-03-30 13:29:24,889 - app.core.excel.converter - INFO - 解析二级规格: 1*18 -> 1*18 +2026-03-30 13:29:24,890 - app.core.excel.converter - INFO - 解析二级规格: 1*45 -> 1*45 +2026-03-30 13:29:24,890 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:29:24,891 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:29:24,892 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:29:24,892 - app.core.excel.converter - INFO - 解析二级规格: 1*35 -> 1*35 +2026-03-30 13:29:24,893 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:29:24,894 - app.core.excel.converter - INFO - 解析二级规格: 1*30 -> 1*30 +2026-03-30 13:29:24,894 - app.core.excel.converter - INFO - 解析二级规格: 1*50 -> 1*50 +2026-03-30 13:29:24,895 - app.core.excel.converter - INFO - 解析二级规格: 1*50 -> 1*50 +2026-03-30 13:29:24,896 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:29:58,482 - app.core.excel.converter - INFO - 成功加载条码映射配置,共62项 +2026-03-30 13:29:58,487 - app.core.excel.converter - INFO - 成功加载条码映射配置,共62项 +2026-03-30 13:30:29,316 - app.core.excel.converter - INFO - 成功加载条码映射配置,共62项 +2026-03-30 13:30:29,321 - app.core.excel.converter - INFO - 成功加载条码映射配置,共62项 +2026-03-30 13:31:51,945 - app.core.excel.converter - INFO - 成功加载条码映射配置,共62项 +2026-03-30 13:31:51,951 - app.core.excel.converter - INFO - 成功加载条码映射配置,共62项 +2026-03-30 13:31:52,379 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2026-03-30 13:31:52,380 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2026-03-30 13:31:52,381 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2026-03-30 13:31:52,381 - app.core.excel.converter - INFO - 解析二级规格: 1*18 -> 1*18 +2026-03-30 13:31:52,382 - app.core.excel.converter - INFO - 解析二级规格: 1*45 -> 1*45 +2026-03-30 13:31:52,382 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:31:52,383 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:31:52,383 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:31:52,384 - app.core.excel.converter - INFO - 解析二级规格: 1*35 -> 1*35 +2026-03-30 13:31:52,384 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:31:52,385 - app.core.excel.converter - INFO - 解析二级规格: 1*30 -> 1*30 +2026-03-30 13:31:52,386 - app.core.excel.converter - INFO - 解析二级规格: 1*50 -> 1*50 +2026-03-30 13:31:52,386 - app.core.excel.converter - INFO - 解析二级规格: 1*50 -> 1*50 +2026-03-30 13:31:52,387 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 +2026-03-30 13:31:52,387 - app.core.excel.converter - INFO - 解析二级规格: 1*40 -> 1*40 diff --git a/logs/app.core.excel.handlers.unit_converter_handlers.log b/logs/app.core.excel.handlers.unit_converter_handlers.log index ccf11a7..0ed8984 100644 --- a/logs/app.core.excel.handlers.unit_converter_handlers.log +++ b/logs/app.core.excel.handlers.unit_converter_handlers.log @@ -4471,3 +4471,44 @@ 2026-03-30 10:21:52,771 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 2026-03-30 10:21:52,772 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 2026-03-30 10:21:52,772 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2026-03-30 13:28:54,734 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 24.0, 单价: 93.6 -> 3.9, 单位: 件 -> 瓶 +2026-03-30 13:28:54,735 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 24.0, 单价: 93.6 -> 3.9, 单位: 件 -> 瓶 +2026-03-30 13:28:54,736 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 18.0, 单价: 70.2 -> 3.9000000000000004, 单位: 件 -> 瓶 +2026-03-30 13:28:54,736 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 45.0, 单价: 148.0 -> 3.2888888888888888, 单位: 件 -> 瓶 +2026-03-30 13:28:54,737 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 142.0 -> 3.55, 单位: 件 -> 瓶 +2026-03-30 13:28:54,738 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 142.0 -> 3.55, 单位: 件 -> 瓶 +2026-03-30 13:28:54,738 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 85.0 -> 2.125, 单位: 件 -> 瓶 +2026-03-30 13:28:54,739 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 35.0, 单价: 133.0 -> 3.8, 单位: 件 -> 瓶 +2026-03-30 13:28:54,739 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 60.0 -> 1.5, 单位: 件 -> 瓶 +2026-03-30 13:28:54,740 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 30.0, 单价: 96.0 -> 3.2, 单位: 件 -> 瓶 +2026-03-30 13:28:54,741 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 50.0, 单价: 39.0 -> 0.78, 单位: 件 -> 瓶 +2026-03-30 13:28:54,741 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 50.0, 单价: 42.0 -> 0.84, 单位: 件 -> 瓶 +2026-03-30 13:28:54,742 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 92.0 -> 2.3, 单位: 件 -> 瓶 +2026-03-30 13:29:24,888 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 24.0, 单价: 93.6 -> 3.9, 单位: 件 -> 瓶 +2026-03-30 13:29:24,889 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 24.0, 单价: 93.6 -> 3.9, 单位: 件 -> 瓶 +2026-03-30 13:29:24,889 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 18.0, 单价: 70.2 -> 3.9000000000000004, 单位: 件 -> 瓶 +2026-03-30 13:29:24,890 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 45.0, 单价: 148.0 -> 3.2888888888888888, 单位: 件 -> 瓶 +2026-03-30 13:29:24,891 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 142.0 -> 3.55, 单位: 件 -> 瓶 +2026-03-30 13:29:24,891 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 142.0 -> 3.55, 单位: 件 -> 瓶 +2026-03-30 13:29:24,892 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 85.0 -> 2.125, 单位: 件 -> 瓶 +2026-03-30 13:29:24,892 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 35.0, 单价: 133.0 -> 3.8, 单位: 件 -> 瓶 +2026-03-30 13:29:24,893 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 60.0 -> 1.5, 单位: 件 -> 瓶 +2026-03-30 13:29:24,894 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 30.0, 单价: 96.0 -> 3.2, 单位: 件 -> 瓶 +2026-03-30 13:29:24,894 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 50.0, 单价: 39.0 -> 0.78, 单位: 件 -> 瓶 +2026-03-30 13:29:24,895 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 50.0, 单价: 42.0 -> 0.84, 单位: 件 -> 瓶 +2026-03-30 13:29:24,896 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 92.0 -> 2.3, 单位: 件 -> 瓶 +2026-03-30 13:31:52,379 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 24.0, 单价: 93.6 -> 3.9, 单位: 件 -> 瓶 +2026-03-30 13:31:52,380 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 24.0, 单价: 93.6 -> 3.9, 单位: 件 -> 瓶 +2026-03-30 13:31:52,381 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 24.0, 单价: 93.6 -> 3.9, 单位: 件 -> 瓶 +2026-03-30 13:31:52,381 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 18.0, 单价: 70.2 -> 3.9000000000000004, 单位: 件 -> 瓶 +2026-03-30 13:31:52,382 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 45.0, 单价: 148.0 -> 3.2888888888888888, 单位: 件 -> 瓶 +2026-03-30 13:31:52,382 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 142.0 -> 3.55, 单位: 件 -> 瓶 +2026-03-30 13:31:52,383 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 142.0 -> 3.55, 单位: 件 -> 瓶 +2026-03-30 13:31:52,384 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 85.0 -> 2.125, 单位: 件 -> 瓶 +2026-03-30 13:31:52,384 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 35.0, 单价: 133.0 -> 3.8, 单位: 件 -> 瓶 +2026-03-30 13:31:52,385 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 60.0 -> 1.5, 单位: 件 -> 瓶 +2026-03-30 13:31:52,385 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 30.0, 单价: 96.0 -> 3.2, 单位: 件 -> 瓶 +2026-03-30 13:31:52,386 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 50.0, 单价: 39.0 -> 0.78, 单位: 件 -> 瓶 +2026-03-30 13:31:52,386 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 50.0, 单价: 42.0 -> 0.84, 单位: 件 -> 瓶 +2026-03-30 13:31:52,387 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 92.0 -> 2.3, 单位: 件 -> 瓶 +2026-03-30 13:31:52,387 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 40.0, 单价: 120.0 -> 3.0, 单位: 件 -> 瓶 diff --git a/logs/app.core.excel.merger.log b/logs/app.core.excel.merger.log index 85dec3f..d4d3c7c 100644 --- a/logs/app.core.excel.merger.log +++ b/logs/app.core.excel.merger.log @@ -261,3 +261,21 @@ 2026-03-30 10:21:25,356 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls 2026-03-30 10:21:52,469 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output 2026-03-30 10:21:52,470 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls +2026-03-30 13:28:54,451 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:28:54,451 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls +2026-03-30 13:29:24,575 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:29:24,576 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls +2026-03-30 13:29:24,580 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:29:24,580 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls +2026-03-30 13:29:58,483 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:29:58,484 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls +2026-03-30 13:29:58,488 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:29:58,488 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls +2026-03-30 13:30:29,317 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:30:29,317 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls +2026-03-30 13:30:29,321 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:30:29,322 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls +2026-03-30 13:31:51,946 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:31:51,947 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls +2026-03-30 13:31:51,951 - app.core.excel.merger - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:31:51,952 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: E:\2025Code\python\orc-order-v2\templates\银豹-采购单模板.xls diff --git a/logs/app.core.excel.processor.log b/logs/app.core.excel.processor.log index 10038ca..1effde1 100644 --- a/logs/app.core.excel.processor.log +++ b/logs/app.core.excel.processor.log @@ -31292,3 +31292,347 @@ 2026-03-30 10:21:52,781 - app.core.excel.processor - INFO - 条码 6902538008401 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 2026-03-30 10:21:52,783 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_495a630b-87cf-4245-834e-2705a3dcd12f.xls 2026-03-30 10:21:52,790 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_495a630b-87cf-4245-834e-2705a3dcd12f.xls +2026-03-30 13:28:54,449 - app.core.excel.processor - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:28:54,449 - app.core.excel.processor - INFO - 使用临时目录: E:\2025Code\python\orc-order-v2\data\temp +2026-03-30 13:28:54,450 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2026-03-30 13:28:54,462 - app.core.excel.processor - INFO - 开始处理Excel文件: E:\2025Code\python\orc-order-v2\data\output\原始数据.xlsx +2026-03-30 13:28:54,727 - app.core.excel.processor - INFO - 成功读取Excel文件: E:\2025Code\python\orc-order-v2\data\output\原始数据.xlsx, 共 17 行 +2026-03-30 13:28:54,730 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 110 +2026-03-30 13:28:54,730 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2026-03-30 13:28:54,730 - app.core.excel.processor - INFO - 重新整理数据结构,共 16 行有效数据 +2026-03-30 13:28:54,730 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品编号 +2026-03-30 13:28:54,731 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品条码 +2026-03-30 13:28:54,731 - app.core.excel.processor - INFO - 使用条码列: 商品编号 +2026-03-30 13:28:54,731 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2026-03-30 13:28:54,731 - app.core.excel.processor - INFO - 找到specification列: 商品规格 +2026-03-30 13:28:54,731 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2026-03-30 13:28:54,731 - app.core.excel.processor - INFO - 找到unit列: 单位 +2026-03-30 13:28:54,731 - app.core.excel.processor - INFO - 找到price列: 单价 +2026-03-30 13:28:54,731 - app.core.excel.processor - INFO - 找到amount列: 金额 +2026-03-30 13:28:54,732 - app.core.excel.processor - INFO - 检测到列映射: {'barcode': '商品编号', 'name': '商品名称', 'specification': '商品规格', 'quantity': '数量', 'unit': '单位', 'price': '单价', 'amount': '金额'} +2026-03-30 13:28:54,733 - app.core.excel.processor - INFO - 从映射列解析规格: 1*24 -> 包装数量=24 +2026-03-30 13:28:54,735 - app.core.excel.processor - INFO - 从映射列解析规格: 1*24 -> 包装数量=24 +2026-03-30 13:28:54,735 - app.core.excel.processor - INFO - 从映射列解析规格: 1*18 -> 包装数量=18 +2026-03-30 13:28:54,736 - app.core.excel.processor - INFO - 从映射列解析规格: 1*45 -> 包装数量=45 +2026-03-30 13:28:54,737 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:28:54,737 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:28:54,738 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:28:54,739 - app.core.excel.processor - INFO - 从映射列解析规格: 1*35 -> 包装数量=35 +2026-03-30 13:28:54,739 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:28:54,740 - app.core.excel.processor - INFO - 从映射列解析规格: 1*30 -> 包装数量=30 +2026-03-30 13:28:54,740 - app.core.excel.processor - INFO - 从映射列解析规格: 1*50 -> 包装数量=50 +2026-03-30 13:28:54,741 - app.core.excel.processor - INFO - 从映射列解析规格: 1*50 -> 包装数量=50 +2026-03-30 13:28:54,742 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:28:54,742 - app.core.excel.processor - INFO - 提取到 13 个商品信息 +2026-03-30 13:28:54,747 - app.core.excel.processor - INFO - 开始处理13 个产品信息 +2026-03-30 13:28:54,747 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,747 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,747 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,748 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,748 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,748 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,748 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,748 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,748 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,748 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,749 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,749 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,749 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:28:54,749 - app.core.excel.processor - INFO - 分组后共0 个不同条码的商品 +2026-03-30 13:28:54,751 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_原始数据.xls +2026-03-30 13:28:54,765 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_原始数据.xls +2026-03-30 13:29:24,574 - app.core.excel.processor - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:29:24,574 - app.core.excel.processor - INFO - 使用临时目录: E:\2025Code\python\orc-order-v2\data\temp +2026-03-30 13:29:24,575 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2026-03-30 13:29:24,579 - app.core.excel.processor - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:29:24,579 - app.core.excel.processor - INFO - 使用临时目录: E:\2025Code\python\orc-order-v2\data\temp +2026-03-30 13:29:24,580 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2026-03-30 13:29:24,868 - app.core.excel.processor - INFO - 开始处理Excel文件: E:\2025Code\python\orc-order-v2\data\output\原始数据.xlsx +2026-03-30 13:29:24,880 - app.core.excel.processor - INFO - 成功读取Excel文件: E:\2025Code\python\orc-order-v2\data\output\原始数据.xlsx, 共 17 行 +2026-03-30 13:29:24,883 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 110 +2026-03-30 13:29:24,883 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2026-03-30 13:29:24,884 - app.core.excel.processor - INFO - 重新整理数据结构,共 16 行有效数据 +2026-03-30 13:29:24,884 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品编号 +2026-03-30 13:29:24,884 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品条码 +2026-03-30 13:29:24,884 - app.core.excel.processor - INFO - 使用条码列: 商品编号 +2026-03-30 13:29:24,885 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2026-03-30 13:29:24,885 - app.core.excel.processor - INFO - 找到specification列: 商品规格 +2026-03-30 13:29:24,885 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2026-03-30 13:29:24,885 - app.core.excel.processor - INFO - 找到unit列: 单位 +2026-03-30 13:29:24,885 - app.core.excel.processor - INFO - 找到price列: 单价 +2026-03-30 13:29:24,885 - app.core.excel.processor - INFO - 找到amount列: 金额 +2026-03-30 13:29:24,885 - app.core.excel.processor - INFO - 检测到列映射: {'barcode': '商品编号', 'name': '商品名称', 'specification': '商品规格', 'quantity': '数量', 'unit': '单位', 'price': '单价', 'amount': '金额'} +2026-03-30 13:29:24,887 - app.core.excel.processor - INFO - 从映射列解析规格: 1*24 -> 包装数量=24 +2026-03-30 13:29:24,888 - app.core.excel.processor - INFO - 从映射列解析规格: 1*24 -> 包装数量=24 +2026-03-30 13:29:24,889 - app.core.excel.processor - INFO - 从映射列解析规格: 1*18 -> 包装数量=18 +2026-03-30 13:29:24,890 - app.core.excel.processor - INFO - 从映射列解析规格: 1*45 -> 包装数量=45 +2026-03-30 13:29:24,890 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:29:24,891 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:29:24,892 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:29:24,892 - app.core.excel.processor - INFO - 从映射列解析规格: 1*35 -> 包装数量=35 +2026-03-30 13:29:24,893 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:29:24,893 - app.core.excel.processor - INFO - 从映射列解析规格: 1*30 -> 包装数量=30 +2026-03-30 13:29:24,894 - app.core.excel.processor - INFO - 从映射列解析规格: 1*50 -> 包装数量=50 +2026-03-30 13:29:24,895 - app.core.excel.processor - INFO - 从映射列解析规格: 1*50 -> 包装数量=50 +2026-03-30 13:29:24,895 - app.core.excel.processor - INFO - 从映射列解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:29:24,896 - app.core.excel.processor - INFO - 提取到 13 个商品信息 +2026-03-30 13:29:24,900 - app.core.excel.processor - INFO - 开始处理13 个产品信息 +2026-03-30 13:29:24,901 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,901 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,901 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,901 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,901 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,902 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,902 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,902 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,902 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,902 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,902 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,902 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,903 - app.core.excel.processor - WARNING - 跳过无条码商品 +2026-03-30 13:29:24,903 - app.core.excel.processor - INFO - 分组后共0 个不同条码的商品 +2026-03-30 13:29:24,905 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_原始数据.xls +2026-03-30 13:29:24,906 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_原始数据.xls +2026-03-30 13:29:58,481 - app.core.excel.processor - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:29:58,481 - app.core.excel.processor - INFO - 使用临时目录: E:\2025Code\python\orc-order-v2\data\temp +2026-03-30 13:29:58,482 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2026-03-30 13:29:58,486 - app.core.excel.processor - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:29:58,487 - app.core.excel.processor - INFO - 使用临时目录: E:\2025Code\python\orc-order-v2\data\temp +2026-03-30 13:29:58,487 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2026-03-30 13:29:58,893 - app.core.excel.processor - INFO - 开始处理Excel文件: E:\2025Code\python\orc-order-v2\data\output\预处理之后.xlsx +2026-03-30 13:29:58,900 - app.core.excel.processor - INFO - 成功读取Excel文件: E:\2025Code\python\orc-order-v2\data\output\预处理之后.xlsx, 共 16 行 +2026-03-30 13:29:58,902 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 5 +2026-03-30 13:29:58,902 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2026-03-30 13:29:58,902 - app.core.excel.processor - INFO - 重新整理数据结构,共 15 行有效数据 +2026-03-30 13:29:58,902 - app.core.excel.processor - INFO - 找到精确匹配的条码列: barcode +2026-03-30 13:29:58,902 - app.core.excel.processor - INFO - 使用条码列: barcode +2026-03-30 13:29:58,903 - app.core.excel.processor - INFO - 检测到列映射: {'barcode': 'barcode'} +2026-03-30 13:29:58,907 - app.core.excel.processor - INFO - 提取到 15 个商品信息 +2026-03-30 13:29:58,911 - app.core.excel.processor - INFO - 开始处理15 个产品信息 +2026-03-30 13:29:58,912 - app.core.excel.processor - INFO - 处理商品: 条码=6909493401025, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,912 - app.core.excel.processor - INFO - 发现赠品:条码6909493401025, 数量=0.0 +2026-03-30 13:29:58,912 - app.core.excel.processor - INFO - 处理商品: 条码=6909493400998, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,912 - app.core.excel.processor - INFO - 发现赠品:条码6909493400998, 数量=0.0 +2026-03-30 13:29:58,912 - app.core.excel.processor - INFO - 处理商品: 条码=6909493106500, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,913 - app.core.excel.processor - INFO - 发现赠品:条码6909493106500, 数量=0.0 +2026-03-30 13:29:58,913 - app.core.excel.processor - INFO - 处理商品: 条码=6909493104193, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,913 - app.core.excel.processor - INFO - 发现赠品:条码6909493104193, 数量=0.0 +2026-03-30 13:29:58,913 - app.core.excel.processor - INFO - 处理商品: 条码=6923644230135, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,913 - app.core.excel.processor - INFO - 发现赠品:条码6923644230135, 数量=0.0 +2026-03-30 13:29:58,913 - app.core.excel.processor - INFO - 处理商品: 条码=6907992822723, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,913 - app.core.excel.processor - INFO - 发现赠品:条码6907992822723, 数量=0.0 +2026-03-30 13:29:58,913 - app.core.excel.processor - INFO - 处理商品: 条码=6907992822747, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,914 - app.core.excel.processor - INFO - 发现赠品:条码6907992822747, 数量=0.0 +2026-03-30 13:29:58,914 - app.core.excel.processor - INFO - 处理商品: 条码=6907992822495, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,914 - app.core.excel.processor - INFO - 发现赠品:条码6907992822495, 数量=0.0 +2026-03-30 13:29:58,914 - app.core.excel.processor - INFO - 处理商品: 条码=6907992823331, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,914 - app.core.excel.processor - INFO - 发现赠品:条码6907992823331, 数量=0.0 +2026-03-30 13:29:58,914 - app.core.excel.processor - INFO - 处理商品: 条码=6921526120017, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,914 - app.core.excel.processor - INFO - 发现赠品:条码6921526120017, 数量=0.0 +2026-03-30 13:29:58,914 - app.core.excel.processor - INFO - 处理商品: 条码=6919208585872, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 发现赠品:条码6919208585872, 数量=0.0 +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 处理商品: 条码=6954065400418, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 发现赠品:条码6954065400418, 数量=0.0 +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 处理商品: 条码=6907992821566, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 发现赠品:条码6907992821566, 数量=0.0 +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 处理商品: 条码=6923644296889, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 发现赠品:条码6923644296889, 数量=0.0 +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 处理商品: 条码=6907992829654, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 发现赠品:条码6907992829654, 数量=0.0 +2026-03-30 13:29:58,915 - app.core.excel.processor - INFO - 分组后共15 个不同条码的商品 +2026-03-30 13:29:58,916 - app.core.excel.processor - INFO - 条码 6909493401025 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,916 - app.core.excel.processor - INFO - 条码 6909493400998 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,916 - app.core.excel.processor - INFO - 条码 6909493106500 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,916 - app.core.excel.processor - INFO - 条码 6909493104193 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,916 - app.core.excel.processor - INFO - 条码 6923644230135 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,916 - app.core.excel.processor - INFO - 条码 6907992822723 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,916 - app.core.excel.processor - INFO - 条码 6907992822747 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,916 - app.core.excel.processor - INFO - 条码 6907992822495 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,916 - app.core.excel.processor - INFO - 条码 6907992823331 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,917 - app.core.excel.processor - INFO - 条码 6921526120017 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,917 - app.core.excel.processor - INFO - 条码 6919208585872 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,917 - app.core.excel.processor - INFO - 条码 6954065400418 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,917 - app.core.excel.processor - INFO - 条码 6907992821566 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,917 - app.core.excel.processor - INFO - 条码 6923644296889 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,917 - app.core.excel.processor - INFO - 条码 6907992829654 处理结果:只有赠品,数量=0.0 +2026-03-30 13:29:58,917 - app.core.excel.processor - INFO - 条码 6909493401025 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,918 - app.core.excel.processor - INFO - 条码 6909493400998 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,918 - app.core.excel.processor - INFO - 条码 6909493106500 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,918 - app.core.excel.processor - INFO - 条码 6909493104193 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,918 - app.core.excel.processor - INFO - 条码 6923644230135 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,918 - app.core.excel.processor - INFO - 条码 6907992822723 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,918 - app.core.excel.processor - INFO - 条码 6907992822747 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,919 - app.core.excel.processor - INFO - 条码 6907992822495 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,919 - app.core.excel.processor - INFO - 条码 6907992823331 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,919 - app.core.excel.processor - INFO - 条码 6921526120017 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,919 - app.core.excel.processor - INFO - 条码 6919208585872 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,919 - app.core.excel.processor - INFO - 条码 6954065400418 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,919 - app.core.excel.processor - INFO - 条码 6907992821566 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,919 - app.core.excel.processor - INFO - 条码 6923644296889 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,920 - app.core.excel.processor - INFO - 条码 6907992829654 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:29:58,922 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_预处理之后.xls +2026-03-30 13:29:58,923 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_预处理之后.xls +2026-03-30 13:30:29,315 - app.core.excel.processor - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:30:29,315 - app.core.excel.processor - INFO - 使用临时目录: E:\2025Code\python\orc-order-v2\data\temp +2026-03-30 13:30:29,316 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2026-03-30 13:30:29,320 - app.core.excel.processor - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:30:29,320 - app.core.excel.processor - INFO - 使用临时目录: E:\2025Code\python\orc-order-v2\data\temp +2026-03-30 13:30:29,321 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2026-03-30 13:30:29,734 - app.core.excel.processor - INFO - 开始处理Excel文件: E:\2025Code\python\orc-order-v2\data\output\预处理之后.xlsx +2026-03-30 13:30:29,742 - app.core.excel.processor - INFO - 成功读取Excel文件: E:\2025Code\python\orc-order-v2\data\output\预处理之后.xlsx, 共 16 行 +2026-03-30 13:30:29,744 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 5 +2026-03-30 13:30:29,744 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2026-03-30 13:30:29,745 - app.core.excel.processor - INFO - 重新整理数据结构,共 15 行有效数据 +2026-03-30 13:30:29,745 - app.core.excel.processor - INFO - 找到精确匹配的条码列: barcode +2026-03-30 13:30:29,745 - app.core.excel.processor - INFO - 使用条码列: barcode +2026-03-30 13:30:29,745 - app.core.excel.processor - INFO - 检测到列映射: {'barcode': 'barcode'} +2026-03-30 13:30:29,749 - app.core.excel.processor - INFO - 提取到 15 个商品信息 +2026-03-30 13:30:29,754 - app.core.excel.processor - INFO - 开始处理15 个产品信息 +2026-03-30 13:30:29,754 - app.core.excel.processor - INFO - 处理商品: 条码=6909493401025, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,754 - app.core.excel.processor - INFO - 发现赠品:条码6909493401025, 数量=0.0 +2026-03-30 13:30:29,755 - app.core.excel.processor - INFO - 处理商品: 条码=6909493400998, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,755 - app.core.excel.processor - INFO - 发现赠品:条码6909493400998, 数量=0.0 +2026-03-30 13:30:29,755 - app.core.excel.processor - INFO - 处理商品: 条码=6909493106500, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,755 - app.core.excel.processor - INFO - 发现赠品:条码6909493106500, 数量=0.0 +2026-03-30 13:30:29,755 - app.core.excel.processor - INFO - 处理商品: 条码=6909493104193, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,755 - app.core.excel.processor - INFO - 发现赠品:条码6909493104193, 数量=0.0 +2026-03-30 13:30:29,755 - app.core.excel.processor - INFO - 处理商品: 条码=6923644230135, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,755 - app.core.excel.processor - INFO - 发现赠品:条码6923644230135, 数量=0.0 +2026-03-30 13:30:29,756 - app.core.excel.processor - INFO - 处理商品: 条码=6907992822723, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,756 - app.core.excel.processor - INFO - 发现赠品:条码6907992822723, 数量=0.0 +2026-03-30 13:30:29,756 - app.core.excel.processor - INFO - 处理商品: 条码=6907992822747, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,756 - app.core.excel.processor - INFO - 发现赠品:条码6907992822747, 数量=0.0 +2026-03-30 13:30:29,756 - app.core.excel.processor - INFO - 处理商品: 条码=6907992822495, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,756 - app.core.excel.processor - INFO - 发现赠品:条码6907992822495, 数量=0.0 +2026-03-30 13:30:29,756 - app.core.excel.processor - INFO - 处理商品: 条码=6907992823331, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,756 - app.core.excel.processor - INFO - 发现赠品:条码6907992823331, 数量=0.0 +2026-03-30 13:30:29,757 - app.core.excel.processor - INFO - 处理商品: 条码=6921526120017, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,757 - app.core.excel.processor - INFO - 发现赠品:条码6921526120017, 数量=0.0 +2026-03-30 13:30:29,757 - app.core.excel.processor - INFO - 处理商品: 条码=6919208585872, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,757 - app.core.excel.processor - INFO - 发现赠品:条码6919208585872, 数量=0.0 +2026-03-30 13:30:29,757 - app.core.excel.processor - INFO - 处理商品: 条码=6954065400418, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,757 - app.core.excel.processor - INFO - 发现赠品:条码6954065400418, 数量=0.0 +2026-03-30 13:30:29,757 - app.core.excel.processor - INFO - 处理商品: 条码=6907992821566, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,758 - app.core.excel.processor - INFO - 发现赠品:条码6907992821566, 数量=0.0 +2026-03-30 13:30:29,758 - app.core.excel.processor - INFO - 处理商品: 条码=6923644296889, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,758 - app.core.excel.processor - INFO - 发现赠品:条码6923644296889, 数量=0.0 +2026-03-30 13:30:29,758 - app.core.excel.processor - INFO - 处理商品: 条码=6907992829654, 数量=0.0, 单价=0.0, 是否赠品=True +2026-03-30 13:30:29,758 - app.core.excel.processor - INFO - 发现赠品:条码6907992829654, 数量=0.0 +2026-03-30 13:30:29,758 - app.core.excel.processor - INFO - 分组后共15 个不同条码的商品 +2026-03-30 13:30:29,758 - app.core.excel.processor - INFO - 条码 6909493401025 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,758 - app.core.excel.processor - INFO - 条码 6909493400998 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,759 - app.core.excel.processor - INFO - 条码 6909493106500 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,759 - app.core.excel.processor - INFO - 条码 6909493104193 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,759 - app.core.excel.processor - INFO - 条码 6923644230135 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,759 - app.core.excel.processor - INFO - 条码 6907992822723 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,759 - app.core.excel.processor - INFO - 条码 6907992822747 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,759 - app.core.excel.processor - INFO - 条码 6907992822495 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,759 - app.core.excel.processor - INFO - 条码 6907992823331 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,759 - app.core.excel.processor - INFO - 条码 6921526120017 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,760 - app.core.excel.processor - INFO - 条码 6919208585872 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,760 - app.core.excel.processor - INFO - 条码 6954065400418 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,760 - app.core.excel.processor - INFO - 条码 6907992821566 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,760 - app.core.excel.processor - INFO - 条码 6923644296889 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,760 - app.core.excel.processor - INFO - 条码 6907992829654 处理结果:只有赠品,数量=0.0 +2026-03-30 13:30:29,760 - app.core.excel.processor - INFO - 条码 6909493401025 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,760 - app.core.excel.processor - INFO - 条码 6909493400998 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,761 - app.core.excel.processor - INFO - 条码 6909493106500 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,761 - app.core.excel.processor - INFO - 条码 6909493104193 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,761 - app.core.excel.processor - INFO - 条码 6923644230135 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,761 - app.core.excel.processor - INFO - 条码 6907992822723 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,761 - app.core.excel.processor - INFO - 条码 6907992822747 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,761 - app.core.excel.processor - INFO - 条码 6907992822495 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,761 - app.core.excel.processor - INFO - 条码 6907992823331 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,762 - app.core.excel.processor - INFO - 条码 6921526120017 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,762 - app.core.excel.processor - INFO - 条码 6919208585872 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,762 - app.core.excel.processor - INFO - 条码 6954065400418 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,762 - app.core.excel.processor - INFO - 条码 6907992821566 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,762 - app.core.excel.processor - INFO - 条码 6923644296889 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,762 - app.core.excel.processor - INFO - 条码 6907992829654 填充:仅有赠品,采购量=0,赠品数量=0.0 +2026-03-30 13:30:29,764 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_预处理之后.xls +2026-03-30 13:30:29,771 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_预处理之后.xls +2026-03-30 13:31:51,944 - app.core.excel.processor - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:31:51,945 - app.core.excel.processor - INFO - 使用临时目录: E:\2025Code\python\orc-order-v2\data\temp +2026-03-30 13:31:51,946 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2026-03-30 13:31:51,950 - app.core.excel.processor - INFO - 使用输出目录: E:\2025Code\python\orc-order-v2\data\output +2026-03-30 13:31:51,950 - app.core.excel.processor - INFO - 使用临时目录: E:\2025Code\python\orc-order-v2\data\temp +2026-03-30 13:31:51,951 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2026-03-30 13:31:52,367 - app.core.excel.processor - INFO - 开始处理Excel文件: E:\2025Code\python\orc-order-v2\data\output\预处理之后.xlsx +2026-03-30 13:31:52,374 - app.core.excel.processor - INFO - 成功读取Excel文件: E:\2025Code\python\orc-order-v2\data\output\预处理之后.xlsx, 共 16 行 +2026-03-30 13:31:52,376 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 65 +2026-03-30 13:31:52,376 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2026-03-30 13:31:52,376 - app.core.excel.processor - INFO - 重新整理数据结构,共 15 行有效数据 +2026-03-30 13:31:52,376 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品条码 +2026-03-30 13:31:52,376 - app.core.excel.processor - INFO - 使用条码列: 商品条码 +2026-03-30 13:31:52,377 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2026-03-30 13:31:52,377 - app.core.excel.processor - INFO - 找到specification列: 规格 +2026-03-30 13:31:52,377 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2026-03-30 13:31:52,377 - app.core.excel.processor - INFO - 找到unit列: 单位 +2026-03-30 13:31:52,377 - app.core.excel.processor - INFO - 找到price列: 单价 +2026-03-30 13:31:52,377 - app.core.excel.processor - INFO - 找到amount列: 金额 +2026-03-30 13:31:52,377 - app.core.excel.processor - INFO - 检测到列映射: {'barcode': '商品条码', 'name': '商品名称', 'specification': '规格', 'quantity': '数量', 'unit': '单位', 'price': '单价', 'amount': '金额'} +2026-03-30 13:31:52,378 - app.core.excel.processor - INFO - 解析规格: 1*24 -> 包装数量=24 +2026-03-30 13:31:52,380 - app.core.excel.processor - INFO - 解析规格: 1*24 -> 包装数量=24 +2026-03-30 13:31:52,380 - app.core.excel.processor - INFO - 解析规格: 1*24 -> 包装数量=24 +2026-03-30 13:31:52,381 - app.core.excel.processor - INFO - 解析规格: 1*18 -> 包装数量=18 +2026-03-30 13:31:52,382 - app.core.excel.processor - INFO - 解析规格: 1*45 -> 包装数量=45 +2026-03-30 13:31:52,382 - app.core.excel.processor - INFO - 解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:31:52,383 - app.core.excel.processor - INFO - 解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:31:52,383 - app.core.excel.processor - INFO - 解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:31:52,384 - app.core.excel.processor - INFO - 解析规格: 1*35 -> 包装数量=35 +2026-03-30 13:31:52,384 - app.core.excel.processor - INFO - 解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:31:52,385 - app.core.excel.processor - INFO - 解析规格: 1*30 -> 包装数量=30 +2026-03-30 13:31:52,385 - app.core.excel.processor - INFO - 解析规格: 1*50 -> 包装数量=50 +2026-03-30 13:31:52,386 - app.core.excel.processor - INFO - 解析规格: 1*50 -> 包装数量=50 +2026-03-30 13:31:52,387 - app.core.excel.processor - INFO - 解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:31:52,387 - app.core.excel.processor - INFO - 解析规格: 1*40 -> 包装数量=40 +2026-03-30 13:31:52,388 - app.core.excel.processor - INFO - 提取到 15 个商品信息 +2026-03-30 13:31:52,393 - app.core.excel.processor - INFO - 开始处理15 个产品信息 +2026-03-30 13:31:52,393 - app.core.excel.processor - INFO - 处理商品: 条码=6909493401025, 数量=24.0, 单价=3.9, 是否赠品=False +2026-03-30 13:31:52,393 - app.core.excel.processor - INFO - 发现正常商品:条码6909493401025, 数量=24.0, 单价=3.9 +2026-03-30 13:31:52,393 - app.core.excel.processor - INFO - 处理商品: 条码=6909493400998, 数量=24.0, 单价=3.9, 是否赠品=False +2026-03-30 13:31:52,393 - app.core.excel.processor - INFO - 发现正常商品:条码6909493400998, 数量=24.0, 单价=3.9 +2026-03-30 13:31:52,393 - app.core.excel.processor - INFO - 处理商品: 条码=6909493106500, 数量=24.0, 单价=3.9, 是否赠品=False +2026-03-30 13:31:52,394 - app.core.excel.processor - INFO - 发现正常商品:条码6909493106500, 数量=24.0, 单价=3.9 +2026-03-30 13:31:52,394 - app.core.excel.processor - INFO - 处理商品: 条码=6909493104193, 数量=18.0, 单价=3.9000000000000004, 是否赠品=False +2026-03-30 13:31:52,394 - app.core.excel.processor - INFO - 发现正常商品:条码6909493104193, 数量=18.0, 单价=3.9000000000000004 +2026-03-30 13:31:52,394 - app.core.excel.processor - INFO - 处理商品: 条码=6923644230135, 数量=45.0, 单价=3.2888888888888888, 是否赠品=False +2026-03-30 13:31:52,394 - app.core.excel.processor - INFO - 发现正常商品:条码6923644230135, 数量=45.0, 单价=3.2888888888888888 +2026-03-30 13:31:52,394 - app.core.excel.processor - INFO - 处理商品: 条码=6907992822723, 数量=40.0, 单价=3.55, 是否赠品=False +2026-03-30 13:31:52,395 - app.core.excel.processor - INFO - 发现正常商品:条码6907992822723, 数量=40.0, 单价=3.55 +2026-03-30 13:31:52,395 - app.core.excel.processor - INFO - 处理商品: 条码=6907992822747, 数量=40.0, 单价=3.55, 是否赠品=False +2026-03-30 13:31:52,395 - app.core.excel.processor - INFO - 发现正常商品:条码6907992822747, 数量=40.0, 单价=3.55 +2026-03-30 13:31:52,395 - app.core.excel.processor - INFO - 处理商品: 条码=6907992822495, 数量=40.0, 单价=2.125, 是否赠品=False +2026-03-30 13:31:52,395 - app.core.excel.processor - INFO - 发现正常商品:条码6907992822495, 数量=40.0, 单价=2.125 +2026-03-30 13:31:52,395 - app.core.excel.processor - INFO - 处理商品: 条码=6907992823331, 数量=35.0, 单价=3.8, 是否赠品=False +2026-03-30 13:31:52,396 - app.core.excel.processor - INFO - 发现正常商品:条码6907992823331, 数量=35.0, 单价=3.8 +2026-03-30 13:31:52,396 - app.core.excel.processor - INFO - 处理商品: 条码=6921526120017, 数量=40.0, 单价=1.5, 是否赠品=False +2026-03-30 13:31:52,396 - app.core.excel.processor - INFO - 发现正常商品:条码6921526120017, 数量=40.0, 单价=1.5 +2026-03-30 13:31:52,396 - app.core.excel.processor - INFO - 处理商品: 条码=6919208585872, 数量=30.0, 单价=3.2, 是否赠品=False +2026-03-30 13:31:52,396 - app.core.excel.processor - INFO - 发现正常商品:条码6919208585872, 数量=30.0, 单价=3.2 +2026-03-30 13:31:52,396 - app.core.excel.processor - INFO - 处理商品: 条码=6954065400418, 数量=50.0, 单价=0.78, 是否赠品=False +2026-03-30 13:31:52,396 - app.core.excel.processor - INFO - 发现正常商品:条码6954065400418, 数量=50.0, 单价=0.78 +2026-03-30 13:31:52,396 - app.core.excel.processor - INFO - 处理商品: 条码=6907992821566, 数量=50.0, 单价=0.84, 是否赠品=False +2026-03-30 13:31:52,397 - app.core.excel.processor - INFO - 发现正常商品:条码6907992821566, 数量=50.0, 单价=0.84 +2026-03-30 13:31:52,397 - app.core.excel.processor - INFO - 处理商品: 条码=6923644296889, 数量=40.0, 单价=2.3, 是否赠品=False +2026-03-30 13:31:52,397 - app.core.excel.processor - INFO - 发现正常商品:条码6923644296889, 数量=40.0, 单价=2.3 +2026-03-30 13:31:52,397 - app.core.excel.processor - INFO - 处理商品: 条码=6907992829654, 数量=40.0, 单价=3.0, 是否赠品=False +2026-03-30 13:31:52,397 - app.core.excel.processor - INFO - 发现正常商品:条码6907992829654, 数量=40.0, 单价=3.0 +2026-03-30 13:31:52,397 - app.core.excel.processor - INFO - 分组后共15 个不同条码的商品 +2026-03-30 13:31:52,397 - app.core.excel.processor - INFO - 条码 6909493401025 处理结果:正常商品数量24.0,单价3.9,赠品数量0 +2026-03-30 13:31:52,398 - app.core.excel.processor - INFO - 条码 6909493400998 处理结果:正常商品数量24.0,单价3.9,赠品数量0 +2026-03-30 13:31:52,398 - app.core.excel.processor - INFO - 条码 6909493106500 处理结果:正常商品数量24.0,单价3.9,赠品数量0 +2026-03-30 13:31:52,398 - app.core.excel.processor - INFO - 条码 6909493104193 处理结果:正常商品数量18.0,单价3.9000000000000004,赠品数量0 +2026-03-30 13:31:52,398 - app.core.excel.processor - INFO - 条码 6923644230135 处理结果:正常商品数量45.0,单价3.2888888888888888,赠品数量0 +2026-03-30 13:31:52,398 - app.core.excel.processor - INFO - 条码 6907992822723 处理结果:正常商品数量40.0,单价3.55,赠品数量0 +2026-03-30 13:31:52,398 - app.core.excel.processor - INFO - 条码 6907992822747 处理结果:正常商品数量40.0,单价3.55,赠品数量0 +2026-03-30 13:31:52,398 - app.core.excel.processor - INFO - 条码 6907992822495 处理结果:正常商品数量40.0,单价2.125,赠品数量0 +2026-03-30 13:31:52,398 - app.core.excel.processor - INFO - 条码 6907992823331 处理结果:正常商品数量35.0,单价3.8,赠品数量0 +2026-03-30 13:31:52,398 - app.core.excel.processor - INFO - 条码 6921526120017 处理结果:正常商品数量40.0,单价1.5,赠品数量0 +2026-03-30 13:31:52,399 - app.core.excel.processor - INFO - 条码 6919208585872 处理结果:正常商品数量30.0,单价3.2,赠品数量0 +2026-03-30 13:31:52,399 - app.core.excel.processor - INFO - 条码 6954065400418 处理结果:正常商品数量50.0,单价0.78,赠品数量0 +2026-03-30 13:31:52,399 - app.core.excel.processor - INFO - 条码 6907992821566 处理结果:正常商品数量50.0,单价0.84,赠品数量0 +2026-03-30 13:31:52,399 - app.core.excel.processor - INFO - 条码 6923644296889 处理结果:正常商品数量40.0,单价2.3,赠品数量0 +2026-03-30 13:31:52,399 - app.core.excel.processor - INFO - 条码 6907992829654 处理结果:正常商品数量40.0,单价3.0,赠品数量0 +2026-03-30 13:31:52,401 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_预处理之后.xls +2026-03-30 13:31:52,409 - app.core.excel.processor - INFO - 采购单已保存到: data/result\采购单_预处理之后.xls diff --git a/logs/app.core.excel.validators.log b/logs/app.core.excel.validators.log index 73c8e24..f5a4418 100644 --- a/logs/app.core.excel.validators.log +++ b/logs/app.core.excel.validators.log @@ -5395,3 +5395,59 @@ 2026-03-30 10:21:52,771 - app.core.excel.validators - INFO - 修正条码长度: 从14位截断到13位 2026-03-30 10:21:52,771 - app.core.excel.validators - INFO - 修正条码长度: 从14位截断到13位 2026-03-30 10:21:52,772 - app.core.excel.validators - INFO - 修正条码长度: 从14位截断到13位 +2026-03-30 13:28:54,733 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,735 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,735 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,736 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,737 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,737 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,738 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,739 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,739 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,740 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,740 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,741 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:28:54,742 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,887 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,888 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,889 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,890 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,890 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,891 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,892 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,892 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,893 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,893 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,894 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,895 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:24,895 - app.core.excel.validators - WARNING - 条码验证失败: 条码不包含数字 +2026-03-30 13:29:58,903 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,903 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,904 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,904 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,904 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,904 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,905 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,905 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,905 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,905 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,906 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,906 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,906 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,906 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:29:58,906 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,746 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,746 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,746 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,746 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,747 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,747 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,747 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,747 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,747 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,748 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,748 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,748 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,748 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,749 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2026-03-30 13:30:29,749 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 diff --git a/logs/app.services.order_service.log b/logs/app.services.order_service.log index c03325b..2d0a772 100644 --- a/logs/app.services.order_service.log +++ b/logs/app.services.order_service.log @@ -697,3 +697,35 @@ 2026-03-30 10:21:52,466 - app.services.order_service - INFO - 初始化OrderService 2026-03-30 10:21:52,470 - app.services.order_service - INFO - OrderService初始化完成 2026-03-30 10:21:52,470 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: e:\2025Code\python\orc-order-v2\data\output\495a630b-87cf-4245-834e-2705a3dcd12f.xlsx +2026-03-30 13:28:54,447 - app.services.order_service - INFO - 初始化OrderService +2026-03-30 13:28:54,451 - app.services.order_service - INFO - OrderService初始化完成 +2026-03-30 13:28:54,452 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: E:\2025Code\python\orc-order-v2\data\output\原始数据.xlsx +2026-03-30 13:28:54,461 - app.services.order_service - ERROR - 检查特殊预处理时出错: 'OrderService' object has no attribute 'config_manager' +2026-03-30 13:29:24,572 - app.services.order_service - INFO - 初始化OrderService +2026-03-30 13:29:24,576 - app.services.order_service - INFO - OrderService初始化完成 +2026-03-30 13:29:24,576 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: E:\2025Code\python\orc-order-v2\data\output\原始数据.xlsx +2026-03-30 13:29:24,577 - app.services.order_service - INFO - 初始化OrderService +2026-03-30 13:29:24,581 - app.services.order_service - INFO - OrderService初始化完成 +2026-03-30 13:29:24,854 - app.services.order_service - INFO - 识别到杨碧月订单,执行预处理... +2026-03-30 13:29:24,868 - app.services.order_service - WARNING - 预处理识别失败: name 'os' is not defined +2026-03-30 13:29:58,480 - app.services.order_service - INFO - 初始化OrderService +2026-03-30 13:29:58,484 - app.services.order_service - INFO - OrderService初始化完成 +2026-03-30 13:29:58,484 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: E:\2025Code\python\orc-order-v2\data\output\原始数据.xlsx +2026-03-30 13:29:58,485 - app.services.order_service - INFO - 初始化OrderService +2026-03-30 13:29:58,488 - app.services.order_service - INFO - OrderService初始化完成 +2026-03-30 13:29:58,758 - app.services.order_service - INFO - 识别到杨碧月订单,执行预处理... +2026-03-30 13:29:58,893 - app.services.order_service - INFO - 检测到特殊供应商,已生成预处理文件: E:\2025Code\python\orc-order-v2\data\output\预处理之后.xlsx +2026-03-30 13:30:29,313 - app.services.order_service - INFO - 初始化OrderService +2026-03-30 13:30:29,317 - app.services.order_service - INFO - OrderService初始化完成 +2026-03-30 13:30:29,318 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: E:\2025Code\python\orc-order-v2\data\output\原始数据.xlsx +2026-03-30 13:30:29,319 - app.services.order_service - INFO - 初始化OrderService +2026-03-30 13:30:29,322 - app.services.order_service - INFO - OrderService初始化完成 +2026-03-30 13:30:29,597 - app.services.order_service - INFO - 识别到杨碧月订单,执行预处理... +2026-03-30 13:30:29,734 - app.services.order_service - INFO - 检测到特殊供应商,已生成预处理文件: E:\2025Code\python\orc-order-v2\data\output\预处理之后.xlsx +2026-03-30 13:31:51,943 - app.services.order_service - INFO - 初始化OrderService +2026-03-30 13:31:51,947 - app.services.order_service - INFO - OrderService初始化完成 +2026-03-30 13:31:51,947 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: E:\2025Code\python\orc-order-v2\data\output\原始数据.xlsx +2026-03-30 13:31:51,948 - app.services.order_service - INFO - 初始化OrderService +2026-03-30 13:31:51,952 - app.services.order_service - INFO - OrderService初始化完成 +2026-03-30 13:31:52,230 - app.services.order_service - INFO - 识别到杨碧月订单,执行预处理... +2026-03-30 13:31:52,367 - app.services.order_service - INFO - 检测到特殊供应商,已生成预处理文件: E:\2025Code\python\orc-order-v2\data\output\预处理之后.xlsx