SNAPSHOT W7 已部署稳定态 — 凯迪ERP+OA一体化平台 (MET 73.3%)

恢复点(restore point)。别人改崩后可 git reset --hard 回到此提交。

== 此快照内容 ==
- 后端 oa-backend: 734 控制器 / 711 实体 (Spring Boot 3.2.5 + SQLite, 端口8091)
- 前端 modern-ui/app: Vue3+Vite, 约700页 (构建产物已在 oa-backend/src/main/resources/static)
- 数据库 oa-backend/data/oa.db: 含全部演示数据 (强制入库, 6.6MB)
- 交接文档 go.md + go-code-reference/endpoints/entities/database.md
- 多代理建设脚本 .claude/wf-*.js

== 状态 ==
- 对 凯迪科技ERP_20260507.xlsx 合规 MET ~73.3% (PARTIAL 75: 34可建+6种子/bug+35外部硬天花板)
- 安全: 5轮红队+5轮复检, default-deny分级鉴权, 连续零可利用
- W3~W7 累计补完436缺口; W8末轮(40缺口)为半成品(源码树可编译但未集成)
- 运行: cd oa-backend; java -jar build/libs/oa-backend-0.1.0.jar --server.port=8091; admin/123456

== 排除(gitignore, 可再生) ==
node_modules / oa-backend/build / .jdks / *.log / Backup-ERP-* / 弃用的OFBiz核心(只保留modern-ui)
完整文件夹备份见同目录 Backup-ERP-20260615-191517/ (含上述全部, 仅缺 node_modules)

时间戳: 20260615-191517

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Qiufeng
2026-06-15 19:19:15 +08:00
co-authored by Claude Opus 4.8
commit 5e51dc3f56
10584 changed files with 2501339 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
export const meta = {
name: 'erp-audit-lean',
description: '精简合规审计:29机构sonnet覆盖审计(只R1功能覆盖,无验证/链/批判),快速量化MET/PARTIAL/MISSING+剩余缺口',
phases: [{ title: '功能覆盖审计' }],
}
const IMPL = `现系统:后端 ~717 控制器(oa-backend/src/main/java/com/kaidi/oa/web)、~697 实体、前端模块页(ofbiz-framework/plugins/modern-ui/app/src/oa/pages)。活体 http://127.0.0.1:8091 登录 POST /api/oa/auth/login {"loginName":"admin","password":"123456"} 取token带 Authorization: Bearer。经P0-P3+W1+W2+W3三批深建(W3刚补完156缺口)。注意:子资源控制器base路径无GET属正常(子路径如/events /summary可达),勿据此判MISSING。`
const FINDINGS = {
type: 'object', additionalProperties: false,
properties: {
dept: { type: 'string' }, suborg: { type: 'string' },
modules: { type: 'array', items: {
type: 'object', additionalProperties: false,
properties: {
module: { type: 'string' },
verdict: { type: 'string', enum: ['MET', 'PARTIAL', 'MISSING', 'LOGIC_GAP'] },
evidence: { type: 'string', description: '控制器/实体/页面/端点证据; MISSING写无' },
gap: { type: 'string', description: '缺什么; MET留空' },
severity: { type: 'string', enum: ['none', 'low', 'med', 'high'] },
},
required: ['module', 'verdict', 'evidence', 'gap', 'severity'],
} },
},
required: ['dept', 'suborg', 'modules'],
}
const SLICE = '/Users/qiu/Desktop/ERP/requirements/_req_slices'
const FILES = [
'01_创新研发中心__产品开发部','02_创新研发中心__申报服务部','03_创新研发中心__知识产权部','04_创新研发中心__实验室',
'05_设计研究中心__咨询可研院','06_设计研究中心__规划设计部','07_设计研究中心__工程监理部',
'08_制造管理中心__环保设备制造中心','09_制造管理中心__生物质肥料制造中心',
'10_工程管理中心__质安部','11_工程管理中心__资料室','12_工程管理中心__专利工法办','13_工程管理中心__成本控制部',
'14_运营管理中心__城镇污水运营中心','15_运营管理中心__工业废水运营中心',
'16_市场部__经营部','17_市场部__办事处','18_市场部__分公司',
'19_支付中心__结算中心','20_支付中心__财务部','21_支付中心__金融办',
'22_内控部__法务风险部','23_内控部__审计监察部',
'24_品牌推广部__宣传部','25_品牌推广部__项目文化',
'26_行政__综合部','27_行政__信息部','28_行政__办公室','29_行政__后勤',
]
phase('功能覆盖审计')
const findings = await parallel(FILES.map((fn) => () =>
agent(
`你是 ERP 需求合规审计员。先 Read 需求切片 ${SLICE}/${fn}.txt。${IMPL}
对该机构需求里【每个功能模块(## 标题)】,grep/读码/活体取证判定现系统实现度:MET(真工作流+联动落地)/PARTIAL(有承载缺部分子功能)/LOGIC_GAP(有页缺关键逻辑联动)/MISSING(无实现)。基于真实代码不臆测,给每个模块一条结论+证据+缺口+severity。`,
{ label: `审:${fn.split('__')[1]}`, phase: '功能覆盖审计', schema: FINDINGS, model: 'sonnet' }
)
)).then((a) => a.filter(Boolean))
// 汇总
const counts = { MET: 0, PARTIAL: 0, LOGIC_GAP: 0, MISSING: 0 }
const gaps = []
for (const f of findings) {
for (const m of (f.modules || [])) {
counts[m.verdict] = (counts[m.verdict] || 0) + 1
if (m.verdict !== 'MET') gaps.push({ area: `${f.dept}/${f.suborg}`, module: m.module, verdict: m.verdict, gap: m.gap, severity: m.severity })
}
}
const total = counts.MET + counts.PARTIAL + counts.LOGIC_GAP + counts.MISSING
log(`审计完成: MET${counts.MET} PARTIAL${counts.PARTIAL} LOGIC${counts.LOGIC_GAP} MISS${counts.MISSING} / 共${total}`)
return { units: findings.length, counts, total, metPct: total ? (counts.MET * 100 / total).toFixed(1) : 0, gaps }