乐于分享
好东西不私藏

从原始数据到 PDF 报告——全流程自动化实战

从原始数据到 PDF 报告——全流程自动化实战

自动生成财务分析报告:从原始数据到 PDF 报告——全流程自动化实战

前面我们学会了数据处理(Pandas)、格式排版(Openpyxl)和数据可视化(Matplotlib)。今天,我们要把这些技能串联起来,打造一条完整的自动化流水线:

原始数据 → 数据清洗 → 分析计算 → 图表生成 → 格式排版 → 输出PDF/Excel报告

这就是财务自动化的终极形态——一键生成专业级财务分析报告


一、 报告自动化框架设计

一个完整的财务报告自动生成系统包含以下模块:

import pandas as pd
import numpy as np
from openpyxl import Workbook
from openpyxl.styles import Font, Alignment, PatternFill, Border, Side
from openpyxl.chart import BarChart, LineChart, PieChart, Reference
from openpyxl.drawing.image import Image as XLImage
import matplotlib.pyplot as plt
from datetime import datetime
import os

classFinancialReportGenerator:
"""财务分析报告自动生成器"""

def__init__(self, company_name="星辰科技", report_period="2024年Q1"):
self.company_name = company_name
self.report_period = report_period
self.generated_at = datetime.now().strftime("%Y-%m-%d %H:%M")
self.charts_created = []
self.wb = None

# ===== 核心方法将在下面逐一实现 =====
pass

二、 模块一:数据读取与清洗

classFinancialReportGenerator:
# ... (前面的 __init__ 保持不变)

defload_and_clean_data(self, filepath):
"""
        步骤1: 读取并清洗原始数据
        """

print(f"\n📂 [步骤1/5] 读取并清洗数据...")

# 读取数据
if filepath.endswith(".xlsx"):
            df = pd.read_excel(filepath)
else:
            df = pd.read_csv(filepath, encoding="utf-8-sig")

print(f"   原始数据: {len(df)} 行 × {len(df.columns)} 列")

# 基础清洗
# 删除空行
        df = df.dropna(how="all")
# 删除重复行
        before_dedup = len(df)
        df = df.drop_duplicates()
iflen(df) < before_dedup:
print(f"   删除重复行: {before_dedup - len(df)} 行")

# 数值列清理
for col in df.columns:
if df[col].dtype == "object":
try:
                    df[col] = pd.to_numeric(
                        df[col].astype(str).str.replace(",""").replace(" """),
                        errors="coerce"
                    )
except:
pass

self.raw_data = df
print(f"   ✅ 清洗后: {len(df)} 行有效数据")
return df

三、 模块二:数据分析引擎

classFinancialReportGenerator:
# ... (延续上面的类)

defanalyze_data(self):
"""
        步骤2: 执行多维度分析
        """

print(f"\n🔍 [步骤2/5] 执行数据分析...")
        df = self.raw_data

self.analysis_results = {}

# ===== 基础统计 =====
        numeric_cols = df.select_dtypes(include=[np.number]).columns
self.analysis_results["summary"] = {
"总记录数"len(df),
"数值列"list(numeric_cols),
        }

# 如果有金额列,做金额分析
        amount_col = None
for col in ["金额""金额""收入""支出""销售额""费用"]:
if col in df.columns:
                amount_col = col
break

if amount_col:
self.analysis_results["amount"] = {
"总计": df[amount_col].sum(),
"均值": df[amount_col].mean(),
"最大值": df[amount_col].max(),
"最小值": df[amount_col].min(),
"中位数": df[amount_col].median(),
            }
print(f"   💰 金额列 '{amount_col}': 总计 {self.analysis_results['amount']['总计']:,.0f}")

# ===== 分组分析 =====
        group_cols = [c for c in df.columns if c != amount_col and df[c].nunique() <= 20]
self.analysis_results["groupby"] = {}

