Files
ERP/.claude/wf-fullbuild-w2.js
T
QiufengandClaude Opus 4.8 5e51dc3f56 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>
2026-06-15 19:19:15 +08:00

88 lines
6.7 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export const meta = {
name: 'erp-fullbuild-w2',
description: '长尾全建W229机构并行深化剩余PARTIAL/MISSING子功能(新建文件+回传共享片段)',
phases: [{ title: '深化剩余缺口' }],
}
const COMMON = `黄金模板:web/FinancingController.java(CRUD+业务动作+@Transactional级联)、web/DevProjectController.java(状态机+审批自动展开WBS)、聚合 web/FundPoolController.java、前端 oa/pages/payment/repayment.vue(自定义工作流页)。
硬约束:①金额BigDecimal+com.kaidi.oa.common.Money(无裸double算钱);②日期String(YYYY-MM-DD)+LocalDate/ChronoUnit;③控制器@RestController @RequestMapping("/api/oa/<资源复数>"),ApiResp.ok(),record请求体,NotFoundException/ApiException(400/409,中文),状态迁移/级联@Transactional;④仓库extends JpaRepository派生查询;⑤前端真实页接真后端(import { http },已解包ApiResp.data,token键oa.token),列表套MasterDataPage,工作流/看板用el-table+el-dialog+el-card;⑥无emoji(@element-plus/icons-vue)、无渐变(纯色蓝#2f6fed)、排版慎重;⑦类名表名加域前缀,grep确认与现有~250控制器零撞名。
**关键纪律**:①**只新建文件**或改你机构自己的页;共享文件(AuthInterceptor/oaModules/TriggerRuleEngine/WorkflowService)**不自改**,放 sharedFileSnippets(file+anchor+change+why);②**不运行gradle/npm**,逐文件自审语法;③加法式,不破坏现有链与审批流;④Vue 里 :row-class-name 等箭头回调的 { row } 必须写成 ({ row }: { row: any }) 避免隐式any。`
const RESULT = {
type: 'object', additionalProperties: false,
properties: {
unit: { type: 'string' },
backendFiles: { type: 'array', items: { type: 'string' } },
frontendFiles: { type: 'array', items: { type: 'string' } },
authFinancePrefixes: { type: 'array', items: { type: 'string' } },
authSensitiveRead: { type: 'array', items: { type: 'string' } },
navEntries: { type: 'array', items: {
type: 'object', additionalProperties: false,
properties: { moduleId: { type: 'string' }, items: { type: 'array', items: {
type: 'object', additionalProperties: false,
properties: { key: { type: 'string' }, label: { type: 'string' }, kind: { type: 'string' }, path: { type: 'string' } },
required: ['key', 'label', 'kind', 'path'] } } },
required: ['moduleId', 'items'] } },
sharedFileSnippets: { type: 'array', items: {
type: 'object', additionalProperties: false,
properties: { file: { type: 'string' }, anchor: { type: 'string' }, change: { type: 'string' }, why: { type: 'string' } },
required: ['file', 'anchor', 'change', 'why'] } },
endpoints: { type: 'array', items: { type: 'string' } },
summary: { type: 'string' },
},
required: ['unit', 'backendFiles', 'frontendFiles', 'authFinancePrefixes', 'authSensitiveRead', 'navEntries', 'sharedFileSnippets', 'endpoints', 'summary'],
}
const SLICE = '/Users/qiu/Desktop/ERP/requirements/_req_slices'
const GAPS = '/Users/qiu/Desktop/ERP/requirements/_xlsx_audit_round2.json'
const UNITS = [
['创新研发中心','产品开发部','rd','01_创新研发中心__产品开发部'],
['创新研发中心','申报服务部','rd','02_创新研发中心__申报服务部'],
['创新研发中心','知识产权部','rd','03_创新研发中心__知识产权部'],
['创新研发中心','实验室','lab','04_创新研发中心__实验室'],
['设计研究中心','咨询可研院','design','05_设计研究中心__咨询可研院'],
['设计研究中心','规划设计部','design','06_设计研究中心__规划设计部'],
['设计研究中心','工程监理部','supervision','07_设计研究中心__工程监理部'],
['制造管理中心','环保设备制造中心','mfg','08_制造管理中心__环保设备制造中心'],
['制造管理中心','生物质肥料制造中心','mfg','09_制造管理中心__生物质肥料制造中心'],
['工程管理中心','质安部','ehs','10_工程管理中心__质安部'],
['工程管理中心','资料室','archive','11_工程管理中心__资料室'],
['工程管理中心','专利工法办','rd','12_工程管理中心__专利工法办'],
['工程管理中心','成本控制部','budget','13_工程管理中心__成本控制部'],
['运营管理中心','城镇污水运营中心','ops','14_运营管理中心__城镇污水运营中心'],
['运营管理中心','工业废水运营中心','ops','15_运营管理中心__工业废水运营中心'],
['市场部','经营部','crm','16_市场部__经营部'],
['市场部','办事处','crm','17_市场部__办事处'],
['市场部','分公司','crm','18_市场部__分公司'],
['支付中心','结算中心','payment','19_支付中心__结算中心'],
['支付中心','财务部','finance','20_支付中心__财务部'],
['支付中心','金融办','payment','21_支付中心__金融办'],
['内控部','法务风险部','legal','22_内控部__法务风险部'],
['内控部','审计监察部','audit','23_内控部__审计监察部'],
['品牌推广部','宣传部','culture','24_品牌推广部__宣传部'],
['品牌推广部','项目文化','culture','25_品牌推广部__项目文化'],
['行政','综合部','hr','26_行政__综合部'],
['行政','信息部','itasset','27_行政__信息部'],
['行政','办公室','admin','28_行政__办公室'],
['行政','后勤','admin','29_行政__后勤'],
]
log(`长尾全建W2${UNITS.length} 机构并行深化剩余缺口`)
phase('深化剩余缺口')
const results = await parallel(UNITS.map(([dept, sub, mod, fn]) => () =>
agent(
`你是资深全栈工程师,为凯迪 ERP【深化】二级机构:${dept} / ${sub}。本机构已有不少控制器(W1/P0-P3已建),你的任务是**补齐审计判为 PARTIAL/MISSING/LOGIC_GAP 的剩余子功能**,把"有承载浅逻辑"做深到"真工作流"。
第一步 Read 需求规格:${SLICE}/${fn}.txt
第二步 Read 第二轮审计缺口清单(找你这个机构 area 的 survivedGaps)${GAPS}
第三步 grep/读码盘点本机构已有控制器/实体(避免重复建,改名加前缀)。
第四步 针对审计点名的剩余缺口,新建 实体+仓库+控制器(+服务) 与真实前端页,把每条 PARTIAL 做深(状态机/审批/自动计算/跨模块取数/预警/条码追溯/版本/依赖/批次序列号等需求描述的真能力)。优先做 high 缺口。把假数据页改接真后端。前端挂模块 '${mod}'。
${COMMON}
返回结构化结果(导航 moduleId='${mod}';共享前缀/导航/片段照纪律回传)。summary 说明补深了哪几条审计缺口。`,
{ label: `深化:${sub}`, phase: '深化剩余缺口', schema: RESULT, model: 'sonnet' }
)
)).then((a) => a.filter(Boolean))
return { built: results.length, total: UNITS.length, results }