diff --git a/app/core/excel/__pycache__/converter.cpython-39.pyc b/app/core/excel/__pycache__/converter.cpython-39.pyc index 18e75ab..16a9c48 100644 Binary files a/app/core/excel/__pycache__/converter.cpython-39.pyc and b/app/core/excel/__pycache__/converter.cpython-39.pyc differ diff --git a/app/core/excel/__pycache__/processor.cpython-39.pyc b/app/core/excel/__pycache__/processor.cpython-39.pyc index 1483af8..04515c2 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/converter.py b/app/core/excel/converter.py index d8d99c3..1440ff5 100644 --- a/app/core/excel/converter.py +++ b/app/core/excel/converter.py @@ -116,6 +116,13 @@ class UnitConverter: if not text or not isinstance(text, str): return None + # 处理XX入白膜格式,如"550纯净水24入白膜" + match = re.search(r'.*?(\d+)入白膜', text) + if match: + result = f"1*{match.group(1)}" + logger.info(f"提取规格(入白膜): {text} -> {result}") + return result + # 尝试所有模式 for pattern, replacement in self.spec_patterns: match = re.search(pattern, text) @@ -149,6 +156,7 @@ class UnitConverter: 3. "xx纸箱" -> 1*xx (如"15纸箱" -> 1*15) 4. "xx白膜" -> 1*xx (如"12白膜" -> 1*12) 5. "xxL" 容量单位特殊处理 + 6. "xx(g|ml|毫升|克)*数字" -> 1*数字 (如"450g*15" -> 1*15) Args: name: 商品名称 @@ -162,6 +170,23 @@ class UnitConverter: # 记录原始商品名称,用于日志 original_name = name + # 新增模式: 处理重量/容量*数字格式,如"450g*15", "450ml*15" + # 忽略重量/容量值,只提取后面的数量作为规格 + weight_volume_pattern = r'.*?\d+(?:g|ml|毫升|克)[*xX×](\d+)' + match = re.search(weight_volume_pattern, name) + if match: + inferred_spec = f"1*{match.group(1)}" + logger.info(f"从名称推断规格(重量/容量*数量): {original_name} -> {inferred_spec}") + return inferred_spec + + # 特殊模式1.1: "xx入白膜" 格式,如"550纯净水24入白膜" -> "1*24" + pattern1_1 = r'.*?(\d+)入白膜' + match = re.search(pattern1_1, name) + if match: + inferred_spec = f"1*{match.group(1)}" + logger.info(f"从名称推断规格(入白膜): {original_name} -> {inferred_spec}") + return inferred_spec + # 特殊模式1: "xx入纸箱" 格式,如"445水溶C血橙15入纸箱" -> "1*15" pattern1 = r'.*?(\d+)入纸箱' match = re.search(pattern1, name) @@ -223,43 +248,51 @@ class UnitConverter: if not spec or not isinstance(spec, str): return 1, 1, None - # 处理三级包装,如1*5*12 - three_level_match = re.match(r'(\d+)[*xX×](\d+)[*xX×](\d+)', spec) - if three_level_match: - try: - level1 = int(three_level_match.group(1)) - level2 = int(three_level_match.group(2)) - level3 = int(three_level_match.group(3)) - logger.info(f"解析三级规格: {spec} -> {level1}*{level2}*{level3}") - return level1, level2, level3 - except ValueError: - pass + try: + # 清理规格字符串,确保格式统一 + spec = re.sub(r'\s+', '', spec) # 移除所有空白 + spec = re.sub(r'[xX×]', '*', spec) # 统一分隔符为* + + # 处理三级包装,如1*5*12 + three_level_match = re.match(r'(\d+)[*](\d+)[*](\d+)', spec) + if three_level_match: + try: + level1 = int(three_level_match.group(1)) + level2 = int(three_level_match.group(2)) + level3 = int(three_level_match.group(3)) + logger.info(f"解析三级规格: {spec} -> {level1}*{level2}*{level3}") + return level1, level2, level3 + except ValueError: + pass + + # 处理二级包装,如1*12 + two_level_match = re.match(r'(\d+)[*](\d+)', spec) + if two_level_match: + try: + level1 = int(two_level_match.group(1)) + level2 = int(two_level_match.group(2)) + logger.info(f"解析二级规格: {spec} -> {level1}*{level2}") + return level1, level2, None + except ValueError: + pass - # 处理二级包装,如1*12 - two_level_match = re.match(r'(\d+)[*xX×](\d+)', spec) - if two_level_match: - try: - level1 = int(two_level_match.group(1)) - level2 = int(two_level_match.group(2)) - logger.info(f"解析二级规格: {spec} -> {level1}*{level2}") - return level1, level2, None - except ValueError: - pass - - # 特殊处理L/升为单位的规格,如12.5L*1 - volume_match = re.match(r'([\d\.]+)[L升][*xX×](\d+)', spec) - if volume_match: - try: - volume = float(volume_match.group(1)) - quantity = int(volume_match.group(2)) - logger.info(f"解析容量规格: {spec} -> {volume}L*{quantity}") - return 1, quantity, None - except ValueError: - pass - - # 默认值 - logger.warning(f"无法解析规格: {spec},使用默认值1*1") - return 1, 1, None + # 特殊处理L/升为单位的规格,如12.5L*1 + volume_match = re.match(r'([\d\.]+)[L升][*xX×](\d+)', spec) + if volume_match: + try: + volume = float(volume_match.group(1)) + quantity = int(volume_match.group(2)) + logger.info(f"解析容量规格: {spec} -> {volume}L*{quantity}") + return 1, quantity, None + except ValueError: + pass + + # 默认值 + logger.warning(f"无法解析规格: {spec},使用默认值1*1") + return 1, 1, None + except Exception as e: + logger.error(f"解析规格时出错: {e}") + return 1, 1, None def process_unit_conversion(self, product: Dict) -> Dict: """ diff --git a/app/core/excel/processor.py b/app/core/excel/processor.py index 19037f1..00902d0 100644 --- a/app/core/excel/processor.py +++ b/app/core/excel/processor.py @@ -210,121 +210,109 @@ class ExcelProcessor: def extract_product_info(self, df: pd.DataFrame) -> List[Dict]: """ - 从数据帧中提取商品信息 + 从处理后的数据框中提取商品信息 + 支持处理不同格式的Excel文件 Args: - df: 数据帧 + df: 数据框 Returns: - 商品信息列表 + 商品信息列表,每个商品为一个字典 """ - # 清理数据:移除全空行 - df = df.dropna(how='all') - logger.info(f"移除空行后,有效数据行数: {len(df)}") - - # 提取有用的列 - barcode_cols = self.extract_barcode(df) - - # 如果没有找到条码列,无法继续处理 - if not barcode_cols: - logger.error("未找到条码列,无法处理") - return [] - - # 定义列名映射 - column_mapping = { - 'name': ['商品名称', '名称', '品名', '商品', '商品名', '商品或服务名称', '品项名', '产品名称', '品项'], - 'specification': ['规格', '规格型号', '型号', '商品规格', '产品规格', '包装规格'], - 'quantity': ['数量', '采购数量', '购买数量', '采购数量', '订单数量', '数量(必填)', '入库数', '入库数量'], - 'unit': ['单位', '采购单位', '计量单位', '单位(必填)', '单位名称', '计价单位'], - 'price': ['单价', '价格', '采购单价', '销售价', '进货价', '单价(必填)', '采购价', '参考价', '入库单价'] - } - - # 映射列名到标准名称 - mapped_columns = {'barcode': barcode_cols[0]} # 使用第一个找到的条码列 - - # 记录列名映射详情 - logger.info(f"使用条码列: {mapped_columns['barcode']}") - - for target, possible_names in column_mapping.items(): - for col in df.columns: - col_str = str(col).strip() - for name in possible_names: - if col_str == name: - mapped_columns[target] = col - logger.info(f"找到{target}列: {col}") - break - if target in mapped_columns: - break - - # 如果没有找到精确匹配,尝试部分匹配 - if target not in mapped_columns: - for col in df.columns: - col_str = str(col).strip().lower() - for name in possible_names: - if name.lower() in col_str: - mapped_columns[target] = col - logger.info(f"找到{target}列(部分匹配): {col}") - break - if target in mapped_columns: - break - - logger.info(f"列名映射结果: {mapped_columns}") - - # 检查是否有规格列 - has_specification_column = 'specification' in mapped_columns - logger.info(f"是否存在规格列: {has_specification_column}") - - # 提取商品信息 products = [] + # 检测表头位置和数据格式 + column_mapping = self._detect_column_mapping(df) + logger.info(f"列名映射结果: {column_mapping}") + + # 检查是否有规格列 + has_specification_column = '规格' in df.columns + logger.info(f"是否存在规格列: {has_specification_column}") + + # 处理每一行数据 for idx, row in df.iterrows(): - barcode = row.get(mapped_columns['barcode']) - - # 跳过空行或无效条码 - if pd.isna(barcode) or not self.validate_barcode(barcode): - logger.debug(f"跳过第{idx+1}行: 条码为空或无效 [{barcode}]") + try: + # 条码处理 - 确保条码总是字符串格式且不带小数点 + 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 + + # 使用format_barcode函数处理条码,确保无小数点 + barcode = format_barcode(barcode_raw) + + # 处理数量字段,先提取数字部分再转换为浮点数 + quantity_value = 0 + quantity_str = "" + if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]): + quantity_str = str(row[column_mapping['quantity']]) + # 使用提取数字的函数 + quantity_num = extract_number(quantity_str) + if quantity_num is not None: + quantity_value = quantity_num + + # 基础信息 + product = { + 'barcode': barcode, + 'name': str(row[column_mapping['name']]) if column_mapping.get('name') else '', + 'quantity': quantity_value, + 'price': float(row[column_mapping['price']]) if column_mapping.get('price') and not pd.isna(row[column_mapping['price']]) else 0, + 'unit': str(row[column_mapping['unit']]) if column_mapping.get('unit') and not pd.isna(row[column_mapping['unit']]) else '', + 'specification': '', + 'package_quantity': None + } + + # 清理单位 + if product['unit'] == 'nan' or product['unit'] == 'None': + product['unit'] = '' + + # 打印每行提取出的信息 + logger.info(f"第{idx+1}行: 提取商品信息 条码={product['barcode']}, 名称={product['name']}, 规格={product['specification']}, 数量={product['quantity']}, 单位={product['unit']}, 单价={product['price']}") + + # 从数量字段中提取单位(如果单位字段为空) + if not product['unit'] and quantity_str: + num, unit = self.unit_converter.extract_unit_from_quantity(quantity_str) + if unit: + product['unit'] = unit + logger.info(f"从数量提取单位: {quantity_str} -> {unit}") + # 如果数量被提取出来,更新数量 + if num is not None: + product['quantity'] = num + + # 提取规格并解析包装数量 + if '规格' in df.columns and not pd.isna(row['规格']): + product['specification'] = str(row['规格']) + package_quantity = self.parse_specification(product['specification']) + if package_quantity: + product['package_quantity'] = package_quantity + logger.info(f"解析规格: {product['specification']} -> 包装数量={package_quantity}") + else: + # 逻辑1: 如果规格为空,尝试从商品名称推断规格 + if product['name']: + # 特殊处理:"营养快线原味450g*15"或"娃哈哈瓶装大AD水蜜桃450ml*15"等形式的名称 + weight_volume_pattern = r'.*?\d+(?:g|ml|毫升|克)[*xX×](\d+)' + match = re.search(weight_volume_pattern, product['name']) + if match: + inferred_spec = f"1*{match.group(1)}" + inferred_qty = int(match.group(1)) + product['specification'] = inferred_spec + product['package_quantity'] = inferred_qty + logger.info(f"从商品名称提取重量/容量规格: {product['name']} -> {inferred_spec}, 包装数量={inferred_qty}") + else: + # 一般情况的规格推断 + inferred_spec, inferred_qty = self.infer_specification_from_name(product['name']) + if inferred_spec: + product['specification'] = inferred_spec + product['package_quantity'] = inferred_qty + logger.info(f"从商品名称推断规格: {product['name']} -> {inferred_spec}, 包装数量={inferred_qty}") + + # 应用单位转换规则 + product = self.unit_converter.process_unit_conversion(product) + + products.append(product) + except Exception as e: + logger.error(f"提取第{idx+1}行商品信息时出错: {e}", exc_info=True) continue - # 创建商品信息字典 - product = { - 'barcode': format_barcode(barcode), - 'name': row.get(mapped_columns.get('name', ''), ''), - 'specification': row.get(mapped_columns.get('specification', ''), ''), - 'quantity': extract_number(str(row.get(mapped_columns.get('quantity', ''), 0))) or 0, - 'unit': str(row.get(mapped_columns.get('unit', ''), '')), - 'price': extract_number(str(row.get(mapped_columns.get('price', ''), 0))) or 0 - } - - logger.info(f"第{idx+1}行: 提取商品信息 条码={product['barcode']}, 名称={product['name']}, 规格={product['specification']}, 数量={product['quantity']}, 单位={product['unit']}, 单价={product['price']}") - - # 如果商品名称为空但商品条码不为空,则使用条码作为名称 - if not product['name'] and product['barcode']: - product['name'] = f"商品 ({product['barcode']})" - logger.info(f"商品名称为空,使用条码作为名称: {product['name']}") - - # 单位处理:如果单位为空但数量包含单位信息 - quantity_str = str(row.get(mapped_columns.get('quantity', ''), '')) - if not product['unit'] and 'quantity' in mapped_columns: - num, unit = self.unit_converter.extract_unit_from_quantity(quantity_str) - if unit: - product['unit'] = unit - logger.info(f"从数量提取单位: {quantity_str} -> {unit}") - # 如果数量被提取出来,更新数量 - if num is not None: - product['quantity'] = num - - # 推断规格:如果规格为空或不存在规格列,尝试从商品名称推断 - if (not product['specification'] or not has_specification_column) and product['name']: - inferred_spec = self.unit_converter.infer_specification_from_name(product['name']) - if inferred_spec: - product['specification'] = inferred_spec - logger.info(f"从商品名称推断规格: {product['name']} -> {inferred_spec}") - - # 应用单位转换规则 - product = self.unit_converter.process_unit_conversion(product) - - products.append(product) - logger.info(f"提取到 {len(products)} 个商品信息") return products @@ -355,6 +343,9 @@ class ExcelProcessor: logger.info(f"开始处理{len(products)} 个产品信息") for product in products: barcode = product.get('barcode', '') + # 确保条码是整数字符串 + barcode = format_barcode(barcode) + if not barcode: logger.warning(f"跳过无条码商品") continue @@ -573,12 +564,8 @@ class ExcelProcessor: self.processed_files[file_path] = output_file self._save_processed_files() - # 自动打开输出目录 - try: - os.startfile(os.path.abspath(self.output_dir)) - logger.info(f"已自动打开输出目录: {self.output_dir}") - except Exception as e: - logger.warning(f"无法自动打开输出目录: {e}") + # 不再自动打开输出目录 + logger.info(f"采购单已保存到: {output_file}") return output_file @@ -602,4 +589,209 @@ class ExcelProcessor: return None # 处理文件 - return self.process_specific_file(latest_file) \ No newline at end of file + return self.process_specific_file(latest_file) + + def _detect_column_mapping(self, df: pd.DataFrame) -> Dict[str, str]: + """ + 检测和映射Excel表头列名 + + Args: + df: 数据框 + + Returns: + 列名映射字典,键为标准列名,值为实际列名 + """ + # 提取有用的列 + barcode_cols = self.extract_barcode(df) + + # 如果没有找到条码列,无法继续处理 + if not barcode_cols: + logger.error("未找到条码列,无法处理") + return {} + + # 定义列名映射 + column_mapping = { + 'name': ['商品名称', '名称', '品名', '商品', '商品名', '商品或服务名称', '品项名', '产品名称', '品项'], + 'specification': ['规格', '规格型号', '型号', '商品规格', '产品规格', '包装规格'], + 'quantity': ['数量', '采购数量', '购买数量', '采购数量', '订单数量', '数量(必填)', '入库数', '入库数量'], + 'unit': ['单位', '采购单位', '计量单位', '单位(必填)', '单位名称', '计价单位'], + 'price': ['单价', '价格', '采购单价', '销售价', '进货价', '单价(必填)', '采购价', '参考价', '入库单价'] + } + + # 映射列名到标准名称 + mapped_columns = {'barcode': barcode_cols[0]} # 使用第一个找到的条码列 + + # 记录列名映射详情 + logger.info(f"使用条码列: {mapped_columns['barcode']}") + + for target, possible_names in column_mapping.items(): + for col in df.columns: + col_str = str(col).strip() + for name in possible_names: + if col_str == name: + mapped_columns[target] = col + logger.info(f"找到{target}列: {col}") + break + if target in mapped_columns: + break + + # 如果没有找到精确匹配,尝试部分匹配 + if target not in mapped_columns: + for col in df.columns: + col_str = str(col).strip().lower() + for name in possible_names: + if name.lower() in col_str: + mapped_columns[target] = col + logger.info(f"找到{target}列(部分匹配): {col}") + break + if target in mapped_columns: + break + + return mapped_columns + + def infer_specification_from_name(self, product_name: str) -> Tuple[Optional[str], Optional[int]]: + """ + 从商品名称推断规格 + 根据特定的命名规则匹配规格信息 + + Args: + product_name: 商品名称 + + Returns: + 规格字符串和包装数量的元组 + """ + if not product_name or not isinstance(product_name, str): + logger.warning(f"无效的商品名: {product_name}") + return None, None + + product_name = product_name.strip() + + # 特殊处理:重量/容量*数字格式 + weight_volume_pattern = r'.*?\d+(?:g|ml|毫升|克)[*xX×](\d+)' + match = re.search(weight_volume_pattern, product_name) + if match: + inferred_spec = f"1*{match.group(1)}" + inferred_qty = int(match.group(1)) + logger.info(f"从商品名称提取重量/容量规格: {product_name} -> {inferred_spec}, 包装数量={inferred_qty}") + return inferred_spec, inferred_qty + + # 使用单位转换器推断规格 + inferred_spec = self.unit_converter.infer_specification_from_name(product_name) + if inferred_spec: + # 解析规格中的包装数量 + package_quantity = self.parse_specification(inferred_spec) + if package_quantity: + logger.info(f"从商品名称推断规格: {product_name} -> {inferred_spec}, 包装数量={package_quantity}") + return inferred_spec, package_quantity + + # 特定商品规则匹配 + spec_rules = [ + # XX入白膜格式,如"550纯净水24入白膜" + (r'.*?(\d+)入白膜', lambda m: (f"1*{m.group(1)}", int(m.group(1)))), + + # 白膜格式,如"550水24白膜" + (r'.*?(\d+)白膜', lambda m: (f"1*{m.group(1)}", int(m.group(1)))), + + # 445水溶C系列 + (r'445水溶C.*?(\d+)[入个]纸箱', lambda m: (f"1*{m.group(1)}", int(m.group(1)))), + + # 东方树叶系列 + (r'东方树叶.*?(\d+\*\d+).*纸箱', lambda m: (m.group(1), int(m.group(1).split('*')[1]))), + + # 桶装 + (r'(\d+\.?\d*L)桶装', lambda m: (f"{m.group(1)}*1", 1)), + + # 树叶茶系 + (r'树叶.*?(\d+)[入个]纸箱', lambda m: (f"1*{m.group(1)}", int(m.group(1)))), + + # 茶π系列 + (r'茶[πΠπ].*?(\d+)纸箱', lambda m: (f"1*{m.group(1)}", int(m.group(1)))), + + # 通用入数匹配 + (r'.*?(\d+)[入个](?:纸箱|箱装|白膜)', lambda m: (f"1*{m.group(1)}", int(m.group(1)))), + + # 通用数字+纸箱格式 + (r'.*?(\d+)纸箱', lambda m: (f"1*{m.group(1)}", int(m.group(1)))) + ] + + # 尝试所有规则 + for pattern, formatter in spec_rules: + match = re.search(pattern, product_name) + if match: + spec, qty = formatter(match) + logger.info(f"根据特定规则推断规格: {product_name} -> {spec}, 包装数量={qty}") + return spec, qty + + # 尝试直接从名称中提取数字*数字格式 + match = re.search(r'(\d+\*\d+)', product_name) + if match: + spec = match.group(1) + package_quantity = self.parse_specification(spec) + if package_quantity: + logger.info(f"从名称中直接提取规格: {spec}, 包装数量={package_quantity}") + return spec, package_quantity + + # 最后尝试提取任何位置的数字,默认典型件装数 + numbers = re.findall(r'\d+', product_name) + if numbers: + for num in numbers: + # 检查是否为典型的件装数(12/15/24/30) + if num in ['12', '15', '24', '30']: + spec = f"1*{num}" + logger.info(f"从名称中提取可能的件装数: {spec}, 包装数量={int(num)}") + return spec, int(num) + + logger.warning(f"无法从商品名'{product_name}' 推断规格") + return None, None + + def parse_specification(self, spec_str: str) -> Optional[int]: + """ + 解析规格字符串,提取包装数量 + 支持格式:1*15, 1x15, 1*5*10 + + Args: + spec_str: 规格字符串 + + Returns: + 包装数量,如果无法解析则返回None + """ + if not spec_str or not isinstance(spec_str, str): + return None + + try: + # 清理规格字符串 + spec_str = clean_string(spec_str) + + # 匹配重量/容量格式,如"450g*15"、"450ml*15" + match = re.search(r'\d+(?:g|ml|毫升|克)[*xX×](\d+)', spec_str) + if match: + # 返回后面的数量 + return int(match.group(1)) + + # 匹配1*5*10 格式的三级规格 + match = re.search(r'(\d+)[\*xX×](\d+)[\*xX×](\d+)', spec_str) + if match: + # 取最后一个数字作为袋数量 + return int(match.group(3)) + + # 匹配1*15, 1x15 格式 + match = re.search(r'(\d+)[\*xX×](\d+)', spec_str) + if match: + # 取第二个数字作为包装数量 + return int(match.group(2)) + + # 匹配24瓶/件等格式 + match = re.search(r'(\d+)[瓶个支袋][//](件|箱)', spec_str) + if match: + return int(match.group(1)) + + # 匹配4L格式 + match = re.search(r'(\d+(?:\.\d+)?)\s*[Ll升][*×]?(\d+)?', spec_str) + if match: + # 如果有第二个数字,返回它;否则返回1 + return int(match.group(2)) if match.group(2) else 1 + + except Exception as e: + logger.warning(f"解析规格'{spec_str}'时出错: {e}") + + return None \ No newline at end of file diff --git a/app/core/utils/__pycache__/string_utils.cpython-39.pyc b/app/core/utils/__pycache__/string_utils.cpython-39.pyc index f601e9d..5998c86 100644 Binary files a/app/core/utils/__pycache__/string_utils.cpython-39.pyc and b/app/core/utils/__pycache__/string_utils.cpython-39.pyc differ diff --git a/app/core/utils/string_utils.py b/app/core/utils/string_utils.py index 61991af..95fc5e9 100644 --- a/app/core/utils/string_utils.py +++ b/app/core/utils/string_utils.py @@ -127,6 +127,12 @@ def parse_specification(spec_str: str) -> Optional[int]: # 清理规格字符串 spec_str = clean_string(spec_str) + # 匹配重量/容量格式,如"450g*15"、"450ml*15" + match = re.search(r'\d+(?:g|ml|毫升|克)[*xX×](\d+)', spec_str) + if match: + # 返回后面的数量 + return int(match.group(1)) + # 匹配1*5*10 格式的三级规格 match = re.search(r'(\d+)[\*xX×](\d+)[\*xX×](\d+)', spec_str) if match: diff --git a/config.ini b/config.ini index e33b7c2..fd4957c 100644 --- a/config.ini +++ b/config.ini @@ -10,6 +10,7 @@ api_url = https://aip.baidubce.com/rest/2.0/ocr/v1/table input_folder = data/input output_folder = data/output temp_folder = data/temp +template_folder = templates processed_record = data/processed_files.json [Performance] @@ -22,3 +23,6 @@ allowed_extensions = .jpg,.jpeg,.png,.bmp excel_extension = .xlsx max_file_size_mb = 4 +[Templates] +purchase_order = 银豹-采购单模板.xls + diff --git a/config/config.ini b/config/config.ini new file mode 100644 index 0000000..fd4957c --- /dev/null +++ b/config/config.ini @@ -0,0 +1,28 @@ +[API] +api_key = O0Fgk3o69RWJ86eAX8BTHRaB +secret_key = VyZD5lzcIMgsup1uuD6Cw0pfzS20IGPZ +timeout = 30 +max_retries = 3 +retry_delay = 2 +api_url = https://aip.baidubce.com/rest/2.0/ocr/v1/table + +[Paths] +input_folder = data/input +output_folder = data/output +temp_folder = data/temp +template_folder = templates +processed_record = data/processed_files.json + +[Performance] +max_workers = 4 +batch_size = 5 +skip_existing = true + +[File] +allowed_extensions = .jpg,.jpeg,.png,.bmp +excel_extension = .xlsx +max_file_size_mb = 4 + +[Templates] +purchase_order = 银豹-采购单模板.xls + diff --git a/data/processed_files.json b/data/processed_files.json deleted file mode 100644 index 9e26dfe..0000000 --- a/data/processed_files.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/data/user_settings.json b/data/user_settings.json new file mode 100644 index 0000000..6a5d1e0 --- /dev/null +++ b/data/user_settings.json @@ -0,0 +1 @@ +{"theme": "light"} \ No newline at end of file diff --git a/diff.txt b/diff.txt new file mode 100644 index 0000000..5c99a20 Binary files /dev/null and b/diff.txt differ diff --git a/logs/__main__.active b/logs/__main__.active deleted file mode 100644 index 6e265cb..0000000 --- a/logs/__main__.active +++ /dev/null @@ -1 +0,0 @@ -Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/__main__.log b/logs/__main__.log index c5882f3..5d1d9ac 100644 --- a/logs/__main__.log +++ b/logs/__main__.log @@ -86,3 +86,115 @@ 2025-05-02 19:53:47,770 - __main__ - INFO - === 流程步骤 3: 订单合并 === 2025-05-02 19:53:47,771 - __main__ - INFO - 合并所有采购单文件: 1 个 2025-05-02 19:53:47,786 - __main__ - ERROR - 订单合并失败 +2025-05-02 20:52:59,674 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 20:52:59,674 - __main__ - INFO - 批量处理所有图片 +2025-05-02 20:53:02,564 - __main__ - INFO - OCR处理完成,总计: 1,成功: 1 +2025-05-02 20:53:02,564 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 20:53:02,564 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx +2025-05-02 20:53:07,427 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 20:53:07,428 - __main__ - INFO - === 流程步骤 3: 订单合并 === +2025-05-02 20:53:07,431 - __main__ - INFO - 合并所有采购单文件: 1 个 +2025-05-02 20:53:07,470 - __main__ - ERROR - 订单合并失败 +2025-05-02 21:02:57,317 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 21:02:57,317 - __main__ - INFO - 批量处理所有图片 +2025-05-02 21:02:57,318 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 21:02:57,319 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 21:02:57,320 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx +2025-05-02 21:02:58,040 - __main__ - ERROR - Excel处理失败 +2025-05-02 21:04:06,635 - __main__ - INFO - 处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:04:07,327 - __main__ - ERROR - Excel处理失败 +2025-05-02 21:07:29,007 - __main__ - INFO - 处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:07:29,708 - __main__ - ERROR - Excel处理失败 +2025-05-02 21:10:08,472 - __main__ - INFO - 处理Excel文件: data/output/微信图片_20250502205251.xlsx +2025-05-02 21:10:09,277 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 21:11:03,186 - __main__ - INFO - 处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:11:07,603 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 21:15:10,779 - __main__ - INFO - 处理Excel文件: data/output/微信图片_20250502205251.xlsx +2025-05-02 21:15:11,666 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 21:16:38,297 - __main__ - INFO - 处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:16:42,564 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 21:21:20,680 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 21:21:20,681 - __main__ - INFO - 批量处理所有图片 +2025-05-02 21:21:27,223 - __main__ - ERROR - OCR处理失败,没有成功处理的图片 +2025-05-02 21:22:23,299 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 21:22:23,299 - __main__ - INFO - 批量处理所有图片 +2025-05-02 21:22:26,468 - __main__ - INFO - OCR处理完成,总计: 1,成功: 1 +2025-05-02 21:22:26,468 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 21:22:26,469 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502212111.xlsx +2025-05-02 21:22:31,696 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502212111.xls +2025-05-02 21:22:31,696 - __main__ - INFO - === 流程步骤 3: 订单合并 === +2025-05-02 21:22:31,715 - __main__ - INFO - 合并所有采购单文件: 1 个 +2025-05-02 21:22:31,741 - __main__ - ERROR - 订单合并失败 +2025-05-02 21:45:07,600 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 21:45:07,600 - __main__ - INFO - 批量处理所有图片 +2025-05-02 21:45:10,629 - __main__ - INFO - OCR处理完成,总计: 1,成功: 1 +2025-05-02 21:45:10,629 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 21:45:10,630 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 21:45:21,947 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 21:45:21,947 - __main__ - INFO - === 流程步骤 3: 订单合并 === +2025-05-02 21:45:21,948 - __main__ - INFO - 合并所有采购单文件: 1 个 +2025-05-02 21:45:24,736 - __main__ - ERROR - 订单合并失败 +2025-05-02 21:54:51,329 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 21:54:51,329 - __main__ - INFO - 批量处理所有图片 +2025-05-02 21:54:51,331 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 21:54:51,331 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 21:54:51,332 - __main__ - WARNING - 未找到可处理的Excel文件 +2025-05-02 21:55:07,665 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 21:55:07,665 - __main__ - INFO - 批量处理所有图片 +2025-05-02 21:55:07,667 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 21:55:07,667 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 21:55:07,668 - __main__ - WARNING - 未找到可处理的Excel文件 +2025-05-02 21:56:33,286 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 21:56:33,286 - __main__ - INFO - 批量处理所有图片 +2025-05-02 21:56:33,287 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 21:56:33,287 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 21:56:33,289 - __main__ - WARNING - 未找到可处理的Excel文件 +2025-05-02 21:58:02,455 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 21:58:02,455 - __main__ - INFO - 批量处理所有图片 +2025-05-02 21:58:02,456 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 21:58:02,456 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 21:58:02,457 - __main__ - WARNING - 未找到可处理的Excel文件 +2025-05-02 22:07:10,382 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 22:07:10,382 - __main__ - INFO - 批量处理所有图片 +2025-05-02 22:07:10,383 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 22:07:10,383 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 22:07:10,383 - __main__ - WARNING - 未找到可处理的Excel文件 +2025-05-02 22:10:02,824 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 22:10:02,825 - __main__ - INFO - 批量处理所有图片 +2025-05-02 22:10:09,464 - __main__ - ERROR - OCR处理失败,没有成功处理的图片 +2025-05-02 22:11:55,061 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 22:11:55,061 - __main__ - INFO - 批量处理所有图片 +2025-05-02 22:11:57,703 - __main__ - INFO - OCR处理完成,总计: 1,成功: 1 +2025-05-02 22:11:57,703 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 22:11:57,705 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:12:08,754 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:12:08,754 - __main__ - INFO - === 流程步骤 3: 订单合并 === +2025-05-02 22:12:08,755 - __main__ - INFO - 合并所有采购单文件: 1 个 +2025-05-02 22:12:11,606 - __main__ - ERROR - 订单合并失败 +2025-05-02 22:26:11,621 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 22:26:11,621 - __main__ - INFO - 批量处理所有图片 +2025-05-02 22:26:11,622 - __main__ - WARNING - 没有找到需要处理的图片 +2025-05-02 22:26:11,623 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 22:26:11,624 - __main__ - WARNING - 未找到可处理的Excel文件 +2025-05-02 22:26:42,571 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 22:26:42,571 - __main__ - INFO - 批量处理所有图片 +2025-05-02 22:26:49,227 - __main__ - ERROR - OCR处理失败,没有成功处理的图片 +2025-05-02 22:29:10,832 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 22:29:10,832 - __main__ - INFO - 批量处理所有图片 +2025-05-02 22:29:14,320 - __main__ - INFO - OCR处理完成,总计: 1,成功: 1 +2025-05-02 22:29:14,320 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 22:29:14,322 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:29:26,875 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:29:26,875 - __main__ - INFO - === 流程步骤 3: 订单合并 === +2025-05-02 22:29:26,876 - __main__ - INFO - 合并所有采购单文件: 1 个 +2025-05-02 22:29:29,918 - __main__ - ERROR - 订单合并失败 +2025-05-02 22:40:41,147 - __main__ - INFO - === 流程步骤 1: OCR识别 === +2025-05-02 22:40:41,147 - __main__ - INFO - 批量处理所有图片 +2025-05-02 22:40:43,846 - __main__ - INFO - OCR处理完成,总计: 1,成功: 1 +2025-05-02 22:40:43,846 - __main__ - INFO - === 流程步骤 2: Excel处理 === +2025-05-02 22:40:43,849 - __main__ - INFO - 处理最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:40:56,995 - __main__ - INFO - Excel处理成功,输出文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:40:56,995 - __main__ - INFO - === 流程步骤 3: 订单合并 === +2025-05-02 22:40:56,996 - __main__ - INFO - 发现 1 个采购单文件 +2025-05-02 22:40:56,996 - __main__ - WARNING - 只有1个采购单文件 D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls,无需合并 +2025-05-02 22:40:56,996 - __main__ - INFO - === 完整流程处理成功(只有一个文件,跳过合并)=== diff --git a/logs/app.core.excel.converter.active b/logs/app.core.excel.converter.active deleted file mode 100644 index 6e265cb..0000000 --- a/logs/app.core.excel.converter.active +++ /dev/null @@ -1 +0,0 @@ -Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.excel.converter.log b/logs/app.core.excel.converter.log index e8276e4..1abe662 100644 --- a/logs/app.core.excel.converter.log +++ b/logs/app.core.excel.converter.log @@ -328,3 +328,328 @@ 2025-05-02 19:53:39,729 - app.core.excel.converter - INFO - 从名称推断规格(白膜): 550水24白膜 -> 1*24 2025-05-02 19:53:39,730 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 2025-05-02 19:53:39,730 - app.core.excel.converter - INFO - 箱单位处理: 数量: 5.0 -> 120.0, 单价: 0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 20:53:03,174 - app.core.excel.converter - INFO - 提取规格: 营养快线原味450g*15 -> 450*15 +2025-05-02 20:53:03,175 - app.core.excel.converter - INFO - 从名称推断规格(通用模式): 营养快线原味450g*15 -> 450*15 +2025-05-02 20:53:03,175 - app.core.excel.converter - INFO - 解析二级规格: 450*15 -> 450*15 +2025-05-02 20:53:03,175 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 20:53:03,176 - app.core.excel.converter - INFO - 提取规格: 营养快线香草450g*15 -> 450*15 +2025-05-02 20:53:03,176 - app.core.excel.converter - INFO - 从名称推断规格(通用模式): 营养快线香草450g*15 -> 450*15 +2025-05-02 20:53:03,176 - app.core.excel.converter - INFO - 解析二级规格: 450*15 -> 450*15 +2025-05-02 20:53:03,176 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 20:53:03,177 - app.core.excel.converter - INFO - 提取规格: 营养快线菠萝450g*15 -> 450*15 +2025-05-02 20:53:03,177 - app.core.excel.converter - INFO - 从名称推断规格(通用模式): 营养快线菠萝450g*15 -> 450*15 +2025-05-02 20:53:03,177 - app.core.excel.converter - INFO - 解析二级规格: 450*15 -> 450*15 +2025-05-02 20:53:03,177 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 20:53:03,178 - app.core.excel.converter - INFO - 提取规格: 幸福牵线椰子450g*15 -> 450*15 +2025-05-02 20:53:03,178 - app.core.excel.converter - INFO - 从名称推断规格(通用模式): 幸福牵线椰子450g*15 -> 450*15 +2025-05-02 20:53:03,300 - app.core.excel.converter - INFO - 解析二级规格: 450*15 -> 450*15 +2025-05-02 20:53:03,300 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 20:53:03,301 - app.core.excel.converter - INFO - 提取规格: 幸福牵线香蕉450g*15 -> 450*15 +2025-05-02 20:53:03,301 - app.core.excel.converter - INFO - 从名称推断规格(通用模式): 幸福牵线香蕉450g*15 -> 450*15 +2025-05-02 20:53:03,302 - app.core.excel.converter - INFO - 解析二级规格: 450*15 -> 450*15 +2025-05-02 20:53:03,302 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 20:53:03,303 - app.core.excel.converter - INFO - 提取规格: 幸福牵线红枣450g*15 -> 450*15 +2025-05-02 20:53:03,303 - app.core.excel.converter - INFO - 从名称推断规格(通用模式): 幸福牵线红枣450g*15 -> 450*15 +2025-05-02 20:53:03,303 - app.core.excel.converter - INFO - 解析二级规格: 450*15 -> 450*15 +2025-05-02 20:53:03,303 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:10:09,140 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:10:09,140 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:10:09,142 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:10:09,142 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:10:09,143 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:10:09,143 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:10:09,145 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:10:09,146 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:10:09,147 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:10:09,147 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:10:09,152 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:10:09,153 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:10:09,155 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:10:09,155 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:10:09,157 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:10:09,158 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:10:09,160 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:10:09,161 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:11:03,851 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:11:03,852 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:11:03,853 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:11:03,853 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:11:03,854 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:11:03,854 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:11:03,855 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:11:03,855 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:11:03,856 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:11:03,856 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:11:03,894 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:11:03,894 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:11:03,895 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:11:03,895 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:11:03,896 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:11:03,896 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:11:03,897 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:11:03,897 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:15:11,416 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:15:11,416 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:15:11,420 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:15:11,420 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:15:11,423 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:15:11,424 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:15:11,427 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:15:11,428 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:15:11,431 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:15:11,432 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:15:11,445 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:15:11,449 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:15:11,454 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:15:11,455 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:15:11,458 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:15:11,459 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:15:11,463 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:15:11,464 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:16:38,928 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:16:38,928 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:16:38,929 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:16:38,929 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:16:38,930 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:16:38,930 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:16:38,931 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:16:38,931 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:16:38,932 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:16:38,932 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:16:38,942 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:16:38,942 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 45.0 -> 3.0, 单位: 件 -> 瓶 +2025-05-02 21:16:38,943 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:16:38,943 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:16:38,944 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:16:38,944 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:16:38,945 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:16:38,945 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 15.0, 单价: 50.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:22:27,278 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:22:27,279 - app.core.excel.converter - INFO - 件单位处理: 数量: 0.5 -> 6.0, 单价: 65.0 -> 5.416666666666667, 单位: 件 -> 瓶 +2025-05-02 21:22:27,279 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:22:27,279 - app.core.excel.converter - INFO - 件单位处理: 数量: 0.5 -> 6.0, 单价: 65.0 -> 5.416666666666667, 单位: 件 -> 瓶 +2025-05-02 21:22:27,280 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:22:27,280 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 12.0, 单价: 49.0 -> 4.083333333333333, 单位: 件 -> 瓶 +2025-05-02 21:22:27,280 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:22:27,280 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 12.0, 单价: 49.0 -> 4.083333333333333, 单位: 件 -> 瓶 +2025-05-02 21:22:27,281 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:22:27,281 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 12.0, 单价: 40.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:22:27,391 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:22:27,391 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 12.0, 单价: 40.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:22:27,392 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:22:27,392 - app.core.excel.converter - INFO - 件单位处理: 数量: 1.0 -> 12.0, 单价: 40.0 -> 3.3333333333333335, 单位: 件 -> 瓶 +2025-05-02 21:22:27,393 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:22:27,393 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 3.0, 单价: 0.0, 单位: 碗 +2025-05-02 21:22:27,393 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:22:27,393 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 1.0, 单价: 0.0, 单位: 桶 +2025-05-02 21:45:11,628 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 21:45:11,631 - app.core.excel.converter - INFO - 提取规格: 550纯净水24入白膜 -> 550纯净水1*24白膜 +2025-05-02 21:45:11,631 - app.core.excel.converter - INFO - 从名称推断规格(通用模式): 550纯净水24入白膜 -> 550纯净水1*24白膜 +2025-05-02 21:45:11,636 - app.core.excel.converter - WARNING - 无法解析规格: 550纯净水1*24白膜,使用默认值1*1 +2025-05-02 21:45:11,636 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 3.0, 单价: 0.0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 21:45:11,637 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 21:45:11,637 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%橙子15入纸箱 -> 1*15 +2025-05-02 21:45:11,637 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:45:11,637 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 0.0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 21:45:11,638 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 21:45:11,638 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 445水溶C血橙15入纸箱 -> 1*15 +2025-05-02 21:45:11,639 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:45:11,639 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 21:45:11,679 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 21:45:11,679 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C柠檬15纸箱 -> 1*15 +2025-05-02 21:45:11,680 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:45:11,680 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 21:45:11,680 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 21:45:11,680 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C青皮桔15纸箱 -> 1*15 +2025-05-02 21:45:11,680 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:45:11,680 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 45.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 21:45:11,681 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 21:45:11,681 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C西柚15纸箱 -> 1*15 +2025-05-02 21:45:11,681 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:45:11,682 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 21:45:11,682 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 21:45:11,682 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶茉莉花茶15纸箱 -> 1*15 +2025-05-02 21:45:11,682 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:45:11,682 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 45.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 21:45:11,683 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 21:45:15,793 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶乌龙茶15纸箱 -> 1*15 +2025-05-02 21:45:15,793 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:45:15,793 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 21:45:15,794 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 21:45:15,794 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶绿茶15纸箱 -> 1*15 +2025-05-02 21:45:15,795 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:45:15,795 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 21:45:15,796 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 21:45:15,796 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 900树叶青柑普洱12入纸箱 -> 1*12 +2025-05-02 21:45:15,796 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 21:45:15,796 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 12.0, 单价: 62.0 -> 5.166666666666667, 单位: 箱 -> 瓶 +2025-05-02 21:45:15,797 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 21:45:15,797 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 410苏打天然水柠檬15纸箱 -> 1*15 +2025-05-02 21:45:15,797 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 21:45:15,798 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 43.0 -> 2.8666666666666667, 单位: 箱 -> 瓶 +2025-05-02 21:45:15,798 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 5桶 -> 数量=5.0, 单位=桶 +2025-05-02 21:45:15,799 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 21:45:18,665 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 21:45:18,665 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 5.0, 单价: 16.0, 单位: 桶 +2025-05-02 21:45:18,666 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1桶 -> 数量=1.0, 单位=桶 +2025-05-02 21:45:18,666 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 21:45:18,667 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 21:45:18,667 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 1.0, 单价: 0.0, 单位: 桶 +2025-05-02 22:11:58,503 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 22:11:58,506 - app.core.excel.converter - INFO - 提取规格: 550纯净水24入白膜 -> 550纯净水1*24白膜 +2025-05-02 22:11:58,506 - app.core.excel.converter - INFO - 从名称推断规格(通用模式): 550纯净水24入白膜 -> 550纯净水1*24白膜 +2025-05-02 22:11:58,507 - app.core.excel.converter - WARNING - 无法解析规格: 550纯净水1*24白膜,使用默认值1*1 +2025-05-02 22:11:58,507 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 3.0, 单价: 0.0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 22:11:58,508 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:11:58,509 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%橙子15入纸箱 -> 1*15 +2025-05-02 22:11:58,509 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:11:58,509 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 0.0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 22:11:58,510 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 22:11:58,510 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 445水溶C血橙15入纸箱 -> 1*15 +2025-05-02 22:11:58,510 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:11:58,627 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:11:58,628 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 22:11:58,628 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C柠檬15纸箱 -> 1*15 +2025-05-02 22:11:58,628 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:11:58,628 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:11:58,629 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 22:11:58,629 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C青皮桔15纸箱 -> 1*15 +2025-05-02 22:11:58,630 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:11:58,630 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 45.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:11:58,630 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:11:58,630 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C西柚15纸箱 -> 1*15 +2025-05-02 22:11:58,630 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:11:58,630 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:11:58,631 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 22:11:58,631 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶茉莉花茶15纸箱 -> 1*15 +2025-05-02 22:11:58,631 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:11:58,631 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 45.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 22:11:58,631 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:12:02,756 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶乌龙茶15纸箱 -> 1*15 +2025-05-02 22:12:02,757 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:12:02,757 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 22:12:02,758 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 22:12:02,758 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶绿茶15纸箱 -> 1*15 +2025-05-02 22:12:02,758 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:12:02,758 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 22:12:02,759 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:12:02,759 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 900树叶青柑普洱12入纸箱 -> 1*12 +2025-05-02 22:12:02,760 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 22:12:02,760 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 12.0, 单价: 62.0 -> 5.166666666666667, 单位: 箱 -> 瓶 +2025-05-02 22:12:02,760 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:12:02,761 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 410苏打天然水柠檬15纸箱 -> 1*15 +2025-05-02 22:12:02,761 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:12:02,761 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 43.0 -> 2.8666666666666667, 单位: 箱 -> 瓶 +2025-05-02 22:12:02,762 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 5桶 -> 数量=5.0, 单位=桶 +2025-05-02 22:12:02,762 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 22:12:05,702 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 22:12:05,702 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 5.0, 单价: 16.0, 单位: 桶 +2025-05-02 22:12:05,703 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1桶 -> 数量=1.0, 单位=桶 +2025-05-02 22:12:05,703 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 22:12:05,704 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 22:12:05,704 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 1.0, 单价: 0.0, 单位: 桶 +2025-05-02 22:29:15,148 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 22:29:15,150 - app.core.excel.converter - INFO - 提取规格: 550纯净水24入白膜 -> 550纯净水1*24白膜 +2025-05-02 22:29:15,150 - app.core.excel.converter - INFO - 从名称推断规格(通用模式): 550纯净水24入白膜 -> 550纯净水1*24白膜 +2025-05-02 22:29:15,152 - app.core.excel.converter - WARNING - 无法解析规格: 550纯净水1*24白膜,使用默认值1*1 +2025-05-02 22:29:15,152 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 3.0, 单价: 0.0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 22:29:15,153 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:29:15,153 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%橙子15入纸箱 -> 1*15 +2025-05-02 22:29:15,154 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:29:15,154 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 0.0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 22:29:15,154 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 22:29:15,155 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 445水溶C血橙15入纸箱 -> 1*15 +2025-05-02 22:29:15,155 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:29:15,296 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:29:15,296 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 22:29:15,297 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C柠檬15纸箱 -> 1*15 +2025-05-02 22:29:15,297 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:29:15,297 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:29:15,298 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 22:29:15,298 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C青皮桔15纸箱 -> 1*15 +2025-05-02 22:29:15,299 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:29:15,299 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 45.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:29:15,299 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:29:15,300 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C西柚15纸箱 -> 1*15 +2025-05-02 22:29:15,300 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:29:15,300 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:29:15,301 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 22:29:15,301 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶茉莉花茶15纸箱 -> 1*15 +2025-05-02 22:29:15,302 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:29:15,302 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 45.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 22:29:15,303 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:29:19,952 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶乌龙茶15纸箱 -> 1*15 +2025-05-02 22:29:19,953 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:29:19,953 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 22:29:19,953 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 22:29:19,953 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶绿茶15纸箱 -> 1*15 +2025-05-02 22:29:19,954 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:29:19,954 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 22:29:19,954 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:29:19,955 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 900树叶青柑普洱12入纸箱 -> 1*12 +2025-05-02 22:29:19,955 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 22:29:19,955 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 12.0, 单价: 62.0 -> 5.166666666666667, 单位: 箱 -> 瓶 +2025-05-02 22:29:19,955 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:29:19,955 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 410苏打天然水柠檬15纸箱 -> 1*15 +2025-05-02 22:29:19,956 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:29:19,956 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 43.0 -> 2.8666666666666667, 单位: 箱 -> 瓶 +2025-05-02 22:29:19,956 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 5桶 -> 数量=5.0, 单位=桶 +2025-05-02 22:29:19,956 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 22:29:23,557 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 22:29:23,557 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 5.0, 单价: 16.0, 单位: 桶 +2025-05-02 22:29:23,558 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1桶 -> 数量=1.0, 单位=桶 +2025-05-02 22:29:23,558 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 22:29:23,558 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 22:29:23,558 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 1.0, 单价: 0.0, 单位: 桶 +2025-05-02 22:40:44,440 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 22:40:44,441 - app.core.excel.converter - INFO - 从名称推断规格(入白膜): 550纯净水24入白膜 -> 1*24 +2025-05-02 22:40:44,443 - app.core.excel.converter - INFO - 解析二级规格: 1*24 -> 1*24 +2025-05-02 22:40:44,443 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 72.0, 单价: 0.0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 22:40:44,443 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:40:44,444 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 450果园30%橙子15入纸箱 -> 1*15 +2025-05-02 22:40:44,444 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:40:44,444 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 0.0 -> 0, 单位: 箱 -> 瓶 +2025-05-02 22:40:44,445 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 22:40:44,445 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 445水溶C血橙15入纸箱 -> 1*15 +2025-05-02 22:40:44,495 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:40:44,495 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:40:44,496 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 22:40:44,496 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C柠檬15纸箱 -> 1*15 +2025-05-02 22:40:44,497 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:40:44,497 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:40:44,497 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 22:40:44,497 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C青皮桔15纸箱 -> 1*15 +2025-05-02 22:40:44,498 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:40:44,498 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 45.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:40:44,498 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:40:44,499 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 445水溶C西柚15纸箱 -> 1*15 +2025-05-02 22:40:44,499 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:40:44,499 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 56.0 -> 3.7333333333333334, 单位: 箱 -> 瓶 +2025-05-02 22:40:44,500 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 3箱 -> 数量=3.0, 单位=箱 +2025-05-02 22:40:44,500 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶茉莉花茶15纸箱 -> 1*15 +2025-05-02 22:40:44,500 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:40:44,500 - app.core.excel.converter - INFO - 箱单位处理: 数量: 3.0 -> 45.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 22:40:49,718 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:40:49,718 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶乌龙茶15纸箱 -> 1*15 +2025-05-02 22:40:49,719 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:40:49,719 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 22:40:49,719 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 2箱 -> 数量=2.0, 单位=箱 +2025-05-02 22:40:49,720 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 500树叶绿茶15纸箱 -> 1*15 +2025-05-02 22:40:49,720 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:40:49,720 - app.core.excel.converter - INFO - 箱单位处理: 数量: 2.0 -> 30.0, 单价: 55.0 -> 3.6666666666666665, 单位: 箱 -> 瓶 +2025-05-02 22:40:49,721 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:40:49,721 - app.core.excel.converter - INFO - 从名称推断规格(入纸箱): 900树叶青柑普洱12入纸箱 -> 1*12 +2025-05-02 22:40:49,722 - app.core.excel.converter - INFO - 解析二级规格: 1*12 -> 1*12 +2025-05-02 22:40:49,722 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 12.0, 单价: 62.0 -> 5.166666666666667, 单位: 箱 -> 瓶 +2025-05-02 22:40:49,722 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1箱 -> 数量=1.0, 单位=箱 +2025-05-02 22:40:49,723 - app.core.excel.converter - INFO - 从名称推断规格(纸箱): 410苏打天然水柠檬15纸箱 -> 1*15 +2025-05-02 22:40:49,723 - app.core.excel.converter - INFO - 解析二级规格: 1*15 -> 1*15 +2025-05-02 22:40:49,723 - app.core.excel.converter - INFO - 箱单位处理: 数量: 1.0 -> 15.0, 单价: 43.0 -> 2.8666666666666667, 单位: 箱 -> 瓶 +2025-05-02 22:40:49,724 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 5桶 -> 数量=5.0, 单位=桶 +2025-05-02 22:40:49,724 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 22:40:53,273 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 22:40:53,273 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 5.0, 单价: 16.0, 单位: 桶 +2025-05-02 22:40:53,273 - app.core.excel.converter - INFO - 从数量提取单位(基本格式): 1桶 -> 数量=1.0, 单位=桶 +2025-05-02 22:40:53,274 - app.core.excel.converter - INFO - 从名称推断规格(容量): 12.9L桶装水 -> 12.9L*1 +2025-05-02 22:40:53,274 - app.core.excel.converter - INFO - 解析容量规格: 12.9L*1 -> 12.9L*1 +2025-05-02 22:40:53,274 - app.core.excel.converter - INFO - 其他单位处理: 保持原样 数量: 1.0, 单价: 0.0, 单位: 桶 diff --git a/logs/app.core.excel.merger.active b/logs/app.core.excel.merger.active deleted file mode 100644 index 6e265cb..0000000 --- a/logs/app.core.excel.merger.active +++ /dev/null @@ -1 +0,0 @@ -Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.excel.merger.log b/logs/app.core.excel.merger.log index bb9d092..35a0c9e 100644 --- a/logs/app.core.excel.merger.log +++ b/logs/app.core.excel.merger.log @@ -86,3 +86,99 @@ 2025-05-02 19:53:47,785 - app.core.excel.merger - WARNING - 数据帧 0 缺少必要的列: ['条码', '采购量', '采购单价'] 2025-05-02 19:53:47,785 - app.core.excel.merger - WARNING - 没有有效的数据帧用于合并 2025-05-02 19:53:47,785 - app.core.excel.merger - ERROR - 合并采购单失败 +2025-05-02 20:52:59,673 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 20:52:59,674 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 20:53:07,428 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 20:53:07,430 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 20:53:07,433 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 20:53:07,434 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 20:53:07,465 - app.core.excel.merger - INFO - 成功读取采购单文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 20:53:07,467 - app.core.excel.merger - INFO - 列名映射结果: {'条码': '条码(必填)', '采购量': '采购量(必填)', '采购单价': '采购单价(必填)', '赠送量': '赠送量'} +2025-05-02 20:53:07,469 - app.core.excel.merger - INFO - 开始合并 1 个采购单文件 +2025-05-02 20:53:07,469 - app.core.excel.merger - WARNING - 数据帧 0 缺少必要的列: ['条码', '采购量', '采购单价'] +2025-05-02 20:53:07,470 - app.core.excel.merger - WARNING - 没有有效的数据帧用于合并 +2025-05-02 20:53:07,470 - app.core.excel.merger - ERROR - 合并采购单失败 +2025-05-02 21:02:57,317 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:02:57,317 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:04:06,634 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:04:06,635 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:07:29,006 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:07:29,007 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:10:08,470 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:10:08,471 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:11:03,185 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:11:03,186 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:15:10,777 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:15:10,778 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:16:38,296 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:16:38,296 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:21:20,679 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:21:20,680 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:22:23,297 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:22:23,298 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:22:31,697 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 21:22:31,702 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 21:22:31,715 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 21:22:31,724 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 21:22:31,735 - app.core.excel.merger - INFO - 成功读取采购单文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502212111.xls +2025-05-02 21:22:31,737 - app.core.excel.merger - INFO - 列名映射结果: {'条码': '条码(必填)', '采购量': '采购量(必填)', '采购单价': '采购单价(必填)', '赠送量': '赠送量'} +2025-05-02 21:22:31,738 - app.core.excel.merger - INFO - 开始合并 1 个采购单文件 +2025-05-02 21:22:31,739 - app.core.excel.merger - WARNING - 数据帧 0 缺少必要的列: ['条码', '采购量', '采购单价'] +2025-05-02 21:22:31,740 - app.core.excel.merger - WARNING - 没有有效的数据帧用于合并 +2025-05-02 21:22:31,741 - app.core.excel.merger - ERROR - 合并采购单失败 +2025-05-02 21:45:07,598 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:45:07,599 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:45:21,947 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 21:45:21,948 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 21:45:21,948 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 21:45:21,949 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 21:45:21,954 - app.core.excel.merger - INFO - 成功读取采购单文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 21:45:21,956 - app.core.excel.merger - INFO - 列名映射结果: {'条码': '条码(必填)', '采购量': '采购量(必填)', '采购单价': '采购单价(必填)', '赠送量': '赠送量'} +2025-05-02 21:45:21,956 - app.core.excel.merger - INFO - 开始合并 1 个采购单文件 +2025-05-02 21:45:21,956 - app.core.excel.merger - WARNING - 数据帧 0 缺少必要的列: ['条码', '采购量', '采购单价'] +2025-05-02 21:45:24,735 - app.core.excel.merger - WARNING - 没有有效的数据帧用于合并 +2025-05-02 21:45:24,736 - app.core.excel.merger - ERROR - 合并采购单失败 +2025-05-02 21:54:51,328 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:54:51,329 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:55:07,664 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:55:07,664 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:56:33,285 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:56:33,286 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:58:02,455 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 21:58:02,455 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:07:10,381 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 22:07:10,382 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:10:02,823 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 22:10:02,824 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:11:55,061 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 22:11:55,061 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:12:08,754 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 22:12:08,755 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 22:12:08,755 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 22:12:08,755 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 22:12:08,758 - app.core.excel.merger - INFO - 成功读取采购单文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:12:08,760 - app.core.excel.merger - INFO - 列名映射结果: {'条码': '条码(必填)', '采购量': '采购量(必填)', '采购单价': '采购单价(必填)', '赠送量': '赠送量'} +2025-05-02 22:12:11,605 - app.core.excel.merger - INFO - 开始合并 1 个采购单文件 +2025-05-02 22:12:11,605 - app.core.excel.merger - WARNING - 数据帧 0 缺少必要的列: ['条码', '采购量', '采购单价'] +2025-05-02 22:12:11,606 - app.core.excel.merger - WARNING - 没有有效的数据帧用于合并 +2025-05-02 22:12:11,606 - app.core.excel.merger - ERROR - 合并采购单失败 +2025-05-02 22:26:11,621 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 22:26:11,621 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:26:42,570 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 22:26:42,570 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:29:10,831 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 22:29:10,831 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:29:26,875 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 22:29:26,876 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 22:29:26,876 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 22:29:26,877 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 +2025-05-02 22:29:26,883 - app.core.excel.merger - INFO - 成功读取采购单文件: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:29:26,884 - app.core.excel.merger - INFO - 列名映射结果: {'条码': '条码(必填)', '采购量': '采购量(必填)', '采购单价': '采购单价(必填)', '赠送量': '赠送量'} +2025-05-02 22:29:29,917 - app.core.excel.merger - INFO - 开始合并 1 个采购单文件 +2025-05-02 22:29:29,917 - app.core.excel.merger - WARNING - 数据帧 0 缺少必要的列: ['条码', '采购量', '采购单价'] +2025-05-02 22:29:29,918 - app.core.excel.merger - WARNING - 没有有效的数据帧用于合并 +2025-05-02 22:29:29,918 - app.core.excel.merger - ERROR - 合并采购单失败 +2025-05-02 22:40:41,146 - app.core.excel.merger - INFO - 初始化PurchaseOrderMerger +2025-05-02 22:40:41,147 - app.core.excel.merger - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:40:56,995 - app.core.excel.merger - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的采购单Excel文件 +2025-05-02 22:40:56,996 - app.core.excel.merger - INFO - 找到 1 个采购单Excel文件 diff --git a/logs/app.core.excel.processor.active b/logs/app.core.excel.processor.active deleted file mode 100644 index 6e265cb..0000000 --- a/logs/app.core.excel.processor.active +++ /dev/null @@ -1 +0,0 @@ -Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.excel.processor.log b/logs/app.core.excel.processor.log index 3deee05..2d3c33f 100644 --- a/logs/app.core.excel.processor.log +++ b/logs/app.core.excel.processor.log @@ -838,3 +838,964 @@ 2025-05-02 19:53:47,621 - app.core.excel.processor - INFO - 条码 6921168509256 填充:仅有赠品,采购量=0,赠品数量=168.0 2025-05-02 19:53:47,624 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502191502.xls 2025-05-02 19:53:47,769 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 20:52:59,673 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 20:52:59,673 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 20:53:02,564 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 20:53:02,564 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx +2025-05-02 20:53:02,565 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx +2025-05-02 20:53:03,145 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx, 共 11 行 +2025-05-02 20:53:03,148 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 40 +2025-05-02 20:53:03,149 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 20:53:03,169 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-02 20:53:03,170 - app.core.excel.processor - INFO - 移除空行后,有效数据行数: 10 +2025-05-02 20:53:03,171 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 20:53:03,171 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 20:53:03,171 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 20:53:03,171 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-02 20:53:03,171 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-02 20:53:03,171 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 20:53:03,171 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '数量', 'unit': '单位', 'price': '销售价'} +2025-05-02 20:53:03,171 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 20:53:03,172 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6902083898618, 名称=营养快线原味450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 20:53:03,175 - app.core.excel.processor - INFO - 从商品名称推断规格: 营养快线原味450g*15 -> 450*15 +2025-05-02 20:53:03,176 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6902083898632, 名称=营养快线香草450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 20:53:03,176 - app.core.excel.processor - INFO - 从商品名称推断规格: 营养快线香草450g*15 -> 450*15 +2025-05-02 20:53:03,177 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6902083898625, 名称=营养快线菠萝450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 20:53:03,177 - app.core.excel.processor - INFO - 从商品名称推断规格: 营养快线菠萝450g*15 -> 450*15 +2025-05-02 20:53:03,178 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6902083907150, 名称=幸福牵线椰子450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 20:53:03,178 - app.core.excel.processor - INFO - 从商品名称推断规格: 幸福牵线椰子450g*15 -> 450*15 +2025-05-02 20:53:03,301 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6902083905224, 名称=幸福牵线香蕉450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 20:53:03,302 - app.core.excel.processor - INFO - 从商品名称推断规格: 幸福牵线香蕉450g*15 -> 450*15 +2025-05-02 20:53:03,302 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6902083905217, 名称=幸福牵线红枣450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 20:53:03,303 - app.core.excel.processor - INFO - 从商品名称推断规格: 幸福牵线红枣450g*15 -> 450*15 +2025-05-02 20:53:03,304 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6902083922658, 名称=娃哈哈瓶装大AD450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 20:53:03,305 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6902083814045, 名称=娃哈哈瓶装大AD水蜜桃450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 20:53:03,305 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6902083814052, 名称=娃哈哈瓶装大AD草莓味450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 20:53:03,306 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-02 20:53:03,315 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-02 20:53:03,315 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898618, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 20:53:03,315 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898618, 数量=15.0, 单价=3.0 +2025-05-02 20:53:03,315 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898632, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 20:53:03,315 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898632, 数量=15.0, 单价=3.0 +2025-05-02 20:53:03,316 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898625, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 20:53:03,316 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898625, 数量=15.0, 单价=3.0 +2025-05-02 20:53:03,316 - app.core.excel.processor - INFO - 处理商品: 条码=6902083907150, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 20:53:03,316 - app.core.excel.processor - INFO - 发现正常商品:条码6902083907150, 数量=15.0, 单价=3.0 +2025-05-02 20:53:03,316 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905224, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 20:53:03,316 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905224, 数量=15.0, 单价=3.0 +2025-05-02 20:53:03,316 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905217, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 20:53:03,316 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905217, 数量=15.0, 单价=3.0 +2025-05-02 20:53:03,316 - app.core.excel.processor - INFO - 处理商品: 条码=6902083922658, 数量=1.0, 单价=50.0, 是否赠品=False +2025-05-02 20:53:03,317 - app.core.excel.processor - INFO - 发现正常商品:条码6902083922658, 数量=1.0, 单价=50.0 +2025-05-02 20:53:03,317 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814045, 数量=1.0, 单价=50.0, 是否赠品=False +2025-05-02 20:53:07,363 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814045, 数量=1.0, 单价=50.0 +2025-05-02 20:53:07,363 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814052, 数量=1.0, 单价=50.0, 是否赠品=False +2025-05-02 20:53:07,363 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814052, 数量=1.0, 单价=50.0 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 条码 6902083898618 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 条码 6902083898632 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 条码 6902083898625 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 条码 6902083907150 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 条码 6902083905224 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 条码 6902083905217 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 条码 6902083922658 处理结果:正常商品数量1.0,单价50.0,赠品数量0 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 条码 6902083814045 处理结果:正常商品数量1.0,单价50.0,赠品数量0 +2025-05-02 20:53:07,364 - app.core.excel.processor - INFO - 条码 6902083814052 处理结果:正常商品数量1.0,单价50.0,赠品数量0 +2025-05-02 20:53:07,367 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 20:53:07,427 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:02:57,316 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:02:57,316 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:02:57,319 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 21:02:57,320 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx +2025-05-02 21:02:57,320 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx +2025-05-02 21:02:58,023 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx, 共 11 行 +2025-05-02 21:02:58,025 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 40 +2025-05-02 21:02:58,025 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 21:02:58,040 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-02 21:02:58,040 - app.core.excel.processor - ERROR - 处理Excel文件时出错: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx, 错误: 'ExcelProcessor' object has no attribute '_detect_column_mapping' +2025-05-02 21:04:06,633 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:04:06,634 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:04:06,636 - app.core.excel.processor - INFO - 开始处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:04:07,316 - app.core.excel.processor - INFO - 成功读取Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx, 共 11 行 +2025-05-02 21:04:07,318 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 40 +2025-05-02 21:04:07,318 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 21:04:07,327 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-02 21:04:07,327 - app.core.excel.processor - ERROR - 处理Excel文件时出错: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx, 错误: 'ExcelProcessor' object has no attribute '_detect_column_mapping' +2025-05-02 21:07:29,005 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:07:29,006 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:07:29,007 - app.core.excel.processor - INFO - 开始处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:07:29,670 - app.core.excel.processor - INFO - 成功读取Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx, 共 11 行 +2025-05-02 21:07:29,672 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 40 +2025-05-02 21:07:29,672 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 21:07:29,683 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-02 21:07:29,683 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 21:07:29,684 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 21:07:29,684 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 21:07:29,685 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-02 21:07:29,685 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-02 21:07:29,685 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 21:07:29,686 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '数量', 'unit': '单位', 'price': '销售价'} +2025-05-02 21:07:29,687 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 21:07:29,689 - app.core.excel.processor - ERROR - 提取第1行商品信息时出错: could not convert string to float: '1件' +Traceback (most recent call last): + File "D:\My Documents\python\orc-order-v2\app\core\excel\processor.py", line 244, in extract_product_info + 'quantity': float(row[column_mapping['quantity']]) if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]) else 0, +ValueError: could not convert string to float: '1件' +2025-05-02 21:07:29,690 - app.core.excel.processor - ERROR - 提取第2行商品信息时出错: could not convert string to float: '1件' +Traceback (most recent call last): + File "D:\My Documents\python\orc-order-v2\app\core\excel\processor.py", line 244, in extract_product_info + 'quantity': float(row[column_mapping['quantity']]) if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]) else 0, +ValueError: could not convert string to float: '1件' +2025-05-02 21:07:29,691 - app.core.excel.processor - ERROR - 提取第3行商品信息时出错: could not convert string to float: '1件' +Traceback (most recent call last): + File "D:\My Documents\python\orc-order-v2\app\core\excel\processor.py", line 244, in extract_product_info + 'quantity': float(row[column_mapping['quantity']]) if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]) else 0, +ValueError: could not convert string to float: '1件' +2025-05-02 21:07:29,691 - app.core.excel.processor - ERROR - 提取第4行商品信息时出错: could not convert string to float: '1件' +Traceback (most recent call last): + File "D:\My Documents\python\orc-order-v2\app\core\excel\processor.py", line 244, in extract_product_info + 'quantity': float(row[column_mapping['quantity']]) if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]) else 0, +ValueError: could not convert string to float: '1件' +2025-05-02 21:07:29,692 - app.core.excel.processor - ERROR - 提取第5行商品信息时出错: could not convert string to float: '1件' +Traceback (most recent call last): + File "D:\My Documents\python\orc-order-v2\app\core\excel\processor.py", line 244, in extract_product_info + 'quantity': float(row[column_mapping['quantity']]) if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]) else 0, +ValueError: could not convert string to float: '1件' +2025-05-02 21:07:29,692 - app.core.excel.processor - ERROR - 提取第6行商品信息时出错: could not convert string to float: '1件' +Traceback (most recent call last): + File "D:\My Documents\python\orc-order-v2\app\core\excel\processor.py", line 244, in extract_product_info + 'quantity': float(row[column_mapping['quantity']]) if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]) else 0, +ValueError: could not convert string to float: '1件' +2025-05-02 21:07:29,706 - app.core.excel.processor - ERROR - 提取第7行商品信息时出错: could not convert string to float: '1件' +Traceback (most recent call last): + File "D:\My Documents\python\orc-order-v2\app\core\excel\processor.py", line 244, in extract_product_info + 'quantity': float(row[column_mapping['quantity']]) if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]) else 0, +ValueError: could not convert string to float: '1件' +2025-05-02 21:07:29,706 - app.core.excel.processor - ERROR - 提取第8行商品信息时出错: could not convert string to float: '1件' +Traceback (most recent call last): + File "D:\My Documents\python\orc-order-v2\app\core\excel\processor.py", line 244, in extract_product_info + 'quantity': float(row[column_mapping['quantity']]) if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]) else 0, +ValueError: could not convert string to float: '1件' +2025-05-02 21:07:29,707 - app.core.excel.processor - ERROR - 提取第9行商品信息时出错: could not convert string to float: '1件' +Traceback (most recent call last): + File "D:\My Documents\python\orc-order-v2\app\core\excel\processor.py", line 244, in extract_product_info + 'quantity': float(row[column_mapping['quantity']]) if column_mapping.get('quantity') and not pd.isna(row[column_mapping['quantity']]) else 0, +ValueError: could not convert string to float: '1件' +2025-05-02 21:07:29,708 - app.core.excel.processor - INFO - 提取到 0 个商品信息 +2025-05-02 21:07:29,708 - app.core.excel.processor - WARNING - 未提取到有效商品信息 +2025-05-02 21:10:08,467 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:10:08,468 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:10:08,473 - app.core.excel.processor - INFO - 开始处理Excel文件: data/output/微信图片_20250502205251.xlsx +2025-05-02 21:10:09,122 - app.core.excel.processor - INFO - 成功读取Excel文件: data/output/微信图片_20250502205251.xlsx, 共 11 行 +2025-05-02 21:10:09,124 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 40 +2025-05-02 21:10:09,124 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 21:10:09,134 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-02 21:10:09,135 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 21:10:09,135 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 21:10:09,135 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 21:10:09,135 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-02 21:10:09,136 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-02 21:10:09,136 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 21:10:09,136 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '数量', 'unit': '单位', 'price': '销售价'} +2025-05-02 21:10:09,137 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 21:10:09,138 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6902083898618.0, 名称=营养快线原味450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:10:09,139 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线原味450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:10:09,141 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6902083898632.0, 名称=营养快线香草450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:10:09,141 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线香草450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:10:09,143 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6902083898625.0, 名称=营养快线菠萝450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:10:09,143 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线菠萝450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:10:09,144 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6902083907150.0, 名称=幸福牵线椰子450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:10:09,145 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线椰子450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:10:09,146 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6902083905224.0, 名称=幸福牵线香蕉450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:10:09,147 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线香蕉450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:10:09,148 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6902083905217.0, 名称=幸福牵线红枣450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:10:09,149 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线红枣450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:10:09,153 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6902083922658.0, 名称=娃哈哈瓶装大AD450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:10:09,154 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:10:09,156 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6902083814045.0, 名称=娃哈哈瓶装大AD水蜜桃450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:10:09,156 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD水蜜桃450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:10:09,159 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6902083814052.0, 名称=娃哈哈瓶装大AD草莓味450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:10:09,160 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD草莓味450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:10:09,162 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-02 21:10:09,174 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-02 21:10:09,175 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898618.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:10:09,176 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898618.0, 数量=15.0, 单价=3.0 +2025-05-02 21:10:09,176 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898632.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:10:09,178 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898632.0, 数量=15.0, 单价=3.0 +2025-05-02 21:10:09,178 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898625.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:10:09,179 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898625.0, 数量=15.0, 单价=3.0 +2025-05-02 21:10:09,179 - app.core.excel.processor - INFO - 处理商品: 条码=6902083907150.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:10:09,179 - app.core.excel.processor - INFO - 发现正常商品:条码6902083907150.0, 数量=15.0, 单价=3.0 +2025-05-02 21:10:09,181 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905224.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:10:09,182 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905224.0, 数量=15.0, 单价=3.0 +2025-05-02 21:10:09,183 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905217.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:10:09,187 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905217.0, 数量=15.0, 单价=3.0 +2025-05-02 21:10:09,190 - app.core.excel.processor - INFO - 处理商品: 条码=6902083922658.0, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:10:09,190 - app.core.excel.processor - INFO - 发现正常商品:条码6902083922658.0, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:10:09,191 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814045.0, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:10:09,192 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814045.0, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:10:09,192 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814052.0, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:10:09,192 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814052.0, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:10:09,193 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-02 21:10:09,193 - app.core.excel.processor - INFO - 条码 6902083898618.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:10:09,194 - app.core.excel.processor - INFO - 条码 6902083898632.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:10:09,194 - app.core.excel.processor - INFO - 条码 6902083898625.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:10:09,194 - app.core.excel.processor - INFO - 条码 6902083907150.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:10:09,195 - app.core.excel.processor - INFO - 条码 6902083905224.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:10:09,196 - app.core.excel.processor - INFO - 条码 6902083905217.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:10:09,197 - app.core.excel.processor - INFO - 条码 6902083922658.0 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:10:09,198 - app.core.excel.processor - INFO - 条码 6902083814045.0 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:10:09,198 - app.core.excel.processor - INFO - 条码 6902083814052.0 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:10:09,205 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 21:10:09,277 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:11:03,184 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:11:03,185 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:11:03,187 - app.core.excel.processor - INFO - 开始处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:11:03,837 - app.core.excel.processor - INFO - 成功读取Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx, 共 11 行 +2025-05-02 21:11:03,839 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 40 +2025-05-02 21:11:03,840 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 21:11:03,849 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-02 21:11:03,849 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 21:11:03,849 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 21:11:03,849 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 21:11:03,849 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-02 21:11:03,849 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-02 21:11:03,849 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 21:11:03,849 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '数量', 'unit': '单位', 'price': '销售价'} +2025-05-02 21:11:03,849 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 21:11:03,850 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6902083898618.0, 名称=营养快线原味450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:11:03,850 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线原味450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:11:03,852 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6902083898632.0, 名称=营养快线香草450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:11:03,853 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线香草450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:11:03,854 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6902083898625.0, 名称=营养快线菠萝450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:11:03,854 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线菠萝450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:11:03,855 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6902083907150.0, 名称=幸福牵线椰子450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:11:03,855 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线椰子450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:11:03,856 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6902083905224.0, 名称=幸福牵线香蕉450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:11:03,856 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线香蕉450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:11:03,857 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6902083905217.0, 名称=幸福牵线红枣450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:11:03,894 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线红枣450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:11:03,895 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6902083922658.0, 名称=娃哈哈瓶装大AD450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:11:03,895 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:11:03,896 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6902083814045.0, 名称=娃哈哈瓶装大AD水蜜桃450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:11:03,896 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD水蜜桃450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:11:03,896 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6902083814052.0, 名称=娃哈哈瓶装大AD草莓味450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:11:03,896 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD草莓味450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:11:03,897 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898618.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898618.0, 数量=15.0, 单价=3.0 +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898632.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898632.0, 数量=15.0, 单价=3.0 +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898625.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898625.0, 数量=15.0, 单价=3.0 +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 处理商品: 条码=6902083907150.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 发现正常商品:条码6902083907150.0, 数量=15.0, 单价=3.0 +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905224.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905224.0, 数量=15.0, 单价=3.0 +2025-05-02 21:11:03,908 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905217.0, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:11:03,909 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905217.0, 数量=15.0, 单价=3.0 +2025-05-02 21:11:03,909 - app.core.excel.processor - INFO - 处理商品: 条码=6902083922658.0, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:11:03,909 - app.core.excel.processor - INFO - 发现正常商品:条码6902083922658.0, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:11:03,909 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814045.0, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:11:03,909 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814045.0, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:11:07,449 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814052.0, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:11:07,449 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814052.0, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:11:07,449 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-02 21:11:07,449 - app.core.excel.processor - INFO - 条码 6902083898618.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:11:07,449 - app.core.excel.processor - INFO - 条码 6902083898632.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:11:07,449 - app.core.excel.processor - INFO - 条码 6902083898625.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:11:07,449 - app.core.excel.processor - INFO - 条码 6902083907150.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:11:07,450 - app.core.excel.processor - INFO - 条码 6902083905224.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:11:07,450 - app.core.excel.processor - INFO - 条码 6902083905217.0 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:11:07,450 - app.core.excel.processor - INFO - 条码 6902083922658.0 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:11:07,450 - app.core.excel.processor - INFO - 条码 6902083814045.0 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:11:07,450 - app.core.excel.processor - INFO - 条码 6902083814052.0 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:11:07,455 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 21:11:07,603 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:15:10,775 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:15:10,776 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:15:10,780 - app.core.excel.processor - INFO - 开始处理Excel文件: data/output/微信图片_20250502205251.xlsx +2025-05-02 21:15:11,390 - app.core.excel.processor - INFO - 成功读取Excel文件: data/output/微信图片_20250502205251.xlsx, 共 11 行 +2025-05-02 21:15:11,393 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 40 +2025-05-02 21:15:11,394 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 21:15:11,408 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-02 21:15:11,408 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 21:15:11,409 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 21:15:11,409 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 21:15:11,409 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-02 21:15:11,410 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-02 21:15:11,410 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 21:15:11,411 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '数量', 'unit': '单位', 'price': '销售价'} +2025-05-02 21:15:11,412 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 21:15:11,413 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6902083898618, 名称=营养快线原味450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:15:11,414 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线原味450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:15:11,418 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6902083898632, 名称=营养快线香草450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:15:11,419 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线香草450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:15:11,422 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6902083898625, 名称=营养快线菠萝450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:15:11,422 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线菠萝450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:15:11,425 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6902083907150, 名称=幸福牵线椰子450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:15:11,425 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线椰子450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:15:11,429 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6902083905224, 名称=幸福牵线香蕉450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:15:11,431 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线香蕉450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:15:11,437 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6902083905217, 名称=幸福牵线红枣450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:15:11,441 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线红枣450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:15:11,452 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6902083922658, 名称=娃哈哈瓶装大AD450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:15:11,454 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:15:11,456 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6902083814045, 名称=娃哈哈瓶装大AD水蜜桃450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:15:11,457 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD水蜜桃450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:15:11,462 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6902083814052, 名称=娃哈哈瓶装大AD草莓味450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:15:11,463 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD草莓味450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:15:11,465 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-02 21:15:11,490 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-02 21:15:11,492 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898618, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:15:11,493 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898618, 数量=15.0, 单价=3.0 +2025-05-02 21:15:11,494 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898632, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:15:11,495 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898632, 数量=15.0, 单价=3.0 +2025-05-02 21:15:11,496 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898625, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:15:11,497 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898625, 数量=15.0, 单价=3.0 +2025-05-02 21:15:11,498 - app.core.excel.processor - INFO - 处理商品: 条码=6902083907150, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:15:11,498 - app.core.excel.processor - INFO - 发现正常商品:条码6902083907150, 数量=15.0, 单价=3.0 +2025-05-02 21:15:11,499 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905224, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:15:11,499 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905224, 数量=15.0, 单价=3.0 +2025-05-02 21:15:11,500 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905217, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:15:11,501 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905217, 数量=15.0, 单价=3.0 +2025-05-02 21:15:11,504 - app.core.excel.processor - INFO - 处理商品: 条码=6902083922658, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:15:11,506 - app.core.excel.processor - INFO - 发现正常商品:条码6902083922658, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:15:11,507 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814045, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:15:11,508 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814045, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:15:11,509 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814052, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:15:11,510 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814052, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:15:11,511 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-02 21:15:11,511 - app.core.excel.processor - INFO - 条码 6902083898618 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:15:11,512 - app.core.excel.processor - INFO - 条码 6902083898632 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:15:11,512 - app.core.excel.processor - INFO - 条码 6902083898625 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:15:11,513 - app.core.excel.processor - INFO - 条码 6902083907150 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:15:11,514 - app.core.excel.processor - INFO - 条码 6902083905224 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:15:11,515 - app.core.excel.processor - INFO - 条码 6902083905217 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:15:11,516 - app.core.excel.processor - INFO - 条码 6902083922658 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:15:11,517 - app.core.excel.processor - INFO - 条码 6902083814045 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:15:11,519 - app.core.excel.processor - INFO - 条码 6902083814052 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:15:11,527 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 21:15:11,660 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:16:38,295 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:16:38,296 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:16:38,297 - app.core.excel.processor - INFO - 开始处理Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:16:38,893 - app.core.excel.processor - INFO - 成功读取Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx, 共 11 行 +2025-05-02 21:16:38,897 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 40 +2025-05-02 21:16:38,897 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 21:16:38,924 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 10 行有效数据 +2025-05-02 21:16:38,924 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 21:16:38,925 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 21:16:38,925 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 21:16:38,925 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-02 21:16:38,925 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-02 21:16:38,925 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 21:16:38,925 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '数量', 'unit': '单位', 'price': '销售价'} +2025-05-02 21:16:38,926 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 21:16:38,927 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6902083898618, 名称=营养快线原味450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:16:38,927 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线原味450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:16:38,929 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6902083898632, 名称=营养快线香草450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:16:38,929 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线香草450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:16:38,929 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6902083898625, 名称=营养快线菠萝450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:16:38,930 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 营养快线菠萝450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:16:38,930 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6902083907150, 名称=幸福牵线椰子450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:16:38,931 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线椰子450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:16:38,931 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6902083905224, 名称=幸福牵线香蕉450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:16:38,932 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线香蕉450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:16:38,938 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6902083905217, 名称=幸福牵线红枣450g*15, 规格=, 数量=1.0, 单位=件, 单价=45.0 +2025-05-02 21:16:38,942 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 幸福牵线红枣450g*15 -> 1*15, 包装数量=15 +2025-05-02 21:16:38,943 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6902083922658, 名称=娃哈哈瓶装大AD450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:16:38,943 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:16:38,944 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6902083814045, 名称=娃哈哈瓶装大AD水蜜桃450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:16:38,944 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD水蜜桃450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:16:38,945 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6902083814052, 名称=娃哈哈瓶装大AD草莓味450ml*15, 规格=, 数量=1.0, 单位=件, 单价=50.0 +2025-05-02 21:16:38,945 - app.core.excel.processor - INFO - 从商品名称提取重量/容量规格: 娃哈哈瓶装大AD草莓味450ml*15 -> 1*15, 包装数量=15 +2025-05-02 21:16:38,945 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-02 21:16:38,960 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-02 21:16:38,960 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898618, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:16:38,960 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898618, 数量=15.0, 单价=3.0 +2025-05-02 21:16:38,960 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898632, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:16:38,960 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898632, 数量=15.0, 单价=3.0 +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 处理商品: 条码=6902083898625, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 发现正常商品:条码6902083898625, 数量=15.0, 单价=3.0 +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 处理商品: 条码=6902083907150, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 发现正常商品:条码6902083907150, 数量=15.0, 单价=3.0 +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905224, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905224, 数量=15.0, 单价=3.0 +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 处理商品: 条码=6902083905217, 数量=15.0, 单价=3.0, 是否赠品=False +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 发现正常商品:条码6902083905217, 数量=15.0, 单价=3.0 +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 处理商品: 条码=6902083922658, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:16:38,961 - app.core.excel.processor - INFO - 发现正常商品:条码6902083922658, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:16:38,962 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814045, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:16:38,962 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814045, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:16:42,410 - app.core.excel.processor - INFO - 处理商品: 条码=6902083814052, 数量=15.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 发现正常商品:条码6902083814052, 数量=15.0, 单价=3.3333333333333335 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 条码 6902083898618 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 条码 6902083898632 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 条码 6902083898625 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 条码 6902083907150 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 条码 6902083905224 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 条码 6902083905217 处理结果:正常商品数量15.0,单价3.0,赠品数量0 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 条码 6902083922658 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 条码 6902083814045 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:16:42,411 - app.core.excel.processor - INFO - 条码 6902083814052 处理结果:正常商品数量15.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:16:42,414 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502205251.xls +2025-05-02 21:16:42,563 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:21:20,678 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:21:20,679 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:22:23,296 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:22:23,297 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:22:26,468 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 21:22:26,469 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502212111.xlsx +2025-05-02 21:22:26,470 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502212111.xlsx +2025-05-02 21:22:27,254 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502212111.xlsx, 共 12 行 +2025-05-02 21:22:27,257 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 55 +2025-05-02 21:22:27,258 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 21:22:27,276 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 11 行有效数据 +2025-05-02 21:22:27,276 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条码 +2025-05-02 21:22:27,276 - app.core.excel.processor - INFO - 使用条码列: 条码 +2025-05-02 21:22:27,276 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 21:22:27,276 - app.core.excel.processor - INFO - 找到specification列: 规格 +2025-05-02 21:22:27,276 - app.core.excel.processor - INFO - 找到quantity列: 数量 +2025-05-02 21:22:27,276 - app.core.excel.processor - INFO - 找到unit列: 单位 +2025-05-02 21:22:27,277 - app.core.excel.processor - INFO - 找到price列: 单价 +2025-05-02 21:22:27,277 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条码', 'name': '商品名称', 'specification': '规格', 'quantity': '数量', 'unit': '单位', 'price': '单价'} +2025-05-02 21:22:27,277 - app.core.excel.processor - INFO - 是否存在规格列: True +2025-05-02 21:22:27,277 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6925303797775, 名称=173g统一粉面蛋肉肠诱惑酸辣味, 规格=, 数量=0.5, 单位=件, 单价=65.0 +2025-05-02 21:22:27,278 - app.core.excel.processor - INFO - 解析规格: 1*12 -> 包装数量=12 +2025-05-02 21:22:27,279 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6925303797782, 名称=173g统一粉面蛋肉肠金汤肥牛味, 规格=, 数量=0.5, 单位=件, 单价=65.0 +2025-05-02 21:22:27,279 - app.core.excel.processor - INFO - 解析规格: 1*12 -> 包装数量=12 +2025-05-02 21:22:27,279 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6925303796426, 名称=128g统一茄皇牛肉桶面, 规格=, 数量=1.0, 单位=件, 单价=49.0 +2025-05-02 21:22:27,279 - app.core.excel.processor - INFO - 解析规格: 1*12 -> 包装数量=12 +2025-05-02 21:22:27,280 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6925303796365, 名称=140g来一桶(藤椒牛肉味)大桶, 规格=, 数量=1.0, 单位=件, 单价=49.0 +2025-05-02 21:22:27,280 - app.core.excel.processor - INFO - 解析规格: 1*12 -> 包装数量=12 +2025-05-02 21:22:27,280 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6925303740627, 名称=108g巧面馆桶面(麻辣笋子味), 规格=, 数量=1.0, 单位=件, 单价=40.0 +2025-05-02 21:22:27,280 - app.core.excel.processor - INFO - 解析规格: 1*12 -> 包装数量=12 +2025-05-02 21:22:27,281 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6925303711368, 名称=107g巧面馆桶面(泡椒牛肉味), 规格=, 数量=1.0, 单位=件, 单价=40.0 +2025-05-02 21:22:27,391 - app.core.excel.processor - INFO - 解析规格: 1*12 -> 包装数量=12 +2025-05-02 21:22:27,392 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6925303770310, 名称=123g巧面馆桶面(红油酸菜味), 规格=, 数量=1.0, 单位=件, 单价=40.0 +2025-05-02 21:22:27,392 - app.core.excel.processor - INFO - 解析规格: 1*12 -> 包装数量=12 +2025-05-02 21:22:27,392 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6925303740719, 名称=120g巧面馆酱拌面(担担碗), 规格=, 数量=3.0, 单位=碗, 单价=0.0 +2025-05-02 21:22:27,392 - app.core.excel.processor - INFO - 解析规格: 1*12 -> 包装数量=12 +2025-05-02 21:22:27,393 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6925303797386, 名称=139g来一桶(笋子牛肉味)大桶, 规格=, 数量=1.0, 单位=桶, 单价=0.0 +2025-05-02 21:22:27,393 - app.core.excel.processor - INFO - 解析规格: 1*12 -> 包装数量=12 +2025-05-02 21:22:27,394 - app.core.excel.processor - INFO - 提取到 9 个商品信息 +2025-05-02 21:22:27,401 - app.core.excel.processor - INFO - 开始处理9 个产品信息 +2025-05-02 21:22:27,401 - app.core.excel.processor - INFO - 处理商品: 条码=6925303797775, 数量=6.0, 单价=5.416666666666667, 是否赠品=False +2025-05-02 21:22:27,401 - app.core.excel.processor - INFO - 发现正常商品:条码6925303797775, 数量=6.0, 单价=5.416666666666667 +2025-05-02 21:22:27,401 - app.core.excel.processor - INFO - 处理商品: 条码=6925303797782, 数量=6.0, 单价=5.416666666666667, 是否赠品=False +2025-05-02 21:22:27,401 - app.core.excel.processor - INFO - 发现正常商品:条码6925303797782, 数量=6.0, 单价=5.416666666666667 +2025-05-02 21:22:27,401 - app.core.excel.processor - INFO - 处理商品: 条码=6925303796426, 数量=12.0, 单价=4.083333333333333, 是否赠品=False +2025-05-02 21:22:27,401 - app.core.excel.processor - INFO - 发现正常商品:条码6925303796426, 数量=12.0, 单价=4.083333333333333 +2025-05-02 21:22:27,401 - app.core.excel.processor - INFO - 处理商品: 条码=6925303796365, 数量=12.0, 单价=4.083333333333333, 是否赠品=False +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 发现正常商品:条码6925303796365, 数量=12.0, 单价=4.083333333333333 +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 处理商品: 条码=6925303740627, 数量=12.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 发现正常商品:条码6925303740627, 数量=12.0, 单价=3.3333333333333335 +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 处理商品: 条码=6925303711368, 数量=12.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 发现正常商品:条码6925303711368, 数量=12.0, 单价=3.3333333333333335 +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 处理商品: 条码=6925303770310, 数量=12.0, 单价=3.3333333333333335, 是否赠品=False +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 发现正常商品:条码6925303770310, 数量=12.0, 单价=3.3333333333333335 +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 处理商品: 条码=6925303740719, 数量=3.0, 单价=0.0, 是否赠品=True +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 发现赠品:条码6925303740719, 数量=3.0 +2025-05-02 21:22:27,402 - app.core.excel.processor - INFO - 处理商品: 条码=6925303797386, 数量=1.0, 单价=0.0, 是否赠品=True +2025-05-02 21:22:31,623 - app.core.excel.processor - INFO - 发现赠品:条码6925303797386, 数量=1.0 +2025-05-02 21:22:31,623 - app.core.excel.processor - INFO - 分组后共9 个不同条码的商品 +2025-05-02 21:22:31,623 - app.core.excel.processor - INFO - 条码 6925303797775 处理结果:正常商品数量6.0,单价5.416666666666667,赠品数量0 +2025-05-02 21:22:31,623 - app.core.excel.processor - INFO - 条码 6925303797782 处理结果:正常商品数量6.0,单价5.416666666666667,赠品数量0 +2025-05-02 21:22:31,623 - app.core.excel.processor - INFO - 条码 6925303796426 处理结果:正常商品数量12.0,单价4.083333333333333,赠品数量0 +2025-05-02 21:22:31,624 - app.core.excel.processor - INFO - 条码 6925303796365 处理结果:正常商品数量12.0,单价4.083333333333333,赠品数量0 +2025-05-02 21:22:31,624 - app.core.excel.processor - INFO - 条码 6925303740627 处理结果:正常商品数量12.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:22:31,624 - app.core.excel.processor - INFO - 条码 6925303711368 处理结果:正常商品数量12.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:22:31,624 - app.core.excel.processor - INFO - 条码 6925303770310 处理结果:正常商品数量12.0,单价3.3333333333333335,赠品数量0 +2025-05-02 21:22:31,624 - app.core.excel.processor - INFO - 条码 6925303740719 处理结果:只有赠品,数量=3.0 +2025-05-02 21:22:31,624 - app.core.excel.processor - INFO - 条码 6925303797386 处理结果:只有赠品,数量=1.0 +2025-05-02 21:22:31,625 - app.core.excel.processor - INFO - 条码 6925303740719 填充:仅有赠品,采购量=0,赠品数量=3.0 +2025-05-02 21:22:31,625 - app.core.excel.processor - INFO - 条码 6925303797386 填充:仅有赠品,采购量=0,赠品数量=1.0 +2025-05-02 21:22:31,628 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502212111.xls +2025-05-02 21:22:31,695 - app.core.excel.processor - INFO - 已自动打开输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:45:07,597 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:45:07,598 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:45:10,629 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 21:45:10,630 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 21:45:10,631 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 21:45:11,404 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx, 共 15 行 +2025-05-02 21:45:11,597 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 35 +2025-05-02 21:45:11,597 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 21:45:11,625 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 14 行有效数据 +2025-05-02 21:45:11,625 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 21:45:11,626 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 21:45:11,626 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 21:45:11,626 - app.core.excel.processor - INFO - 找到quantity列: 订单数量 +2025-05-02 21:45:11,627 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 21:45:11,627 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '订单数量', 'price': '销售价'} +2025-05-02 21:45:11,627 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 21:45:11,628 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6921168560509, 名称=550纯净水24入白膜, 规格=, 数量=3.0, 单位=, 单价=0.0 +2025-05-02 21:45:11,629 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 21:45:11,635 - app.core.excel.processor - INFO - 从商品名称推断规格: 550纯净水24入白膜 -> 550纯净水1*24白膜, 包装数量=24 +2025-05-02 21:45:11,635 - app.core.excel.processor - INFO - 从商品名称推断规格: 550纯净水24入白膜 -> 550纯净水1*24白膜, 包装数量=24 +2025-05-02 21:45:11,637 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6921168532001, 名称=450果园30%橙子15入纸箱, 规格=, 数量=1.0, 单位=, 单价=0.0 +2025-05-02 21:45:11,637 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 21:45:11,637 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,637 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,638 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6921168560189, 名称=445水溶C血橙15入纸箱, 规格=, 数量=2.0, 单位=, 单价=56.0 +2025-05-02 21:45:11,638 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 21:45:11,638 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C血橙15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,638 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C血橙15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,679 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6921168500956, 名称=445水溶C柠檬15纸箱, 规格=, 数量=2.0, 单位=, 单价=56.0 +2025-05-02 21:45:11,679 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 21:45:11,679 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,679 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,680 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6921168559244, 名称=445水溶C青皮桔15纸箱, 规格=, 数量=3.0, 单位=, 单价=56.0 +2025-05-02 21:45:11,680 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 21:45:11,680 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C青皮桔15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,680 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C青皮桔15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,681 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6921168500970, 名称=445水溶C西柚15纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 21:45:11,681 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 21:45:11,681 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C西柚15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,681 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C西柚15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,682 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6921168558049, 名称=500树叶茉莉花茶15纸箱, 规格=, 数量=3.0, 单位=, 单价=55.0 +2025-05-02 21:45:11,682 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 21:45:11,682 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶茉莉花茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,682 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶茉莉花茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:11,683 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6921168558032, 名称=500树叶乌龙茶15纸箱, 规格=, 数量=1.0, 单位=, 单价=55.0 +2025-05-02 21:45:11,683 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 21:45:15,793 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶乌龙茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:15,793 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶乌龙茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:15,794 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168558018, 名称=500树叶绿茶15纸箱, 规格=, 数量=2.0, 单位=, 单价=55.0 +2025-05-02 21:45:15,794 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 21:45:15,795 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶绿茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:15,795 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶绿茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:15,795 - app.core.excel.processor - INFO - 第10行: 提取商品信息 条码=6921168598649, 名称=900树叶青柑普洱12入纸箱, 规格=, 数量=1.0, 单位=, 单价=62.0 +2025-05-02 21:45:15,796 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 21:45:15,796 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12, 包装数量=12 +2025-05-02 21:45:15,796 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12, 包装数量=12 +2025-05-02 21:45:15,797 - app.core.excel.processor - INFO - 第11行: 提取商品信息 条码=6921168595006, 名称=410苏打天然水柠檬15纸箱, 规格=, 数量=1.0, 单位=, 单价=43.0 +2025-05-02 21:45:15,797 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 21:45:15,797 - app.core.excel.processor - INFO - 从商品名称推断规格: 410苏打天然水柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:15,797 - app.core.excel.processor - INFO - 从商品名称推断规格: 410苏打天然水柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 21:45:15,798 - app.core.excel.processor - INFO - 第12行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=5.0, 单位=, 单价=16.0 +2025-05-02 21:45:15,798 - app.core.excel.processor - INFO - 从数量提取单位: 5桶 -> 桶 +2025-05-02 21:45:15,800 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 21:45:15,800 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 21:45:18,666 - app.core.excel.processor - INFO - 第13行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=1.0, 单位=, 单价=0.0 +2025-05-02 21:45:18,666 - app.core.excel.processor - INFO - 从数量提取单位: 1桶 -> 桶 +2025-05-02 21:45:18,667 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 21:45:18,667 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 21:45:18,667 - app.core.excel.processor - INFO - 提取到 13 个商品信息 +2025-05-02 21:45:18,676 - app.core.excel.processor - INFO - 开始处理13 个产品信息 +2025-05-02 21:45:18,676 - app.core.excel.processor - INFO - 处理商品: 条码=6921168560509, 数量=3.0, 单价=0, 是否赠品=True +2025-05-02 21:45:18,676 - app.core.excel.processor - INFO - 发现赠品:条码6921168560509, 数量=3.0 +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 处理商品: 条码=6921168532001, 数量=15.0, 单价=0, 是否赠品=True +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 发现赠品:条码6921168532001, 数量=15.0 +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 处理商品: 条码=6921168560189, 数量=30.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 发现正常商品:条码6921168560189, 数量=30.0, 单价=3.7333333333333334 +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 处理商品: 条码=6921168500956, 数量=30.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 发现正常商品:条码6921168500956, 数量=30.0, 单价=3.7333333333333334 +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 处理商品: 条码=6921168559244, 数量=45.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 发现正常商品:条码6921168559244, 数量=45.0, 单价=3.7333333333333334 +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 处理商品: 条码=6921168500970, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 发现正常商品:条码6921168500970, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 21:45:18,677 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558049, 数量=45.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 21:45:18,678 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558049, 数量=45.0, 单价=3.6666666666666665 +2025-05-02 21:45:18,678 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558032, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 21:45:18,678 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558032, 数量=15.0, 单价=3.6666666666666665 +2025-05-02 21:45:18,678 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558018, 数量=30.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 21:45:18,678 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558018, 数量=30.0, 单价=3.6666666666666665 +2025-05-02 21:45:18,678 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598649, 数量=12.0, 单价=5.166666666666667, 是否赠品=False +2025-05-02 21:45:18,678 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598649, 数量=12.0, 单价=5.166666666666667 +2025-05-02 21:45:18,678 - app.core.excel.processor - INFO - 处理商品: 条码=6921168595006, 数量=15.0, 单价=2.8666666666666667, 是否赠品=False +2025-05-02 21:45:18,678 - app.core.excel.processor - INFO - 发现正常商品:条码6921168595006, 数量=15.0, 单价=2.8666666666666667 +2025-05-02 21:45:21,939 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=5.0, 单价=16.0, 是否赠品=False +2025-05-02 21:45:21,939 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594054, 数量=5.0, 单价=16.0 +2025-05-02 21:45:21,939 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=1.0, 单价=0.0, 是否赠品=True +2025-05-02 21:45:21,939 - app.core.excel.processor - INFO - 发现赠品:条码6921168594054, 数量=1.0 +2025-05-02 21:45:21,939 - app.core.excel.processor - INFO - 分组后共12 个不同条码的商品 +2025-05-02 21:45:21,939 - app.core.excel.processor - INFO - 条码 6921168560509 处理结果:只有赠品,数量=3.0 +2025-05-02 21:45:21,939 - app.core.excel.processor - INFO - 条码 6921168532001 处理结果:只有赠品,数量=15.0 +2025-05-02 21:45:21,940 - app.core.excel.processor - INFO - 条码 6921168560189 处理结果:正常商品数量30.0,单价3.7333333333333334,赠品数量0 +2025-05-02 21:45:21,940 - app.core.excel.processor - INFO - 条码 6921168500956 处理结果:正常商品数量30.0,单价3.7333333333333334,赠品数量0 +2025-05-02 21:45:21,940 - app.core.excel.processor - INFO - 条码 6921168559244 处理结果:正常商品数量45.0,单价3.7333333333333334,赠品数量0 +2025-05-02 21:45:21,940 - app.core.excel.processor - INFO - 条码 6921168500970 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 21:45:21,940 - app.core.excel.processor - INFO - 条码 6921168558049 处理结果:正常商品数量45.0,单价3.6666666666666665,赠品数量0 +2025-05-02 21:45:21,940 - app.core.excel.processor - INFO - 条码 6921168558032 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-02 21:45:21,940 - app.core.excel.processor - INFO - 条码 6921168558018 处理结果:正常商品数量30.0,单价3.6666666666666665,赠品数量0 +2025-05-02 21:45:21,940 - app.core.excel.processor - INFO - 条码 6921168598649 处理结果:正常商品数量12.0,单价5.166666666666667,赠品数量0 +2025-05-02 21:45:21,940 - app.core.excel.processor - INFO - 条码 6921168595006 处理结果:正常商品数量15.0,单价2.8666666666666667,赠品数量0 +2025-05-02 21:45:21,941 - app.core.excel.processor - INFO - 条码 6921168594054 处理结果:正常商品数量5.0,单价16.0,赠品数量1.0 +2025-05-02 21:45:21,941 - app.core.excel.processor - INFO - 条码 6921168560509 填充:仅有赠品,采购量=0,赠品数量=3.0 +2025-05-02 21:45:21,941 - app.core.excel.processor - INFO - 条码 6921168532001 填充:仅有赠品,采购量=0,赠品数量=15.0 +2025-05-02 21:45:21,941 - app.core.excel.processor - INFO - 条码 6921168594054 填充:采购量=5.0,赠品数量1.0 +2025-05-02 21:45:21,945 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 21:45:21,946 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 21:54:51,327 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:54:51,328 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:54:51,331 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 21:54:51,332 - app.core.excel.processor - WARNING - 未在 D:\My Documents\python\orc-order-v2\data\output 目录下找到未处理的Excel文件 +2025-05-02 21:55:07,663 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:55:07,663 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:55:07,667 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 21:55:07,668 - app.core.excel.processor - WARNING - 未在 D:\My Documents\python\orc-order-v2\data\output 目录下找到未处理的Excel文件 +2025-05-02 21:56:33,284 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:56:33,285 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:56:33,288 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 21:56:33,288 - app.core.excel.processor - WARNING - 未在 D:\My Documents\python\orc-order-v2\data\output 目录下找到未处理的Excel文件 +2025-05-02 21:58:02,454 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 21:58:02,454 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 21:58:02,456 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 21:58:02,456 - app.core.excel.processor - WARNING - 未在 D:\My Documents\python\orc-order-v2\data\output 目录下找到未处理的Excel文件 +2025-05-02 22:07:10,380 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 22:07:10,381 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:07:10,383 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 22:07:10,383 - app.core.excel.processor - WARNING - 未在 D:\My Documents\python\orc-order-v2\data\output 目录下找到未处理的Excel文件 +2025-05-02 22:10:02,822 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 22:10:02,823 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:11:55,060 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 22:11:55,060 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:11:57,703 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 22:11:57,705 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:11:57,705 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:11:58,485 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx, 共 15 行 +2025-05-02 22:11:58,487 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 35 +2025-05-02 22:11:58,488 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 22:11:58,501 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 14 行有效数据 +2025-05-02 22:11:58,501 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 22:11:58,502 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 22:11:58,502 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 22:11:58,502 - app.core.excel.processor - INFO - 找到quantity列: 订单数量 +2025-05-02 22:11:58,502 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 22:11:58,502 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '订单数量', 'price': '销售价'} +2025-05-02 22:11:58,502 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 22:11:58,503 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6921168560509, 名称=550纯净水24入白膜, 规格=, 数量=3.0, 单位=, 单价=0.0 +2025-05-02 22:11:58,504 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 22:11:58,507 - app.core.excel.processor - INFO - 从商品名称推断规格: 550纯净水24入白膜 -> 550纯净水1*24白膜, 包装数量=24 +2025-05-02 22:11:58,507 - app.core.excel.processor - INFO - 从商品名称推断规格: 550纯净水24入白膜 -> 550纯净水1*24白膜, 包装数量=24 +2025-05-02 22:11:58,508 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6921168532001, 名称=450果园30%橙子15入纸箱, 规格=, 数量=1.0, 单位=, 单价=0.0 +2025-05-02 22:11:58,509 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:11:58,509 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,509 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,510 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6921168560189, 名称=445水溶C血橙15入纸箱, 规格=, 数量=2.0, 单位=, 单价=56.0 +2025-05-02 22:11:58,510 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 22:11:58,510 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C血橙15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,510 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C血橙15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,627 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6921168500956, 名称=445水溶C柠檬15纸箱, 规格=, 数量=2.0, 单位=, 单价=56.0 +2025-05-02 22:11:58,628 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 22:11:58,628 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,628 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,629 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6921168559244, 名称=445水溶C青皮桔15纸箱, 规格=, 数量=3.0, 单位=, 单价=56.0 +2025-05-02 22:11:58,629 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 22:11:58,629 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C青皮桔15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,629 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C青皮桔15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,630 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6921168500970, 名称=445水溶C西柚15纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 22:11:58,630 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:11:58,630 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C西柚15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,630 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C西柚15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,631 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6921168558049, 名称=500树叶茉莉花茶15纸箱, 规格=, 数量=3.0, 单位=, 单价=55.0 +2025-05-02 22:11:58,631 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 22:11:58,631 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶茉莉花茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,631 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶茉莉花茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:11:58,631 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6921168558032, 名称=500树叶乌龙茶15纸箱, 规格=, 数量=1.0, 单位=, 单价=55.0 +2025-05-02 22:12:02,756 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:12:02,757 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶乌龙茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:12:02,757 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶乌龙茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:12:02,757 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168558018, 名称=500树叶绿茶15纸箱, 规格=, 数量=2.0, 单位=, 单价=55.0 +2025-05-02 22:12:02,758 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 22:12:02,758 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶绿茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:12:02,758 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶绿茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:12:02,759 - app.core.excel.processor - INFO - 第10行: 提取商品信息 条码=6921168598649, 名称=900树叶青柑普洱12入纸箱, 规格=, 数量=1.0, 单位=, 单价=62.0 +2025-05-02 22:12:02,759 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:12:02,759 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12, 包装数量=12 +2025-05-02 22:12:02,760 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12, 包装数量=12 +2025-05-02 22:12:02,760 - app.core.excel.processor - INFO - 第11行: 提取商品信息 条码=6921168595006, 名称=410苏打天然水柠檬15纸箱, 规格=, 数量=1.0, 单位=, 单价=43.0 +2025-05-02 22:12:02,761 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:12:02,761 - app.core.excel.processor - INFO - 从商品名称推断规格: 410苏打天然水柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:12:02,761 - app.core.excel.processor - INFO - 从商品名称推断规格: 410苏打天然水柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:12:02,762 - app.core.excel.processor - INFO - 第12行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=5.0, 单位=, 单价=16.0 +2025-05-02 22:12:02,762 - app.core.excel.processor - INFO - 从数量提取单位: 5桶 -> 桶 +2025-05-02 22:12:02,764 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:12:05,702 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:12:05,703 - app.core.excel.processor - INFO - 第13行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=1.0, 单位=, 单价=0.0 +2025-05-02 22:12:05,703 - app.core.excel.processor - INFO - 从数量提取单位: 1桶 -> 桶 +2025-05-02 22:12:05,703 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:12:05,703 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:12:05,704 - app.core.excel.processor - INFO - 提取到 13 个商品信息 +2025-05-02 22:12:05,714 - app.core.excel.processor - INFO - 开始处理13 个产品信息 +2025-05-02 22:12:05,714 - app.core.excel.processor - INFO - 处理商品: 条码=6921168560509, 数量=3.0, 单价=0, 是否赠品=True +2025-05-02 22:12:05,715 - app.core.excel.processor - INFO - 发现赠品:条码6921168560509, 数量=3.0 +2025-05-02 22:12:05,715 - app.core.excel.processor - INFO - 处理商品: 条码=6921168532001, 数量=15.0, 单价=0, 是否赠品=True +2025-05-02 22:12:05,715 - app.core.excel.processor - INFO - 发现赠品:条码6921168532001, 数量=15.0 +2025-05-02 22:12:05,715 - app.core.excel.processor - INFO - 处理商品: 条码=6921168560189, 数量=30.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:12:05,715 - app.core.excel.processor - INFO - 发现正常商品:条码6921168560189, 数量=30.0, 单价=3.7333333333333334 +2025-05-02 22:12:05,715 - app.core.excel.processor - INFO - 处理商品: 条码=6921168500956, 数量=30.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:12:05,715 - app.core.excel.processor - INFO - 发现正常商品:条码6921168500956, 数量=30.0, 单价=3.7333333333333334 +2025-05-02 22:12:05,716 - app.core.excel.processor - INFO - 处理商品: 条码=6921168559244, 数量=45.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:12:05,716 - app.core.excel.processor - INFO - 发现正常商品:条码6921168559244, 数量=45.0, 单价=3.7333333333333334 +2025-05-02 22:12:05,716 - app.core.excel.processor - INFO - 处理商品: 条码=6921168500970, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:12:05,716 - app.core.excel.processor - INFO - 发现正常商品:条码6921168500970, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 22:12:05,716 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558049, 数量=45.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 22:12:05,716 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558049, 数量=45.0, 单价=3.6666666666666665 +2025-05-02 22:12:05,716 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558032, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 22:12:05,716 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558032, 数量=15.0, 单价=3.6666666666666665 +2025-05-02 22:12:05,717 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558018, 数量=30.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 22:12:05,717 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558018, 数量=30.0, 单价=3.6666666666666665 +2025-05-02 22:12:05,717 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598649, 数量=12.0, 单价=5.166666666666667, 是否赠品=False +2025-05-02 22:12:05,717 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598649, 数量=12.0, 单价=5.166666666666667 +2025-05-02 22:12:05,717 - app.core.excel.processor - INFO - 处理商品: 条码=6921168595006, 数量=15.0, 单价=2.8666666666666667, 是否赠品=False +2025-05-02 22:12:08,744 - app.core.excel.processor - INFO - 发现正常商品:条码6921168595006, 数量=15.0, 单价=2.8666666666666667 +2025-05-02 22:12:08,744 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=5.0, 单价=16.0, 是否赠品=False +2025-05-02 22:12:08,744 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594054, 数量=5.0, 单价=16.0 +2025-05-02 22:12:08,744 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=1.0, 单价=0.0, 是否赠品=True +2025-05-02 22:12:08,744 - app.core.excel.processor - INFO - 发现赠品:条码6921168594054, 数量=1.0 +2025-05-02 22:12:08,744 - app.core.excel.processor - INFO - 分组后共12 个不同条码的商品 +2025-05-02 22:12:08,744 - app.core.excel.processor - INFO - 条码 6921168560509 处理结果:只有赠品,数量=3.0 +2025-05-02 22:12:08,745 - app.core.excel.processor - INFO - 条码 6921168532001 处理结果:只有赠品,数量=15.0 +2025-05-02 22:12:08,745 - app.core.excel.processor - INFO - 条码 6921168560189 处理结果:正常商品数量30.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:12:08,745 - app.core.excel.processor - INFO - 条码 6921168500956 处理结果:正常商品数量30.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:12:08,745 - app.core.excel.processor - INFO - 条码 6921168559244 处理结果:正常商品数量45.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:12:08,745 - app.core.excel.processor - INFO - 条码 6921168500970 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:12:08,745 - app.core.excel.processor - INFO - 条码 6921168558049 处理结果:正常商品数量45.0,单价3.6666666666666665,赠品数量0 +2025-05-02 22:12:08,745 - app.core.excel.processor - INFO - 条码 6921168558032 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-02 22:12:08,746 - app.core.excel.processor - INFO - 条码 6921168558018 处理结果:正常商品数量30.0,单价3.6666666666666665,赠品数量0 +2025-05-02 22:12:08,746 - app.core.excel.processor - INFO - 条码 6921168598649 处理结果:正常商品数量12.0,单价5.166666666666667,赠品数量0 +2025-05-02 22:12:08,746 - app.core.excel.processor - INFO - 条码 6921168595006 处理结果:正常商品数量15.0,单价2.8666666666666667,赠品数量0 +2025-05-02 22:12:08,746 - app.core.excel.processor - INFO - 条码 6921168594054 处理结果:正常商品数量5.0,单价16.0,赠品数量1.0 +2025-05-02 22:12:08,746 - app.core.excel.processor - INFO - 条码 6921168560509 填充:仅有赠品,采购量=0,赠品数量=3.0 +2025-05-02 22:12:08,747 - app.core.excel.processor - INFO - 条码 6921168532001 填充:仅有赠品,采购量=0,赠品数量=15.0 +2025-05-02 22:12:08,748 - app.core.excel.processor - INFO - 条码 6921168594054 填充:采购量=5.0,赠品数量1.0 +2025-05-02 22:12:08,752 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:12:08,753 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:26:11,620 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 22:26:11,620 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:26:11,623 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 22:26:11,624 - app.core.excel.processor - WARNING - 未在 D:\My Documents\python\orc-order-v2\data\output 目录下找到未处理的Excel文件 +2025-05-02 22:26:42,569 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 22:26:42,570 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:29:10,830 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 22:29:10,831 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:29:14,320 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 22:29:14,321 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:29:14,322 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:29:15,074 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx, 共 15 行 +2025-05-02 22:29:15,077 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 35 +2025-05-02 22:29:15,077 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 22:29:15,096 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 14 行有效数据 +2025-05-02 22:29:15,096 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 22:29:15,097 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 22:29:15,097 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 22:29:15,098 - app.core.excel.processor - INFO - 找到quantity列: 订单数量 +2025-05-02 22:29:15,098 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 22:29:15,099 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '订单数量', 'price': '销售价'} +2025-05-02 22:29:15,100 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 22:29:15,101 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6921168560509, 名称=550纯净水24入白膜, 规格=, 数量=3.0, 单位=, 单价=0.0 +2025-05-02 22:29:15,148 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 22:29:15,151 - app.core.excel.processor - INFO - 从商品名称推断规格: 550纯净水24入白膜 -> 550纯净水1*24白膜, 包装数量=24 +2025-05-02 22:29:15,152 - app.core.excel.processor - INFO - 从商品名称推断规格: 550纯净水24入白膜 -> 550纯净水1*24白膜, 包装数量=24 +2025-05-02 22:29:15,153 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6921168532001, 名称=450果园30%橙子15入纸箱, 规格=, 数量=1.0, 单位=, 单价=0.0 +2025-05-02 22:29:15,153 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:29:15,153 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,153 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,154 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6921168560189, 名称=445水溶C血橙15入纸箱, 规格=, 数量=2.0, 单位=, 单价=56.0 +2025-05-02 22:29:15,155 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 22:29:15,155 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C血橙15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,155 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C血橙15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,296 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6921168500956, 名称=445水溶C柠檬15纸箱, 规格=, 数量=2.0, 单位=, 单价=56.0 +2025-05-02 22:29:15,297 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 22:29:15,297 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,297 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,298 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6921168559244, 名称=445水溶C青皮桔15纸箱, 规格=, 数量=3.0, 单位=, 单价=56.0 +2025-05-02 22:29:15,298 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 22:29:15,298 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C青皮桔15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,299 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C青皮桔15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,299 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6921168500970, 名称=445水溶C西柚15纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 22:29:15,300 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:29:15,300 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C西柚15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,300 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C西柚15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,301 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6921168558049, 名称=500树叶茉莉花茶15纸箱, 规格=, 数量=3.0, 单位=, 单价=55.0 +2025-05-02 22:29:15,301 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 22:29:15,302 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶茉莉花茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,302 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶茉莉花茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:15,303 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6921168558032, 名称=500树叶乌龙茶15纸箱, 规格=, 数量=1.0, 单位=, 单价=55.0 +2025-05-02 22:29:19,952 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:29:19,952 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶乌龙茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:19,953 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶乌龙茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:19,953 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168558018, 名称=500树叶绿茶15纸箱, 规格=, 数量=2.0, 单位=, 单价=55.0 +2025-05-02 22:29:19,953 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 22:29:19,953 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶绿茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:19,954 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶绿茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:19,954 - app.core.excel.processor - INFO - 第10行: 提取商品信息 条码=6921168598649, 名称=900树叶青柑普洱12入纸箱, 规格=, 数量=1.0, 单位=, 单价=62.0 +2025-05-02 22:29:19,954 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:29:19,955 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12, 包装数量=12 +2025-05-02 22:29:19,955 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12, 包装数量=12 +2025-05-02 22:29:19,955 - app.core.excel.processor - INFO - 第11行: 提取商品信息 条码=6921168595006, 名称=410苏打天然水柠檬15纸箱, 规格=, 数量=1.0, 单位=, 单价=43.0 +2025-05-02 22:29:19,955 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:29:19,955 - app.core.excel.processor - INFO - 从商品名称推断规格: 410苏打天然水柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:19,955 - app.core.excel.processor - INFO - 从商品名称推断规格: 410苏打天然水柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:29:19,956 - app.core.excel.processor - INFO - 第12行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=5.0, 单位=, 单价=16.0 +2025-05-02 22:29:19,956 - app.core.excel.processor - INFO - 从数量提取单位: 5桶 -> 桶 +2025-05-02 22:29:19,957 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:29:23,557 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:29:23,557 - app.core.excel.processor - INFO - 第13行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=1.0, 单位=, 单价=0.0 +2025-05-02 22:29:23,558 - app.core.excel.processor - INFO - 从数量提取单位: 1桶 -> 桶 +2025-05-02 22:29:23,558 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:29:23,558 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:29:23,559 - app.core.excel.processor - INFO - 提取到 13 个商品信息 +2025-05-02 22:29:23,569 - app.core.excel.processor - INFO - 开始处理13 个产品信息 +2025-05-02 22:29:23,570 - app.core.excel.processor - INFO - 处理商品: 条码=6921168560509, 数量=3.0, 单价=0, 是否赠品=True +2025-05-02 22:29:23,570 - app.core.excel.processor - INFO - 发现赠品:条码6921168560509, 数量=3.0 +2025-05-02 22:29:23,570 - app.core.excel.processor - INFO - 处理商品: 条码=6921168532001, 数量=15.0, 单价=0, 是否赠品=True +2025-05-02 22:29:23,570 - app.core.excel.processor - INFO - 发现赠品:条码6921168532001, 数量=15.0 +2025-05-02 22:29:23,570 - app.core.excel.processor - INFO - 处理商品: 条码=6921168560189, 数量=30.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:29:23,571 - app.core.excel.processor - INFO - 发现正常商品:条码6921168560189, 数量=30.0, 单价=3.7333333333333334 +2025-05-02 22:29:23,571 - app.core.excel.processor - INFO - 处理商品: 条码=6921168500956, 数量=30.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:29:23,571 - app.core.excel.processor - INFO - 发现正常商品:条码6921168500956, 数量=30.0, 单价=3.7333333333333334 +2025-05-02 22:29:23,571 - app.core.excel.processor - INFO - 处理商品: 条码=6921168559244, 数量=45.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:29:23,571 - app.core.excel.processor - INFO - 发现正常商品:条码6921168559244, 数量=45.0, 单价=3.7333333333333334 +2025-05-02 22:29:23,571 - app.core.excel.processor - INFO - 处理商品: 条码=6921168500970, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:29:23,571 - app.core.excel.processor - INFO - 发现正常商品:条码6921168500970, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 22:29:23,571 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558049, 数量=45.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 22:29:23,571 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558049, 数量=45.0, 单价=3.6666666666666665 +2025-05-02 22:29:23,572 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558032, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 22:29:23,572 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558032, 数量=15.0, 单价=3.6666666666666665 +2025-05-02 22:29:23,572 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558018, 数量=30.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 22:29:23,572 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558018, 数量=30.0, 单价=3.6666666666666665 +2025-05-02 22:29:23,572 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598649, 数量=12.0, 单价=5.166666666666667, 是否赠品=False +2025-05-02 22:29:23,572 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598649, 数量=12.0, 单价=5.166666666666667 +2025-05-02 22:29:23,572 - app.core.excel.processor - INFO - 处理商品: 条码=6921168595006, 数量=15.0, 单价=2.8666666666666667, 是否赠品=False +2025-05-02 22:29:26,868 - app.core.excel.processor - INFO - 发现正常商品:条码6921168595006, 数量=15.0, 单价=2.8666666666666667 +2025-05-02 22:29:26,868 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=5.0, 单价=16.0, 是否赠品=False +2025-05-02 22:29:26,868 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594054, 数量=5.0, 单价=16.0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=1.0, 单价=0.0, 是否赠品=True +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 发现赠品:条码6921168594054, 数量=1.0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 分组后共12 个不同条码的商品 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168560509 处理结果:只有赠品,数量=3.0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168532001 处理结果:只有赠品,数量=15.0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168560189 处理结果:正常商品数量30.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168500956 处理结果:正常商品数量30.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168559244 处理结果:正常商品数量45.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168500970 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168558049 处理结果:正常商品数量45.0,单价3.6666666666666665,赠品数量0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168558032 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168558018 处理结果:正常商品数量30.0,单价3.6666666666666665,赠品数量0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168598649 处理结果:正常商品数量12.0,单价5.166666666666667,赠品数量0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168595006 处理结果:正常商品数量15.0,单价2.8666666666666667,赠品数量0 +2025-05-02 22:29:26,869 - app.core.excel.processor - INFO - 条码 6921168594054 处理结果:正常商品数量5.0,单价16.0,赠品数量1.0 +2025-05-02 22:29:26,870 - app.core.excel.processor - INFO - 条码 6921168560509 填充:仅有赠品,采购量=0,赠品数量=3.0 +2025-05-02 22:29:26,870 - app.core.excel.processor - INFO - 条码 6921168532001 填充:仅有赠品,采购量=0,赠品数量=15.0 +2025-05-02 22:29:26,870 - app.core.excel.processor - INFO - 条码 6921168594054 填充:采购量=5.0,赠品数量1.0 +2025-05-02 22:29:26,873 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:29:26,875 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:40:41,145 - app.core.excel.processor - INFO - 初始化ExcelProcessor +2025-05-02 22:40:41,146 - app.core.excel.processor - INFO - 初始化完成,模板文件: templates\银豹-采购单模板.xls +2025-05-02 22:40:43,846 - app.core.excel.processor - INFO - 搜索目录 D:\My Documents\python\orc-order-v2\data\output 中的Excel文件 +2025-05-02 22:40:43,848 - app.core.excel.processor - INFO - 找到最新的Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:40:43,849 - app.core.excel.processor - INFO - 开始处理Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:40:44,428 - app.core.excel.processor - INFO - 成功读取Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx, 共 15 行 +2025-05-02 22:40:44,430 - app.core.excel.processor - INFO - 找到可能的表头行: 第1行,评分: 35 +2025-05-02 22:40:44,430 - app.core.excel.processor - INFO - 识别到表头在第 1 行 +2025-05-02 22:40:44,439 - app.core.excel.processor - INFO - 使用表头行重新读取数据,共 14 行有效数据 +2025-05-02 22:40:44,439 - app.core.excel.processor - INFO - 找到精确匹配的条码列: 条形码 +2025-05-02 22:40:44,439 - app.core.excel.processor - INFO - 使用条码列: 条形码 +2025-05-02 22:40:44,439 - app.core.excel.processor - INFO - 找到name列: 商品名称 +2025-05-02 22:40:44,439 - app.core.excel.processor - INFO - 找到quantity列: 订单数量 +2025-05-02 22:40:44,439 - app.core.excel.processor - INFO - 找到price列: 销售价 +2025-05-02 22:40:44,439 - app.core.excel.processor - INFO - 列名映射结果: {'barcode': '条形码', 'name': '商品名称', 'quantity': '订单数量', 'price': '销售价'} +2025-05-02 22:40:44,439 - app.core.excel.processor - INFO - 是否存在规格列: False +2025-05-02 22:40:44,440 - app.core.excel.processor - INFO - 第1行: 提取商品信息 条码=6921168560509, 名称=550纯净水24入白膜, 规格=, 数量=3.0, 单位=, 单价=0.0 +2025-05-02 22:40:44,440 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 22:40:44,441 - app.core.excel.processor - INFO - 从商品名称推断规格: 550纯净水24入白膜 -> 1*24, 包装数量=24 +2025-05-02 22:40:44,441 - app.core.excel.processor - INFO - 从商品名称推断规格: 550纯净水24入白膜 -> 1*24, 包装数量=24 +2025-05-02 22:40:44,443 - app.core.excel.processor - INFO - 第2行: 提取商品信息 条码=6921168532001, 名称=450果园30%橙子15入纸箱, 规格=, 数量=1.0, 单位=, 单价=0.0 +2025-05-02 22:40:44,444 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:40:44,444 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,444 - app.core.excel.processor - INFO - 从商品名称推断规格: 450果园30%橙子15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,444 - app.core.excel.processor - INFO - 第3行: 提取商品信息 条码=6921168560189, 名称=445水溶C血橙15入纸箱, 规格=, 数量=2.0, 单位=, 单价=56.0 +2025-05-02 22:40:44,445 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 22:40:44,445 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C血橙15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,445 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C血橙15入纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,495 - app.core.excel.processor - INFO - 第4行: 提取商品信息 条码=6921168500956, 名称=445水溶C柠檬15纸箱, 规格=, 数量=2.0, 单位=, 单价=56.0 +2025-05-02 22:40:44,496 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 22:40:44,496 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,496 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,497 - app.core.excel.processor - INFO - 第5行: 提取商品信息 条码=6921168559244, 名称=445水溶C青皮桔15纸箱, 规格=, 数量=3.0, 单位=, 单价=56.0 +2025-05-02 22:40:44,497 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 22:40:44,498 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C青皮桔15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,498 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C青皮桔15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,498 - app.core.excel.processor - INFO - 第6行: 提取商品信息 条码=6921168500970, 名称=445水溶C西柚15纸箱, 规格=, 数量=1.0, 单位=, 单价=56.0 +2025-05-02 22:40:44,498 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:40:44,499 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C西柚15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,499 - app.core.excel.processor - INFO - 从商品名称推断规格: 445水溶C西柚15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,499 - app.core.excel.processor - INFO - 第7行: 提取商品信息 条码=6921168558049, 名称=500树叶茉莉花茶15纸箱, 规格=, 数量=3.0, 单位=, 单价=55.0 +2025-05-02 22:40:44,500 - app.core.excel.processor - INFO - 从数量提取单位: 3箱 -> 箱 +2025-05-02 22:40:44,500 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶茉莉花茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,500 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶茉莉花茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:44,501 - app.core.excel.processor - INFO - 第8行: 提取商品信息 条码=6921168558032, 名称=500树叶乌龙茶15纸箱, 规格=, 数量=1.0, 单位=, 单价=55.0 +2025-05-02 22:40:49,718 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:40:49,719 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶乌龙茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:49,719 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶乌龙茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:49,719 - app.core.excel.processor - INFO - 第9行: 提取商品信息 条码=6921168558018, 名称=500树叶绿茶15纸箱, 规格=, 数量=2.0, 单位=, 单价=55.0 +2025-05-02 22:40:49,720 - app.core.excel.processor - INFO - 从数量提取单位: 2箱 -> 箱 +2025-05-02 22:40:49,720 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶绿茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:49,720 - app.core.excel.processor - INFO - 从商品名称推断规格: 500树叶绿茶15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:49,720 - app.core.excel.processor - INFO - 第10行: 提取商品信息 条码=6921168598649, 名称=900树叶青柑普洱12入纸箱, 规格=, 数量=1.0, 单位=, 单价=62.0 +2025-05-02 22:40:49,721 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:40:49,721 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12, 包装数量=12 +2025-05-02 22:40:49,722 - app.core.excel.processor - INFO - 从商品名称推断规格: 900树叶青柑普洱12入纸箱 -> 1*12, 包装数量=12 +2025-05-02 22:40:49,722 - app.core.excel.processor - INFO - 第11行: 提取商品信息 条码=6921168595006, 名称=410苏打天然水柠檬15纸箱, 规格=, 数量=1.0, 单位=, 单价=43.0 +2025-05-02 22:40:49,722 - app.core.excel.processor - INFO - 从数量提取单位: 1箱 -> 箱 +2025-05-02 22:40:49,723 - app.core.excel.processor - INFO - 从商品名称推断规格: 410苏打天然水柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:49,723 - app.core.excel.processor - INFO - 从商品名称推断规格: 410苏打天然水柠檬15纸箱 -> 1*15, 包装数量=15 +2025-05-02 22:40:49,723 - app.core.excel.processor - INFO - 第12行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=5.0, 单位=, 单价=16.0 +2025-05-02 22:40:49,724 - app.core.excel.processor - INFO - 从数量提取单位: 5桶 -> 桶 +2025-05-02 22:40:53,273 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:40:53,273 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:40:53,273 - app.core.excel.processor - INFO - 第13行: 提取商品信息 条码=6921168594054, 名称=12.9L桶装水, 规格=, 数量=1.0, 单位=, 单价=0.0 +2025-05-02 22:40:53,274 - app.core.excel.processor - INFO - 从数量提取单位: 1桶 -> 桶 +2025-05-02 22:40:53,274 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:40:53,274 - app.core.excel.processor - INFO - 从商品名称推断规格: 12.9L桶装水 -> 12.9L*1, 包装数量=1 +2025-05-02 22:40:53,274 - app.core.excel.processor - INFO - 提取到 13 个商品信息 +2025-05-02 22:40:53,280 - app.core.excel.processor - INFO - 开始处理13 个产品信息 +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 处理商品: 条码=6921168560509, 数量=72.0, 单价=0, 是否赠品=True +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 发现赠品:条码6921168560509, 数量=72.0 +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 处理商品: 条码=6921168532001, 数量=15.0, 单价=0, 是否赠品=True +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 发现赠品:条码6921168532001, 数量=15.0 +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 处理商品: 条码=6921168560189, 数量=30.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 发现正常商品:条码6921168560189, 数量=30.0, 单价=3.7333333333333334 +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 处理商品: 条码=6921168500956, 数量=30.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 发现正常商品:条码6921168500956, 数量=30.0, 单价=3.7333333333333334 +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 处理商品: 条码=6921168559244, 数量=45.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:40:53,281 - app.core.excel.processor - INFO - 发现正常商品:条码6921168559244, 数量=45.0, 单价=3.7333333333333334 +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 处理商品: 条码=6921168500970, 数量=15.0, 单价=3.7333333333333334, 是否赠品=False +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 发现正常商品:条码6921168500970, 数量=15.0, 单价=3.7333333333333334 +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558049, 数量=45.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558049, 数量=45.0, 单价=3.6666666666666665 +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558032, 数量=15.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558032, 数量=15.0, 单价=3.6666666666666665 +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 处理商品: 条码=6921168558018, 数量=30.0, 单价=3.6666666666666665, 是否赠品=False +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 发现正常商品:条码6921168558018, 数量=30.0, 单价=3.6666666666666665 +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 处理商品: 条码=6921168598649, 数量=12.0, 单价=5.166666666666667, 是否赠品=False +2025-05-02 22:40:53,282 - app.core.excel.processor - INFO - 发现正常商品:条码6921168598649, 数量=12.0, 单价=5.166666666666667 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 处理商品: 条码=6921168595006, 数量=15.0, 单价=2.8666666666666667, 是否赠品=False +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 发现正常商品:条码6921168595006, 数量=15.0, 单价=2.8666666666666667 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=5.0, 单价=16.0, 是否赠品=False +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 发现正常商品:条码6921168594054, 数量=5.0, 单价=16.0 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 处理商品: 条码=6921168594054, 数量=1.0, 单价=0.0, 是否赠品=True +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 发现赠品:条码6921168594054, 数量=1.0 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 分组后共12 个不同条码的商品 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 条码 6921168560509 处理结果:只有赠品,数量=72.0 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 条码 6921168532001 处理结果:只有赠品,数量=15.0 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 条码 6921168560189 处理结果:正常商品数量30.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 条码 6921168500956 处理结果:正常商品数量30.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 条码 6921168559244 处理结果:正常商品数量45.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 条码 6921168500970 处理结果:正常商品数量15.0,单价3.7333333333333334,赠品数量0 +2025-05-02 22:40:56,989 - app.core.excel.processor - INFO - 条码 6921168558049 处理结果:正常商品数量45.0,单价3.6666666666666665,赠品数量0 +2025-05-02 22:40:56,990 - app.core.excel.processor - INFO - 条码 6921168558032 处理结果:正常商品数量15.0,单价3.6666666666666665,赠品数量0 +2025-05-02 22:40:56,990 - app.core.excel.processor - INFO - 条码 6921168558018 处理结果:正常商品数量30.0,单价3.6666666666666665,赠品数量0 +2025-05-02 22:40:56,990 - app.core.excel.processor - INFO - 条码 6921168598649 处理结果:正常商品数量12.0,单价5.166666666666667,赠品数量0 +2025-05-02 22:40:56,990 - app.core.excel.processor - INFO - 条码 6921168595006 处理结果:正常商品数量15.0,单价2.8666666666666667,赠品数量0 +2025-05-02 22:40:56,990 - app.core.excel.processor - INFO - 条码 6921168594054 处理结果:正常商品数量5.0,单价16.0,赠品数量1.0 +2025-05-02 22:40:56,990 - app.core.excel.processor - INFO - 条码 6921168560509 填充:仅有赠品,采购量=0,赠品数量=72.0 +2025-05-02 22:40:56,990 - app.core.excel.processor - INFO - 条码 6921168532001 填充:仅有赠品,采购量=0,赠品数量=15.0 +2025-05-02 22:40:56,990 - app.core.excel.processor - INFO - 条码 6921168594054 填充:采购量=5.0,赠品数量1.0 +2025-05-02 22:40:56,993 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls +2025-05-02 22:40:56,995 - app.core.excel.processor - INFO - 采购单已保存到: D:\My Documents\python\orc-order-v2\data\output\采购单_微信图片_20250502214456.xls diff --git a/logs/app.core.ocr.baidu_ocr.active b/logs/app.core.ocr.baidu_ocr.active deleted file mode 100644 index 6e265cb..0000000 --- a/logs/app.core.ocr.baidu_ocr.active +++ /dev/null @@ -1 +0,0 @@ -Active since: 2025-05-02 19:53:27 \ 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 da0e3fe..1976ee7 100644 --- a/logs/app.core.ocr.baidu_ocr.log +++ b/logs/app.core.ocr.baidu_ocr.log @@ -7,3 +7,41 @@ 2025-05-02 19:15:17,843 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 2025-05-02 19:42:19,449 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 2025-05-02 19:53:28,299 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-02 20:53:00,004 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-02 21:21:20,675 - app.core.ocr.baidu_ocr - WARNING - API密钥未设置,请在配置文件中设置API密钥 +2025-05-02 21:21:20,881 - app.core.ocr.baidu_ocr - WARNING - 获取访问令牌失败 (尝试 1/3): {"error_description":"The request is missing a required parameter","error":"invalid_request"} + +2025-05-02 21:21:23,050 - app.core.ocr.baidu_ocr - WARNING - 获取访问令牌失败 (尝试 2/3): {"error_description":"The request is missing a required parameter","error":"invalid_request"} + +2025-05-02 21:21:27,217 - app.core.ocr.baidu_ocr - WARNING - 获取访问令牌失败 (尝试 3/3): {"error_description":"The request is missing a required parameter","error":"invalid_request"} + +2025-05-02 21:21:27,218 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌 +2025-05-02 21:21:27,219 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌,无法进行表格识别 +2025-05-02 21:22:23,521 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-02 21:45:08,034 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-02 21:55:07,660 - app.core.ocr.baidu_ocr - WARNING - API密钥未设置,请在配置文件中设置API密钥 +2025-05-02 21:56:33,281 - app.core.ocr.baidu_ocr - WARNING - API密钥未设置,请在配置文件中设置API密钥 +2025-05-02 21:58:02,451 - app.core.ocr.baidu_ocr - WARNING - API密钥未设置,请在配置文件中设置API密钥 +2025-05-02 22:07:10,378 - app.core.ocr.baidu_ocr - WARNING - API密钥未设置,请在配置文件中设置API密钥 +2025-05-02 22:10:02,820 - app.core.ocr.baidu_ocr - WARNING - API密钥未设置,请在配置文件中设置API密钥 +2025-05-02 22:10:03,047 - app.core.ocr.baidu_ocr - WARNING - 获取访问令牌失败 (尝试 1/3): {"error_description":"The request is missing a required parameter","error":"invalid_request"} + +2025-05-02 22:10:05,242 - app.core.ocr.baidu_ocr - WARNING - 获取访问令牌失败 (尝试 2/3): {"error_description":"The request is missing a required parameter","error":"invalid_request"} + +2025-05-02 22:10:09,462 - app.core.ocr.baidu_ocr - WARNING - 获取访问令牌失败 (尝试 3/3): {"error_description":"The request is missing a required parameter","error":"invalid_request"} + +2025-05-02 22:10:09,462 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌 +2025-05-02 22:10:09,462 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌,无法进行表格识别 +2025-05-02 22:11:55,308 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-02 22:26:11,617 - app.core.ocr.baidu_ocr - WARNING - API密钥未设置,请在配置文件中设置API密钥 +2025-05-02 22:26:42,566 - app.core.ocr.baidu_ocr - WARNING - API密钥未设置,请在配置文件中设置API密钥 +2025-05-02 22:26:42,774 - app.core.ocr.baidu_ocr - WARNING - 获取访问令牌失败 (尝试 1/3): {"error_description":"The request is missing a required parameter","error":"invalid_request"} + +2025-05-02 22:26:44,970 - app.core.ocr.baidu_ocr - WARNING - 获取访问令牌失败 (尝试 2/3): {"error_description":"The request is missing a required parameter","error":"invalid_request"} + +2025-05-02 22:26:49,225 - app.core.ocr.baidu_ocr - WARNING - 获取访问令牌失败 (尝试 3/3): {"error_description":"The request is missing a required parameter","error":"invalid_request"} + +2025-05-02 22:26:49,225 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌 +2025-05-02 22:26:49,226 - app.core.ocr.baidu_ocr - ERROR - 无法获取访问令牌,无法进行表格识别 +2025-05-02 22:29:11,192 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 +2025-05-02 22:40:41,390 - app.core.ocr.baidu_ocr - INFO - 成功获取访问令牌 diff --git a/logs/app.core.ocr.table_ocr.active b/logs/app.core.ocr.table_ocr.active deleted file mode 100644 index 6e265cb..0000000 --- a/logs/app.core.ocr.table_ocr.active +++ /dev/null @@ -1 +0,0 @@ -Active since: 2025-05-02 19:53:27 \ 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 9c914f8..fec7ae5 100644 --- a/logs/app.core.ocr.table_ocr.log +++ b/logs/app.core.ocr.table_ocr.log @@ -155,3 +155,159 @@ 2025-05-02 19:53:29,681 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502191502.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx 2025-05-02 19:53:29,683 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 2025-05-02 19:53:29,683 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-02 20:52:59,672 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 20:52:59,672 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 20:52:59,672 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 20:52:59,672 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 20:52:59,675 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 20:52:59,675 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 20:52:59,676 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502205251.jpg +2025-05-02 20:53:02,561 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502205251.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx +2025-05-02 20:53:02,563 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 +2025-05-02 20:53:02,564 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-02 21:02:57,314 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:02:57,314 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:02:57,314 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:02:57,315 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:02:57,318 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 +2025-05-02 21:02:57,318 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 21:04:06,632 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:04:06,632 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:04:06,632 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:04:06,633 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:07:29,003 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:07:29,003 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:07:29,003 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:07:29,004 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:10:08,463 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:10:08,464 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:10:08,464 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:10:08,465 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:11:03,182 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:11:03,183 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:11:03,183 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:11:03,183 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:15:10,772 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:15:10,773 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:15:10,773 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:15:10,774 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:16:38,294 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:16:38,295 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:16:38,295 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:16:38,295 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:21:20,676 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:21:20,677 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:21:20,677 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:21:20,678 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:21:20,681 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 21:21:20,681 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 21:21:20,682 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502212111.jpg +2025-05-02 21:21:27,220 - app.core.ocr.table_ocr - ERROR - OCR识别失败: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502212111.jpg +2025-05-02 21:21:27,222 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 0/1 +2025-05-02 21:21:27,223 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 0 +2025-05-02 21:22:23,294 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:22:23,295 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:22:23,295 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:22:23,296 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:22:23,300 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 21:22:23,300 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 21:22:23,301 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502212111.jpg +2025-05-02 21:22:26,463 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502212111.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502212111.xlsx +2025-05-02 21:22:26,467 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 +2025-05-02 21:22:26,467 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-02 21:45:07,596 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:45:07,597 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:45:07,597 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:45:07,597 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:45:07,600 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 21:45:07,601 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 21:45:07,602 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg +2025-05-02 21:45:10,623 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 21:45:10,628 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 +2025-05-02 21:45:10,629 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-02 21:54:51,324 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:54:51,325 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:54:51,325 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:54:51,326 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:54:51,330 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 +2025-05-02 21:54:51,330 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 21:55:07,661 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:55:07,661 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:55:07,662 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:55:07,662 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:55:07,666 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 +2025-05-02 21:55:07,667 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 21:56:33,283 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:56:33,283 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:56:33,283 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:56:33,284 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:56:33,287 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 +2025-05-02 21:56:33,287 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 21:58:02,452 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 21:58:02,453 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:58:02,453 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 21:58:02,453 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 21:58:02,456 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 +2025-05-02 21:58:02,456 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 22:07:10,379 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 22:07:10,379 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:07:10,379 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 22:07:10,380 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:07:10,383 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 +2025-05-02 22:07:10,383 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 22:10:02,821 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 22:10:02,821 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:10:02,821 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 22:10:02,822 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:10:02,825 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 22:10:02,825 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 22:10:02,827 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg +2025-05-02 22:10:09,462 - app.core.ocr.table_ocr - ERROR - OCR识别失败: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg +2025-05-02 22:10:09,463 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 0/1 +2025-05-02 22:10:09,463 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 0 +2025-05-02 22:11:55,058 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 22:11:55,059 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:11:55,059 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 22:11:55,059 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:11:55,062 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 22:11:55,063 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 22:11:55,065 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg +2025-05-02 22:11:57,699 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:11:57,702 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 +2025-05-02 22:11:57,703 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-02 22:26:11,618 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 22:26:11,618 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:26:11,619 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 22:26:11,619 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:26:11,622 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 0 个未处理 +2025-05-02 22:26:11,622 - app.core.ocr.table_ocr - WARNING - 没有需要处理的图片 +2025-05-02 22:26:42,567 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 22:26:42,568 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:26:42,568 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 22:26:42,568 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:26:42,572 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 22:26:42,572 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 22:26:42,573 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg +2025-05-02 22:26:49,226 - app.core.ocr.table_ocr - ERROR - OCR识别失败: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg +2025-05-02 22:26:49,227 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 0/1 +2025-05-02 22:26:49,227 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 0 +2025-05-02 22:29:10,827 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 22:29:10,828 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:29:10,828 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 22:29:10,829 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:29:10,832 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 22:29:10,832 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 22:29:10,833 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg +2025-05-02 22:29:14,309 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:29:14,319 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 +2025-05-02 22:29:14,320 - app.core.ocr.table_ocr - INFO - 所有图片处理完成, 总计: 1, 成功: 1 +2025-05-02 22:40:41,143 - app.core.ocr.table_ocr - INFO - 使用输入目录: D:\My Documents\python\orc-order-v2\data\input +2025-05-02 22:40:41,143 - app.core.ocr.table_ocr - INFO - 使用输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:40:41,143 - app.core.ocr.table_ocr - INFO - 使用临时目录: D:\My Documents\python\orc-order-v2\data\temp +2025-05-02 22:40:41,144 - app.core.ocr.table_ocr - INFO - OCR处理器初始化完成,输入目录: D:\My Documents\python\orc-order-v2\data\input, 输出目录: D:\My Documents\python\orc-order-v2\data\output +2025-05-02 22:40:41,148 - app.core.ocr.table_ocr - INFO - 找到 1 个图片文件,其中 1 个未处理 +2025-05-02 22:40:41,148 - app.core.ocr.table_ocr - INFO - 处理批次 1/1, 大小: 1 +2025-05-02 22:40:41,149 - app.core.ocr.table_ocr - INFO - 开始处理图片: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg +2025-05-02 22:40:43,841 - app.core.ocr.table_ocr - INFO - 图片处理成功: D:\My Documents\python\orc-order-v2\data\input\微信图片_20250502214456.jpg, 输出文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:40:43,845 - app.core.ocr.table_ocr - INFO - 批次处理完成, 成功: 1/1 +2025-05-02 22:40:43,845 - 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 deleted file mode 100644 index 6e265cb..0000000 --- a/logs/app.core.utils.file_utils.active +++ /dev/null @@ -1 +0,0 @@ -Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.core.utils.file_utils.log b/logs/app.core.utils.file_utils.log index 09024ed..cd6dd53 100644 --- a/logs/app.core.utils.file_utils.log +++ b/logs/app.core.utils.file_utils.log @@ -4,3 +4,9 @@ 2025-05-02 19:33:54,966 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 2025-05-02 19:35:48,767 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 2025-05-02 19:36:15,988 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 +2025-05-02 21:54:51,332 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 +2025-05-02 21:55:07,667 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 +2025-05-02 21:56:33,288 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 +2025-05-02 21:58:02,456 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 +2025-05-02 22:07:10,383 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 +2025-05-02 22:26:11,623 - app.core.utils.file_utils - WARNING - 未在目录 D:\My Documents\python\orc-order-v2\data\output 中找到符合条件的文件 diff --git a/logs/app.services.ocr_service.active b/logs/app.services.ocr_service.active deleted file mode 100644 index 6e265cb..0000000 --- a/logs/app.services.ocr_service.active +++ /dev/null @@ -1 +0,0 @@ -Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.services.ocr_service.log b/logs/app.services.ocr_service.log index 593c691..2753bb7 100644 --- a/logs/app.services.ocr_service.log +++ b/logs/app.services.ocr_service.log @@ -71,3 +71,63 @@ 2025-05-02 19:53:27,938 - app.services.ocr_service - INFO - 初始化OCRService 2025-05-02 19:53:27,940 - app.services.ocr_service - INFO - OCRService初始化完成 2025-05-02 19:53:27,942 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 20:52:59,670 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 20:52:59,673 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 20:52:59,675 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 21:02:57,313 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:02:57,315 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:02:57,318 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 21:04:06,630 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:04:06,633 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:07:29,002 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:07:29,004 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:10:08,462 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:10:08,465 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:11:03,181 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:11:03,183 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:15:10,771 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:15:10,774 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:16:38,293 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:16:38,295 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:21:20,675 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:21:20,678 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:21:20,681 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 21:22:23,293 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:22:23,296 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:22:23,299 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 21:45:07,595 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:45:07,597 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:45:07,600 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 21:54:51,323 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:54:51,326 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:54:51,329 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 21:55:07,659 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:55:07,662 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:55:07,666 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 21:56:33,280 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:56:33,284 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:56:33,287 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 21:58:02,451 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 21:58:02,453 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 21:58:02,456 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 22:07:10,377 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 22:07:10,380 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 22:07:10,382 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 22:10:02,819 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 22:10:02,822 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 22:10:02,825 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 22:11:55,057 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 22:11:55,059 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 22:11:55,062 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 22:26:11,617 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 22:26:11,620 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 22:26:11,622 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 22:26:42,566 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 22:26:42,568 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 22:26:42,571 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 22:29:10,825 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 22:29:10,829 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 22:29:10,832 - app.services.ocr_service - INFO - OCRService开始批量处理图片, batch_size=None, max_workers=None +2025-05-02 22:40:41,142 - app.services.ocr_service - INFO - 初始化OCRService +2025-05-02 22:40:41,144 - app.services.ocr_service - INFO - OCRService初始化完成 +2025-05-02 22:40:41,147 - 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 deleted file mode 100644 index 6e265cb..0000000 --- a/logs/app.services.order_service.active +++ /dev/null @@ -1 +0,0 @@ -Active since: 2025-05-02 19:53:27 \ No newline at end of file diff --git a/logs/app.services.order_service.log b/logs/app.services.order_service.log index 1e2008d..785474b 100644 --- a/logs/app.services.order_service.log +++ b/logs/app.services.order_service.log @@ -78,3 +78,65 @@ 2025-05-02 19:53:27,942 - app.services.order_service - INFO - OrderService初始化完成 2025-05-02 19:53:29,684 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502191502.xlsx 2025-05-02 19:53:47,771 - app.services.order_service - INFO - OrderService开始合并所有采购单 +2025-05-02 20:52:59,673 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 20:52:59,674 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 20:53:02,565 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx +2025-05-02 20:53:07,431 - app.services.order_service - INFO - OrderService开始合并所有采购单 +2025-05-02 21:02:57,316 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:02:57,317 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:02:57,320 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502205251.xlsx +2025-05-02 21:04:06,633 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:04:06,635 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:04:06,636 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:07:29,004 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:07:29,007 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:07:29,007 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:10:08,467 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:10:08,471 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:10:08,472 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: data/output/微信图片_20250502205251.xlsx +2025-05-02 21:11:03,183 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:11:03,186 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:11:03,186 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:15:10,775 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:15:10,778 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:15:10,779 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: data/output/微信图片_20250502205251.xlsx +2025-05-02 21:16:38,295 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:16:38,297 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:16:38,297 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:/My Documents/python/orc-order-v2/data/output/微信图片_20250502205251.xlsx +2025-05-02 21:21:20,678 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:21:20,680 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:22:23,296 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:22:23,299 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:22:26,470 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502212111.xlsx +2025-05-02 21:22:31,715 - app.services.order_service - INFO - OrderService开始合并所有采购单 +2025-05-02 21:45:07,597 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:45:07,599 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:45:10,631 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 21:45:21,948 - app.services.order_service - INFO - OrderService开始合并所有采购单 +2025-05-02 21:54:51,326 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:54:51,329 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:55:07,662 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:55:07,665 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:56:33,284 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:56:33,286 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 21:58:02,453 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 21:58:02,455 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 22:07:10,380 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 22:07:10,382 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 22:10:02,822 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 22:10:02,824 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 22:11:55,059 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 22:11:55,061 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 22:11:57,705 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:12:08,755 - app.services.order_service - INFO - OrderService开始合并所有采购单 +2025-05-02 22:26:11,620 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 22:26:11,621 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 22:26:42,568 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 22:26:42,571 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 22:29:10,829 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 22:29:10,831 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 22:29:14,322 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx +2025-05-02 22:29:26,876 - app.services.order_service - INFO - OrderService开始合并所有采购单 +2025-05-02 22:40:41,144 - app.services.order_service - INFO - 初始化OrderService +2025-05-02 22:40:41,147 - app.services.order_service - INFO - OrderService初始化完成 +2025-05-02 22:40:43,849 - app.services.order_service - INFO - OrderService开始处理指定Excel文件: D:\My Documents\python\orc-order-v2\data\output\微信图片_20250502214456.xlsx diff --git a/run.py b/run.py index d32ef91..f7cea95 100644 --- a/run.py +++ b/run.py @@ -251,8 +251,18 @@ def run_pipeline(ocr_service: OCRService, order_service: OrderService, args) -> # 获取所有采购单文件 file_paths = order_service.get_purchase_orders() if not file_paths: - logger.warning("未找到采购单文件") - return False + logger.warning("未找到采购单文件,跳过合并步骤") + logger.info("=== 完整流程处理成功(未执行合并步骤)===") + # 非错误状态,继续执行 + return True + + # 有文件需要合并 + logger.info(f"发现 {len(file_paths)} 个采购单文件") + + if len(file_paths) == 1: + logger.warning(f"只有1个采购单文件 {file_paths[0]},无需合并") + logger.info("=== 完整流程处理成功(只有一个文件,跳过合并)===") + return True logger.info(f"合并所有采购单文件: {len(file_paths)} 个") merge_result = order_service.merge_orders() diff --git a/启动器.py b/启动器.py index 50d0b22..b17eab3 100644 --- a/启动器.py +++ b/启动器.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """ -OCR订单处理系统启动器 +益选-OCR订单处理系统启动器 ----------------- 提供简单的图形界面,方便用户选择功能 """ @@ -13,53 +13,116 @@ import time import subprocess import shutil import tkinter as tk -from tkinter import messagebox, filedialog, scrolledtext +from tkinter import messagebox, filedialog, scrolledtext, ttk +from tkinter import font as tkfont from threading import Thread import datetime +import json +import re +from typing import Dict, List, Optional, Any -def ensure_directories(): - """确保必要的目录结构存在""" - directories = ["data/input", "data/output", "data/temp", "logs"] - for directory in directories: - if not os.path.exists(directory): - os.makedirs(directory, exist_ok=True) - print(f"创建目录: {directory}") +# 全局变量,用于跟踪任务状态 +RUNNING_TASK = None +THEME_MODE = "light" # 默认浅色主题 -class LogRedirector: - """日志重定向器,用于捕获命令输出并显示到界面""" - def __init__(self, text_widget): - self.text_widget = text_widget - self.buffer = "" - self.terminal = sys.__stdout__ # 保存原始的stdout引用 - - def write(self, string): - self.buffer += string - # 同时输出到终端 - self.terminal.write(string) - # 在UI线程中更新文本控件 - self.text_widget.after(0, self.update_text_widget) - - def update_text_widget(self): - self.text_widget.configure(state=tk.NORMAL) - self.text_widget.insert(tk.END, self.buffer) - # 自动滚动到底部 - self.text_widget.see(tk.END) - self.text_widget.configure(state=tk.DISABLED) - self.buffer = "" - - def flush(self): - self.terminal.flush() # 确保终端也被刷新 +# 定义浅色和深色主题颜色 +THEMES = { + "light": { + "bg": "#f0f0f0", + "fg": "#000000", + "button_bg": "#e0e0e0", + "button_fg": "#000000", + "log_bg": "#ffffff", + "log_fg": "#000000", + "highlight_bg": "#4a6984", + "highlight_fg": "#ffffff", + "border": "#cccccc", + "success": "#28a745", + "error": "#dc3545", + "warning": "#ffc107", + "info": "#17a2b8" + }, + "dark": { + "bg": "#2d2d2d", + "fg": "#ffffff", + "button_bg": "#444444", + "button_fg": "#ffffff", + "log_bg": "#1e1e1e", + "log_fg": "#e0e0e0", + "highlight_bg": "#4a6984", + "highlight_fg": "#ffffff", + "border": "#555555", + "success": "#28a745", + "error": "#dc3545", + "warning": "#ffc107", + "info": "#17a2b8" + } +} -def run_command_with_logging(command, log_widget): +class StatusBar(tk.Frame): + """状态栏,显示当前系统状态和进度""" + + def __init__(self, master, **kwargs): + super().__init__(master, **kwargs) + self.configure(height=25, relief=tk.SUNKEN, borderwidth=1) + + # 状态标签 + self.status_label = tk.Label(self, text="就绪", anchor=tk.W, padx=5) + self.status_label.pack(side=tk.LEFT, fill=tk.X, expand=True) + + # 进度条 + self.progress = ttk.Progressbar(self, orient=tk.HORIZONTAL, length=200, mode='determinate') + self.progress.pack(side=tk.RIGHT, padx=5, pady=2) + + # 隐藏进度条(初始状态) + self.progress.pack_forget() + + def set_status(self, text, progress=None): + """设置状态栏文本和进度""" + self.status_label.config(text=text) + + if progress is not None and 0 <= progress <= 100: + self.progress.pack(side=tk.RIGHT, padx=5, pady=2) + self.progress.config(value=progress) + else: + self.progress.pack_forget() + + def set_running(self, is_running=True): + """设置运行状态""" + if is_running: + self.status_label.config(text="处理中...", foreground=THEMES[THEME_MODE]["info"]) + self.progress.pack(side=tk.RIGHT, padx=5, pady=2) + self.progress.config(mode='indeterminate') + self.progress.start() + else: + self.status_label.config(text="就绪", foreground=THEMES[THEME_MODE]["fg"]) + self.progress.stop() + self.progress.pack_forget() + +def run_command_with_logging(command, log_widget, status_bar=None, on_complete=None): """运行命令并将输出重定向到日志窗口""" + global RUNNING_TASK + + # 如果已有任务在运行,提示用户 + if RUNNING_TASK is not None: + messagebox.showinfo("任务进行中", "请等待当前任务完成后再执行新的操作。") + return + def run_in_thread(): + global RUNNING_TASK + RUNNING_TASK = command + + # 更新状态栏 + if status_bar: + status_bar.set_running(True) + # 记录命令开始执行的时间 start_time = datetime.datetime.now() log_widget.configure(state=tk.NORMAL) log_widget.delete(1.0, tk.END) # 清空之前的日志 - log_widget.insert(tk.END, f"执行命令: {' '.join(command)}\n") - log_widget.insert(tk.END, f"开始时间: {start_time.strftime('%Y-%m-%d %H:%M:%S')}\n") - log_widget.insert(tk.END, "=" * 50 + "\n\n") + log_widget.insert(tk.END, f"执行命令: {' '.join(command)}\n", "command") + log_widget.insert(tk.END, f"开始时间: {start_time.strftime('%Y-%m-%d %H:%M:%S')}\n", "time") + log_widget.insert(tk.END, "=" * 50 + "\n\n", "separator") log_widget.configure(state=tk.DISABLED) # 获取原始的stdout和stderr @@ -94,10 +157,18 @@ def run_command_with_logging(command, log_widget): env=env ) + output_data = [] # 读取并显示输出 for line in process.stdout: + output_data.append(line) print(line.rstrip()) # 直接打印到已重定向的stdout + # 尝试从输出中提取进度信息 + if status_bar: + progress = extract_progress_from_log(line) + if progress is not None: + log_widget.after(0, lambda p=progress: status_bar.set_status(f"处理中: {p}%完成", p)) + # 等待进程结束 process.wait() @@ -110,352 +181,501 @@ def run_command_with_logging(command, log_widget): print(f"结束时间: {end_time.strftime('%Y-%m-%d %H:%M:%S')}") print(f"耗时: {duration.total_seconds():.2f} 秒") - # 如果处理成功,显示成功信息 - if process.returncode == 0: - log_widget.after(0, lambda: messagebox.showinfo("操作成功", "处理完成!\n请在data/output目录查看结果。")) + # 获取输出内容 + output_text = ''.join(output_data) + + # 检查是否是完整流程命令且遇到了"未找到可合并的文件"的情况 + is_pipeline = "pipeline" in command + no_merge_files = "未找到采购单文件" in output_text + single_file = "只有1个采购单文件" in output_text + + # 如果是完整流程且只是没有找到可合并文件或只有一个文件,则视为成功 + if is_pipeline and (no_merge_files or single_file): + print("完整流程中没有需要合并的文件,但其他步骤执行成功,视为成功完成") + if status_bar: + log_widget.after(0, lambda: status_bar.set_status("处理完成", 100)) + log_widget.after(0, lambda: show_result_preview(command, output_text)) else: - log_widget.after(0, lambda: messagebox.showerror("操作失败", f"处理失败,返回码:{process.returncode}")) + # 执行完成后处理结果 + if on_complete: + log_widget.after(0, lambda: on_complete(process.returncode, output_text)) + + # 如果处理成功,显示成功信息 + if process.returncode == 0: + if status_bar: + log_widget.after(0, lambda: status_bar.set_status("处理完成", 100)) + log_widget.after(0, lambda: show_result_preview(command, output_text)) + else: + if status_bar: + log_widget.after(0, lambda: status_bar.set_status(f"处理失败 (返回码: {process.returncode})", 0)) + log_widget.after(0, lambda: messagebox.showerror("操作失败", f"处理失败,返回码:{process.returncode}")) except Exception as e: print(f"\n执行出错: {str(e)}") + if status_bar: + log_widget.after(0, lambda: status_bar.set_status(f"执行出错: {str(e)}", 0)) log_widget.after(0, lambda: messagebox.showerror("执行错误", f"执行命令时出错: {str(e)}")) finally: # 恢复原始stdout和stderr sys.stdout = old_stdout sys.stderr = old_stderr + + # 任务完成,重置状态 + RUNNING_TASK = None + if status_bar: + log_widget.after(0, lambda: status_bar.set_running(False)) # 在新线程中运行,避免UI阻塞 Thread(target=run_in_thread).start() -def add_to_log(log_widget, text): - """向日志窗口添加文本""" - log_widget.configure(state=tk.NORMAL) - log_widget.insert(tk.END, text) - log_widget.see(tk.END) # 自动滚动到底部 - log_widget.configure(state=tk.DISABLED) +def extract_progress_from_log(log_line): + """从日志行中提取进度信息""" + # 尝试匹配"处理批次 x/y"格式的进度信息 + batch_match = re.search(r'处理批次 (\d+)/(\d+)', log_line) + if batch_match: + current = int(batch_match.group(1)) + total = int(batch_match.group(2)) + return int(current / total * 100) + + # 尝试匹配百分比格式 + percent_match = re.search(r'(\d+)%', log_line) + if percent_match: + return int(percent_match.group(1)) + + return None -def select_file(log_widget): - """选择图片文件并复制到data/input目录""" - # 确保目录存在 - ensure_directories() +def show_result_preview(command, output): + """显示处理结果预览""" + # 根据命令类型提取不同的结果信息 + if "ocr" in command: + show_ocr_result_preview(output) + elif "excel" in command: + show_excel_result_preview(output) + elif "merge" in command: + show_merge_result_preview(output) + elif "pipeline" in command: + show_pipeline_result_preview(output) + else: + messagebox.showinfo("处理完成", "操作已成功完成!\n请在data/output目录查看结果。") + +def show_ocr_result_preview(output): + """显示OCR处理结果预览""" + # 提取处理的文件数量 + files_match = re.search(r'找到 (\d+) 个图片文件,其中 (\d+) 个未处理', output) + processed_match = re.search(r'所有图片处理完成, 总计: (\d+), 成功: (\d+)', output) - # 获取输入目录的绝对路径 - input_dir = os.path.abspath("data/input") - - file_path = filedialog.askopenfilename( - title="选择要处理的图片文件", - initialdir=input_dir, # 默认打开data/input目录 - filetypes=[("图片文件", "*.jpg *.jpeg *.png *.bmp")] - ) - - if not file_path: - return None + if processed_match: + total = int(processed_match.group(1)) + success = int(processed_match.group(2)) - # 记录选择文件的信息 - add_to_log(log_widget, f"已选择文件: {file_path}\n") - - # 计算目标路径,始终放在data/input中 - output_path = os.path.join("data/input", os.path.basename(file_path)) - abs_output_path = os.path.abspath(output_path) - - # 检查是否是同一个文件 - if os.path.normpath(os.path.abspath(file_path)) != os.path.normpath(abs_output_path): - # 如果是不同的文件,则复制 - try: - shutil.copy2(file_path, output_path) - add_to_log(log_widget, f"已复制文件到处理目录: {output_path}\n") - except Exception as e: - add_to_log(log_widget, f"复制文件失败: {e}\n") - messagebox.showerror("错误", f"复制文件失败: {e}") - return None - - # 返回绝对路径,确保命令行处理正确 - return abs_output_path - -def select_excel_file(log_widget): - """选择Excel文件并复制到data/output目录""" - # 确保目录存在 - ensure_directories() - - # 获取输出目录的绝对路径 - output_dir = os.path.abspath("data/output") - - file_path = filedialog.askopenfilename( - title="选择要处理的Excel文件", - initialdir=output_dir, # 默认打开data/output目录 - filetypes=[("Excel文件", "*.xlsx *.xls")] - ) - - if not file_path: - return None + # 创建结果预览对话框 + preview = tk.Toplevel() + preview.title("OCR处理结果") + preview.geometry("400x300") + preview.resizable(False, False) - # 记录选择文件的信息 - add_to_log(log_widget, f"已选择文件: {file_path}\n") - - # 计算目标路径,始终放在data/output中 - output_path = os.path.join("data/output", os.path.basename(file_path)) - abs_output_path = os.path.abspath(output_path) - - # 检查是否是同一个文件 - if os.path.normpath(os.path.abspath(file_path)) != os.path.normpath(abs_output_path): - # 如果是不同的文件,则复制 - try: - shutil.copy2(file_path, output_path) - add_to_log(log_widget, f"已复制文件到处理目录: {output_path}\n") - except Exception as e: - add_to_log(log_widget, f"复制文件失败: {e}\n") - messagebox.showerror("错误", f"复制文件失败: {e}") - return None - - # 返回绝对路径,确保命令行处理正确 - return abs_output_path - -def process_single_image(log_widget): - """处理单个图片""" - file_path = select_file(log_widget) - if file_path: - # 确保文件存在 - if os.path.exists(file_path): - add_to_log(log_widget, f"正在处理图片: {os.path.basename(file_path)}\n") - # 使用绝对路径,并指定直接输出到data/output - run_command_with_logging(["python", "run.py", "ocr", "--input", file_path], log_widget) + # 居中显示 + center_window(preview) + + # 添加内容 + tk.Label(preview, text="OCR处理完成", font=("Arial", 16, "bold")).pack(pady=10) + + result_frame = tk.Frame(preview) + result_frame.pack(pady=10, fill=tk.BOTH, expand=True) + + tk.Label(result_frame, text=f"总共处理: {total} 个文件", font=("Arial", 12)).pack(anchor=tk.W, padx=20, pady=5) + tk.Label(result_frame, text=f"成功处理: {success} 个文件", font=("Arial", 12)).pack(anchor=tk.W, padx=20, pady=5) + tk.Label(result_frame, text=f"失败数量: {total - success} 个文件", font=("Arial", 12)).pack(anchor=tk.W, padx=20, pady=5) + + # 处理结果评估 + if success == total: + result_text = "全部处理成功!" + result_color = "#28a745" + elif success > total * 0.8: + result_text = "大部分处理成功。" + result_color = "#ffc107" else: - add_to_log(log_widget, f"文件不存在: {file_path}\n") - messagebox.showerror("错误", f"文件不存在: {file_path}") + result_text = "处理失败较多,请检查日志。" + result_color = "#dc3545" + + tk.Label(result_frame, text=result_text, font=("Arial", 12, "bold"), fg=result_color).pack(pady=10) + + # 添加按钮 + button_frame = tk.Frame(preview) + button_frame.pack(pady=10) + + tk.Button(button_frame, text="查看输出文件", command=lambda: os.startfile(os.path.abspath("data/output"))).pack(side=tk.LEFT, padx=10) + tk.Button(button_frame, text="关闭", command=preview.destroy).pack(side=tk.LEFT, padx=10) else: - add_to_log(log_widget, "未选择文件,操作已取消\n") + messagebox.showinfo("OCR处理完成", "OCR处理已完成,请在data/output目录查看结果。") -def process_excel_file(log_widget): - """处理Excel文件""" - file_path = select_excel_file(log_widget) - if file_path: - # 确保文件存在 - if os.path.exists(file_path): - add_to_log(log_widget, f"正在处理Excel文件: {os.path.basename(file_path)}\n") - # 使用绝对路径 - run_command_with_logging(["python", "run.py", "excel", "--input", file_path], log_widget) +def show_excel_result_preview(output): + """显示Excel处理结果预览""" + # 提取处理的Excel信息 + extract_match = re.search(r'提取到 (\d+) 个商品信息', output) + file_match = re.search(r'采购单已保存到: (.+?)(?:\n|$)', output) + + if extract_match and file_match: + products_count = int(extract_match.group(1)) + output_file = file_match.group(1) + + # 创建结果预览对话框 + preview = tk.Toplevel() + preview.title("Excel处理结果") + preview.geometry("450x320") + preview.resizable(False, False) + + # 使弹窗居中显示 + center_window(preview) + + # 添加内容 + tk.Label(preview, text="Excel处理完成", font=("Arial", 16, "bold")).pack(pady=10) + + result_frame = tk.Frame(preview) + result_frame.pack(pady=10, fill=tk.BOTH, expand=True) + + tk.Label(result_frame, text=f"提取商品数量: {products_count} 个", font=("Arial", 12)).pack(anchor=tk.W, padx=20, pady=5) + tk.Label(result_frame, text=f"输出文件: {os.path.basename(output_file)}", font=("Arial", 12)).pack(anchor=tk.W, padx=20, pady=5) + + # 处理成功提示 + tk.Label(result_frame, text="采购单已成功生成!", font=("Arial", 12, "bold"), fg="#28a745").pack(pady=10) + + # 文件信息框 + file_frame = tk.Frame(result_frame, relief=tk.GROOVE, borderwidth=1) + file_frame.pack(fill=tk.X, padx=15, pady=5) + + tk.Label(file_frame, text="文件信息", font=("Arial", 10, "bold")).pack(anchor=tk.W, padx=10, pady=5) + + # 获取文件大小和时间 + try: + file_size = os.path.getsize(output_file) + file_time = datetime.datetime.fromtimestamp(os.path.getmtime(output_file)) + + size_text = f"{file_size / 1024:.1f} KB" if file_size < 1024*1024 else f"{file_size / (1024*1024):.1f} MB" + + tk.Label(file_frame, text=f"文件大小: {size_text}", font=("Arial", 10)).pack(anchor=tk.W, padx=10, pady=2) + tk.Label(file_frame, text=f"创建时间: {file_time.strftime('%Y-%m-%d %H:%M:%S')}", font=("Arial", 10)).pack(anchor=tk.W, padx=10, pady=2) + except: + tk.Label(file_frame, text="无法获取文件信息", font=("Arial", 10)).pack(anchor=tk.W, padx=10, pady=2) + + # 添加按钮 + button_frame = tk.Frame(preview) + button_frame.pack(pady=10) + + tk.Button(button_frame, text="打开文件", command=lambda: os.startfile(output_file)).pack(side=tk.LEFT, padx=5) + tk.Button(button_frame, text="打开所在文件夹", command=lambda: os.startfile(os.path.dirname(output_file))).pack(side=tk.LEFT, padx=5) + tk.Button(button_frame, text="关闭", command=preview.destroy).pack(side=tk.LEFT, padx=5) + else: + messagebox.showinfo("Excel处理完成", "Excel处理已完成,请在data/output目录查看结果。") + +def show_merge_result_preview(output): + """显示合并结果预览""" + # 提取合并信息 + merged_match = re.search(r'合并了 (\d+) 个采购单', output) + product_match = re.search(r'共处理 (\d+) 个商品', output) + output_match = re.search(r'已保存到: (.+?)(?:\n|$)', output) + + if merged_match and output_match: + merged_count = int(merged_match.group(1)) + product_count = int(product_match.group(1)) if product_match else 0 + output_file = output_match.group(1) + + # 创建结果预览对话框 + preview = tk.Toplevel() + preview.title("采购单合并结果") + preview.geometry("450x300") + preview.resizable(False, False) + + # 设置主题 + apply_theme(preview) + + # 添加内容 + tk.Label(preview, text="采购单合并完成", font=("Arial", 16, "bold")).pack(pady=10) + + result_frame = tk.Frame(preview) + result_frame.pack(pady=10, fill=tk.BOTH, expand=True) + + tk.Label(result_frame, text=f"合并采购单数量: {merged_count} 个", font=("Arial", 12)).pack(anchor=tk.W, padx=20, pady=5) + tk.Label(result_frame, text=f"处理商品数量: {product_count} 个", font=("Arial", 12)).pack(anchor=tk.W, padx=20, pady=5) + tk.Label(result_frame, text=f"输出文件: {os.path.basename(output_file)}", font=("Arial", 12)).pack(anchor=tk.W, padx=20, pady=5) + + # 处理成功提示 + tk.Label(result_frame, text="采购单已成功合并!", font=("Arial", 12, "bold"), fg=THEMES[THEME_MODE]["success"]).pack(pady=10) + + # 添加按钮 + button_frame = tk.Frame(preview) + button_frame.pack(pady=10) + + tk.Button(button_frame, text="打开文件", command=lambda: os.startfile(output_file)).pack(side=tk.LEFT, padx=10) + tk.Button(button_frame, text="打开所在文件夹", command=lambda: os.startfile(os.path.dirname(output_file))).pack(side=tk.LEFT, padx=10) + tk.Button(button_frame, text="关闭", command=preview.destroy).pack(side=tk.LEFT, padx=10) + else: + messagebox.showinfo("采购单合并完成", "采购单合并已完成,请在data/output目录查看结果。") + +def show_pipeline_result_preview(output): + """显示完整流程结果预览""" + # 提取关键信息 + ocr_match = re.search(r'所有图片处理完成, 总计: (\d+), 成功: (\d+)', output) + excel_match = re.search(r'提取到 (\d+) 个商品信息', output) + output_file_match = re.search(r'采购单已保存到: (.+?)(?:\n|$)', output) + + # 创建结果预览对话框 + preview = tk.Toplevel() + preview.title("完整流程处理结果") + preview.geometry("500x400") + preview.resizable(False, False) + + # 居中显示 + center_window(preview) + + # 添加内容 + tk.Label(preview, text="完整处理流程已完成", font=("Arial", 16, "bold")).pack(pady=10) + + # 添加处理结果提示(即使没有可合并文件也显示成功) + no_files_match = re.search(r'未找到可合并的文件', output) + if no_files_match: + tk.Label(preview, text="未找到可合并文件,但其他步骤已成功执行", font=("Arial", 12)).pack(pady=0) + + result_frame = tk.Frame(preview) + result_frame.pack(pady=10, fill=tk.BOTH, expand=True) + + # 创建多行结果区域 + result_text = scrolledtext.ScrolledText(result_frame, wrap=tk.WORD, height=15, width=60) + result_text.pack(fill=tk.BOTH, expand=True, padx=15, pady=5) + result_text.configure(state=tk.NORMAL) + + # 填充结果文本 + result_text.insert(tk.END, "===== 流程执行结果 =====\n\n", "title") + + # OCR处理结果 + result_text.insert(tk.END, "步骤1: OCR识别\n", "step") + if ocr_match: + total = int(ocr_match.group(1)) + success = int(ocr_match.group(2)) + result_text.insert(tk.END, f" 处理图片: {total} 个\n", "info") + result_text.insert(tk.END, f" 成功识别: {success} 个\n", "info") + if success == total: + result_text.insert(tk.END, " 结果: 全部识别成功\n", "success") else: - add_to_log(log_widget, f"文件不存在: {file_path}\n") - messagebox.showerror("错误", f"文件不存在: {file_path}") + result_text.insert(tk.END, f" 结果: 部分识别成功 ({success}/{total})\n", "warning") else: - # 如果未选择文件,尝试处理最新的Excel - add_to_log(log_widget, "未选择文件,尝试处理最新的Excel文件\n") - run_command_with_logging(["python", "run.py", "excel"], log_widget) - -def organize_project_files(log_widget): - """整理项目中的文件到正确位置""" - # 确保目录存在 - ensure_directories() + result_text.insert(tk.END, " 结果: 无OCR处理或处理信息不完整\n", "warning") - add_to_log(log_widget, "开始整理项目文件...\n") - - # 转移根目录文件 - files_moved = 0 - - # 处理日志文件 - log_files = [f for f in os.listdir('.') if f.endswith('.log')] - for log_file in log_files: - try: - src_path = os.path.join('.', log_file) - dst_path = os.path.join('logs', log_file) - if not os.path.exists(dst_path) or os.path.getmtime(src_path) > os.path.getmtime(dst_path): - shutil.copy2(src_path, dst_path) - add_to_log(log_widget, f"已移动日志文件: {src_path} -> {dst_path}\n") - files_moved += 1 - except Exception as e: - add_to_log(log_widget, f"移动日志文件出错: {e}\n") - - # 处理JSON文件 - json_files = [f for f in os.listdir('.') if f.endswith('.json')] - for json_file in json_files: - try: - src_path = os.path.join('.', json_file) - dst_path = os.path.join('data', json_file) - if not os.path.exists(dst_path) or os.path.getmtime(src_path) > os.path.getmtime(dst_path): - shutil.copy2(src_path, dst_path) - add_to_log(log_widget, f"已移动记录文件: {src_path} -> {dst_path}\n") - files_moved += 1 - except Exception as e: - add_to_log(log_widget, f"移动记录文件出错: {e}\n") - - # 处理input和output目录 - for old_dir, new_dir in {"input": "data/input", "output": "data/output"}.items(): - if os.path.exists(old_dir) and os.path.isdir(old_dir): - for file in os.listdir(old_dir): - src_path = os.path.join(old_dir, file) - dst_path = os.path.join(new_dir, file) - try: - if os.path.isfile(src_path): - if not os.path.exists(dst_path) or os.path.getmtime(src_path) > os.path.getmtime(dst_path): - shutil.copy2(src_path, dst_path) - add_to_log(log_widget, f"已转移文件: {src_path} -> {dst_path}\n") - files_moved += 1 - except Exception as e: - add_to_log(log_widget, f"移动文件出错: {e}\n") - - # 显示结果 - if files_moved > 0: - add_to_log(log_widget, f"整理完成,共整理 {files_moved} 个文件\n") - messagebox.showinfo("整理完成", f"已整理 {files_moved} 个文件到正确位置。\n" - "原始文件保留在原位置,以确保数据安全。") + # Excel处理结果 + result_text.insert(tk.END, "\n步骤2: Excel处理\n", "step") + if excel_match: + products = int(excel_match.group(1)) + result_text.insert(tk.END, f" 提取商品: {products} 个\n", "info") + result_text.insert(tk.END, " 结果: 成功生成采购单\n", "success") + if output_file_match: + output_file = output_file_match.group(1) + result_text.insert(tk.END, f" 输出文件: {os.path.basename(output_file)}\n", "info") else: - add_to_log(log_widget, "没有需要整理的文件\n") - messagebox.showinfo("整理完成", "没有需要整理的文件。") - -def clean_data_files(log_widget): - """清理data目录中的文件""" - # 确保目录存在 - ensure_directories() + result_text.insert(tk.END, " 结果: 无Excel处理或处理信息不完整\n", "warning") - add_to_log(log_widget, "开始清理文件...\n") + # 总体评估 + result_text.insert(tk.END, "\n===== 整体评估 =====\n", "title") - # 获取需要清理的目录 - input_dir = os.path.abspath("data/input") - output_dir = os.path.abspath("data/output") + has_errors = "错误" in output or "失败" in output - # 统计文件信息 - input_files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))] - output_files = [f for f in os.listdir(output_dir) if os.path.isfile(os.path.join(output_dir, f))] + no_files_match = re.search(r'未找到采购单文件', output) + single_file_match = re.search(r'只有1个采购单文件', output) - # 显示统计信息 - add_to_log(log_widget, f"输入目录 ({input_dir}) 共有 {len(input_files)} 个文件\n") - add_to_log(log_widget, f"输出目录 ({output_dir}) 共有 {len(output_files)} 个文件\n") + if no_files_match: + result_text.insert(tk.END, "没有找到可合并的文件,但处理流程已成功完成。\n", "warning") + result_text.insert(tk.END, "可以选择打开Excel文件或查看输出文件夹。\n", "info") + elif single_file_match: + result_text.insert(tk.END, "只有一个采购单文件,无需合并,处理流程已成功完成。\n", "warning") + result_text.insert(tk.END, "可以选择打开生成的Excel文件。\n", "info") + elif ocr_match and excel_match and not has_errors: + result_text.insert(tk.END, "流程完整执行成功!\n", "success") + elif ocr_match or excel_match: + result_text.insert(tk.END, "流程部分执行成功,请检查日志获取详情。\n", "warning") + else: + result_text.insert(tk.END, "流程执行可能存在问题,请查看详细日志。\n", "error") - # 显示确认对话框 - if not input_files and not output_files: - messagebox.showinfo("清理文件", "没有需要清理的文件") - return + # 设置标签样式 + result_text.tag_configure("title", font=("Arial", 12, "bold")) + result_text.tag_configure("step", font=("Arial", 11, "bold")) + result_text.tag_configure("info", font=("Arial", 10)) + result_text.tag_configure("success", font=("Arial", 10, "bold"), foreground="#28a745") + result_text.tag_configure("warning", font=("Arial", 10, "bold"), foreground="#ffc107") + result_text.tag_configure("error", font=("Arial", 10, "bold"), foreground="#dc3545") - confirm_message = "确定要清理以下文件吗?\n\n" - confirm_message += f"- 输入目录: {len(input_files)} 个文件\n" - confirm_message += f"- 输出目录: {len(output_files)} 个文件\n" - confirm_message += "\n此操作不可撤销!" + result_text.configure(state=tk.DISABLED) - if not messagebox.askyesno("确认清理", confirm_message): - add_to_log(log_widget, "清理操作已取消\n") - return - - # 清理输入目录的文件 - files_deleted = 0 - - # 先提示用户选择要清理的目录 - options = [] - if input_files: - options.append(("输入目录(data/input)", input_dir)) - if output_files: - options.append(("输出目录(data/output)", output_dir)) - - # 创建临时的选择对话框 - dialog = tk.Toplevel() - dialog.title("选择要清理的目录") - dialog.geometry("300x200") - dialog.transient(log_widget.winfo_toplevel()) # 设置为主窗口的子窗口 - dialog.grab_set() # 模态对话框 - - tk.Label(dialog, text="请选择要清理的目录:", font=("Arial", 12)).pack(pady=10) - - # 选择变量 - choices = {} - for name, path in options: - var = tk.BooleanVar(value=True) # 默认选中 - choices[path] = var - tk.Checkbutton(dialog, text=name, variable=var, font=("Arial", 10)).pack(anchor=tk.W, padx=20, pady=5) - - # 删除前备份选项 - backup_var = tk.BooleanVar(value=False) - tk.Checkbutton(dialog, text="删除前备份文件", variable=backup_var, font=("Arial", 10)).pack(anchor=tk.W, padx=20, pady=5) - - result = {"confirmed": False, "choices": {}, "backup": False} - - def on_confirm(): - result["confirmed"] = True - result["choices"] = {path: var.get() for path, var in choices.items()} - result["backup"] = backup_var.get() - dialog.destroy() - - def on_cancel(): - dialog.destroy() - - # 按钮 - button_frame = tk.Frame(dialog) + # 添加按钮 + button_frame = tk.Frame(preview) button_frame.pack(pady=10) - tk.Button(button_frame, text="确认", command=on_confirm, width=10).pack(side=tk.LEFT, padx=10) - tk.Button(button_frame, text="取消", command=on_cancel, width=10).pack(side=tk.LEFT, padx=10) - # 等待对话框关闭 - dialog.wait_window() + if output_file_match: + output_file = output_file_match.group(1) + tk.Button(button_frame, text="打开Excel文件", command=lambda: os.startfile(output_file)).pack(side=tk.LEFT, padx=10) + else: + # 如果没有找到合并后的文件,但Excel处理成功,提供打开最新Excel文件的选项 + if excel_match or no_files_match or single_file_match: + # 找到输出目录中最新的采购单Excel文件 + output_dir = os.path.abspath("data/output") + excel_files = [f for f in os.listdir(output_dir) if f.startswith('采购单_') and (f.endswith('.xls') or f.endswith('.xlsx'))] + if excel_files: + # 按修改时间排序,获取最新的文件 + excel_files.sort(key=lambda x: os.path.getmtime(os.path.join(output_dir, x)), reverse=True) + latest_file = os.path.join(output_dir, excel_files[0]) + tk.Button(button_frame, text="打开最新Excel文件", + command=lambda: os.startfile(latest_file)).pack(side=tk.LEFT, padx=10) - if not result["confirmed"]: - add_to_log(log_widget, "清理操作已取消\n") - return - - # 备份文件 - if result["backup"]: - backup_dir = os.path.join("data", "backup", datetime.datetime.now().strftime("%Y%m%d%H%M%S")) - os.makedirs(backup_dir, exist_ok=True) - add_to_log(log_widget, f"创建备份目录: {backup_dir}\n") - - for dir_path, selected in result["choices"].items(): - if selected: - dir_name = os.path.basename(dir_path) - backup_subdir = os.path.join(backup_dir, dir_name) - os.makedirs(backup_subdir, exist_ok=True) - - files = [f for f in os.listdir(dir_path) if os.path.isfile(os.path.join(dir_path, f))] - for file in files: - src = os.path.join(dir_path, file) - dst = os.path.join(backup_subdir, file) - try: - shutil.copy2(src, dst) - add_to_log(log_widget, f"已备份: {src} -> {dst}\n") - except Exception as e: - add_to_log(log_widget, f"备份失败: {src}, 错误: {e}\n") - - # 删除所选目录的文件 - for dir_path, selected in result["choices"].items(): - if selected: - files = [f for f in os.listdir(dir_path) if os.path.isfile(os.path.join(dir_path, f))] - for file in files: - file_path = os.path.join(dir_path, file) - try: - os.remove(file_path) - add_to_log(log_widget, f"已删除: {file_path}\n") - files_deleted += 1 - except Exception as e: - add_to_log(log_widget, f"删除失败: {file_path}, 错误: {e}\n") - - # 显示结果 - add_to_log(log_widget, f"清理完成,共删除 {files_deleted} 个文件\n") - messagebox.showinfo("清理完成", f"共删除 {files_deleted} 个文件") + tk.Button(button_frame, text="查看输出文件夹", command=lambda: os.startfile(os.path.abspath("data/output"))).pack(side=tk.LEFT, padx=10) + tk.Button(button_frame, text="关闭", command=preview.destroy).pack(side=tk.LEFT, padx=10) -def clean_cache(log_widget): - """清除缓存,重置处理记录""" - add_to_log(log_widget, "开始清除缓存...\n") +def apply_theme(widget, theme_mode=None): + """应用主题到小部件""" + global THEME_MODE - cache_files = [ - "data/processed_files.json", # OCR处理记录 - "data/output/processed_files.json" # Excel处理记录 - ] + if theme_mode is None: + theme_mode = THEME_MODE - for cache_file in cache_files: - try: - if os.path.exists(cache_file): - # 创建备份 - backup_file = f"{cache_file}.bak" - shutil.copy2(cache_file, backup_file) + theme = THEMES[theme_mode] + + try: + widget.configure(bg=theme["bg"], fg=theme["fg"]) + except: + pass + + # 递归应用到所有子部件 + for child in widget.winfo_children(): + if isinstance(child, tk.Button) and not isinstance(child, ttk.Button): + child.configure(bg=theme["button_bg"], fg=theme["button_fg"]) + elif isinstance(child, scrolledtext.ScrolledText): + child.configure(bg=theme["log_bg"], fg=theme["log_fg"]) + else: + try: + child.configure(bg=theme["bg"], fg=theme["fg"]) + except: + pass - # 清空或删除缓存文件 - with open(cache_file, 'w') as f: - f.write('{}') # 写入空的JSON对象 - - add_to_log(log_widget, f"已清除缓存文件: {cache_file},并创建备份: {backup_file}\n") + # 递归处理子部件的子部件 + apply_theme(child, theme_mode) + +def toggle_theme(root, log_widget, status_bar=None): + """切换主题模式""" + global THEME_MODE + + # 切换主题模式 + THEME_MODE = "dark" if THEME_MODE == "light" else "light" + + # 应用主题到整个界面 + apply_theme(root) + + # 配置日志样式 + log_widget.configure(bg=THEMES[THEME_MODE]["log_bg"], fg=THEMES[THEME_MODE]["log_fg"]) + + # 设置状态栏 + if status_bar: + apply_theme(status_bar) + + # 保存主题设置 + try: + with open("data/user_settings.json", "w") as f: + json.dump({"theme": THEME_MODE}, f) + except: + pass + + return THEME_MODE + +def ensure_directories(): + """确保必要的目录结构存在""" + directories = ["data/input", "data/output", "data/temp", "logs"] + for directory in directories: + if not os.path.exists(directory): + os.makedirs(directory, exist_ok=True) + print(f"创建目录: {directory}") + +class LogRedirector: + """日志重定向器,用于捕获命令输出并显示到界面""" + def __init__(self, text_widget): + self.text_widget = text_widget + self.buffer = "" + self.terminal = sys.__stdout__ # 保存原始的stdout引用 + + def write(self, string): + self.buffer += string + # 同时输出到终端 + self.terminal.write(string) + # 在UI线程中更新文本控件 + self.text_widget.after(0, self.update_text_widget) + + def update_text_widget(self): + self.text_widget.configure(state=tk.NORMAL) + + # 根据内容使用不同的标签 + if self.buffer.strip(): + # 检测不同类型的消息并应用相应样式 + if any(marker in self.buffer.lower() for marker in ["错误", "error", "失败", "异常", "exception"]): + self.text_widget.insert(tk.END, self.buffer, "error") + elif any(marker in self.buffer.lower() for marker in ["警告", "warning"]): + self.text_widget.insert(tk.END, self.buffer, "warning") + elif any(marker in self.buffer.lower() for marker in ["成功", "success", "完成", "成功处理"]): + self.text_widget.insert(tk.END, self.buffer, "success") + elif any(marker in self.buffer.lower() for marker in ["info", "信息", "开始", "处理中"]): + self.text_widget.insert(tk.END, self.buffer, "info") else: - add_to_log(log_widget, f"缓存文件不存在: {cache_file}\n") - except Exception as e: - add_to_log(log_widget, f"清除缓存文件时出错: {cache_file}, 错误: {e}\n") + self.text_widget.insert(tk.END, self.buffer, "normal") + else: + self.text_widget.insert(tk.END, self.buffer) + + # 自动滚动到底部 + self.text_widget.see(tk.END) + self.text_widget.configure(state=tk.DISABLED) + self.buffer = "" + + def flush(self): + self.terminal.flush() # 确保终端也被刷新 + +def create_collapsible_frame(parent, title, initial_state=True): + """创建可折叠的面板""" + frame = tk.Frame(parent) + frame.pack(fill=tk.X, pady=5) - add_to_log(log_widget, "缓存清除完成,系统将重新处理所有文件\n") - messagebox.showinfo("缓存清除", "缓存已清除,系统将重新处理所有文件。") + # 标题栏 + title_frame = tk.Frame(frame) + title_frame.pack(fill=tk.X) + + # 折叠指示器 + state_var = tk.BooleanVar(value=initial_state) + indicator = "▼" if initial_state else "►" + state_label = tk.Label(title_frame, text=indicator, font=("Arial", 10, "bold")) + state_label.pack(side=tk.LEFT, padx=5) + + # 标题 + title_label = tk.Label(title_frame, text=title, font=("Arial", 11, "bold")) + title_label.pack(side=tk.LEFT, padx=5) + + # 内容区域 + content_frame = tk.Frame(frame) + if initial_state: + content_frame.pack(fill=tk.X, padx=20, pady=5) + + # 点击事件处理函数 + def toggle_collapse(event=None): + current_state = state_var.get() + new_state = not current_state + state_var.set(new_state) + + # 更新指示器 + state_label.config(text="▼" if new_state else "►") + + # 显示或隐藏内容 + if new_state: + content_frame.pack(fill=tk.X, padx=20, pady=5) + else: + content_frame.pack_forget() + + # 绑定点击事件 + title_frame.bind("", toggle_collapse) + state_label.bind("", toggle_collapse) + title_label.bind("", toggle_collapse) + + return content_frame, state_var def main(): """主函数""" @@ -465,7 +685,7 @@ def main(): # 创建窗口 root = tk.Tk() root.title("益选-OCR订单处理系统 v1.0") - root.geometry("1200x800") # 增加窗口宽度以容纳日志 + root.geometry("1200x650") # 增加窗口高度以容纳更多元素 # 创建主区域分割 main_pane = tk.PanedWindow(root, orient=tk.HORIZONTAL) @@ -476,130 +696,355 @@ def main(): main_pane.add(left_frame) # 标题 - tk.Label(left_frame, text="益选-OCR订单处理系统", font=("Arial", 16)).pack(pady=10) + title_frame = tk.Frame(left_frame) + title_frame.pack(fill=tk.X, pady=10) - # 功能按钮区域 - buttons_frame = tk.Frame(left_frame) - buttons_frame.pack(pady=10, fill=tk.Y) + # 主标题 + tk.Label(title_frame, text="益选-OCR订单处理系统", font=("Arial", 16, "bold")).pack(side=tk.LEFT, padx=10) + + # 添加作者信息 + author_frame = tk.Frame(left_frame) + author_frame.pack(fill=tk.X, pady=0) + tk.Label(author_frame, text="作者:欢欢欢", font=("Arial", 10)).pack(side=tk.LEFT, padx=15) # 创建日志显示区域 log_frame = tk.Frame(main_pane) main_pane.add(log_frame) # 日志标题 - tk.Label(log_frame, text="处理日志", font=("Arial", 12)).pack(pady=5) + tk.Label(log_frame, text="处理日志", font=("Arial", 12, "bold")).pack(pady=5) # 日志文本区域 log_text = scrolledtext.ScrolledText(log_frame, wrap=tk.WORD, height=30, width=60) log_text.pack(fill=tk.BOTH, expand=True, padx=5, pady=5) log_text.configure(state=tk.DISABLED) # 设置为只读 + # 为日志文本添加标签样式 + log_text.tag_configure("normal", foreground="#000000") + log_text.tag_configure("command", foreground="#17a2b8", font=("Arial", 10, "bold")) + log_text.tag_configure("time", foreground="#17a2b8", font=("Arial", 9)) + log_text.tag_configure("separator", foreground="#cccccc") + log_text.tag_configure("error", foreground="#dc3545") + log_text.tag_configure("warning", foreground="#ffc107") + log_text.tag_configure("success", foreground="#28a745") + log_text.tag_configure("info", foreground="#17a2b8") + + # 创建状态栏 + status_bar = StatusBar(root) + status_bar.pack(side=tk.BOTTOM, fill=tk.X) + # 日志初始内容 - add_to_log(log_text, "益选-OCR订单处理系统启动器 v1.0\n") - add_to_log(log_text, f"当前工作目录: {os.getcwd()}\n") - add_to_log(log_text, "系统已准备就绪,请选择要执行的操作。\n") + add_to_log(log_text, "益选-OCR订单处理系统启动器 v1.0\n", "command") + add_to_log(log_text, f"当前工作目录: {os.getcwd()}\n", "info") + add_to_log(log_text, "系统已准备就绪,请选择要执行的操作。\n", "normal") - # OCR识别按钮 - tk.Button( - buttons_frame, - text="OCR图像识别 (批量)", - width=20, - height=2, - command=lambda: run_command_with_logging(["python", "run.py", "ocr", "--batch"], log_text) - ).pack(pady=5) + # 创建按钮区域(使用两列布局) + button_area = tk.Frame(left_frame) + button_area.pack(fill=tk.BOTH, expand=True, pady=10) - # 单个图片处理 - tk.Button( - buttons_frame, - text="处理单个图片", - width=20, - height=2, - command=lambda: process_single_image(log_text) - ).pack(pady=5) + # 按钮尺寸和间距 + button_width = 15 + button_height = 2 + button_padx = 5 + button_pady = 5 - # Excel处理按钮 + # 第一行 + row1 = tk.Frame(button_area) + row1.pack(fill=tk.X, pady=button_pady) + + # 处理Excel文件 tk.Button( - buttons_frame, + row1, text="处理Excel文件", - width=20, - height=2, - command=lambda: process_excel_file(log_text) - ).pack(pady=5) + width=button_width, + height=button_height, + command=lambda: process_excel_file(log_text, status_bar) + ).pack(side=tk.LEFT, padx=button_padx) - # 订单合并按钮 + # OCR批量识别 tk.Button( - buttons_frame, - text="合并采购单", - width=20, - height=2, - command=lambda: run_command_with_logging(["python", "run.py", "merge"], log_text) - ).pack(pady=5) + row1, + text="OCR批量识别", + width=button_width, + height=button_height, + command=lambda: run_command_with_logging(["python", "run.py", "ocr", "--batch"], log_text, status_bar) + ).pack(side=tk.LEFT, padx=button_padx) - # 完整流程按钮 + # 第二行 + row2 = tk.Frame(button_area) + row2.pack(fill=tk.X, pady=button_pady) + + # 完整处理流程 tk.Button( - buttons_frame, + row2, text="完整处理流程", - width=20, - height=2, - command=lambda: run_command_with_logging(["python", "run.py", "pipeline"], log_text) - ).pack(pady=5) + width=button_width, + height=button_height, + command=lambda: run_command_with_logging(["python", "run.py", "pipeline"], log_text, status_bar) + ).pack(side=tk.LEFT, padx=button_padx) - # 清除缓存按钮 + # 处理单个图片 tk.Button( - buttons_frame, - text="清除处理缓存", - width=20, - height=2, - command=lambda: clean_cache(log_text) - ).pack(pady=5) + row2, + text="处理单个图片", + width=button_width, + height=button_height, + command=lambda: process_single_image(log_text, status_bar) + ).pack(side=tk.LEFT, padx=button_padx) - # 整理文件按钮 + # 第三行 + row3 = tk.Frame(button_area) + row3.pack(fill=tk.X, pady=button_pady) + + # 合并采购单按钮 tk.Button( - buttons_frame, + row3, + text="合并采购单", + width=button_width, + height=button_height, + command=lambda: run_command_with_logging(["python", "run.py", "merge"], log_text, status_bar) + ).pack(side=tk.LEFT, padx=button_padx) + + # 整理项目文件 + tk.Button( + row3, text="整理项目文件", - width=20, - height=2, + width=button_width, + height=button_height, command=lambda: organize_project_files(log_text) - ).pack(pady=5) + ).pack(side=tk.LEFT, padx=button_padx) + + # 第四行 + row4 = tk.Frame(button_area) + row4.pack(fill=tk.X, pady=button_pady) + + # 清除处理缓存按钮 + tk.Button( + row4, + text="清除处理缓存", + width=button_width, + height=button_height, + command=lambda: clean_cache(log_text) + ).pack(side=tk.LEFT, padx=button_padx) # 清理文件按钮 tk.Button( - buttons_frame, + row4, text="清理文件", - width=20, - height=2, + width=button_width, + height=button_height, command=lambda: clean_data_files(log_text) - ).pack(pady=5) + ).pack(side=tk.LEFT, padx=button_padx) + + # 第五行 + row5 = tk.Frame(button_area) + row5.pack(fill=tk.X, pady=button_pady) # 打开输入目录 tk.Button( - buttons_frame, + row5, text="打开输入目录", - width=20, + width=button_width, + height=button_height, command=lambda: os.startfile(os.path.abspath("data/input")) - ).pack(pady=5) + ).pack(side=tk.LEFT, padx=button_padx) # 打开输出目录 tk.Button( - buttons_frame, + row5, text="打开输出目录", - width=20, + width=button_width, + height=button_height, command=lambda: os.startfile(os.path.abspath("data/output")) - ).pack(pady=5) - - # 清空日志按钮 - tk.Button( - buttons_frame, - text="清空日志", - width=20, - command=lambda: log_text.delete(1.0, tk.END) - ).pack(pady=5) + ).pack(side=tk.LEFT, padx=button_padx) # 底部说明 - tk.Label(left_frame, text="© 2025 益选-OCR订单处理系统 v1.0", font=("Arial", 10)).pack(side=tk.BOTTOM, pady=10) + tk.Label(left_frame, text="© 2025 益选-OCR订单处理系统 v1.0 by 欢欢欢", font=("Arial", 9)).pack(side=tk.BOTTOM, pady=10) + + # 修改单个图片和Excel处理函数以使用状态栏 + def process_single_image_with_status(log_widget, status_bar): + status_bar.set_status("选择图片中...") + file_path = select_file(log_widget) + if file_path: + status_bar.set_status("开始处理图片...") + run_command_with_logging(["python", "run.py", "ocr", "--input", file_path], log_widget, status_bar) + else: + status_bar.set_status("操作已取消") + add_to_log(log_widget, "未选择文件,操作已取消\n", "warning") + + def process_excel_file_with_status(log_widget, status_bar): + status_bar.set_status("选择Excel文件中...") + file_path = select_excel_file(log_widget) + if file_path: + status_bar.set_status("开始处理Excel文件...") + run_command_with_logging(["python", "run.py", "excel", "--input", file_path], log_widget, status_bar) + else: + status_bar.set_status("开始处理最新Excel文件...") + add_to_log(log_widget, "未选择文件,尝试处理最新的Excel文件\n", "info") + run_command_with_logging(["python", "run.py", "excel"], log_widget, status_bar) + + # 替换原始函数引用 + global process_single_image, process_excel_file + process_single_image = process_single_image_with_status + process_excel_file = process_excel_file_with_status # 启动主循环 root.mainloop() +def add_to_log(log_widget, text, tag="normal"): + """向日志窗口添加文本,支持样式标签""" + log_widget.configure(state=tk.NORMAL) + log_widget.insert(tk.END, text, tag) + log_widget.see(tk.END) # 自动滚动到底部 + log_widget.configure(state=tk.DISABLED) + +def select_file(log_widget, file_types=[("所有文件", "*.*")], title="选择文件"): + """通用文件选择对话框""" + file_path = filedialog.askopenfilename(title=title, filetypes=file_types) + if file_path: + add_to_log(log_widget, f"已选择文件: {file_path}\n", "info") + return file_path + +def select_excel_file(log_widget): + """选择Excel文件""" + return select_file( + log_widget, + [("Excel文件", "*.xlsx *.xls"), ("所有文件", "*.*")], + "选择Excel文件" + ) + +def clean_cache(log_widget): + """清除处理缓存""" + try: + # 清除OCR缓存文件 + cache_files = [ + os.path.join("data", "processed_files.json"), + os.path.join("data/output", "processed_files.json"), + os.path.join("data/output", "merged_files.json") + ] + + for cache_file in cache_files: + if os.path.exists(cache_file): + os.remove(cache_file) + add_to_log(log_widget, f"已清除缓存文件: {cache_file}\n", "success") + + # 清除临时文件夹中所有文件 + temp_dir = os.path.join("data/temp") + if os.path.exists(temp_dir): + for file in os.listdir(temp_dir): + file_path = os.path.join(temp_dir, file) + try: + if os.path.isfile(file_path): + os.remove(file_path) + add_to_log(log_widget, f"已清除临时文件: {file_path}\n", "info") + except Exception as e: + add_to_log(log_widget, f"清除文件时出错: {file_path}, 错误: {str(e)}\n", "error") + + # 清除日志文件中的active标记 + log_dir = "logs" + if os.path.exists(log_dir): + for file in os.listdir(log_dir): + if file.endswith(".active"): + file_path = os.path.join(log_dir, file) + try: + os.remove(file_path) + add_to_log(log_widget, f"已清除活动日志标记: {file_path}\n", "info") + except Exception as e: + add_to_log(log_widget, f"清除文件时出错: {file_path}, 错误: {str(e)}\n", "error") + + # 重置全局状态 + global RUNNING_TASK + RUNNING_TASK = None + + add_to_log(log_widget, "缓存清除完成,系统将重新处理所有文件\n", "success") + messagebox.showinfo("缓存清除", "缓存已清除,系统将重新处理所有文件。") + except Exception as e: + add_to_log(log_widget, f"清除缓存时出错: {str(e)}\n", "error") + messagebox.showerror("错误", f"清除缓存时出错: {str(e)}") + +def organize_project_files(log_widget): + """整理项目文件结构""" + try: + # 创建必要的目录 + directories = ["data/input", "data/output", "data/temp", "logs"] + for directory in directories: + if not os.path.exists(directory): + os.makedirs(directory, exist_ok=True) + add_to_log(log_widget, f"创建目录: {directory}\n", "info") + + # 移动日志文件到logs目录 + for file in os.listdir("."): + if file.endswith(".log") and os.path.isfile(file): + dest_path = os.path.join("logs", file) + try: + shutil.move(file, dest_path) + add_to_log(log_widget, f"移动日志文件: {file} -> {dest_path}\n", "info") + except Exception as e: + add_to_log(log_widget, f"移动文件时出错: {file}, 错误: {str(e)}\n", "error") + + # 移动配置文件到config目录 + if not os.path.exists("config"): + os.makedirs("config", exist_ok=True) + + for file in os.listdir("."): + if file.endswith(".ini") or file.endswith(".cfg") or file.endswith(".json"): + if os.path.isfile(file) and file != "data/user_settings.json": + dest_path = os.path.join("config", file) + try: + shutil.move(file, dest_path) + add_to_log(log_widget, f"移动配置文件: {file} -> {dest_path}\n", "info") + except Exception as e: + add_to_log(log_widget, f"移动文件时出错: {file}, 错误: {str(e)}\n", "error") + + add_to_log(log_widget, "项目文件整理完成\n", "success") + except Exception as e: + add_to_log(log_widget, f"整理项目文件时出错: {str(e)}\n", "error") + +def clean_data_files(log_widget): + """清理数据文件""" + try: + # 确认清理 + if not messagebox.askyesno("确认清理", "确定要清理所有数据文件吗?这将删除所有输入和输出数据。"): + add_to_log(log_widget, "操作已取消\n", "info") + return + + # 清理输入目录 + input_dir = "data/input" + files_cleaned = 0 + for file in os.listdir(input_dir): + file_path = os.path.join(input_dir, file) + if os.path.isfile(file_path): + os.remove(file_path) + files_cleaned += 1 + + # 清理输出目录 + output_dir = "data/output" + for file in os.listdir(output_dir): + file_path = os.path.join(output_dir, file) + if os.path.isfile(file_path): + os.remove(file_path) + files_cleaned += 1 + + # 清理临时目录 + temp_dir = "data/temp" + for file in os.listdir(temp_dir): + file_path = os.path.join(temp_dir, file) + if os.path.isfile(file_path): + os.remove(file_path) + files_cleaned += 1 + + add_to_log(log_widget, f"已清理 {files_cleaned} 个数据文件\n", "success") + except Exception as e: + add_to_log(log_widget, f"清理数据文件时出错: {str(e)}\n", "error") + +def center_window(window): + """使窗口居中显示""" + window.update_idletasks() + width = window.winfo_width() + height = window.winfo_height() + x = (window.winfo_screenwidth() // 2) - (width // 2) + y = (window.winfo_screenheight() // 2) - (height // 2) + window.geometry('{}x{}+{}+{}'.format(width, height, x, y)) + if __name__ == "__main__": main() \ No newline at end of file