当前位置:首页>python>[原创] Python 自动化识别电子发票信息 + 重复发票智能查重统计

[原创] Python 自动化识别电子发票信息 + 重复发票智能查重统计

  • 2026-02-04 22:57:44
[原创] Python 自动化识别电子发票信息 + 重复发票智能查重统计

适用场景:财务审计、报销核查、税务合规、重复开票检测 技术栈:pdfplumber + pandas + hashlib + openpyxl 输入:./pdf_invoices/ 目录下所有 PDF 电子发票

pip install tabulate pdfplumber pandas openpyxl

获取发票信息代码

import os
import re
import pandas as pd
from pdfplumber import open as pdf_open

def extract_invoice_data(pdf_path):
    """
    从单个PDF文件中提取发票数据,使用表格提取和文本提取。
    返回基本信息和项目明细列表。
    """
    with pdf_open(pdf_path) as pdf:
        full_text = ""
        tables_data = []
        for page in pdf.pages:
            page_text = page.extract_text()
            if page_text:
                full_text += page_text + "\n"
            page_tables = page.extract_tables()
            for table in page_tables:
                tables_data.append(table)

        if not tables_data:
            return {
                '发票号码': 'Unknown',
                '购买方': 'Unknown', '购买税号': 'Unknown', '销售方': 'Unknown',
                '销售税号': 'Unknown', '合计金额': 'Unknown', '合计税额': 'Unknown',
                '价税合计(小写)': 'Unknown', '明细条数': 0
            }, []  # 返回空项目列表

        # 假设第一个表格包含基本信息(买方卖方)
        header_table = tables_data[0] if tables_data else []

        buyer_name = "Unknown"
        buyer_tax = "Unknown"
        seller_name = "Unknown"
        seller_tax = "Unknown"

        # 查找包含买方/卖方信息的表头行
        for row in header_table:
            if row and len(row) >= 5:
                row_norm = [cell.replace('\n', ' ') if cell else '' for cell in row]
                # 买方
                if row_norm[0] and ('购' in row_norm[0] or '买' in row_norm[0]):
                    buyer_str = row_norm[1]
                    # 名称模式
                    name_pat = r'名\s*称\s*[::]?\s*([^ :统一]+?)(?=\s*[::]?\s*统一|$)'
                    name_match = re.search(name_pat, buyer_str)
                    if name_match:
                        buyer_name = name_match.group(1).strip()
                    # 税号
                    tax_pat = r'统一社会信用代码\s*/?\s*纳税人识别号\s*[::]?\s*([A-Z0-9]{18})'
                    tax_match = re.search(tax_pat, buyer_str)
                    if tax_match:
                        buyer_tax = tax_match.group(1)

                # 卖方
                if row_norm[3] and ('销' in row_norm[3] or '售' in row_norm[3]):
                    seller_str = row_norm[4]
                    name_pat = r'名\s*称\s*[::]?\s*([^ :统一]+?)(?=\s*[::]?\s*统一|$)'
                    name_match = re.search(name_pat, seller_str)
                    if name_match:
                        seller_name = name_match.group(1).strip()
                    tax_pat = r'统一社会信用代码\s*/?\s*纳税人识别号\s*[::]?\s*([A-Z0-9]{18})'
                    tax_match = re.search(tax_pat, seller_str)
                    if tax_match:
                        seller_tax = tax_match.group(1)

        # 从完整文本中提取发票号码
        invoice_num_pat = r'发票号码[::]?\s*(\d+)'
        invoice_num_match = re.search(invoice_num_pat, full_text)
        invoice_num = invoice_num_match.group(1) if invoice_num_match else "Unknown"

        # 提取项目明细:使用文本解析
        items = []
        detail_match = re.search(r'项目名称.*?税 额\s*(.*?)(?=价税合计|合 计|开票人|备注)', full_text, re.DOTALL | re.IGNORECASE)
        if detail_match:
            details_text = detail_match.group(1).strip()
            lines = [line.strip() for line in details_text.split('\n') if line.strip()]
            i = 0
            while i < len(lines):
                line = lines[i]
                # 跳过表头
                if '项目名称' in line:
                    i += 1
                    continue
                if '*' in line:
                    # 尝试完整模式
                    pat_full = r'\*(.*?)\*\s*(.+?)\s+([A-Z0-9]+)\s+([^\d\s]+)\s+(\d+(?:\.\d+)?)\s+([\d.]+)\s+([\d.]+)\s+(\d+%)\s+([\d.]+)'
                    match = re.search(pat_full, line)
                    if match:
                        category, name, spec, unit, qty, price, amount, taxrate, tax = match.groups()
                        # 下一行描述添加到名称
                        desc = name
                        i += 1
                        while i < len(lines) and lines[i] and '*' not in lines[i] and not re.match(r'\d{4}|合', lines[i]):
                            desc += ' ' + lines[i]
                            i += 1
                        items.append({
                            '文件名': os.path.basename(pdf_path),
                            '发票号码': invoice_num,
                            '项目名称': category + ' ' + desc.strip(),
                            '规格型号': spec,
                            '单位': unit,
                            '数量': qty,
                            '单价': price,
                            '金额': amount,
                            '税率/征收率': taxrate,
                            '税额': tax
                        })
                        continue
                    # 尝试调整模式(无规格、单位、数量)
                    pat_adjust = r'\*(.*?)\*\s*(.+?)\s+(-?[\d.]+)\s+(\d+%)\s+(-?[\d.]+)'
                    match = re.search(pat_adjust, line)
                    if match:
                        category, name, amount, taxrate, tax = match.groups()
                        # 假设单价=金额
                        price = amount
                        i += 1
                        while i < len(lines) and lines[i] and '*' not in lines[i]:
                            name += ' ' + lines[i]
                            i += 1
                        items.append({
                            '文件名': os.path.basename(pdf_path),
                            '发票号码': invoice_num,
                            '项目名称': category + ' ' + name.strip(),
                            '规格型号': '',
                            '单位': '',
                            '数量': '',
                            '单价': price,
                            '金额': amount,
                            '税率/征收率': taxrate,
                            '税额': tax
                        })
                        continue
                i += 1

        item_count = len(items)

        # 从完整文本中提取合计金额和税额作为后备或主要方法
        full_text_norm = re.sub(r'\s+', ' ', full_text)
        full_text_norm = full_text_norm.replace(':', ':').replace('(', '(').replace(')', ')')

        # 合计金额和税额: "合 计 ¥xx.xx ¥yy.yy"
        totals_pat = r'合\s*计\s*[::]?\s*¥?\s*([\d.]+)\s*¥?\s*([\d.]+)'
        totals_match = re.search(totals_pat, full_text_norm)
        total_amount = f"¥{totals_match.group(1)}" if totals_match else "Unknown"
        total_tax = f"¥{totals_match.group(2)}" if totals_match and len(totals_match.groups()) == 2 else "Unknown"

        # 如果未找到,在表格中查找
        if total_amount == "Unknown":
            for row in tables_data[0] if tables_data else []:
                if row and any('合 计' in str(cell) for cell in row):
                    cell_with_totals = next((cell for cell in row if cell and '¥' in str(cell)), None)
                    if cell_with_totals:
                        cell_str = str(cell_with_totals).replace('\n', ' ')
                        amounts = re.findall(r'¥([\d.]+)', cell_str)
                        if len(amounts) >= 1:
                            total_amount = f"¥{amounts[0]}"
                        if len(amounts) >= 2:
                            total_tax = f"¥{amounts[1]}"

        # 价税合计(小写)
        price_tax_pat = r'\(小写\)\s*[·¥]?\s*([\d.]+)'
        price_tax_match = re.search(price_tax_pat, full_text_norm)
        price_tax_total = f"¥{price_tax_match.group(1)}" if price_tax_match else "Unknown"

        # 如果未找到,在表格中查找
        if price_tax_total == "Unknown":
            for row in tables_data[0] if tables_data else []:
                if row and any('价税合计' in str(cell) for cell in row):
                    cell_with_price = next((cell for cell in row if cell and '小写' in str(cell)), None)
                    if cell_with_price:
                        cell_str = str(cell_with_price).replace('\n', ' ')
                        pt_match = re.search(r'\(小写\)\s*[·¥]?\s*([\d.]+)', cell_str)
                        if pt_match:
                            price_tax_total = f"¥{pt_match.group(1)}"

        # 后备: 如果价税合计未知,从金额+税额计算
        if price_tax_total == "Unknown" and total_amount != "Unknown" and total_tax != "Unknown":
            try:
                amt = float(re.search(r'[\d.]+', total_amount).group())
                tx = float(re.search(r'[\d.]+', total_tax).group())
                price_tax_total = f"¥{amt + tx:.2f}"
            except (ValueError, AttributeError):
                pass

        basic_info = {
            '发票号码': invoice_num,
            '购买方': buyer_name,
            '购买税号': buyer_tax,
            '销售方': seller_name,
            '销售税号': seller_tax,
            '合计金额': total_amount,
            '合计税额': total_tax,
            '价税合计(小写)': price_tax_total,
            '明细条数': item_count
        }

        return basic_info, items

