diff --git a/app/core/excel/__pycache__/processor.cpython-39.pyc b/app/core/excel/__pycache__/processor.cpython-39.pyc index a778a34..9739594 100644 Binary files a/app/core/excel/__pycache__/processor.cpython-39.pyc and b/app/core/excel/__pycache__/processor.cpython-39.pyc differ diff --git a/app/core/excel/processor.py b/app/core/excel/processor.py index a3c38d4..58ab410 100644 --- a/app/core/excel/processor.py +++ b/app/core/excel/processor.py @@ -237,10 +237,17 @@ class ExcelProcessor: # 处理每一行数据 for idx, row in df.iterrows(): try: + # 跳过无效行:名称为空、包含小计/合计/总计/空行等 + name_val = str(row[column_mapping['name']]) if column_mapping.get('name') and not pd.isna(row[column_mapping['name']]) else '' + if not name_val or any(key in name_val for key in ["小计", "合计", "总计"]): + continue # 条码处理 - 确保条码总是字符串格式且不带小数点 barcode_raw = row[column_mapping['barcode']] if column_mapping.get('barcode') else '' if pd.isna(barcode_raw) or barcode_raw == '' or str(barcode_raw).strip() in ['nan', 'None']: continue + # 跳过条码长度异常、数量为0、单价为0且名称疑似无效的行 + if (len(str(barcode_raw)) < 7) or (column_mapping.get('quantity') and (pd.isna(row[column_mapping['quantity']]) or str(row[column_mapping['quantity']]).strip() in ['nan', 'None', '0', '0.0'])): + continue # 使用format_barcode函数处理条码,确保无小数点 barcode = format_barcode(barcode_raw) @@ -296,13 +303,16 @@ class ExcelProcessor: # 提取规格并解析包装数量 if '规格' in df.columns and not pd.isna(row['规格']): product['specification'] = str(row['规格']) + # 修正OCR误识别的4.51*4为4.5L*4 + product['specification'] = re.sub(r'(\d+\.\d+)1\*(\d+)', r'\1L*\2', product['specification']) package_quantity = self.parse_specification(product['specification']) if package_quantity: product['package_quantity'] = package_quantity logger.info(f"解析规格: {product['specification']} -> 包装数量={package_quantity}") elif column_mapping.get('specification') and not pd.isna(row[column_mapping['specification']]): - # 添加这段逻辑以处理通过列映射找到的规格列 product['specification'] = str(row[column_mapping['specification']]) + # 修正OCR误识别的4.51*4为4.5L*4 + product['specification'] = re.sub(r'(\d+\.\d+)1\*(\d+)', r'\1L*\2', product['specification']) package_quantity = self.parse_specification(product['specification']) if package_quantity: product['package_quantity'] = package_quantity diff --git a/logs/__main__.active b/logs/__main__.active index 0ba361d..5951359 100644 --- a/logs/__main__.active +++ b/logs/__main__.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:46 \ No newline at end of file diff --git a/logs/app.core.excel.converter.active b/logs/app.core.excel.converter.active index 0ba361d..9093649 100644 --- a/logs/app.core.excel.converter.active +++ b/logs/app.core.excel.converter.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:28:31 \ No newline at end of file diff --git a/logs/app.core.excel.converter.log b/logs/app.core.excel.converter.log index 7039109..ac7b97d 100644 --- a/logs/app.core.excel.converter.log +++ b/logs/app.core.excel.converter.log @@ -2030,3 +2030,34 @@ 2025-05-10 12:54:53,022 - app.core.excel.converter - INFO - 解析容量(L)规格: 1L*12 -> 1*12 2025-05-10 12:54:53,023 - app.core.excel.converter - INFO - 解析容量(L)规格: 1L*12 -> 1*12 2025-05-10 12:57:50,073 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 13:09:39,200 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 13:09:43,052 - app.core.excel.converter - INFO - 解析容量(L)规格: 2L*8 -> 1*8 +2025-05-10 13:09:43,053 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 13:09:43,054 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 13:09:43,055 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*15 -> 1*15 +2025-05-10 13:09:43,056 - app.core.excel.converter - INFO - 解析容量(L)规格: 2.08L*8 -> 1*8 +2025-05-10 13:09:43,065 - app.core.excel.converter - INFO - 解析容量(L)规格: 1.5L*12 -> 1*12 +2025-05-10 13:09:43,068 - app.core.excel.converter - WARNING - 无法解析规格: 4.51*4,使用默认值1*1 +2025-05-10 13:09:43,069 - app.core.excel.converter - INFO - 解析容量(ml)规格: 550ml*24 -> 1*24 +2025-05-10 13:09:43,072 - app.core.excel.converter - WARNING - 无法解析规格: 总数:29大,使用默认值1*1 +2025-05-10 14:16:18,084 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 14:16:59,267 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 14:17:10,876 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 14:17:11,015 - app.core.excel.converter - INFO - 解析容量(L)规格: 2L*8 -> 1*8 +2025-05-10 14:17:11,016 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 14:17:11,018 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 14:17:11,018 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*24 -> 1*24 +2025-05-10 14:17:11,019 - app.core.excel.converter - INFO - 解析容量(ml)规格: 500ml*15 -> 1*15 +2025-05-10 14:17:11,020 - app.core.excel.converter - INFO - 解析容量(L)规格: 2.08L*8 -> 1*8 +2025-05-10 14:17:11,085 - app.core.excel.converter - INFO - 解析容量(L)规格: 1.5L*12 -> 1*12 +2025-05-10 14:17:11,086 - app.core.excel.converter - INFO - 解析容量(L)规格: 4.5L*4 -> 1*4 +2025-05-10 14:17:11,087 - app.core.excel.converter - INFO - 解析容量(ml)规格: 550ml*24 -> 1*24 +2025-05-10 14:20:46,718 - app.core.excel.converter - INFO - 成功加载条码映射配置,共19项 +2025-05-10 14:20:48,448 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,449 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,452 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,453 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,454 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,496 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,497 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 +2025-05-10 14:20:48,497 - app.core.excel.converter - INFO - 解析容量(ml)规格: 600ml*15 -> 1*15 diff --git a/logs/app.core.excel.handlers.barcode_mapper.active b/logs/app.core.excel.handlers.barcode_mapper.active index 0ba361d..9093649 100644 --- a/logs/app.core.excel.handlers.barcode_mapper.active +++ b/logs/app.core.excel.handlers.barcode_mapper.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:28:31 \ No newline at end of file diff --git a/logs/app.core.excel.handlers.unit_converter_handlers.active b/logs/app.core.excel.handlers.unit_converter_handlers.active index 0ba361d..9093649 100644 --- a/logs/app.core.excel.handlers.unit_converter_handlers.active +++ b/logs/app.core.excel.handlers.unit_converter_handlers.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:28:31 \ No newline at end of file diff --git a/logs/app.core.excel.handlers.unit_converter_handlers.log b/logs/app.core.excel.handlers.unit_converter_handlers.log index d267245..e35176e 100644 --- a/logs/app.core.excel.handlers.unit_converter_handlers.log +++ b/logs/app.core.excel.handlers.unit_converter_handlers.log @@ -111,3 +111,29 @@ 2025-05-10 12:54:53,021 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 12.0, 单价: 42.0 -> 3.5, 单位: 件 -> 瓶 2025-05-10 12:54:53,022 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品件单位处理: 数量: 1.0 -> 12.0, 单价: 0, 单位: 件 -> 瓶 2025-05-10 12:54:53,023 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品瓶单位处理: 保持原样 数量: 1.0, 单价: 0, 单位: 瓶 +2025-05-10 13:09:43,052 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 2.0 -> 16.0, 单价: 41.0 -> 5.125, 单位: 件 -> 瓶 +2025-05-10 13:09:43,053 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 72.0, 单价: 52.0 -> 2.1666666666666665, 单位: 件 -> 瓶 +2025-05-10 13:09:43,054 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 5.0 -> 120.0, 单价: 51.0 -> 2.125, 单位: 件 -> 瓶 +2025-05-10 13:09:43,055 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 45.0, 单价: 44.0 -> 2.933333333333333, 单位: 件 -> 瓶 +2025-05-10 13:09:43,056 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 5.0 -> 40.0, 单价: 20.0 -> 2.5, 单位: 件 -> 瓶 +2025-05-10 13:09:43,065 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 4.0 -> 48.0, 单价: 26.0 -> 2.1666666666666665, 单位: 件 -> 瓶 +2025-05-10 13:09:43,068 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 2.0 -> 2.0, 单价: 26.0 -> 26.0, 单位: 件 -> 瓶 +2025-05-10 13:09:43,069 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品件单位处理: 数量: 1.0 -> 24.0, 单价: 0, 单位: 件 -> 瓶 +2025-05-10 13:09:43,073 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品单位处理: 保持原样 数量: 0.0, 单价: 0, 单位: +2025-05-10 14:17:11,015 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 2.0 -> 16.0, 单价: 41.0 -> 5.125, 单位: 件 -> 瓶 +2025-05-10 14:17:11,017 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 72.0, 单价: 52.0 -> 2.1666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:17:11,018 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 5.0 -> 120.0, 单价: 51.0 -> 2.125, 单位: 件 -> 瓶 +2025-05-10 14:17:11,019 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 4.0 -> 96.0, 单价: 53.0 -> 2.2083333333333335, 单位: 件 -> 瓶 +2025-05-10 14:17:11,019 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 45.0, 单价: 44.0 -> 2.933333333333333, 单位: 件 -> 瓶 +2025-05-10 14:17:11,020 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 5.0 -> 40.0, 单价: 20.0 -> 2.5, 单位: 件 -> 瓶 +2025-05-10 14:17:11,085 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 4.0 -> 48.0, 单价: 26.0 -> 2.1666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:17:11,086 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 2.0 -> 8.0, 单价: 26.0 -> 6.5, 单位: 件 -> 瓶 +2025-05-10 14:17:11,087 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品件单位处理: 数量: 1.0 -> 24.0, 单价: 0, 单位: 件 -> 瓶 +2025-05-10 14:20:48,448 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 65.0 -> 4.333333333333333, 单位: 件 -> 瓶 +2025-05-10 14:20:48,449 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 3.0 -> 45.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,452 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,453 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,495 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,496 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,497 - app.core.excel.handlers.unit_converter_handlers - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 件 -> 瓶 +2025-05-10 14:20:48,498 - app.core.excel.handlers.unit_converter_handlers - INFO - 赠品件单位处理: 数量: 2.0 -> 30.0, 单价: 0, 单位: 件 -> 瓶 diff --git a/logs/app.core.excel.merger.active b/logs/app.core.excel.merger.active index 0ba361d..0a1e8d5 100644 --- a/logs/app.core.excel.merger.active +++ b/logs/app.core.excel.merger.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:45 \ No newline at end of file diff --git a/logs/app.core.excel.merger.log b/logs/app.core.excel.merger.log index 5ac1354..b5994a3 100644 --- a/logs/app.core.excel.merger.log +++ b/logs/app.core.excel.merger.log @@ -524,3 +524,13 @@ 2025-05-10 12:50:31,806 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls 2025-05-10 12:54:52,741 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output 2025-05-10 12:54:52,742 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 13:09:39,201 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 13:09:39,201 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 14:16:18,086 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:16:18,086 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 14:16:59,268 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:16:59,268 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 14:17:10,877 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:17:10,878 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls +2025-05-10 14:20:46,719 - app.core.excel.merger - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:20:46,719 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger完成,模板文件: templates\银豹-采购单模板.xls diff --git a/logs/app.core.excel.processor.active b/logs/app.core.excel.processor.active index 0ba361d..0a1e8d5 100644 --- a/logs/app.core.excel.processor.active +++ b/logs/app.core.excel.processor.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:45 \ No newline at end of file diff --git a/logs/app.core.excel.processor.log b/logs/app.core.excel.processor.log index 7188b4a..996dd64 100644 --- a/logs/app.core.excel.processor.log +++ b/logs/app.core.excel.processor.log @@ -6441,3 +6441,229 @@ ValueError: could not convert string to float: '2\n96' 2025-05-10 12:54:56,174 - app.core.excel.processor - INFO - 条码 6922456896362 填充:采购量=12.0,赠品数量13.0 2025-05-10 12:54:56,177 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250509142700.xls 2025-05-10 12:54:56,179 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250509142700.xls +2025-05-10 13:09:39,199 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 13:09:39,199 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 13:09:39,200 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 13:09:42,986 - app.core.excel.processor - INFO - 搜索目录 data/output 中的Excel文件 +2025-05-10 13:09:42,987 - app.core.excel.processor - INFO - 找到最新的Excel文件: data/output\微信图片_20250510130835.xlsx +2025-05-10 13:09:42,987 - app.core.excel.processor - INFO - 开始处理Excel文件: data/output\微信图片_20250510130835.xlsx +2025-05-10 13:09:43,013 - app.core.excel.processor - INFO - 成功读取Excel文件: data/output\微信图片_20250510130835.xlsx, 共 11 行 +2025-05-10 13:09:43,022 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 60 +2025-05-10 13:09:43,022 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-10 13:09:43,042 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-10 13:09:43,042 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品条码 +2025-05-10 13:09:43,042 - app.core.excel.processor - INFO - 使用条码列: 商品条码 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到specification列: 规格 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 找到price列: 单价 +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '商品条码', 'name': '商品名称', 'specification': '规格', 'quantity': '数量', 'unit': '单位', 'price': '单价'} +2025-05-10 13:09:43,043 - app.core.excel.processor - INFO - 是否存在规格列: True +2025-05-10 13:09:43,045 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6954767433073, 名称=2L大雪碧, 规格=, 数量=2.0, 单位=件, 单价=41.0 +2025-05-10 13:09:43,051 - app.core.excel.processor - INFO - 解析规格: 2L*8 -> 包装数量=8 +2025-05-10 13:09:43,053 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6954767432076, 名称=中雪碧500ml, 规格=, 数量=3.0, 单位=件, 单价=52.0 +2025-05-10 13:09:43,053 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 13:09:43,054 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6954767412573, 名称=中可口可乐500ml, 规格=, 数量=5.0, 单位=件, 单价=51.0 +2025-05-10 13:09:43,054 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 13:09:43,054 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6925303730574, 名称=500ml阿萨姆原味, 规格=, 数量=3.0, 单位=件, 单价=44.0 +2025-05-10 13:09:43,055 - app.core.excel.processor - INFO - 解析规格: 500ml*15 -> 包装数量=15 +2025-05-10 13:09:43,055 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6901285992933, 名称=2.08L怡宝, 规格=, 数量=5.0, 单位=件, 单价=20.0 +2025-05-10 13:09:43,056 - app.core.excel.processor - INFO - 解析规格: 2.08L*8 -> 包装数量=8 +2025-05-10 13:09:43,064 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6901285991271, 名称=1.5L怡宝, 规格=, 数量=4.0, 单位=件, 单价=26.0 +2025-05-10 13:09:43,065 - app.core.excel.processor - INFO - 解析规格: 1.5L*12 -> 包装数量=12 +2025-05-10 13:09:43,066 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6901285991530, 名称=4.5L怡宝, 规格=, 数量=2.0, 单位=件, 单价=26.0 +2025-05-10 13:09:43,066 - app.core.excel.processor - INFO - 解析规格: 4.51*4 -> 包装数量=4 +2025-05-10 13:09:43,069 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168509256, 名称=550ml(红色包装)中农夫, 规格=, 数量=1.0, 单位=件, 单价=0.0 +2025-05-10 13:09:43,069 - app.core.excel.processor - INFO - 解析规格: 550ml*24 -> 包装数量=24 +2025-05-10 13:09:43,071 - app.core.excel.processor - INFO - 第10行: 提取商品信息 条码=优惠后金额: +1093.00, 名称=壹仟零玖拾叁元整, 规格=, 数量=0, 单位=, 单价=0 +2025-05-10 13:09:43,073 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-10 13:09:43,084 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-10 13:09:43,084 - app.core.excel.processor - INFO - 处理商品: 条码=6954767433073, 数量=16.0, 单价=5.125, 是否赠品=False +2025-05-10 13:09:43,084 - app.core.excel.processor - INFO - 发现正常商品:条码6954767433073, 数量=16.0, 单价=5.125 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6954767432076, 数量=72.0, 单价=2.1666666666666665, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6954767432076, 数量=72.0, 单价=2.1666666666666665 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6954767412573, 数量=120.0, 单价=2.125, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6954767412573, 数量=120.0, 单价=2.125 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6925303730574, 数量=45.0, 单价=2.933333333333333, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6925303730574, 数量=45.0, 单价=2.933333333333333 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6901285992933, 数量=40.0, 单价=2.5, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6901285992933, 数量=40.0, 单价=2.5 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6901285991271, 数量=48.0, 单价=2.1666666666666665, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6901285991271, 数量=48.0, 单价=2.1666666666666665 +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 处理商品: 条码=6901285991530, 数量=2.0, 单价=26.0, 是否赠品=False +2025-05-10 13:09:43,085 - app.core.excel.processor - INFO - 发现正常商品:条码6901285991530, 数量=2.0, 单价=26.0 +2025-05-10 13:09:45,883 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=24.0, 单价=0, 是否赠品=True +2025-05-10 13:09:45,884 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=24.0 +2025-05-10 13:09:45,884 - app.core.excel.processor - INFO - 处理商品: 条码=109300, 数量=0.0, 单价=0, 是否赠品=True +2025-05-10 13:09:45,884 - app.core.excel.processor - INFO - 发现赠品:条码109300, 数量=0.0 +2025-05-10 13:09:45,884 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6954767433073 处理结果:正常商品数量16.0,单价5.125,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6954767432076 处理结果:正常商品数量72.0,单价2.1666666666666665,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6954767412573 处理结果:正常商品数量120.0,单价2.125,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6925303730574 处理结果:正常商品数量45.0,单价2.933333333333333,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6901285992933 处理结果:正常商品数量40.0,单价2.5,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6901285991271 处理结果:正常商品数量48.0,单价2.1666666666666665,赠品数量0 +2025-05-10 13:09:45,885 - app.core.excel.processor - INFO - 条码 6901285991530 处理结果:正常商品数量2.0,单价26.0,赠品数量0 +2025-05-10 13:09:45,886 - app.core.excel.processor - INFO - 条码 6921168509256 处理结果:只有赠品,数量=24.0 +2025-05-10 13:09:45,886 - app.core.excel.processor - INFO - 条码 109300 处理结果:只有赠品,数量=0.0 +2025-05-10 13:09:45,886 - app.core.excel.processor - INFO - 条码 6921168509256 填充:仅有赠品,采购量=0,赠品数量=24.0 +2025-05-10 13:09:45,887 - app.core.excel.processor - INFO - 条码 109300 填充:仅有赠品,采购量=0,赠品数量=0.0 +2025-05-10 13:09:45,891 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 13:09:45,893 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 14:16:18,083 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:16:18,083 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:16:18,085 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 14:16:18,087 - app.core.excel.processor - INFO - 开始处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/采购单_微信图片_20250510130835.xls +2025-05-10 14:16:18,095 - app.core.excel.processor - INFO - 成功读取Excel文件: D:/My Documents/python/orc-order-v2/data/output/采购单_微信图片_20250510130835.xls, 共 10 行 +2025-05-10 14:16:18,099 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 35 +2025-05-10 14:16:18,099 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-10 14:16:18,105 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 9 行有效数据 +2025-05-10 14:16:18,105 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条码(必填) +2025-05-10 14:16:18,105 - app.core.excel.processor - INFO - 使用条码列: 条码(必填) +2025-05-10 14:16:18,105 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-10 14:16:18,106 - app.core.excel.processor - INFO - 找到price列(部分匹配): 采购单价(必填) +2025-05-10 14:16:18,108 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条码(必填)', 'name': '商品名称', 'price': '采购单价(必填)'} +2025-05-10 14:16:18,110 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-10 14:16:18,112 - app.core.excel.processor - INFO - 提取到 0 个商品信息 +2025-05-10 14:16:18,113 - app.core.excel.processor - WARNING - 未提取到有效商品信息 +2025-05-10 14:16:59,266 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:16:59,266 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:16:59,267 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 14:16:59,269 - app.core.excel.processor - INFO - 搜索目录 data/output 中的Excel文件 +2025-05-10 14:16:59,270 - app.core.excel.processor - WARNING - 找到的最新文件是采购单,不作处理: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 14:16:59,270 - app.core.excel.processor - WARNING - 未找到可处理的Excel文件 +2025-05-10 14:17:10,875 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:17:10,876 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:17:10,877 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 14:17:10,878 - app.core.excel.processor - INFO - 开始处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250510130835.xlsx +2025-05-10 14:17:10,945 - app.core.excel.processor - INFO - 成功读取Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250510130835.xlsx, 共 11 行 +2025-05-10 14:17:10,949 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 60 +2025-05-10 14:17:10,949 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-10 14:17:11,005 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-10 14:17:11,005 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品条码 +2025-05-10 14:17:11,005 - app.core.excel.processor - INFO - 使用条码列: 商品条码 +2025-05-10 14:17:11,009 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-10 14:17:11,009 - app.core.excel.processor - INFO - 找到specification列: 规格 +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 找到price列: 单价 +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '商品条码', 'name': '商品名称', 'specification': '规格', 'quantity': '数量', 'unit': '单位', 'price': '单价'} +2025-05-10 14:17:11,010 - app.core.excel.processor - INFO - 是否存在规格列: True +2025-05-10 14:17:11,012 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6954767433073, 名称=2L大雪碧, 规格=, 数量=2.0, 单位=件, 单价=41.0 +2025-05-10 14:17:11,014 - app.core.excel.processor - INFO - 解析规格: 2L*8 -> 包装数量=8 +2025-05-10 14:17:11,016 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6954767432076, 名称=中雪碧500ml, 规格=, 数量=3.0, 单位=件, 单价=52.0 +2025-05-10 14:17:11,016 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 14:17:11,018 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6954767412573, 名称=中可口可乐500ml, 规格=, 数量=5.0, 单位=件, 单价=51.0 +2025-05-10 14:17:11,018 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 14:17:11,018 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6954767423579, 名称=500ml中零度可口可乐, 规格=, 数量=4.0, 单位=件, 单价=53.0 +2025-05-10 14:17:11,018 - app.core.excel.processor - INFO - 解析规格: 500ml*24 -> 包装数量=24 +2025-05-10 14:17:11,019 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6925303730574, 名称=500ml阿萨姆原味, 规格=, 数量=3.0, 单位=件, 单价=44.0 +2025-05-10 14:17:11,019 - app.core.excel.processor - INFO - 解析规格: 500ml*15 -> 包装数量=15 +2025-05-10 14:17:11,020 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6901285992933, 名称=2.08L怡宝, 规格=, 数量=5.0, 单位=件, 单价=20.0 +2025-05-10 14:17:11,020 - app.core.excel.processor - INFO - 解析规格: 2.08L*8 -> 包装数量=8 +2025-05-10 14:17:11,021 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6901285991271, 名称=1.5L怡宝, 规格=, 数量=4.0, 单位=件, 单价=26.0 +2025-05-10 14:17:11,085 - app.core.excel.processor - INFO - 解析规格: 1.5L*12 -> 包装数量=12 +2025-05-10 14:17:11,086 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6901285991530, 名称=4.5L怡宝, 规格=, 数量=2.0, 单位=件, 单价=26.0 +2025-05-10 14:17:11,086 - app.core.excel.processor - INFO - 解析规格: 4.5L*4 -> 包装数量=4 +2025-05-10 14:17:11,087 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168509256, 名称=550ml(红色包装)中农夫, 规格=, 数量=1.0, 单位=件, 单价=0.0 +2025-05-10 14:17:11,087 - app.core.excel.processor - INFO - 解析规格: 550ml*24 -> 包装数量=24 +2025-05-10 14:17:11,087 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 处理商品: 条码=6954767433073, 数量=16.0, 单价=5.125, 是否赠品=False +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 发现正常商品:条码6954767433073, 数量=16.0, 单价=5.125 +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 处理商品: 条码=6954767432076, 数量=72.0, 单价=2.1666666666666665, 是否赠品=False +2025-05-10 14:17:11,095 - app.core.excel.processor - INFO - 发现正常商品:条码6954767432076, 数量=72.0, 单价=2.1666666666666665 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6954767412573, 数量=120.0, 单价=2.125, 是否赠品=False +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 发现正常商品:条码6954767412573, 数量=120.0, 单价=2.125 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6954767423579, 数量=96.0, 单价=2.2083333333333335, 是否赠品=False +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 发现正常商品:条码6954767423579, 数量=96.0, 单价=2.2083333333333335 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6925303730574, 数量=45.0, 单价=2.933333333333333, 是否赠品=False +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 发现正常商品:条码6925303730574, 数量=45.0, 单价=2.933333333333333 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6901285992933, 数量=40.0, 单价=2.5, 是否赠品=False +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 发现正常商品:条码6901285992933, 数量=40.0, 单价=2.5 +2025-05-10 14:17:11,096 - app.core.excel.processor - INFO - 处理商品: 条码=6901285991271, 数量=48.0, 单价=2.1666666666666665, 是否赠品=False +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 发现正常商品:条码6901285991271, 数量=48.0, 单价=2.1666666666666665 +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 处理商品: 条码=6901285991530, 数量=8.0, 单价=6.5, 是否赠品=False +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 发现正常商品:条码6901285991530, 数量=8.0, 单价=6.5 +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 处理商品: 条码=6921168509256, 数量=24.0, 单价=0, 是否赠品=True +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 发现赠品:条码6921168509256, 数量=24.0 +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-10 14:17:11,097 - app.core.excel.processor - INFO - 条码 6954767433073 处理结果:正常商品数量16.0,单价5.125,赠品数量0 +2025-05-10 14:17:11,098 - app.core.excel.processor - INFO - 条码 6954767432076 处理结果:正常商品数量72.0,单价2.1666666666666665,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6954767412573 处理结果:正常商品数量120.0,单价2.125,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6954767423579 处理结果:正常商品数量96.0,单价2.2083333333333335,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6925303730574 处理结果:正常商品数量45.0,单价2.933333333333333,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6901285992933 处理结果:正常商品数量40.0,单价2.5,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6901285991271 处理结果:正常商品数量48.0,单价2.1666666666666665,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6901285991530 处理结果:正常商品数量8.0,单价6.5,赠品数量0 +2025-05-10 14:17:15,243 - app.core.excel.processor - INFO - 条码 6921168509256 处理结果:只有赠品,数量=24.0 +2025-05-10 14:17:15,244 - app.core.excel.processor - INFO - 条码 6921168509256 填充:仅有赠品,采购量=0,赠品数量=24.0 +2025-05-10 14:17:15,247 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 14:17:15,248 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510130835.xls +2025-05-10 14:20:46,716 - app.core.excel.processor - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:20:46,717 - app.core.excel.processor - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:20:46,718 - app.core.excel.processor - INFO - 初始化ExcelProcessor完成,模板文件: templates/银豹-采购单模板.xls +2025-05-10 14:20:48,381 - app.core.excel.processor - INFO - 搜索目录 data/output 中的Excel文件 +2025-05-10 14:20:48,384 - app.core.excel.processor - INFO - 找到最新的Excel文件: data/output\微信图片_20250510142041.xlsx +2025-05-10 14:20:48,384 - app.core.excel.processor - INFO - 开始处理Excel文件: data/output\微信图片_20250510142041.xlsx +2025-05-10 14:20:48,420 - app.core.excel.processor - INFO - 成功读取Excel文件: data/output\微信图片_20250510142041.xlsx, 共 10 行 +2025-05-10 14:20:48,427 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 60 +2025-05-10 14:20:48,427 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-10 14:20:48,444 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 9 行有效数据 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 商品条码 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 使用条码列: 商品条码 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到specification列: 规格 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 找到price列: 单价 +2025-05-10 14:20:48,445 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '商品条码', 'name': '商品名称', 'specification': '规格', 'quantity': '数量', 'unit': '单位', 'price': '单价'} +2025-05-10 14:20:48,446 - app.core.excel.processor - INFO - 是否存在规格列: True +2025-05-10 14:20:48,446 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6902538008920, 名称=600ml脉动电解质西柚口味, 规格=, 数量=1.0, 单位=件, 单价=65.0 +2025-05-10 14:20:48,447 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,449 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6902538004045, 名称=600ml脉动青柠口味, 规格=, 数量=3.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,449 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,451 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6902538009040, 名称=600ml脉动沁爽青草口味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,451 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,453 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6902538004052, 名称=600ml脉动雪柚橘子味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,453 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,454 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6902538007169, 名称=600ml脉动菠萝口味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,454 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,495 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6902538008425, 名称=600ml脉动零糖柠檬味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,496 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,496 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6902538008364, 名称=600ml脉动玫瑰葡萄口味, 规格=, 数量=1.0, 单位=件, 单价=55.0 +2025-05-10 14:20:48,496 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,497 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6902538005141, 名称=600ml脉动桃子口味, 规格=, 数量=2.0, 单位=件, 单价=0.0 +2025-05-10 14:20:48,497 - app.core.excel.processor - INFO - 解析规格: 600ml*15 -> 包装数量=15 +2025-05-10 14:20:48,498 - app.core.excel.processor - INFO - 提取到 8 个商品信息 +2025-05-10 14:20:48,511 - app.core.excel.processor - INFO - 开始处理8 个产品信息 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538008920, 数量=15.0, 单价=4.333333333333333, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538008920, 数量=15.0, 单价=4.333333333333333 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538004045, 数量=45.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538004045, 数量=45.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538009040, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538009040, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538004052, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538004052, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538007169, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 发现正常商品:条码6902538007169, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,512 - app.core.excel.processor - INFO - 处理商品: 条码=6902538008425, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 发现正常商品:条码6902538008425, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 处理商品: 条码=6902538008364, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 发现正常商品:条码6902538008364, 数量=15.0, 单价=3.6666666666666665 +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 处理商品: 条码=6902538005141, 数量=30.0, 单价=0, 是否赠品=True +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 发现赠品:条码6902538005141, 数量=30.0 +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 分组后共8 个不同条码的商品 +2025-05-10 14:20:48,513 - app.core.excel.processor - INFO - 条码 6902538008920 处理结果:正常商品数量15.0,单价4.333333333333333,赠品数量0 +2025-05-10 14:20:52,163 - app.core.excel.processor - INFO - 条码 6902538004045 处理结果:正常商品数量45.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,163 - app.core.excel.processor - INFO - 条码 6902538009040 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538004052 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538007169 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538008425 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538008364 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538005141 处理结果:只有赠品,数量=30.0 +2025-05-10 14:20:52,164 - app.core.excel.processor - INFO - 条码 6902538005141 填充:仅有赠品,采购量=0,赠品数量=30.0 +2025-05-10 14:20:52,166 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510142041.xls +2025-05-10 14:20:52,168 - app.core.excel.processor - INFO - 采购单已保存到: data/output\采购单_微信图片_20250510142041.xls diff --git a/logs/app.core.excel.validators.active b/logs/app.core.excel.validators.active index 0ba361d..9093649 100644 --- a/logs/app.core.excel.validators.active +++ b/logs/app.core.excel.validators.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:28:31 \ No newline at end of file diff --git a/logs/app.core.excel.validators.log b/logs/app.core.excel.validators.log index aa32354..2f96311 100644 --- a/logs/app.core.excel.validators.log +++ b/logs/app.core.excel.validators.log @@ -7,3 +7,6 @@ 2025-05-08 19:45:49,641 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 2025-05-08 19:45:49,878 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 2025-05-08 19:45:49,881 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 +2025-05-10 13:09:43,071 - app.core.excel.validators - WARNING - 条码长度异常: 109300, 长度=6 +2025-05-10 13:09:43,072 - app.core.excel.validators - WARNING - 条码验证失败: 条码长度异常: 109300, 长度=6 +2025-05-10 13:09:43,072 - app.core.excel.validators - WARNING - 数量验证失败: 数量必须大于0,当前值: 0.0 diff --git a/logs/app.core.ocr.baidu_ocr.active b/logs/app.core.ocr.baidu_ocr.active index 26dd9c1..884791a 100644 --- a/logs/app.core.ocr.baidu_ocr.active +++ b/logs/app.core.ocr.baidu_ocr.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:51 \ No newline at end of file +Active since: 2025-05-10 14:20:44 \ No newline at end of file diff --git a/logs/app.core.ocr.baidu_ocr.log b/logs/app.core.ocr.baidu_ocr.log index 41d7caa..962f614 100644 --- a/logs/app.core.ocr.baidu_ocr.log +++ b/logs/app.core.ocr.baidu_ocr.log @@ -91,3 +91,5 @@ 2025-05-10 12:34:15,444 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌 2025-05-10 12:34:15,445 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌,无法进行表格识别 2025-05-10 12:47:25,432 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-10 13:09:39,486 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-10 14:20:47,053 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 diff --git a/logs/app.core.ocr.table_ocr.active b/logs/app.core.ocr.table_ocr.active index 26dd9c1..884791a 100644 --- a/logs/app.core.ocr.table_ocr.active +++ b/logs/app.core.ocr.table_ocr.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:51 \ No newline at end of file +Active since: 2025-05-10 14:20:44 \ No newline at end of file diff --git a/logs/app.core.ocr.table_ocr.log b/logs/app.core.ocr.table_ocr.log index 7e2ace5..388f53d 100644 --- a/logs/app.core.ocr.table_ocr.log +++ b/logs/app.core.ocr.table_ocr.log @@ -775,3 +775,23 @@ 2025-05-10 12:54:52,737 - app.core.ocr.table_ocr - INFO - 初始化OCRProcessor完成:输入目录=data/input, 输出目录=data/output 2025-05-10 12:54:52,743 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 2025-05-10 12:54:52,743 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-10 13:09:39,196 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-10 13:09:39,196 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 13:09:39,197 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 13:09:39,197 - app.core.ocr.table_ocr - INFO - 允许的文件类型: ['.jpg', '.jpeg', '.png', '.bmp'] +2025-05-10 13:09:39,198 - app.core.ocr.table_ocr - INFO - 初始化OCRProcessor完成:输入目录=data/input, 输出目录=data/output +2025-05-10 13:09:39,202 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-10 13:09:39,202 - app.core.ocr.table_ocr - INFO - 处理批次 1/1: 1 个文件 +2025-05-10 13:09:39,204 - app.core.ocr.table_ocr - INFO - 开始处理图片: data/input\微信图片_20250510130835.jpg +2025-05-10 13:09:42,978 - app.core.ocr.table_ocr - INFO - 图片处理成功: data/input\微信图片_20250510130835.jpg, 输出文件: data/output\微信图片_20250510130835.xlsx +2025-05-10 13:09:42,984 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-10 14:20:46,714 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-10 14:20:46,714 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-10 14:20:46,715 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-10 14:20:46,715 - app.core.ocr.table_ocr - INFO - 允许的文件类型: ['.jpg', '.jpeg', '.png', '.bmp'] +2025-05-10 14:20:46,715 - app.core.ocr.table_ocr - INFO - 初始化OCRProcessor完成:输入目录=data/input, 输出目录=data/output +2025-05-10 14:20:46,721 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-10 14:20:46,721 - app.core.ocr.table_ocr - INFO - 处理批次 1/1: 1 个文件 +2025-05-10 14:20:46,722 - app.core.ocr.table_ocr - INFO - 开始处理图片: data/input\微信图片_20250510142041.jpg +2025-05-10 14:20:48,367 - app.core.ocr.table_ocr - INFO - 图片处理成功: data/input\微信图片_20250510142041.jpg, 输出文件: data/output\微信图片_20250510142041.xlsx +2025-05-10 14:20:48,379 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 diff --git a/logs/app.core.utils.file_utils.active b/logs/app.core.utils.file_utils.active index 26dd9c1..884791a 100644 --- a/logs/app.core.utils.file_utils.active +++ b/logs/app.core.utils.file_utils.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:51 \ No newline at end of file +Active since: 2025-05-10 14:20:44 \ No newline at end of file diff --git a/logs/app.services.ocr_service.active b/logs/app.services.ocr_service.active index 26dd9c1..884791a 100644 --- a/logs/app.services.ocr_service.active +++ b/logs/app.services.ocr_service.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:51 \ No newline at end of file +Active since: 2025-05-10 14:20:44 \ No newline at end of file diff --git a/logs/app.services.ocr_service.log b/logs/app.services.ocr_service.log index 4d3cb00..8831c5e 100644 --- a/logs/app.services.ocr_service.log +++ b/logs/app.services.ocr_service.log @@ -316,3 +316,11 @@ 2025-05-10 12:54:52,737 - app.services.ocr_service - INFO - OCRService初始化完成 2025-05-10 12:54:52,742 - app.services.ocr_service - INFO - OCRService.batch_process被调用,转发到process_images_batch 2025-05-10 12:54:52,742 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-10 13:09:39,194 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-10 13:09:39,198 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-10 13:09:39,202 - app.services.ocr_service - INFO - OCRService.batch_process被调用,转发到process_images_batch +2025-05-10 13:09:39,202 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-10 14:20:46,713 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-10 14:20:46,715 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-10 14:20:46,720 - app.services.ocr_service - INFO - OCRService.batch_process被调用,转发到process_images_batch +2025-05-10 14:20:46,720 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None diff --git a/logs/app.services.order_service.active b/logs/app.services.order_service.active index 0ba361d..0a1e8d5 100644 --- a/logs/app.services.order_service.active +++ b/logs/app.services.order_service.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:45 \ No newline at end of file diff --git a/logs/app.services.order_service.log b/logs/app.services.order_service.log index 4d9ce2d..3b1abb2 100644 --- a/logs/app.services.order_service.log +++ b/logs/app.services.order_service.log @@ -356,3 +356,18 @@ 2025-05-10 12:54:52,737 - app.services.order_service - INFO - 初始化OrderService 2025-05-10 12:54:52,742 - app.services.order_service - INFO - OrderService初始化完成 2025-05-10 12:54:52,744 - app.services.order_service - INFO - OrderService开始处理最新Excel文件 +2025-05-10 13:09:39,198 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 13:09:39,201 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 13:09:42,986 - app.services.order_service - INFO - OrderService开始处理最新Excel文件 +2025-05-10 14:16:18,081 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 14:16:18,087 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 14:16:18,087 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:/My Documents/python/orc-order-v2/data/output/采购单_微信图片_20250510130835.xls +2025-05-10 14:16:59,264 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 14:16:59,269 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 14:16:59,269 - app.services.order_service - INFO - OrderService开始处理最新Excel文件 +2025-05-10 14:17:10,874 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 14:17:10,878 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 14:17:10,878 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250510130835.xlsx +2025-05-10 14:20:46,715 - app.services.order_service - INFO - 初始化OrderService +2025-05-10 14:20:46,719 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-10 14:20:48,381 - app.services.order_service - INFO - OrderService开始处理最新Excel文件 diff --git a/logs/app.services.tobacco_service.active b/logs/app.services.tobacco_service.active index 0ba361d..5951359 100644 --- a/logs/app.services.tobacco_service.active +++ b/logs/app.services.tobacco_service.active @@ -1 +1 @@ -Active since: 2025-05-10 12:54:52 \ No newline at end of file +Active since: 2025-05-10 14:20:46 \ No newline at end of file