Merge pull request #242 from yunyingk/mac15/clean-report-templates-and-assets
Clean report templates, drop legacy charts, and refine guidelines
This commit is contained in:
11 files changed
+17
-728
No files matched your search
@@ -12,7 +12,6 @@
|
||||
src/domains/seal/reports/
|
||||
├── charts/ # 图表生成子模块(100% 纯 TS 数据驱动矢量计算)
|
||||
│ ├── venn.ts # 图 1:AI 与人工审核准确率对比维恩图
|
||||
│ ├── duration-histogram.ts # 图 2:多模板单据审核耗时分布对比堆叠直方图
|
||||
│ └── index.ts # 图表模块出口
|
||||
├── pipeline/ # 取数、推断与组装流水线
|
||||
│ ├── describe.ts # 解析 Markdown 标题并反推各章节数据需求
|
||||
@@ -37,8 +36,7 @@ src/domains/seal/reports/
|
||||
│ ├── monthly.md # 标准月度报告 Markdown 模板
|
||||
│ ├── report.css # 报告排版与 A4 打印样式表
|
||||
│ ├── resources.ts # Bun 编译期静态资源嵌入定义
|
||||
│ ├── assets/ # 内置图表矢量资产
|
||||
│ └── examples/ # 真实脱敏报告示例
|
||||
│ └── assets/ # 内置图 1 矢量图表资产
|
||||
├── index.ts # 报告域对外统一门面出口 (Barrel)
|
||||
└── README.md # 架构与开发指南
|
||||
```
|
||||
@@ -1,66 +0,0 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { renderDurationHistogramPng, renderDurationHistogramSvg, DEFAULT_EEKA_DURATION_SERIES } from "./duration-histogram.js";
|
||||
import { pngDimensions } from "../render/png.js";
|
||||
import { writeFileSync, unlinkSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { tmpdir } from "node:os";
|
||||
|
||||
describe("renderDurationHistogramSvg", () => {
|
||||
test("generates valid SVG with default EEKA 240-sample series and average line", () => {
|
||||
const svg = renderDurationHistogramSvg();
|
||||
|
||||
expect(svg).toStartWith("<svg");
|
||||
expect(svg).toEndWith("</svg>\n");
|
||||
expect(svg).toContain("各单据模板审核耗时分布对比");
|
||||
expect(svg).toContain("总体平均耗时: 445.4秒");
|
||||
expect(svg).toContain("审核耗时(秒)");
|
||||
expect(svg).toContain("单据数量");
|
||||
expect(svg).toContain("采购付款单-月结款 (15单)");
|
||||
expect(DEFAULT_EEKA_DURATION_SERIES).toHaveLength(7);
|
||||
const totalSamples = DEFAULT_EEKA_DURATION_SERIES.reduce((acc, s) => acc + s.count, 0);
|
||||
expect(totalSamples).toBe(240);
|
||||
expect(svg).toContain('stroke="#e02424"');
|
||||
});
|
||||
|
||||
test("supports dynamic durations array automatic binning", () => {
|
||||
const svg = renderDurationHistogramSvg({
|
||||
title: "测试单据耗时分布",
|
||||
series: [
|
||||
{
|
||||
name: "测试模板A",
|
||||
count: 3,
|
||||
color: "#48a9c5",
|
||||
durations: [180, 220, 240] // 1 in [150, 200), 2 in [200, 250)
|
||||
}
|
||||
],
|
||||
averageSeconds: 213.3,
|
||||
averageLabel: "平均: 213.3秒"
|
||||
});
|
||||
|
||||
expect(svg).toContain("测试单据耗时分布");
|
||||
expect(svg).toContain("平均: 213.3秒");
|
||||
expect(svg).toContain("测试模板A (3单)");
|
||||
expect(svg).toContain("#48a9c5");
|
||||
});
|
||||
});
|
||||
|
||||
describe("renderDurationHistogramPng", () => {
|
||||
test("generates high-DPI 4x PNG buffer matching 4800x2400 resolution", async () => {
|
||||
const buffer = await renderDurationHistogramPng({
|
||||
scale: 4
|
||||
});
|
||||
|
||||
expect(buffer).toBeDefined();
|
||||
expect(buffer.length).toBeGreaterThan(50_000);
|
||||
|
||||
const tmpFile = join(tmpdir(), `test-hist-${Date.now()}.png`);
|
||||
try {
|
||||
writeFileSync(tmpFile, buffer);
|
||||
const dims = pngDimensions(tmpFile);
|
||||
expect(dims.width).toBe(4800);
|
||||
expect(dims.height).toBe(2400);
|
||||
} finally {
|
||||
try { unlinkSync(tmpFile); } catch {}
|
||||
}
|
||||
}, 15000);
|
||||
});
|
||||
@@ -1,248 +0,0 @@
|
||||
import { renderHtmlToImageBuffer } from "../render/browser.js";
|
||||
|
||||
export interface HistogramSeries {
|
||||
name: string;
|
||||
count: number;
|
||||
color: string;
|
||||
/** 每单审核耗时数组(秒);若提供则自动分箱计算高度 */
|
||||
durations?: number[];
|
||||
/** 直接提供的各分箱频数数组(长度对应 bins 数量) */
|
||||
binCounts?: number[];
|
||||
}
|
||||
|
||||
export interface DurationHistogramOptions {
|
||||
title?: string;
|
||||
series: HistogramSeries[];
|
||||
averageSeconds?: number;
|
||||
averageLabel?: string;
|
||||
binWidth?: number;
|
||||
binStart?: number;
|
||||
binEnd?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
}
|
||||
|
||||
export interface DurationHistogramPngOptions extends DurationHistogramOptions {
|
||||
/** 渲染倍率:默认 4x 超高分屏/印刷级采样 (4800×2400) */
|
||||
scale?: number;
|
||||
chrome?: string;
|
||||
}
|
||||
|
||||
/** 赢家时尚 (EEKA) 2026年8月全量 240 单样本的真实审核耗时分布基线数据 */
|
||||
export const DEFAULT_EEKA_DURATION_SERIES: HistogramSeries[] = [
|
||||
{
|
||||
name: "采购付款单-月结款",
|
||||
count: 15,
|
||||
color: "#48a9c5",
|
||||
binCounts: [2, 2, 0, 1, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
},
|
||||
{
|
||||
name: "其他报销及业务单据",
|
||||
count: 12,
|
||||
color: "#b19cd9",
|
||||
binCounts: [0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0]
|
||||
},
|
||||
{
|
||||
name: "差旅报销单-定额",
|
||||
count: 22,
|
||||
color: "#f7a072",
|
||||
binCounts: [0, 0, 6, 3, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
|
||||
},
|
||||
{
|
||||
name: "采购申请与预付款类单据",
|
||||
count: 24,
|
||||
color: "#fed766",
|
||||
binCounts: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0]
|
||||
},
|
||||
{
|
||||
name: "一般费用报销单【收据】- 个人报销",
|
||||
count: 33,
|
||||
color: "#a8d5ba",
|
||||
binCounts: [0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
},
|
||||
{
|
||||
name: "一般费用报销单【发票】- 对外支付",
|
||||
count: 64,
|
||||
color: "#f5a9b8",
|
||||
binCounts: [0, 0, 1, 1, 2, 2, 2, 0, 4, 3, 4, 0, 0, 0, 1, 3, 0, 1, 1, 0]
|
||||
},
|
||||
{
|
||||
name: "一般费用报销单【发票】- 个人报销",
|
||||
count: 70,
|
||||
color: "#7fe3d7",
|
||||
binCounts: [0, 2, 2, 5, 5, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]
|
||||
}
|
||||
];
|
||||
|
||||
/**
|
||||
* 自动生成各单据模板审核耗时分布对比的多系列堆叠直方图 (SVG)。
|
||||
* 100% 纯代码矢量计算,数据驱动自动分箱,支持 7 组模板色彩层次堆叠与平均值虚线标注。
|
||||
*/
|
||||
export function renderDurationHistogramSvg(options?: Partial<DurationHistogramOptions>): string {
|
||||
const {
|
||||
title = "各单据模板审核耗时分布对比 (2026年8月全量240单样本)",
|
||||
series = DEFAULT_EEKA_DURATION_SERIES,
|
||||
averageSeconds = 445.4,
|
||||
averageLabel = "总体平均耗时: 445.4秒 (约7.4分钟)",
|
||||
binWidth = 50,
|
||||
binStart = 150,
|
||||
binEnd = 1150,
|
||||
width = 1200,
|
||||
height = 600
|
||||
} = options ?? {};
|
||||
|
||||
const numBins = Math.round((binEnd - binStart) / binWidth);
|
||||
const plotLeft = 80;
|
||||
const plotRight = width - 40;
|
||||
const plotTop = 60;
|
||||
const plotBottom = height - 80;
|
||||
const plotWidth = plotRight - plotLeft;
|
||||
const plotHeight = plotBottom - plotTop;
|
||||
|
||||
// 计算分箱数据矩阵 [binIndex][seriesIndex] = count
|
||||
const binData: number[][] = Array.from({ length: numBins }, () => Array(series.length).fill(0));
|
||||
|
||||
series.forEach((s, sIdx) => {
|
||||
if (s.binCounts && s.binCounts.length >= numBins) {
|
||||
for (let b = 0; b < numBins; b++) binData[b]![sIdx] = s.binCounts[b] ?? 0;
|
||||
} else if (s.durations) {
|
||||
for (const d of s.durations) {
|
||||
if (d >= binStart && d < binEnd) {
|
||||
const b = Math.min(numBins - 1, Math.floor((d - binStart) / binWidth));
|
||||
binData[b]![sIdx] = (binData[b]![sIdx] ?? 0) + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 计算最大 Y 轴高度(默认向上取整到偶数,至少 11)
|
||||
const maxStack = Math.max(11, ...binData.map((counts) => counts.reduce((acc, c) => acc + c, 0)));
|
||||
const yDomainMax = Math.ceil(maxStack / 2) * 2;
|
||||
const yUnit = plotHeight / yDomainMax;
|
||||
|
||||
// X 轴映射 (秒 -> 像素)
|
||||
const xDomainMin = 140;
|
||||
const xDomainMax = 1220;
|
||||
const mapX = (sec: number) => plotLeft + ((sec - xDomainMin) / (xDomainMax - xDomainMin)) * plotWidth;
|
||||
|
||||
// 平均线坐标
|
||||
const avgX = mapX(averageSeconds);
|
||||
|
||||
// 生成水平网格线与 Y 轴刻度 (步长 2)
|
||||
const yTicks: Array<{ val: number; y: number }> = [];
|
||||
for (let val = 0; val <= yDomainMax; val += 2) {
|
||||
yTicks.push({ val, y: plotBottom - val * yUnit });
|
||||
}
|
||||
|
||||
// 生成垂直网格线与 X 轴刻度 (步长 200秒)
|
||||
const xTicks: Array<{ val: number; x: number }> = [];
|
||||
for (let val = 200; val <= 1200; val += 200) {
|
||||
xTicks.push({ val, x: mapX(val) });
|
||||
}
|
||||
|
||||
// 渲染堆叠条块
|
||||
const barElements: string[] = [];
|
||||
for (let b = 0; b < numBins; b++) {
|
||||
const bStartSec = binStart + b * binWidth;
|
||||
const bEndSec = bStartSec + binWidth;
|
||||
const bx1 = mapX(bStartSec);
|
||||
const bx2 = mapX(bEndSec);
|
||||
const bWidth = bx2 - bx1;
|
||||
|
||||
let currentBottomY = plotBottom;
|
||||
for (let sIdx = 0; sIdx < series.length; sIdx++) {
|
||||
const count = binData[b]![sIdx] ?? 0;
|
||||
if (count > 0) {
|
||||
const segHeight = count * yUnit;
|
||||
const segY = currentBottomY - segHeight;
|
||||
const color = series[sIdx]!.color;
|
||||
barElements.push(
|
||||
`<rect x="${bx1.toFixed(1)}" y="${segY.toFixed(1)}" width="${bWidth.toFixed(1)}" height="${segHeight.toFixed(1)}" fill="${color}" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>`
|
||||
);
|
||||
currentBottomY = segY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 图例项目(按业务重要性逆序排在右上角图例框中)
|
||||
const legendItems = [...series].reverse();
|
||||
const legendBoxWidth = 300;
|
||||
const legendRowHeight = 23;
|
||||
const legendBoxHeight = (legendItems.length + 1) * legendRowHeight + 16;
|
||||
const legendBoxX = plotRight - legendBoxWidth - 12;
|
||||
const legendBoxY = plotTop + 12;
|
||||
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" font-family="-apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif">
|
||||
<rect width="${width}" height="${height}" fill="#ffffff"/>
|
||||
|
||||
<!-- Title -->
|
||||
<text x="${(width / 2).toFixed(1)}" y="38" font-size="20" font-weight="600" fill="#111111" text-anchor="middle">${title}</text>
|
||||
|
||||
<!-- Horizontal Gridlines -->
|
||||
<g stroke="#f0f0f0" stroke-width="1">
|
||||
${yTicks.filter((t) => t.val > 0).map((t) => `<line x1="${plotLeft}" y1="${t.y.toFixed(1)}" x2="${plotRight}" y2="${t.y.toFixed(1)}"/>`).join("\n ")}
|
||||
</g>
|
||||
|
||||
<!-- Vertical Gridlines -->
|
||||
<g stroke="#f5f5f5" stroke-width="1">
|
||||
${xTicks.map((t) => `<line x1="${t.x.toFixed(1)}" y1="${plotTop}" x2="${t.x.toFixed(1)}" y2="${plotBottom}"/>`).join("\n ")}
|
||||
</g>
|
||||
|
||||
<!-- Stacked Bars -->
|
||||
<g>
|
||||
${barElements.join("\n ")}
|
||||
</g>
|
||||
|
||||
<!-- Plot Border -->
|
||||
<rect x="${plotLeft}" y="${plotTop}" width="${plotWidth}" height="${plotHeight}" fill="none" stroke="#222222" stroke-width="1.2"/>
|
||||
|
||||
<!-- Red Average Line -->
|
||||
<line x1="${avgX.toFixed(1)}" y1="${plotTop}" x2="${avgX.toFixed(1)}" y2="${plotBottom}" stroke="#e02424" stroke-width="2.4" stroke-dasharray="6,4"/>
|
||||
|
||||
<!-- Y-axis Ticks & Labels -->
|
||||
<g font-size="14" fill="#222222" text-anchor="end">
|
||||
${yTicks.map((t) => `<line x1="${plotLeft - 5}" y1="${t.y.toFixed(1)}" x2="${plotLeft}" y2="${t.y.toFixed(1)}" stroke="#222222" stroke-width="1.2"/><text x="${plotLeft - 10}" y="${(t.y + 5).toFixed(1)}">${t.val}</text>`).join("\n ")}
|
||||
</g>
|
||||
<text x="25" y="${(plotTop + plotHeight / 2).toFixed(1)}" font-size="16" font-weight="500" fill="#222222" text-anchor="middle" transform="rotate(-90 25 ${(plotTop + plotHeight / 2).toFixed(1)})">单据数量</text>
|
||||
|
||||
<!-- X-axis Ticks & Labels -->
|
||||
<g font-size="14" fill="#222222" text-anchor="middle">
|
||||
${xTicks.map((t) => `<line x1="${t.x.toFixed(1)}" y1="${plotBottom}" x2="${t.x.toFixed(1)}" y2="${plotBottom + 5}" stroke="#222222" stroke-width="1.2"/><text x="${t.x.toFixed(1)}" y="${plotBottom + 24}">${t.val}</text>`).join("\n ")}
|
||||
</g>
|
||||
<text x="${(plotLeft + plotWidth / 2).toFixed(1)}" y="${plotBottom + 56}" font-size="16" font-weight="500" fill="#222222" text-anchor="middle">审核耗时(秒)</text>
|
||||
|
||||
<!-- Legend Box (Top Right) -->
|
||||
<g transform="translate(${legendBoxX}, ${legendBoxY})">
|
||||
<rect width="${legendBoxWidth}" height="${legendBoxHeight}" fill="#ffffff" stroke="#bbbbbb" stroke-width="1" rx="3"/>
|
||||
${legendItems.map((item, idx) => {
|
||||
const rowY = 12 + idx * legendRowHeight;
|
||||
return `<rect x="12" y="${rowY}" width="22" height="12" fill="${item.color}" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<text x="42" y="${rowY + 10}" font-size="12" fill="#222222">${item.name} (${item.count}单)</text>`;
|
||||
}).join("\n ")}
|
||||
<!-- Average Line in Legend -->
|
||||
<line x1="12" y1="${12 + legendItems.length * legendRowHeight + 6}" x2="34" y2="${12 + legendItems.length * legendRowHeight + 6}" stroke="#e02424" stroke-width="2.4" stroke-dasharray="5,3"/>
|
||||
<text x="42" y="${12 + legendItems.length * legendRowHeight + 10}" font-size="12" fill="#222222">${averageLabel}</text>
|
||||
</g>
|
||||
</svg>
|
||||
`;
|
||||
}
|
||||
|
||||
/**
|
||||
* 采用本地 Headless Chrome 原生渲染管线输出高清晰度耗时分布直方图 PNG 图片。
|
||||
* 默认 4x 超高分采样 (4800×2400),完美匹配 24 寸 4K 屏与高精度 PDF 导出。
|
||||
*/
|
||||
export async function renderDurationHistogramPng(options?: Partial<DurationHistogramPngOptions>): Promise<Buffer> {
|
||||
const svg = renderDurationHistogramSvg(options);
|
||||
const width = options?.width ?? 1200;
|
||||
const height = options?.height ?? 600;
|
||||
const scale = options?.scale ?? 4;
|
||||
const html = `<!DOCTYPE html><html><head><meta charset="utf-8"><style>* { box-sizing: border-box; margin: 0; padding: 0; } body { width: ${width}px; height: ${height}px; background: #ffffff; display: flex; justify-content: center; align-items: center; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; -webkit-font-smoothing: antialiased; }</style></head><body>${svg}</body></html>`;
|
||||
|
||||
return renderHtmlToImageBuffer({
|
||||
html,
|
||||
width,
|
||||
height,
|
||||
scale,
|
||||
chrome: options?.chrome
|
||||
});
|
||||
}
|
||||
@@ -1,2 +1 @@
|
||||
export * from "./venn.js";
|
||||
export * from "./duration-histogram.js";
|
||||
@@ -51,7 +51,7 @@ export function saveReportMarkdown(
|
||||
const cleanBase = basename(path).replace(/^\d+-/, "");
|
||||
target = `${assetDir}/${images.size + 1}-${cleanBase}`;
|
||||
const dynamic = dynamicAssets?.[path] ?? dynamicAssets?.[basename(path)] ?? dynamicAssets?.[cleanBase];
|
||||
const bundled = templatePath === BUILTIN_TEMPLATE_PATH ? REPORT_ASSETS[path] : undefined;
|
||||
const bundled = REPORT_ASSETS[path] ?? (templatePath === BUILTIN_TEMPLATE_PATH ? REPORT_ASSETS[path] : undefined);
|
||||
const data = dynamic ?? bundled ?? readFileSync(inputFile(resolve(dirname(templatePath), path)));
|
||||
files.set(resolve(dirname(file), target), data);
|
||||
images.set(path, target);
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
| 文件 | 用途 |
|
||||
| --- | --- |
|
||||
| `monthly.md` | 模板本体。**可变的皮**:章节标题、表格结构允许增删改名——填充逻辑从标题反推数据需求(`src/domains/seal/reports/describe.ts`),改这里通常不用改代码 |
|
||||
| `assets/` | 报告配图(图 1 数据图、图 2/3 占位图),相对引用,渲染时随 md 一起解析 |
|
||||
| `examples/` | 填充真实数据的成品示例(结构参考 + 测试夹具) |
|
||||
| `assets/` | 报告核心配图(图 1 准确率维恩图),相对引用,渲染时随 md 一起解析 |
|
||||
| `report.css` | HTML、长图和 A4 PDF 共用的版式,随 CLI 内嵌 |
|
||||
|
||||
模板纪律见模板仓库 README:不引入 frontmatter/占位符标记(结构即契约)、正文不含 HTML 注释、表格只换数据行。
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="600" viewBox="0 0 1200 600" font-family="-apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif">
|
||||
<rect width="1200" height="600" fill="#ffffff"/>
|
||||
|
||||
<!-- Title -->
|
||||
<text x="600.0" y="38" font-size="20" font-weight="600" fill="#111111" text-anchor="middle">各单据模板审核耗时分布对比 (2026年8月全量240单样本)</text>
|
||||
|
||||
<!-- Horizontal Gridlines -->
|
||||
<g stroke="#f0f0f0" stroke-width="1">
|
||||
<line x1="80" y1="443.3" x2="1160" y2="443.3"/>
|
||||
<line x1="80" y1="366.7" x2="1160" y2="366.7"/>
|
||||
<line x1="80" y1="290.0" x2="1160" y2="290.0"/>
|
||||
<line x1="80" y1="213.3" x2="1160" y2="213.3"/>
|
||||
<line x1="80" y1="136.7" x2="1160" y2="136.7"/>
|
||||
<line x1="80" y1="60.0" x2="1160" y2="60.0"/>
|
||||
</g>
|
||||
|
||||
<!-- Vertical Gridlines -->
|
||||
<g stroke="#f5f5f5" stroke-width="1">
|
||||
<line x1="140.0" y1="60" x2="140.0" y2="520"/>
|
||||
<line x1="340.0" y1="60" x2="340.0" y2="520"/>
|
||||
<line x1="540.0" y1="60" x2="540.0" y2="520"/>
|
||||
<line x1="740.0" y1="60" x2="740.0" y2="520"/>
|
||||
<line x1="940.0" y1="60" x2="940.0" y2="520"/>
|
||||
<line x1="1140.0" y1="60" x2="1140.0" y2="520"/>
|
||||
</g>
|
||||
|
||||
<!-- Stacked Bars -->
|
||||
<g>
|
||||
<rect x="90.0" y="443.3" width="50.0" height="76.7" fill="#48a9c5" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="140.0" y="443.3" width="50.0" height="76.7" fill="#48a9c5" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="140.0" y="366.7" width="50.0" height="76.7" fill="#7fe3d7" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="190.0" y="290.0" width="50.0" height="230.0" fill="#f7a072" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="190.0" y="251.7" width="50.0" height="38.3" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="190.0" y="175.0" width="50.0" height="76.7" fill="#7fe3d7" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="240.0" y="481.7" width="50.0" height="38.3" fill="#48a9c5" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="240.0" y="366.7" width="50.0" height="115.0" fill="#f7a072" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="240.0" y="328.3" width="50.0" height="38.3" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="240.0" y="136.7" width="50.0" height="191.7" fill="#7fe3d7" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="290.0" y="481.7" width="50.0" height="38.3" fill="#b19cd9" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="290.0" y="405.0" width="50.0" height="76.7" fill="#f7a072" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="290.0" y="328.3" width="50.0" height="76.7" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="290.0" y="136.7" width="50.0" height="191.7" fill="#7fe3d7" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="340.0" y="481.7" width="50.0" height="38.3" fill="#48a9c5" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="340.0" y="443.3" width="50.0" height="38.3" fill="#f7a072" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="340.0" y="366.7" width="50.0" height="76.7" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="340.0" y="213.3" width="50.0" height="153.3" fill="#7fe3d7" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="390.0" y="443.3" width="50.0" height="76.7" fill="#48a9c5" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="390.0" y="366.7" width="50.0" height="76.7" fill="#a8d5ba" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="390.0" y="290.0" width="50.0" height="76.7" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="440.0" y="481.7" width="50.0" height="38.3" fill="#b19cd9" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="440.0" y="443.3" width="50.0" height="38.3" fill="#a8d5ba" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="440.0" y="405.0" width="50.0" height="38.3" fill="#7fe3d7" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="490.0" y="443.3" width="50.0" height="76.7" fill="#b19cd9" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="490.0" y="290.0" width="50.0" height="153.3" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="540.0" y="481.7" width="50.0" height="38.3" fill="#48a9c5" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="540.0" y="443.3" width="50.0" height="38.3" fill="#a8d5ba" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="540.0" y="328.3" width="50.0" height="115.0" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="590.0" y="481.7" width="50.0" height="38.3" fill="#b19cd9" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="590.0" y="328.3" width="50.0" height="153.3" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="640.0" y="481.7" width="50.0" height="38.3" fill="#fed766" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="640.0" y="405.0" width="50.0" height="76.7" fill="#a8d5ba" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="690.0" y="481.7" width="50.0" height="38.3" fill="#f7a072" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="740.0" y="481.7" width="50.0" height="38.3" fill="#fed766" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="790.0" y="481.7" width="50.0" height="38.3" fill="#b19cd9" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="790.0" y="443.3" width="50.0" height="38.3" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="840.0" y="405.0" width="50.0" height="115.0" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="890.0" y="481.7" width="50.0" height="38.3" fill="#7fe3d7" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="940.0" y="481.7" width="50.0" height="38.3" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="990.0" y="481.7" width="50.0" height="38.3" fill="#fed766" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<rect x="990.0" y="443.3" width="50.0" height="38.3" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
</g>
|
||||
|
||||
<!-- Plot Border -->
|
||||
<rect x="80" y="60" width="1080" height="460" fill="none" stroke="#222222" stroke-width="1.2"/>
|
||||
|
||||
<!-- Red Average Line -->
|
||||
<line x1="385.4" y1="60" x2="385.4" y2="520" stroke="#e02424" stroke-width="2.4" stroke-dasharray="6,4"/>
|
||||
|
||||
<!-- Y-axis Ticks & Labels -->
|
||||
<g font-size="14" fill="#222222" text-anchor="end">
|
||||
<line x1="75" y1="520.0" x2="80" y2="520.0" stroke="#222222" stroke-width="1.2"/><text x="70" y="525.0">0</text>
|
||||
<line x1="75" y1="443.3" x2="80" y2="443.3" stroke="#222222" stroke-width="1.2"/><text x="70" y="448.3">2</text>
|
||||
<line x1="75" y1="366.7" x2="80" y2="366.7" stroke="#222222" stroke-width="1.2"/><text x="70" y="371.7">4</text>
|
||||
<line x1="75" y1="290.0" x2="80" y2="290.0" stroke="#222222" stroke-width="1.2"/><text x="70" y="295.0">6</text>
|
||||
<line x1="75" y1="213.3" x2="80" y2="213.3" stroke="#222222" stroke-width="1.2"/><text x="70" y="218.3">8</text>
|
||||
<line x1="75" y1="136.7" x2="80" y2="136.7" stroke="#222222" stroke-width="1.2"/><text x="70" y="141.7">10</text>
|
||||
<line x1="75" y1="60.0" x2="80" y2="60.0" stroke="#222222" stroke-width="1.2"/><text x="70" y="65.0">12</text>
|
||||
</g>
|
||||
<text x="25" y="290.0" font-size="16" font-weight="500" fill="#222222" text-anchor="middle" transform="rotate(-90 25 290.0)">单据数量</text>
|
||||
|
||||
<!-- X-axis Ticks & Labels -->
|
||||
<g font-size="14" fill="#222222" text-anchor="middle">
|
||||
<line x1="140.0" y1="520" x2="140.0" y2="525" stroke="#222222" stroke-width="1.2"/><text x="140.0" y="544">200</text>
|
||||
<line x1="340.0" y1="520" x2="340.0" y2="525" stroke="#222222" stroke-width="1.2"/><text x="340.0" y="544">400</text>
|
||||
<line x1="540.0" y1="520" x2="540.0" y2="525" stroke="#222222" stroke-width="1.2"/><text x="540.0" y="544">600</text>
|
||||
<line x1="740.0" y1="520" x2="740.0" y2="525" stroke="#222222" stroke-width="1.2"/><text x="740.0" y="544">800</text>
|
||||
<line x1="940.0" y1="520" x2="940.0" y2="525" stroke="#222222" stroke-width="1.2"/><text x="940.0" y="544">1000</text>
|
||||
<line x1="1140.0" y1="520" x2="1140.0" y2="525" stroke="#222222" stroke-width="1.2"/><text x="1140.0" y="544">1200</text>
|
||||
</g>
|
||||
<text x="620.0" y="576" font-size="16" font-weight="500" fill="#222222" text-anchor="middle">审核耗时(秒)</text>
|
||||
|
||||
<!-- Legend Box (Top Right) -->
|
||||
<g transform="translate(848, 72)">
|
||||
<rect width="300" height="200" fill="#ffffff" stroke="#bbbbbb" stroke-width="1" rx="3"/>
|
||||
<rect x="12" y="12" width="22" height="12" fill="#7fe3d7" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<text x="42" y="22" font-size="12" fill="#222222">一般费用报销单【发票】- 个人报销 (70单)</text>
|
||||
<rect x="12" y="35" width="22" height="12" fill="#f5a9b8" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<text x="42" y="45" font-size="12" fill="#222222">一般费用报销单【发票】- 对外支付 (64单)</text>
|
||||
<rect x="12" y="58" width="22" height="12" fill="#a8d5ba" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<text x="42" y="68" font-size="12" fill="#222222">一般费用报销单【收据】- 个人报销 (33单)</text>
|
||||
<rect x="12" y="81" width="22" height="12" fill="#fed766" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<text x="42" y="91" font-size="12" fill="#222222">采购申请与预付款类单据 (24单)</text>
|
||||
<rect x="12" y="104" width="22" height="12" fill="#f7a072" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<text x="42" y="114" font-size="12" fill="#222222">差旅报销单-定额 (22单)</text>
|
||||
<rect x="12" y="127" width="22" height="12" fill="#b19cd9" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<text x="42" y="137" font-size="12" fill="#222222">其他报销及业务单据 (12单)</text>
|
||||
<rect x="12" y="150" width="22" height="12" fill="#48a9c5" fill-opacity="0.8" stroke="#333333" stroke-width="0.75"/>
|
||||
<text x="42" y="160" font-size="12" fill="#222222">采购付款单-月结款 (15单)</text>
|
||||
<!-- Average Line in Legend -->
|
||||
<line x1="12" y1="179" x2="34" y2="179" stroke="#e02424" stroke-width="2.4" stroke-dasharray="5,3"/>
|
||||
<text x="42" y="183" font-size="12" fill="#222222">总体平均耗时: 445.4秒 (约7.4分钟)</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="880" height="360" viewBox="0 0 880 360">
|
||||
<rect x="4" y="4" width="872" height="352" rx="10" fill="#f6f8fa" stroke="#c9d1d9" stroke-width="2" stroke-dasharray="8 6"/>
|
||||
<text x="440" y="168" text-anchor="middle" font-family="PingFang SC, Hiragino Sans GB, sans-serif" font-size="22" fill="#8b949e">配图占位:示例单据截图(可多张)</text>
|
||||
<text x="440" y="202" text-anchor="middle" font-family="PingFang SC, Hiragino Sans GB, sans-serif" font-size="14" fill="#adb5bd">实际报告替换为正式图表</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 581 B |
@@ -1,265 +0,0 @@
|
||||
# 【赢家】8月AI审核准确率报告
|
||||
|
||||
| 报告信息 | 内容 |
|
||||
| --- | --- |
|
||||
| 报告编号 | eeka-ai-audit-2026-08 |
|
||||
| 客户名称 | 赢家时尚 |
|
||||
| 统计期间 | 2026-08-01 ~ 2026-08-31 |
|
||||
| 报告状态 | 草稿 |
|
||||
| 生成日期 | 2026-09-23 |
|
||||
|
||||
> **摘要**:以赢家时尚授权的 **240 笔**历史审批单据(2026-08-01 ~ 2026-08-31)为样本,对合思 AI 审核结论与人工审核结论做全量复核。AI 审核准确率 **92.08%**,人工审核准确率 **83.33%**;系统全月成功审核率近 **90%**,自 8 月 8 日迭代后稳定在 **96.07%**。AI 在人工已同意的单据中额外识别出 **40 笔**存在风险的凭证。
|
||||
|
||||
---
|
||||
|
||||
## 1. 审核测试结果
|
||||
|
||||
### 1.1 数据来源与范围
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 数据来源 | 赢家时尚授权的已完成历史审批单据 |
|
||||
| 统计期间 | 2026-08-01 ~ 2026-08-31 期间单据 |
|
||||
| 单据模板 | 涵盖一般费用报销单【发票】-个人报销、一般费用报销单【发票】-对外支付、一般费用报销单【收据】-个人报销、差旅报销单-定额、采购付款单等 **16 类**业务单据模板 |
|
||||
| 样本总量 | **240 张**(100 张同意 + 100 张驳回 + 40 张建议复核) |
|
||||
|
||||
### 1.2 核心准确率结论
|
||||
|
||||
基于已经给定的规则库:
|
||||
|
||||
| 审核方式 | 准确率 |
|
||||
| --- | --- |
|
||||
| 合思 AI 审核 | **92.08%** |
|
||||
| 人工审核 | **83.33%** |
|
||||
|
||||
AI 审核准确率的计算方式:
|
||||
|
||||
$$ \text{AI 审核准确率} = \frac{\text{依规判定正确单数}}{\text{样本总量}} = \frac{221}{240} = 92.08\% $$
|
||||
|
||||

|
||||
|
||||
*图 1 · AI 与人工审核准确率对比*
|
||||
|
||||
### 1.3 系统稳定性
|
||||
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 全月成功审核率 | 近 **90%** |
|
||||
| 迭代影响 | 8 月第一周失败率较高;自 8 月 8 日迭代后,系统稳定性升至 **96.07%** 的稳定运行常态 |
|
||||
|
||||
> **注**:“审核失败”是产品侧的保护机制:当 AI 对单据内容无法形成可靠判断,系统会将该次审核标记为失败,以避免错误影响实际审批。
|
||||
|
||||
---
|
||||
|
||||
## 2. AI 失准分析(学习优化空间)
|
||||
|
||||
在全量 **240 单**的深度稽核中,合思 AI 依规综合正确 **221 单(92.08%)**,综合失准共 **19 单(7.92%)**。失准主要由以下三个维度构成。
|
||||
|
||||
### 2.1 失准构成总览
|
||||
|
||||
| 维度 | 失准类型 | 占比 | 单数 |
|
||||
| --- | --- | --- | --- |
|
||||
| TOP 1 | 规则执行与判定偏差 | 47.4% | 9 张 |
|
||||
| TOP 2 | 数据与附件识别问题 | 26.3% | 5 张 |
|
||||
| TOP 3 | 费用明细查重冲突 | 26.3% | 5 张 |
|
||||
| 合计 | — | 100% | 19 张 |
|
||||
|
||||
### 2.2 TOP 1 · 规则执行与判定偏差(9 张 / 47.4%)
|
||||
|
||||
**解决方案**:严格校准规则触发后动作,按规则执行。
|
||||
|
||||
| 单号 | 问题描述 |
|
||||
| --- | --- |
|
||||
| FP2609671 | rule-125 仅核验支付凭证金额一致性,不要求个人代垫的收款方必须是公司,AI 误要求 |
|
||||
| CD2625928 | 8 月 3 日至 8 月 5 日均为工作日(周一至周三),AI 误认为有周末未扣减问题 |
|
||||
| FP2609370 | 费用承担主体命中 rule-40 / rule-99 豁免白名单,AI 未执行豁免逻辑导致驳回 |
|
||||
|
||||
*(节选 3 例,全量 9 张)*
|
||||
|
||||
### 2.3 TOP 2 · 数据与附件识别问题(5 张 / 26.3%)
|
||||
|
||||
**解决方案**:持续优化识别模型,提升多附件文字解析稳定性。
|
||||
|
||||
| 单号 | 问题描述 |
|
||||
| --- | --- |
|
||||
| SJ2661735 | 手写收据金额 243 元被 OCR 误识别为 2433 元,导致金额不符误驳回 |
|
||||
| FP2611200 | 微信红包支付记录清晰完整,AI 误判定为无关凭据导致误驳回 |
|
||||
| SG2619081 | 已完整包含中秋节福利品发放人员统计表 Excel 文件,AI 因多附件漏提取误判缺件驳回 |
|
||||
|
||||
*(节选 3 例,全量 5 张)*
|
||||
|
||||
### 2.4 TOP 3 · 费用明细查重冲突(5 张 / 26.3%)
|
||||
|
||||
**解决方案**:已去掉跨批次相似费用冲突的默认判定,客户可按需配置此功能。
|
||||
|
||||
| 单号 | 问题描述 |
|
||||
| --- | --- |
|
||||
| CGD260875 | AI 因跨批次存在历史同类辅料费用提示疑似冲突转人工 |
|
||||
| FP2607495 | AI 因跨批次云产品疑似同类费用冲突转人工 |
|
||||
| FP2608432 | 发票金额 180 元(1% 普票),远未达到 500 元专票强制门槛,AI 因过度怀疑是否存在专票协议转人工 |
|
||||
|
||||
*(节选 3 例,全量 5 张)*
|
||||
|
||||
---
|
||||
|
||||
## 3. AI 发现的潜在风险
|
||||
|
||||
在人工审核同意的单据中,有部分单据被 AI 发现存在风险,问题 TOP 3 如下。
|
||||
|
||||
### 3.1 风险构成总览
|
||||
|
||||
| 维度 | 风险类型 | 占比 | 单数 |
|
||||
| --- | --- | --- | --- |
|
||||
| TOP 1 | 缺失要求凭证 | 57.5% | 23 张 |
|
||||
| TOP 2 | 大额预付与采购口径偏差 | 22.5% | 9 张 |
|
||||
| TOP 3 | 票据合规与专票强制违规 | 20.0% | 8 张 |
|
||||
| 合计 | — | 100% | 40 张 |
|
||||
|
||||
### 3.2 TOP 1 · 缺失要求凭证(23 张 / 57.5%)
|
||||
|
||||
| 单号 | 问题描述 |
|
||||
| --- | --- |
|
||||
| FP2610941 | 改衣费未附改衣明细表 |
|
||||
| FP2610735 | 咨询费报销资料不全 |
|
||||
| FP2608630 | 专利代理费未列明发明名称且缺少缴费通知书 |
|
||||
|
||||
*(节选 3 例,全量 23 张)*
|
||||
|
||||
### 3.3 TOP 2 · 大额预付与采购口径偏差(9 张 / 22.5%)
|
||||
|
||||
| 单号 | 问题描述 |
|
||||
| --- | --- |
|
||||
| YF2616524 | 大额预付款单未关联申购单 / 申请单 |
|
||||
| CGA260211 | 采购预付款单明细采购订单号与合同号不一致 |
|
||||
| CGD261254 | 采购付款单品类为上装类但发票明细为服装加工费,业务勾稽不符 |
|
||||
|
||||
*(节选 3 例,全量 9 张)*
|
||||
|
||||
### 3.4 TOP 3 · 票据合规与专票强制违规(8 张 / 20.0%)
|
||||
|
||||
| 单号 | 问题描述 |
|
||||
| --- | --- |
|
||||
| FP2609850 / FP2610235 / FP2610631 | 发票类对外支付模板未上传正规发票,上传非正规微信截图或洗衣取衣单据 |
|
||||
| FP2610206 | 高税率业务金额超 500 元未开具增值税专用发票且无免专票佐证 |
|
||||
| FP2609582 | 完税证明纳税人名称与费用承担公司主体不一致 |
|
||||
|
||||
*(节选 3 条,全量 8 张)*
|
||||
|
||||
---
|
||||
|
||||
## 4. 综合效益
|
||||
|
||||
| 维度 | 结论 | 关键数据 |
|
||||
| --- | --- | --- |
|
||||
| 准确度 | 除去 AI 无法形成可靠判断而转失败的单据,AI 在既定规则范围内的准确率已赶超人工审批 | **92.08%** |
|
||||
| 时效 | AI 审核单张单据平均耗时赶超人工处理时效 | 平均 **445.4 秒** |
|
||||
| 风险拦截 | 在人工审核通过的单据中,合思 AI 有效防堵无票支付、大额无合同预付、税票违规等税务与资金安全隐患 | 40 笔 |
|
||||
| 工作量 | 协助财务人员弥补遗漏、关注单据重点信息,大幅释放财务人员精力,专注于更有价值的工作 | — |
|
||||
|
||||

|
||||
|
||||
*图 2 · 各单据模板审核耗时分布对比*
|
||||
|
||||
---
|
||||
|
||||
## 5. AI 与人工审核一致性示例
|
||||
|
||||
| 示例单号 | 单据模板 | 合思 AI 审核驳回意见 | 人工实际退回说明 | 双方一致性 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| **FP2609372** | 一般费用报销单【发票】- 个人报销 | 帕森墨镜发票(776.15元,税率13%)仅开具普通发票,单笔超500元未按规定开具增值税专用发票且无免专票佐证,违反专票管控要求,建议驳回换开专票。 | `4、发票不合规:普票替换成专票` | **专票合规要求100%对齐**:均严格执行超500元13%高税率发票必须开具专票的硬性管控。 |
|
||||
| **FP2610941** | 一般费用报销单【发票】- 个人报销 | 对应规则129:改衣明细表未上传,必备核心附件缺失,不符合改衣费报销要求,AI建议【驳回单据】。 | `2、附件不合规:未提供改衣费明细表` | **必备明细表缺失一致**:AI 精准拦截缺件,人工直接依据未提供改衣费明细表退回。 |
|
||||
| **FP2610780** | 一般费用报销单【发票】- 对外支付 | 版布开发费对外支付报销,对账单未上传至专项附件且未检出双方盖章,违反规则69,建议驳回单据、补充合规盖章对账单。 | `2、附件不合规:盖章对账单及送货单没有上传附件` | **公对公盖章凭据一致**:对外支付缺少双方盖章对账单,AI 提前拦截,人工随后同样驳回。 |
|
||||
| **CD2625843** | 差旅报销单-定额 | 差旅定额补助消费日期(8月10日)与关联出差申请单行程(7月31日)不符,超出合理出差区间,建议驳回。 | `3、表单填写错误:结余补贴时间与出差时间不一致` | **行程时间勾稽一致**:双方均敏锐识别出补贴申请时间与实际行程脱节。 |
|
||||
| **FP2611220** | 一般费用报销单【发票】- 个人报销 | 费用类型选用错误:报销内容为清洁耗材(鸡毛掸子、刮水器、除尘滚轮等),错选为“门店环保费(仅限清洁人工及绿植)”,建议驳回。 | `3、表单填写错误:费用明细选择办公费` | **科目填报纠错一致**:AI 指出错选环保费,人工直接打回要求改选办公费。 |
|
||||
| **FP2611191** | 一般费用报销单【发票】- 个人报销 | 活动表格内费用金额与实际报销金额不一致;未按要求上传金额匹配的一一对应支付记录,建议驳回。 | `支付记录与报销金额不一致,请把不相关的支付记录删除只保留与报销单相关的金额。` | **支付凭证与金额一致性**:双方均发现支付凭据与报销金额脱节、混入无关凭据。 |
|
||||
| **YS2600603** | 预提类非生产物料采购申请 | FS成本中心不符合品推费要求(应选品推组,实选两广事业部),二级费用类型与业务场景不匹配,建议驳回。 | `3、表单填写错误:成本中心、预算项目有误` | **预算与成本中心纠错一致**:AI 与人工退回均直指成本中心与预算项目选错。 |
|
||||
| **SJ2661686** | 一般费用报销单【收据】- 个人报销 | 存在2项高风险:收据模板错传正规发票;且改衣费报销缺少必备的改衣明细表,建议驳回。 | `未上传改衣费明细表` | **硬性合规项一致**:人工直接依据缺少改衣明细表退回。 |
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
*图 3 ~ 6 · 上述示例单对应的单据截图*
|
||||
|
||||
---
|
||||
|
||||
## 6. AI 通过 / 人工驳回单据明细
|
||||
|
||||
| 单据编号 | 单据模板 | AI 审批决策 | 人工审批参考结论 | 原因分类 | 复核结论 | 截图 |
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| **FP2608010** | 发票-个人报销 | 同意 | 终止 (改衣费超标) | **依规正确 (计入 D4)** | 单据改衣费发票、支付凭证及Excel改衣明细表齐全且金额均为1195元完全一致,收款人即申请人免营业执照,完全符合rule-129合规要求。人工以口头“改衣费超标”为由终止(规则库中无此超标阻断线),AI依规放行完全正确。 |  |
|
||||
| **FP2608464** | 发票-对外支付 | 同意 | 终止 (2、附件不合规:账单抬头错误) | **AI失准 (不计入分子)** | 附件对账单买方抬头存在错误,未匹配费用承担主体,命中rule-13对账单买方校验风险。人工退单指出账单抬头错误依规有据,AI未能识别出对账单抬头瑕疵直接放行,属于数据/附件识别失误。 |  |
|
||||
| **YS2600514** | 预提类采购申请 | 同意 | 终止 (请核对“确认采购金额”;请补充附件费用计划。) | **依规正确 (计入 D4)** | 现行规则库中对于该类申请单的检查规则不包含“采购金额/费用计划附件”的强制校验卡口,单据字段与基础凭证合规,AI依既定规则放行正确。 |  |
|
||||
| **SJ2661226** | 收据-个人报销 | 同意 | 终止 (无理由) | **依规正确 (计入 D4)** | 单据收据、明细表、支付记录及收据袋编码均齐全且金额完全一致,符合rule-129各项规定。单据本身合规,AI依规放行正确。 |  |
|
||||
| **SJ2661313** | 收据-个人报销 | 同意 | 终止 (无理由) | **AI失准 (不计入分子)** | 单据费用为“商场附加费”,依rule-128必须提供正规发票,本单仅附收据无发票,不符合科目票据规范。AI误判放行,属于规则执行错误。 |  |
|
||||
| **FP2609210** | 发票-对外支付 | 同意 | 终止 (无理由终止/撤回) | **依规正确 (计入 D4)** | 专柜小额维修费1236元,发票真实合规,依据rule-177区域部门5000元以下免关联申购单,万元以下免合同,单据在线上规则下无违规。AI放行正确。 |  |
|
||||
| **FP2609105** | 发票-个人报销 | 同意 | 终止 (未提供活动实际销售情况,费用占销比说明) | **依规正确 (计入 D4)** | 单据发票验真一致,电子发票PDF源文件齐全,收款人匹配。人工以“未提供费用占销比说明”退回,但规则库未将占销比设为必填附件,AI依规放行正确。 |  |
|
||||
| **SJ2661468** | 收据-个人报销 | 同意 | 终止 | **依规正确 (计入 D4)** | 门店改衣费报销260元,改衣清单与收据袋完整合规,无违规或缺件。AI按既定规则核验通过正确。 |  |
|
||||
| **SJ2661540** | 收据-个人报销 | 同意 | 终止 | **依规正确 (计入 D4)** | 单据模板及收据票据核验合规,无拦截风险。AI依规放行判定正确。 |  |
|
||||
| **FP2610213** | 发票-对外支付 | 同意 | 终止 | **依规正确 (计入 D4)** | 单据各项附件(增值税专票、盖章合同、核销单)齐全完整,金额准确无瑕疵。AI依规放行判定正确。 |  |
|
||||
| **FP2610610** | 发票-个人报销 | 同意 | 终止 (电话网络费由人事统一报销) | **依规正确 (计入 D4)** | 门店电话网络费330元,发票及支付记录完全合规。人工以公司内部口头行政口径“人事统一报销”退单,规则库未配置该项排除规则,AI依规放行正确。 |  |
|
||||
| **SJ2661469** | 收据-对外支付 | 同意 | 终止 | **依规正确 (计入 D4)** | 改衣费250元,改衣明细表及票据齐全合规,收款人为合规备案人员。AI依规判定正确。 |  |
|
||||
| **FP2610689** | 发票-对外支付 | 同意 | 终止 (结算单应按公司区分,不能合并一起) | **依规正确 (计入 D4)** | 员工体检福利费,体检合同、发票及人员名单齐全,分摊成本中心同属一区域。人工要求拆分公司结算单退回,规则库未配置该项规则,AI依规放行判定正确。 |  |
|
||||
| **FP2610431** | 发票-对外支付 | 同意 | 终止 | **依规正确 (计入 D4)** | 单据全维度核验合规,发票、收款主体、成本中心均无风险。AI依规放行判定正确。 |  |
|
||||
| **SJ2661828** | 收据-个人报销 | 同意 | 终止 | **依规正确 (计入 D4)** | 收据类单据表单与票据均符合规则要求,无风险项。AI依规放行判定正确。 |  |
|
||||
|
||||
在上述 **15 笔**单据中:
|
||||
|
||||
1. **86.7%(13 / 15 笔)属于依规正确(计入 D4)**:单据在线上凭证与 196 条规则库完全合规,退单主要由于经办人撤回、无理由终止,或财务人员在执行尚未纳入线上规则库的其他规则。**AI 线上放行依据规则库正确。**
|
||||
|
||||
2. **仅有 2 笔属于 AI 真实失准(占全量样本 0.83%)**,已如实扣除准确率,未计入分子:`FP2608464`(对账单抬头瑕疵未能检出)、`SJ2661313`(商场附加费无专票放行)。
|
||||
|
||||
---
|
||||
|
||||
## 7. 支撑数据与材料
|
||||
|
||||
### 7.1 分模板准确率与自动审批率
|
||||
|
||||
全量 N = 240:
|
||||
|
||||
| 单据模板 | AI 准确率 | 人工准确率 | 自动审批率 | 人工同意:驳回 | AI&人工都准确比例 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| 一般费用报销单【发票】- 个人报销 | 92.86% | 87.14% | 45.71% | 70(57:13) | 80.00% |
|
||||
| 一般费用报销单【发票】- 对外支付 | 92.19% | 75.00% | 42.19% | 64(50:14) | 67.19% |
|
||||
| 一般费用报销单【收据】- 个人报销 | 93.94% | 93.94% | 48.48% | 33(20:13) | 87.88% |
|
||||
| 差旅报销单-定额 | 81.82% | 100.00% | 31.82% | 22(19:3) | 81.82% |
|
||||
| 采购付款单-月结款 | 93.33% | 93.33% | 66.67% | 15(15:0) | 86.67% |
|
||||
| 预提类非生产物料采购申请 | 85.71% | 100.00% | 28.57% | 7(2:5) | 85.71% |
|
||||
| 预付款单 | 100.00% | 42.86% | 14.29% | 7(7:0) | 42.86% |
|
||||
| 一般费用报销单【收据】- 对外支付 | 100.00% | 100.00% | 40.00% | 5(2:3) | 100.00% |
|
||||
| 一般费用报销单【云账户及银行代扣】- 对外支付 | 100.00% | 50.00% | 25.00% | 4(3:1) | 50.00% |
|
||||
| 采购付款单-预付款 | 100.00% | 0.00% | 0.00% | 4(4:0) | 0.00% |
|
||||
| 非生产物料采购申请(不需预提) | 75.00% | 100.00% | 0.00% | 4(2:2) | 75.00% |
|
||||
| 装修报销单 | 100.00% | 0.00% | 0.00% | 1(1:0) | 0.00% |
|
||||
| 立项费用报销单 | 100.00% | 0.00% | 0.00% | 1(1:0) | 0.00% |
|
||||
| 预提类非生产物料采购报销单 | 100.00% | 100.00% | 0.00% | 1(0:1) | 100.00% |
|
||||
| 一般费用报销单【物流中心-运费专用】 | 100.00% | 100.00% | 100.00% | 1(1:0) | 100.00% |
|
||||
| 采购付款「负数」单-预付款 | 100.00% | 100.00% | 100.00% | 1(1:0) | 100.00% |
|
||||
| **全量样本总体 (N=240)** | **92.08%** | **83.33%** | **41.67%** | **240(185:55)** | **75.42%** |
|
||||
|
||||
### 7.2 跑批原始数据
|
||||
|
||||
[请至钉钉文档查看附件《赢家时尚2026年8月单据审批质量审计报告\_全量看板.xlsx》。](https://alidocs.dingtalk.com/i/nodes/kDnRL6jAJM6GyZPZI99mZ0gX8yMoPYe1?iframeQuery=anchorId%3DX02mu3v6grnsfbr1tvg7m)
|
||||
|
||||
### 7.3 抽样方法与可复现性
|
||||
|
||||
本次复核共抽取 240 笔样本,抽样规则如下:
|
||||
|
||||
| # | 抽样规则 |
|
||||
| --- | --- |
|
||||
| 1 | 时间全月均衡覆盖(8 月 1 日—31 日) |
|
||||
| 2 | 100 笔 AI 同意 + 100 笔 AI 驳回 + 40 笔 AI 复核 |
|
||||
| 3 | 保底 30 笔大额采购与预付款单据(上中下旬各 10 笔),其余 170 笔按企业当期各报销模板的实际发生比例加权分配 |
|
||||
| 4 | 固定随机种子抽样算法基于截止日固定随机种子(Seed: 20260831)自动执行,且全流程清单支持任何第三方精准复现核验 |
|
||||
|
||||
抽样基于账期截止日的固定随机种子执行,全过程可由第三方复现,完整可执行代码随报告附件交付。
|
||||
|
||||
**抽样算法说明**
|
||||
|
||||
1. **输入数据池**:2026 年 8 月全量 6,573 笔已归档业务单据。
|
||||
2. **随机数与排序稳定性**:采用 Python 标准库与 `hashlib.sha256(f"{seed}_{bill_no}")` 双重散列锁死序列,第三方执行该代码,所得出的 240 笔单据清单、顺序及样本编号都会与本数据集完全一致。
|
||||
3. **输出样本集**:程序精确生成 240 笔单据,时间分布严格为 **80 : 80 : 80(1:1:1)**,决策分布严格为 **100(同意): 100(驳回): 40(建议复核)**,采购大额单据共 **39 笔(满足 >= 30 笔保底要求)**,达到要求。
|
||||
@@ -1,8 +1,6 @@
|
||||
import monthly from "./monthly.md" with { type: "text" };
|
||||
import css from "./report.css" with { type: "text" };
|
||||
import accuracy from "./assets/图1-准确率对比.svg" with { type: "text" };
|
||||
import benefits from "./assets/图2-综合效益.svg" with { type: "text" };
|
||||
import screenshot from "./assets/图3-示例截图.svg" with { type: "text" };
|
||||
|
||||
// Git owns the source files; Bun embeds these imports in both developer and release binaries.
|
||||
// Loading the built-in template never depends on cwd, a checkout, or skill installation.
|
||||
@@ -10,7 +8,5 @@ export const BUILTIN_TEMPLATE_PATH = "builtin:reports/templates/monthly.md";
|
||||
export const BUILTIN_MONTHLY_TEMPLATE = monthly;
|
||||
export const REPORT_CSS = css;
|
||||
export const REPORT_ASSETS: Record<string, string> = {
|
||||
"assets/图1-准确率对比.svg": accuracy,
|
||||
"assets/图2-综合效益.svg": benefits,
|
||||
"assets/图3-示例截图.svg": screenshot
|
||||
"assets/图1-准确率对比.svg": accuracy
|
||||
};
|
||||
Reference in new issue
Block a user