for gcol in group_cols[:3]:  # 最多3个分组维度
            grouped = df.groupby(gcol)[amount_col].agg(["sum""count""mean"]) \
                       .round(2if amount_col else df.groupby(gcol).size()
            grouped.columns = ["合计""笔数""均值"if amount_col else ["计数"]
            grouped = grouped.sort_values("合计", ascending=Trueif"合计"in grouped.columns else grouped
self.analysis_results["groupby"][gcol] = grouped
print(f"   📊 按 '{gcol}' 分组完成 ({len(grouped)} 个类别)")

# ===== 趋势分析(如果有日期列)=====
        date_cols = [c for c in df.columns if"日期"in c or"时间"in c or"date"in c.lower()]
if date_cols:
            date_col = date_cols[0]
try:
                df[date_col] = pd.to_datetime(df[date_col])
                df["月份"] = df[date_col].dt.to_period("M")
                monthly = df.groupby("月份")[amount_col].sum() if amount_col else df.groupby("月份").size()
self.analysis_results["trend"] = monthly
print(f"   📈 月度趋势分析完成 ({len(monthed)} 个月)")
except:
pass

print(f"   ✅ 分析完成!")
returnself.analysis_results

四、 模块三:图表自动生成

classFinancialReportGenerator:
# ... (延续)

defgenerate_charts(self, output_dir="./charts"):
"""
        步骤3: 自动生成分析图表
        """

print(f"\n📊 [步骤3/5] 生成可视化图表...")
        os.makedirs(output_dir, exist_ok=True)

# 中文配置
        plt.rcParams["font.sans-serif"] = ["SimHei""Microsoft YaHei"]
        plt.rcParams["axes.unicode_minus"] = False

        charts = []

# ===== 图表1: TOP N 排名图 =====
if"groupby"inself.analysis_results:
for gcol, gdata inlist(self.analysis_results["groupby"].items())[:2]:
if"合计"in gdata.columns:
                    fig, ax = plt.subplots(figsize=(10max(4len(gdata) * 0.4)))

                    colors = plt.cm.Blues(np.linspace(0.40.9len(gdata)))
                    bars = ax.barh(gdata.index, gdata["合计"], color=colors, edgecolor="white")

# 数值标签
for bar, val inzip(bars, gdata["合计"]):
                        ax.text(val + max(gdata["合计"]) * 0.01,
                               bar.get_y() + bar.get_height()/2,
f"{val:,.0f}", va="center", fontsize=9)

                    ax.set_title(f"按{gcol}排名({self.report_period})",
                                fontsize=14, fontweight="bold")
                    ax.set_xlabel("金额"if"金额"notin gcol.lower() elseNone
                    ax.grid(axis="x", linestyle="--", alpha=0.4)

                    chart_path = os.path.join(output_dir, f"chart_{gcol}_ranking.png")
                    plt.tight_layout()
                    plt.savefig(chart_path, dpi=150, bbox_inches="tight", facecolor="white")
                    plt.close()
                    charts.append({"path": chart_path, "title"f"{gcol}排名"})
print(f"   ✓ {gcol}排名图")

# ===== 图表2: 趋势折线图 =====
if"trend"inself.analysis_results:
            trend = self.analysis_results["trend"]
            fig, ax = plt.subplots(figsize=(125))
            ax.plot(range(len(trend)), trend.values, marker="o", linewidth=2,
                   color="#4472C4", markersize=8)
            ax.fill_between(range(len(trend)), trend.values, alpha=0.15, color="#4472C4")
            ax.set_xticks(range(len(trend)))
            ax.set_xticklabels([str(m) for m in trend.index], rotation=45)
            ax.set_title(f"月度趋势({self.report_period})", fontsize=14, fontweight="bold")
            ax.grid(True, linestyle="--", alpha=0.4)

            chart_path = os.path.join(output_dir, "chart_trend.png")
            plt.tight_layout()
            plt.savefig(chart_path, dpi=150, bbox_inches="tight", facecolor="white")
            plt.close()
            charts.append({"path": chart_path, "title""月度趋势"})
print(f"   ✓ 趋势折线图")

# ===== 图表3: 占比饼图 =====
if"groupby"inself.analysis_results:
            first_group = list(self.analysis_results["groupby"].values())[0]
if"合计"in first_group.columns andlen(first_group) <= 10:
                fig, ax = plt.subplots(figsize=(88))
                colors = plt.cm.Set3(np.linspace(01len(first_group)))
                wedges, texts, autotexts = ax.pie(
                    first_group["合计"], labels=first_group.index,
                    autopct="%1.1f%%", colors=colors, startangle=90,
                    textprops={"fontsize"10}
                )
                ax.set_title(f"结构占比({self.report_period})", fontsize=14, fontweight="bold")

                chart_path = os.path.join(output_dir, "chart_pie.png")
                plt.tight_layout()
                plt.savefig(chart_path, dpi=150, bbox_inches="tight", facecolor="white")
                plt.close()
                charts.append({"path": chart_path, "title""结构占比"})
print(f"   ✓ 结构占比饼图")

self.charts_created = charts
print(f"   ✅ 共生成 {len(charts)} 张图表")
return charts

五、 模块四:生成 Excel 报告

classFinancialReportGenerator:
# ... (延续)

defgenerate_excel_report(self, output_file=None):
"""
        步骤4: 生成格式化的 Excel 报告
        """

print(f"\n📝 [步骤4/5] 生成 Excel 报告...")

if output_file isNone:
            output_file = f"{self.company_name}_{self.report_period}_财务分析报告.xlsx"

        wb = Workbook()
        ws = wb.active
        ws.title = "报告首页"

# ===== 封面区域 =====
        ws.merge_cells("A1:H1")
        ws["A1"] = f"{self.company_name}"
        ws["A1"].font = Font(name="微软雅黑", size=24, bold=True, color="1F4E79")
        ws["A1"].alignment = Alignment(horizontal="center", vertical="center")
        ws.row_dimensions[1].height = 50

        ws.merge_cells("A2:H2")
        ws["A2"] = f"财务分析报告"
        ws["A2"].font = Font(name="微软雅黑", size=18, color="2F5496")
        ws["A2"].alignment = Alignment(horizontal="center")
        ws.row_dimensions[2].height = 35

        ws.merge_cells("A3:H3")
        ws["A3"] = f"报告期间: {self.report_period}"
        ws["A3"].font = Font(size=12, italic=True, color="666666")
        ws["A3"].alignment = Alignment(horizontal="center")

        ws.merge_cells("A4:H4")
        ws["A4"] = f"生成时间: {self.generated_at}"
        ws["A4"].font = Font(size=10, color="888888")
        ws["A4"].alignment = Alignment(horizontal="center")

# ===== 关键指标卡片 =====
        row = 6
if"amount"inself.analysis_results:
            metrics = [
                ("总金额"self.analysis_results["amount"]["总计"], "#4472C4"),
                ("平均值"self.analysis_results["amount"]["均值"], "#ED7D31"),
                ("最大值"self.analysis_results["amount"]["最大值"], "#70AD47"),
                ("记录数"self.analysis_results["summary"]["总记录数"], "#FFC000"),
            ]

            ws.cell(row=row, column=1, value="关键指标").font = Font(bold=True, size=12)
            row += 1

for i, (label, value, color) inenumerate(metrics):
                col = i * 2 + 1
                cell_val = ws.cell(row=row, column=col, value=value)
                cell_val.font = Font(bold=True, size=16, color=color)
                cell_val.alignment = Alignment(horizontal="center")
                cell_val.number_format = '#,##0.00'ifisinstance(value, floatelse'#,##0'

                cell_label = ws.cell(row=row+1, column=col, value=label)
                cell_label.font = Font(size=10, color="666666")
                cell_label.alignment = Alignment(horizontal="center")

            row += 3

# ===== 插入图表 =====
for chart_info inself.charts_created[:4]:  # 最多插入4张图
if os.path.exists(chart_info["path"]):
                img = XLImage(chart_info["path"])
                img.width = 500
                img.height = 300
                ws.add_image(img, f"A{row}")
                row += 20

# ===== 数据明细 Sheet =====
        ws_data = wb.create_sheet("数据明细")
for r_idx, row_data inenumerate(dataframe_to_rows(self.raw_data, index=False, header=True), 1):
for c_idx, value inenumerate(row_data, 1):
                cell = ws_data.cell(row=r_idx, column=c_idx, value=value)
if r_idx == 1:
                    cell.font = Font(bold=True, color="FFFFFF")
                    cell.fill = PatternFill("4472C4", fill_type="solid")

# ===== 分析结果 Sheet =====
if"groupby"inself.analysis_results:
            ws_analysis = wb.create_sheet("分组分析")
            start_row = 1
for gname, gdata inself.analysis_results["groupby"].items():
                ws_analysis.cell(row=start_row, column=1, value=f"按 {gname} 分组").font = Font(bold=True, size=12)
                start_row += 1
for c_idx, col_name inenumerate(gdata.columns, 1):
                    ws_analysis.cell(row=start_row, column=c_idx, value=col_name).font = Font(bold=True)
                start_row += 1
for r_idx, (idx, row_data) inenumerate(gdata.iterrows(), 0):
                    ws_analysis.cell(row=start_row + r_idx, column=1, value=str(idx))
for c_idx, val inenumerate(row_data, 2):
                        ws_analysis.cell(row=start_row + r_idx, column=c_idx, value=val)
                start_row += len(gdata) + 3

        wb.save(output_file)
print(f"   ✅ Excel 报告已保存: {output_file}")
return output_file

注意: 需要在文件头部添加 from openpyxl.utils.dataframe import dataframe_to_rows


六、 完整执行流程

defrun_full_report_pipeline(data_file, company_name="星辰科技",
                              report_period="2024年Q1", output_dir="./"
):
"""
    一键运行完整报告生成流水线
    """

print("=" * 70)
print(f"🚀 财务分析报告自动生成系统")
print(f"   公司: {company_name}")
print(f"   期间: {report_period}")
print("=" * 70)

    start_time = datetime.now()

# 初始化生成器
    generator = FinancialReportGenerator(company_name, report_period)

# 步骤1: 数据读取与清洗
    generator.load_and_clean_data(data_file)

# 步骤2: 数据分析
    generator.analyze_data()

# 步骤3: 生成图表
    charts_dir = os.path.join(output_dir, "charts")
    generator.generate_charts(charts_dir)

# 步骤4: 生成 Excel 报告
    excel_file = generator.generate_excel_report(
        os.path.join(output_dir, f"{company_name}_{report_period}_报告.xlsx")
    )

    elapsed = (datetime.now() - start_time).total_seconds()

print(f"\n{'='*70}")
print(f"✨ 全部完成! 总耗时: {elapsed:.1f} 秒")
print(f"   📁 Excel报告: {excel_file}")
print(f"   📊 图表目录: {charts_dir}")
print(f"{'='*70}")

return generator


# ===== 使用示例 =====
# run_full_report_pipeline(
#     data_file="费用明细_2024Q1.xlsx",
#     company_name="星辰科技有限公司",
#     report_period="2024年第一季度",
#     output_dir="./输出报告/"
# )

七、 进阶:输出为 PDF

如果需要生成 PDF 版本的报告,可以使用以下方案:

# 方案1: Excel 转 PDF(最简单)
# 在 Excel 中:文件 → 导出 → 创建 PDF/XPS 文档
# 或使用 win32com 库自动化操作 Excel

# 方案2: 使用 ReportLab 生成专业 PDF
# pip install reportlab
from reportlab.lib import colors
from reportlab.lib.pagesizes import A4
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer, Image
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm

defgenerate_pdf_report(analysis_results, charts_created, output_file="财务报告.pdf"):
"""生成 PDF 格式的财务报告"""
    doc = SimpleDocTemplate(output_file, pagesize=A4,
                           rightMargin=2*cm, leftMargin=2*cm,
                           topMargin=2*cm, bottomMargin=2*cm)

    styles = getSampleStyleSheet()
    story = []

# 标题
    title_style = ParagraphStyle("Title", parent=styles["Heading1"],
                                 fontSize=24, spaceAfter=30, alignment=1)
    story.append(Paragraph("财务分析报告", title_style))

# 关键指标表格
if"amount"in analysis_results:
        data = [["指标""数值"]]
for key, val in analysis_results["amount"].items():
            data.append([key, f"{val:,.2f}"])

        table = Table(data, colWidths=[6*cm, 8*cm])
        table.setStyle(TableStyle([
            ("BACKGROUND", (00), (-10), colors.HexColor("#4472C4")),
            ("TEXTCOLOR", (00), (-10), colors.white),
            ("ALIGN", (00), (-1, -1), "CENTER"),
            ("FONTNAME", (00), (-10), "Helvetica-Bold"),
            ("FONTSIZE", (00), (-10), 12),
            ("BOTTOMPADDING", (00), (-10), 12),
            ("BACKGROUND", (01), (-1, -1), colors.HexColor("#F2F2F2")),
            ("GRID", (00), (-1, -1), 1, colors.white),
        ]))
        story.append(table)
        story.append(Spacer(120))

# 插入图表
for chart in charts_created[:3]:
if os.path.exists(chart["path"]):
            story.append(Paragraph(f"<b>{chart['title']}</b>", styles["Heading2"]))
            img = Image(chart["path"], width=16*cm, height=10*cm)
            story.append(img)
            story.append(Spacer(115))

    doc.build(story)
print(f"✅ PDF 报告已生成: {output_file}")


# 使用
# generate_pdf_report(generator.analysis_results, generator.charts_created)

八、 总结

今天我们构建了一个完整的财务报告自动化流水线

步骤
工具
产出
数据读取与清洗
Pandas
干净的数据集
多维分析
Pandas groupby
分析结果
图表生成
Matplotlib
可视化图表
Excel 排版
Openpyxl
专业报表
PDF 输出
ReportLab
正式报告

这套系统的核心价值在于可复用性——每月只需替换数据文件,点击运行即可获得一份全新的完整报告。

下一篇文章,我们将学习 财务预测入门——如何用 Python 做销售趋势预测。

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