def process_folder(folder_path, output_file='output.xlsx'):
    """
    处理文件夹中的所有PDF文件,创建DataFrame,基于发票号码去除重复项,
    计算价税合计(小写)的总和,并输出到Excel,包括五个工作表:'基本信息' (不包含项目明细的基本信息),
    '项目明细' (所有项目详情), '汇总' (无明细的汇总), 
    '销售明细' (按卖方分组的销售明细),
    '重复发票' (重复的发票文件列表)。
    """
    basic_data = []
    all_items = []
    pdf_files = [f for f in os.listdir(folder_path) if f.lower().endswith('.pdf')]
    pdf_files.sort()
    for filename in pdf_files:
        pdf_path = os.path.join(folder_path, filename)
        try:
            basic_info, items = extract_invoice_data(pdf_path)
            basic_info['文件名'] = filename
            basic_data.append(basic_info)
            all_items.extend(items)
        except Exception as e:
            print(f"处理 {filename} 时出错: {e}")
            basic_data.append({
                '文件名': filename,
                '发票号码': 'Unknown',
                '购买方': f'Error: {str(e)[:50]}', '购买税号': '', '销售方': '', 
                '销售税号': '', '合计金额': '', '合计税额': '', '价税合计(小写)': '',
                '明细条数': 0
            })
            all_items.append({
                '文件名': filename,
                '发票号码': 'Unknown',
                '项目名称': '', '规格型号': '', '单位': '', '数量': '', '单价': '',
                '金额': '', '税率/征收率': '', '税额': ''
            })

    df_basic = pd.DataFrame(basic_data)
    columns_order_basic = ['文件名', '发票号码', '购买方', '购买税号', '销售方', '销售税号', '合计金额', '合计税额', '价税合计(小写)', '明细条数']
    df_basic = df_basic.reindex(columns=columns_order_basic)

    # 基于'发票号码'去除重复项,保留第一个出现
    initial_count = len(df_basic)
    # 找出所有重复行(包括第一次和后续)
    df_duplicates_mask = df_basic.duplicated(subset=['发票号码'], keep=False)
    df_duplicates = df_basic[df_duplicates_mask].copy()
    # 只保留重复的部分(排除第一次出现)
    df_duplicates = df_duplicates[df_duplicates.duplicated(subset=['发票号码'], keep='first')]

    df_basic = df_basic.drop_duplicates(subset=['发票号码'], keep='first')
    duplicate_count = initial_count - len(df_basic)
    if duplicate_count > 0:
        print(f"基于发票号码移除了 {duplicate_count} 个重复发票。")
        # 创建重复发票的DataFrame,只包含文件名和发票号码
        df_duplicates_list = df_duplicates[['文件名', '发票号码']].copy()
        df_duplicates_list = df_duplicates_list.sort_values('发票号码')
    else:
        # 如果没有重复,创建空DataFrame
        df_duplicates_list = pd.DataFrame(columns=['文件名', '发票号码'])

    # 创建项目明细DataFrame
    df_items = pd.DataFrame(all_items)
    columns_order_items = ['文件名', '发票号码', '项目名称', '规格型号', '单位', '数量', '单价', '金额', '税率/征收率', '税额']
    df_items = df_items.reindex(columns=columns_order_items)

    # 计算价税合计(小写)的总和
    def parse_amount(val):
        if isinstance(val, str) and val != 'Unknown' and '¥' in val:
            try:
                return float(re.search(r'[\d.]+', val).group())
            except (ValueError, AttributeError):
                return 0.0
        return 0.0

    total_sum = df_basic['价税合计(小写)'].apply(parse_amount).sum()

    # 创建汇总DataFrame(无明细,仅总计)
    summary_data = {'总价税合计(小写)': [f"¥{total_sum:.2f}"]}
    summary_df = pd.DataFrame(summary_data)

    # 创建销售明细:按销售方分组,合计价税合计(小写),计数发票
    df_numeric = df_basic.copy()
    df_numeric['价税合计数值'] = df_numeric['价税合计(小写)'].apply(parse_amount)
    sales_group = df_numeric.groupby('销售方').agg({
        '价税合计数值': ['sum', 'count']
    }).round(2)
    sales_group.columns = ['销售总价税合计(小写)', '发票数量']
    sales_group = sales_group.reset_index()
    sales_group['销售总价税合计(小写)'] = sales_group['销售总价税合计(小写)'].apply(lambda x: f"¥{x}")

    # 输出到Excel,包括五个工作表
    with pd.ExcelWriter(output_file, engine='openpyxl') as writer:
        df_basic.to_excel(writer, sheet_name='基本信息', index=False)
        df_items.to_excel(writer, sheet_name='项目明细', index=False)
        summary_df.to_excel(writer, sheet_name='汇总', index=False)
        sales_group.to_excel(writer, sheet_name='销售明细', index=False)
        df_duplicates_list.to_excel(writer, sheet_name='重复发票', index=False)

    print(f"数据已导出到 {output_file}")
    print(f"总价税合计(小写) 总和: ¥{total_sum:.2f}")
    print(f"总项目条数: {len(df_items)}")
    print(df_basic.to_markdown(index=False))  # 打印Markdown预览

    return df_basic, df_items

# 使用示例:
folder_path = r'./pdf_invoices'  # 替换为您的文件夹路径
df_basic, df_items = process_folder(folder_path)

最终效果

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-07 23:41:34 HTTP/2.0 GET : https://f.mffb.com.cn/a/467759.html
  2. 运行时间 : 0.257299s [ 吞吐率:3.89req/s ] 内存消耗:4,799.03kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=fc0760a5980f14801039affa5d535608
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000729s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001066s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.072733s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.017883s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000566s ]
  6. SELECT * FROM `set` [ RunTime:0.003111s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000582s ]
  8. SELECT * FROM `article` WHERE `id` = 467759 LIMIT 1 [ RunTime:0.007110s ]
  9. UPDATE `article` SET `lasttime` = 1770478894 WHERE `id` = 467759 [ RunTime:0.010501s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000366s ]
  11. SELECT * FROM `article` WHERE `id` < 467759 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.008521s ]
  12. SELECT * FROM `article` WHERE `id` > 467759 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.016021s ]
  13. SELECT * FROM `article` WHERE `id` < 467759 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.011855s ]
  14. SELECT * FROM `article` WHERE `id` < 467759 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.003781s ]
  15. SELECT * FROM `article` WHERE `id` < 467759 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.005402s ]
0.258816s