duyunzhoudyz/dyz-gongwen-skills / skills/gongwen-data
gongwen-data
Verified为公文整理数据、出图表,包括报表体检(空值、合并单元格、合计校验、单位和时段口径冲突),汇总下级报表,计算同比、环比、增速、百分点、占比、拉动、完成率、平均值并附算式,把数据写成能直接进公文的句子,在本机生成黑白灰 Excel 图表,数据不出本机,缺的数标【待补】。用户说合并科室月报、汇总下面报的表、查查合计对不对、算同比环比、百分点怎么写、这组数写成一段话、做个柱状图折线图时使用。整篇总结和分析报告交 gongwen-report,装有行业包时,本行业专用文书交对应行业包;成稿核数字交 gongwen-review,整改台账转 Excel 交 gongwen-rectify。
references/inspect-checklist.md
View on GitHub# 报表体检与合并清单
不能运行脚本时按本清单人工检查,能运行时用它复核脚本结果;编号与脚本输出的 `id` 对应(合并的 DT-MG- 编号见 `references/scripts.md` 第二部分)。
## 一、体检顺序
先看标注(有密级或内部标注的立即停止)→ 再看结构(表头行、合计和小计行、“其中”行,表头前说明和表注写的时段、单位、口径)→ 单元格 → 对合计 → 最后看口径(多张表逐表比对)。每张表只体检一次,正文只引用体检后确认可用的数。
## 二、问题清单
| 编号 | 问题 | 人工怎么查 | 级别 | 处理 |
|---|---|---|---|---|
| DT-SEC-01 | 密级或内部标注 | 文件名、各工作表名、标题、表头前、表注、单元格 | P0 | 停止处理,回到开工检查第1条;用户说明后才可加 `--marking-ok` 重跑,降为 P2,输出仍按内部材料管理 |
| DT-SUM-01、02 | 合计、小计与明细不符 | 明细逐项相加,与合计行比;有小计的先核小计,再用各小计相加核合计 | P0 | 按 SKILL.md 第二步处理;体检报告写明“表中合计A,明细相加B,相差C” |
| DT-SUM-03 | 相差在修约误差内 | 相差不超过末位2个单位(如1位小数的表差0.1、0.2) | P2 | 表注写“因四舍五入,分项之和与合计略有出入” |
| DT-SUM-06 | 超出修约容差 | 相差超过末位2个单位,但不超过(行数+1)×0.5个末位单位 | P1 | 可能是修约或填报有误;查清前按 DT-SUM-01 处理 |
| DT-SUM-04 | 比率、平均数列的合计 | 合计行的率或平均数是不是简单相加或简单平均 | P2 | 按 SKILL.md 第二步重算 |
| DT-SUM-05 | 合计相符但明细有空值 | 某列有空格,合计只加了有数的行 | P2 | 与别的列比较时先补齐或两边同口径剔除 |
| DT-NUL-01、02 | 空值、占位符 | 空格、“—”“/”“无”“暂无” | P1 | 按 SKILL.md 第二步;表注写了含义的引用原文;没写的问清是未报、0还是不适用 |
| DT-TXT-01 | 文本型数字 | 单元格左上角有绿色三角、数字靠左 | P1 | Excel 求和会跳过,合计偏小;转换为数字 |
| DT-TXT-02 | 数后带单位或货币符号 | “3500元”“¥88” | P1 | 单位写进表头,格内只填数 |
| DT-TXT-03 | 约数 | “约20”“30多”“近百” | P1 | 按 SKILL.md 第二步处理 |
| DT-TXT-04 | 全角数字、首尾空格 | “12”“ 35” | P2 | 改为半角,删去空格 |
| DT-TXT-05 | 数值列有文字 | “未报”“见附件” | P1 | 改填数值或移到备注 |
| DT-MRG-01 | 数据区合并单元格 | 合并后只有左上角有值,其余按空读取 | P1 | 取消合并、逐行填写后再汇总 |
| DT-ERR-01、02 | 公式错误值、公式无结果 | “#DIV/0!”“#REF!”;程序生成的表公式没有计算结果 | P0、P1 | 在原表修正;用 Excel 打开保存后再处理 |
| DT-UNIT-01、02 | 单位不一致;没写单位 | 同一列有元有万元;表头、表注都没有单位 | P0;P2 | 换算统一后再算,换算写进底稿;没写的向填报单位确认 |
| DT-PER-01、03 | 没写时段、时段不止一个 | 标题和表注里找“2026年1—6月”之类 | P2 | 确认每列对应的时段 |
| DT-DUP-01~03 | 重复行、名称写法不一致 | 同一单位出现两次;“心内科”与“心内科 ” | P1 | 删重或合并;统一写法 |
| DT-STR-01~05 | 表格结构 | 认不出表头(01);多级表头合并为“上级-下级”(02);没有数据行(03);隐藏行列(04);夹着重复表头(05) | P1、P2 | 指定表头行;核对列名;确认隐藏内容是否计入;删重复表头 |
| DT-STR-06 | “其中”行 | “其中:党员”是上一行的一部分 | P2 | 不参与求和 |
| DT-VAL-01、02 | 负数、比率超过100% | 人数为负、合格率120% | P2 | 核对是否录错、分子分母颠倒 |
| DT-PRI-01、02 | 个人信息 | 姓名、身份证号、手机号、病案号、住院号、学号、家庭住址 | P0 | 提醒脱敏;输出写“张某”“138****0000”;汇总只用统计数 |
## 三、合并汇总规则
除 SKILL.md 第三步的五条规则外:
1. 对齐表头:列名去掉空格和括注后对应。某表缺某列的,该列汇总标“不完整”,不当作0。
2. 去重:同一单位在两张表里都出现的,问清是否重复报送(确认前按第三步第4条处理);联合开展的事项只计一次。
3. 应报未报:对照应报单位名单,没交的列入体检报告和“待补”一行。
例:人社局报“培训320人”,农业农村局报“培训410人次”,不能写“共培训730人(人次)”;登记进口径冲突表,正文分写两家数字,待核实一行请农业农村局提供按人统计的培训数。
## 四、体检报告和口径冲突表的格式
体检报告开头一行结论,再列问题清单,级别高的在前:
```text
体检结论:表A有P0问题1条(新登记户数合计不符),正文暂用明细相加数;其余数据可用,见计算底稿。
```
| 序号 | 级别 | 表 | 位置 | 问题 | 处理建议 |
|---|---|---|---|---|---|
| 1 | P0 | 表A | 第21行 新登记户数 | 合计4382,明细18行相加4356,相差26 | 请登记注册科核对;查清前正文写“4356户”,表中合计4382户列入待核实 |
多张表合并时,口径冲突另列“附:口径冲突表”,放在起草说明之后:
| 序号 | 指标或事项 | 各表的说法 | 冲突类型 | 本稿处理 | 请谁确认 |
|---|---|---|---|---|---|
| 1 | 新登记户数 | 表A、表B:1—6月;表C:1—5月 | 时段不一致 | 表C未计入合计,正文注明“不含南岭镇” | 南岭镇市场监管所 |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |