Commit Graph

8 Commits

Author SHA1 Message Date
25d5d1c7be F2-9: 选择窗完整化——searchable搜索、树形模板picker修复、部门树amis-tree端点
- UiTypeMapper: SelectDialog/MultiSelectDialog 生成 searchable:true + source 带 ?q=\${term}&page&perPage(F2-9搜索)
- PickerController: resolveByViewTemplate 支持 <tree> 根元素,取第一个 <node entityid> 解析实体(修复138b7ca7树形模板返回"非法实体")
- OrgController: 新增 GET /api/org/depart-tree/{orgId}/amis-tree,返回 {label,value,children} 嵌套格式供 amis select-tree 消费

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 01:54:44 +08:00
e876327c75 F2-8: 写链路异常友好响应 + 附件控件映射
- 新增 WriteExceptionHandler:ValidationException→422、PrivilegeException→403、
  RuntimeException→500,均返回 amis 约定 {status,msg},不再裸透 Spring 500
- UiTypeMapper 新增 MultiFileUploadField/FileUploadField → input-file
  (receiver=/api/file/upload, downloadUrl=/api/file/${id}, multiple)
- 转换器单测新增 form_附件字段MultiFileUploadField转inputFile(28/28 pass)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 00:47:31 +08:00
2d8a16eef6 F2-16: 转换器列级渲染映射——枚举/日期/布尔列显示人话
TemplateToAmisConverter.buildColumns() 按 entityId 查询
SYS_ENTITYATTRIBUTE 元数据,注入 amis 列渲染配置:
- DATE → type=date(YYYY-MM-DD)
- TIME → type=datetime(YYYY-MM-DD HH:mm)
- ENUMERATE/STATUS → type=mapping,枚举翻译表从 SYS_ENUMERATE 嵌入
- BOOLEAN → type=mapping({0:否,1:是,false:否,true:是})

覆盖:3147 列命中(12138 总列),875 个模板;
重批 1516 条,闸一 98.2% 不变;单测 33/33;e2e 35/35。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 00:30:35 +08:00
6e5880f5fa F2-13: 转换器 title 取 view_template.name(修 title=测试 问题)
根因:convertCrud/convertReport 等取 XML title 属性(往往为"测试"),
应取 view_template.name。
修法:convertGraded 增加 templateName 参数,BatchConvertCli 传入
view_template.name,各 convert* 方法优先用 templateName 作为 page title。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 23:33:26 +08:00
9544099718 F1-4b: 批量转换接 attachScriptOnEvent,产物补挂 onEvent 重入库双库
- BatchConvertCli: 闸一通过后按 rewritten/<tid>/*.FULL_AUTO.groovy 挂 onEvent(第5参数=产物根);guardUrl 改为禁 ceshi+允许本地库
- application-dev.yml: eip4.script.rewritten-root 配置(实际部署建议绝对路径启动参覆盖)
- 双库各 379/1,493 条产物带 execute-template 钩子;e2e script-replay 2/2 绿
- 坑: yml 是 jar 内资源,改后须重打包;启动工作目录影响相对路径解析

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:01:35 +08:00
082b439179 P4-5: 实装改写后脚本挂回 amis onEvent 重放链路
转换器侧(事件段):TemplateToAmisConverter.attachScriptOnEvent 在页面
body 挂 inited+change 两类 onEvent,动作链 ajax 调 /api/script/execute-template
(传 templateId/seq/item:${&})→ replayScriptCommands 重放返回指令。

执行端点:ScriptExecuteController /api/script/execute-template 改接
{templateId,seq,item},RewrittenScriptStore 按 (tid,seq) 从改写产物
output/rewritten 取脚本正文(去头注释)经 facade 执行;原按名端点改
-by-name 保留 P4-2 兼容。

测试:RewrittenScriptStoreTest 4 + ScriptExecuteControllerTest 4 +
TemplateToAmisConverterTest 新增 4 onEvent 例;converter 28 / metadata 77 /
ArchUnit 1 全绿。

出入回写报告第五章 §5.3;新坑入手册 §8.5(组件级动作路由)/§8.6(改写产物取数键)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 16:55:43 +08:00
f563b472e6 P4-1 转换器线:扩 EDITFORM/主子表/树/选择窗/<report> 段 + 全量 1516 模板批量转换双闸分级
转换器扩展(platform-converter,PoC crud 三段种子上):
- 按 XML 根元素分派 crud/form/tree/report/group;ConversionResult+Grade 三级分级
- EDITFORM:form pageid 解析 view_page 取字段;主子表 EditGrid/FormEditGrid→input-table(子列取自 editgridtemplate)
- 树:type=3 声明式→input-tree、type=4 引用式→flex(tree+crud)
- 选择窗 SelectDialog/MultiSelectDialog→select+source(非 amis picker:picker 不在 6.13 schema 表单项 oneOf,闸一会拒)
- <report> A 类:crud+合计行(issummer→summaryFields)+金额列(ismoney→number);selectservice→/api/flow;JOR/图表降级标注
- UiTypeMapper 统一 uitype 映射;每决策登记映射台账(全量约 1.6 万条)
- 孤儿模板(entityid 非法/空 xml)旁路标记不崩(手册 §7.4)

批量+双闸(BatchConvertCli,可独立 CLI 跑批,只读连库+5435 ceshi 库硬守门):
- 闸一 SchemaGate(宽松语义预处理抽出,与 AmisSchemaController 共享):通过 98.2%(1489/1516)
- 闸二 playwright+本地 amis SDK 渲染冒烟,每类型抽≥5:25/25 全过
- 产物 转换产物/(schema/*.json + 分级清单.csv + 闸二结果.json)
- 失败 27 个全为空 xml 孤儿模板(库内数据问题,非转换器缺陷)

新坑进手册 §8.3(picker 不在表单项 oneOf,用 select+source) §8.4(闸二大 schema 经端点拉避 HTTP 431)
单测 24 个;全 reactor mvn test+ArchUnit 绿
报告 platform-converter/P4批量转换报告.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 16:27:49 +08:00
a9219c5c77 chore: 落地 eip4-platform 多模块骨架基线(PoC→工程化)
从 eip4-poc 迁入双层制模块化单体:保真层 platform-legacy-core
(com.dsasp 引擎原样)+ 现代层 platform-metadata/auth/flow-gateway/
converter/ai + platform-app 启动器。ArchUnit 纪律固化(保真层禁依赖现代层)。
此为 C1 对拍工作的编译通过基线。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 23:40:51 +08:00