|
|
8e5e2410d1
|
feat(converter): convertReport 对含 JOR 套打的 type=200 产报表查看器
EIP3 真报表(jatools JOR 套打)此前被转换器降级成 amis 表格。现 convertReport 分流:
含 <reportfile>(JOR 套打版式,328/339)→ convertReportViewer 产 page→crud:
- api=/api/report/frame/{templateId}(currentTemplateId,缺则回落 entityId);
- filter=buildSearchFilter(查询条件,F3-1 过滤主键列)——picker 落 crud.filter 工作上下文;
- 单 html 列把 ${__url} 渲成 <iframe>(JOR HTML 独立加载、CSS 隔离保真);
- 有查询条件时 initFetch:false(等用户「查询」再加载,避免必填工程为空时空参渲染报错);
- header/footer toolbar 置空(报表查看器无新增/批量/分页)。
无 reportfile(9/339,纯数据报表)→ 保留原数据表降级行为不变。
测试:替换旧 JOR 降级用例为 4 个查看器用例(api/单 html iframe 列/picker 落 crud.filter+initFetch/
templateId 入 api/无 reportfile 保留表格);全 platform-converter 186 测试绿。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-25 22:19:18 +08:00 |
|
|
|
8fe377b0c8
|
feat(blueprint): master-detail-v1 编译器分支 + PageBlueprintChild
PageBlueprint 加 RECIPE_MASTER_DETAIL 常量与可空 child 组件(14-arg,
保留 13-arg 兼容构造);新增 PageBlueprintChild record。
PageBlueprintCompiler.masterDetail 复用 maintenance 列表骨架,
新增/编辑表单内联 house-style input-table 子表(name=listColumn,
quickEdit 控件),编辑表单 initApi 走 _LOAD 回显主+子行。
validate 接受 master-detail 并要求 child 非空/childTable/listColumn
非空/fields 非空。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-20 15:16:30 +08:00 |
|
|
|
a51f35317f
|
test edit form page resolution
ci / build-test-parity (push) Has been cancelled
|
2026-06-18 17:17:48 +08:00 |
|
|
|
dbf5b6c86a
|
fix edit form page resolution
ci / build-test-parity (push) Has been cancelled
|
2026-06-18 17:16:45 +08:00 |
|
|
|
ccd74710fa
|
fix schedule job notify editor
ci / build-test-parity (push) Has been cancelled
|
2026-06-18 17:15:10 +08:00 |
|
|
|
d218c2ba6f
|
fix framework treegrid search and formeditgrid editors
|
2026-06-18 16:35:51 +08:00 |
|
|
|
b6e6964913
|
fix framework p2 custom views
|
2026-06-18 15:35:17 +08:00 |
|
|
|
ffd8c31e7e
|
fix: gate function template downloads
|
2026-06-18 13:24:43 +08:00 |
|
|
|
22211b2557
|
feat(附件): 双态组件 + 新建/编辑保存落库打通
- 转换器 buildAttachmentField: 附件字段收敛为单个 input-file 双态组件
(staticOn ${__readonly} 查看只读可下载/编辑可增删; joinValues:false,extractValue:false
提交附件对象数组), 删除 each+service 容器, 查看/编辑同位置同布局
- FlowController 读路径 resolveAttachmentFields: 把保真层大写 DOCUMENT
({SYS_DOC_ID,FILENAME,FILESIZE}) 归一为 amis 小写契约 {id,name,value,url,sizeKb},
修掉"查看附件空白图标"
- FlowController 写路径 normalizeAttachmentFieldsForWrite(按 url=/api/file/ 签名识别):
修改流 → [{SYS_DOC_ID}] 交保真层 updateAttachments 对账(留/软删/不重复插);
新建流 → 捕获 docId+剥离 DOCUMENT, 保存后用返回主键 relinkInsertedAttachments
UPDATE sys_doc.businesskey 改挂(直接改挂、非复制 → 无 UNKNOWN 孤儿)
- FileController.upload: businesskey 右补白 36 位对齐保真层 getDoc(CHAR(36) 主键),
否则 loadDoc 读不到新附件; 响应补 value
- 测试: converter 154 + metadata 368 全绿
(新增 4c 读契约归一 / 4d 修改归一 / 4e 新建改挂 / FileController 补白)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-18 13:09:36 +08:00 |
|
|
|
5636b37220
|
feat: complete framework P2 deltas
|
2026-06-18 11:18:40 +08:00 |
|
|
|
c9e4d35ca1
|
feat: wire schedule notifications and data import downloads
ci / build-test-parity (push) Has been cancelled
|
2026-06-18 09:59:55 +08:00 |
|
|
|
3523007f16
|
feat: add framework script editor actions
ci / build-test-parity (push) Has been cancelled
|
2026-06-18 09:39:07 +08:00 |
|
|
|
a019af8e3a
|
feat: wire process monitor actions
|
2026-06-18 09:02:54 +08:00 |
|
|
|
1d8a4fec60
|
feat: wire process form removal actions
|
2026-06-18 08:55:17 +08:00 |
|
|
|
61f31527bc
|
feat: wire my started workflow tasks
|
2026-06-18 08:12:15 +08:00 |
|
|
|
21e3865dcf
|
fix(platform): restore approval history drawer
|
2026-06-18 02:12:27 +08:00 |
|
|
|
278b0da422
|
fix(platform): resolve picker load defaults
ci / build-test-parity (push) Has been cancelled
|
2026-06-18 01:51:59 +08:00 |
|
|
|
723443ea1e
|
fix(platform): implement short message send
|
2026-06-18 01:19:15 +08:00 |
|
|
|
bf7bb2515b
|
fix(platform): complete picker parity and message detail
ci / build-test-parity (push) Has been cancelled
|
2026-06-18 00:30:01 +08:00 |
|
|
|
0d6fab4a5e
|
fix(converter): map user selectors to amis picker
ci / build-test-parity (push) Has been cancelled
|
2026-06-17 23:48:39 +08:00 |
|
|
|
2c1ec5f54e
|
fix(converter): avoid amis mode collision for user picker
ci / build-test-parity (push) Has been cancelled
|
2026-06-17 23:15:43 +08:00 |
|
|
|
57f011e801
|
feat(metadata): restore legacy user transfer picker flow
ci / build-test-parity (push) Has been cancelled
|
2026-06-17 22:36:33 +08:00 |
|
|
|
78d27847dd
|
fix(metadata): make user picker searchable and show selections
ci / build-test-parity (push) Has been cancelled
|
2026-06-17 22:04:26 +08:00 |
|
|
|
88ff6f6bfb
|
feat(metadata): wire legacy process selector
ci / build-test-parity (push) Has been cancelled
|
2026-06-17 21:45:12 +08:00 |
|
|
|
1581a99d75
|
feat(metadata): wire legacy user select picker
ci / build-test-parity (push) Has been cancelled
|
2026-06-17 21:31:11 +08:00 |
|
|
|
57c3412aff
|
fix(flow): restore workflow task converted pages
|
2026-06-17 20:44:52 +08:00 |
|
|
|
3276774037
|
fix(converter): 树编辑表单按 <layout> 槽位排版+隐藏未布局字段
type=3 可编辑树 master-detail(buildEditableTreeMasterDetail)原直接
form.put("body", formItems) 把 view_page <fields> 全平铺为可见输入框,
无视 <layout>——泄露 VERSION/主键/引用 id 等隐藏字段(标签还是裸列名),
且字段不按布局顺序。
老引擎 FormPageTemplateComponent 用 Vaadin CustomLayout:只渲染 <layout>
里有 <div location="X"> 槽位的字段(按文档序),无槽位字段绑进 FieldGroup
供提交但不显示。EDITFORM(convertForm)早已走 buildFormBody 复刻此行为,
唯独树编辑路径漏了。
改:buildEditableTreeMasterDetail 解析 pageRoot 后同样走 buildFormBody
(tabs + <div location> 文档序归位 + 未布局字段 hidden=true 收尾,提交不丢)。
影响 41 个可编辑树页(含功能模板下载/菜单维护/实体分类等)。
live 实证 13accf09:可见仅 ISOPEN/BUTTONCAPTION/DOCUMENT(布局序+正确标签),
VERSION/SYS_MENU_ID/VIEW_TEMPLATE_DOWNLAD_ID/VIEW_TEMPLATEID 隐藏。
全量重转 dry-run 深度 diff=41 页变(余保真),已重导收敛 0 diff。
converter 156 测试绿(树 master-detail 测试改递归取字段穿透布局容器)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-17 17:37:55 +08:00 |
|
|
|
b5fe995344
|
feat(converter): 机制①整页改写器 + 功能模板下载门控(去添加按钮/改标题)
EngineclassDelta 原仅支持「crud 工具栏追加按钮」。新增 MUTATORS 注册表
(engineclass FQN → 整页 schema 改写器),apply 拆为 applyToolbarButtons
(crud 加按钮,行为不变)+ applyMutators(任意 body 整页改写),覆盖非
crud 加按钮类 delta。
注册 FuncDownloadComponent(功能模板下载模板管理 0246d4bd / 设置 13accf09,
type=3 树页 grid → 左 input-tree + 右 button-toolbar[添加] + form):复刻
refreshRightLayout —— ① 移除右表单「添加/删除」按钮(附件随菜单/实体生成
不应手工增删,老 cl.removeComponent(insert)/(del)),空 toolbar 整条移除;
② 右表单标题改「编辑模板附件」(老 panel.setCaption)。改写器重建列表回填,
兼容转换器的不可变 List.of 列 body(原地 removeIf 会 UOE)。
未做:老「仅 VIEW_TEMPLATEID 非空才显示右表单」门控——amis form visibleOn
依赖自身 initApi 数据成循环,正解需树节点携带该列(改 TemplateTreeController),
价值低暂延后。
另核对:实体分类-枚举组(b114351f) 老 EntityEnumerateType 用 UUID 当树节点 id
(Vaadin 懒加载防重复 addItem),EIP4 树端点用 PK 唯一 + 跨级去重 + 一次性全量
建树,结构上天然规避,实测 598 节点零重复 → 已覆盖,无需移植。
全量重转 dry-run 深度 diff 确认语义仅 2 页变(余 2725 页保真),已重导上线
(live 实证 13accf09 无「添加」按钮 + 标题「编辑模板附件」)。converter 156 测试绿。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-17 16:57:44 +08:00 |
|
|
|
17c449cbf5
|
feat(converter): 机制①定制视图 delta 注入 + filterscript 级联过滤
机制①(engineclass Java delta 移植):老系统「定制视图」=数据驱动 XML 由
默认模板引擎渲染,但配 engineclass 的视图有 Java 子类在默认引擎之上加/改
按钮。转换器已复刻默认页但抓不到 Java delta——新增 EngineclassDelta 注册表
(engineclass FQN → 工具栏按钮 builder),convertGraded 增 engineclass 入参,
默认页转好后追加注入(默认页不变,仅 append);BatchConvertCli 透传
view_template.engineclass。
本轮注册 4 个 framework 定制视图:
- UserManageView:设置主岗位 + 查看用户菜单
- SystemLogMainView:按类型删除 + 全部删除
- SysUserLoginHistoryMainView:按查询条件删除记录
- SysUserLoginInfoMainView:查看登录记录(下钻登录历史)
配套后端:
- LogController(/api/admin/log/delete-all|delete-by-type|delete-by-logintime)
接 SystemLogManager;deleteByType 用 LogType 枚举白名单防注入。
- MenuController 新增 /api/admin/user/{userId}/menu(查看指定用户可见菜单树,
移植 UserRoleView,与 /api/admin/menu 共用 menuTreeFor 构建逻辑)。
filterscript 级联(P1):view_page 字段 filterscript 的「按其它字段值过滤本
字段」语义无法统一脚本引擎,故按性能优先做模式匹配——动态/常量等值绑定追加
到 select source(&COL=${TRIG}),含 SQL/服务调用/控制流/WhereClause 的复杂
脚本整条跳过(不误改);动态触发设 initFetchOn,添加态不发空参全量请求。
测试全绿(platform-converter + platform-metadata 共 490,0 失败 0 错误)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-17 16:32:50 +08:00 |
|
|
|
838669f124
|
fix(converter): type=4 选择框收口——丢主键列ID + 条件分类树过滤(真列才渲)+名称搜索
用户反馈:功能选择框列表显裸 ID、分类过滤无效。修:①丢 gridtemplate display 里 iskeycolumn=true 列(如 VIEW_TEMPLATE_ID,它=picker的value,网格不重复显裸id)②分类树过滤器仅当 rcolumnname 是右表真实列(isRealColumn 查 information_schema)才渲染——功能管理右表 VIEW_TEMPLATE 无 ENTITYTYPE 列(分类靠 功能→view_templateentity→实体.entitytype 2跳join,属自定义组件UserFunDesignComponent/153),通用 treegrid 表达不了,渲个点了不缩窄的死过滤器只会误导,故省略,降级为可搜索表格③始终补名称搜索框,且 source 显式带 &searchCol=(amis 不把 filter 表单值自动拼进已含 query 的 source url,须显式引用才发得出去——同 pageId 坑)。通用 type=4(rcol 真列如 GOODSSORT_ID)仍保留功能性分类树过滤器。API实证:treegrid?NAME=中标→1516过滤到4;功能picker无ID列+名称搜索。122测试绿。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 22:35:18 +08:00 |
|
|
|
bad7e66b73
|
feat(converter): type=4 选择框→picker 弹窗收尾(分类树过滤+功能表格)
ci / build-test-parity (push) Has been cancelled
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 22:08:58 +08:00 |
|
|
|
5e0845e2c2
|
feat(converter+metadata): 树+表 type=4 选择框 → picker 弹窗(分类树过滤+功能表格)
SelectDialog/MultiSelectDialog 的 dialogid 指向 type=4 treeGrid 模板时(如功能 8b89fd29:treetemplate分类树+gridtemplate功能表 rcolumnname=ENTITYTYPE),转换器 applyTreeGridPicker 产 picker:source=/api/template/treegrid?treeRef=&gridTable=&rcol=&node=${rcol},pickerSchema={mode:table, filter:[tree-select 分类 source=/api/template/{treeRef}/tree searchable], columns(取自gridtemplate display)}。降级规则:通用+自定义 type=4 都走此(不看 engineclass,自定义降级为通用 treeGrid 渲染,非扁平表)。后端 TemplateTreeController.treeGrid 每行补 _label(grid实体显示列)供 picker labelField 显名。spike 实证 amis picker pickerSchema=crud+tree-select filter 机制成立。live:菜单维护 功能 picker 开弹窗=分类树过滤+功能表格(7列单选),选行回填 id+显名,console 0错。caveat:8b89fd29 右表 VIEW_TEMPLATE 无物理 ENTITYTYPE 列→该 dialog 分类过滤不缩窄(数据特性非机制缺陷),其它 type=4 正常。converter121+metadata323测试绿。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 21:48:08 +08:00 |
|
|
|
dc2aa31df8
|
feat(converter): 树 type=3 选择框 tree-select 加 searchable(大树下拉搜索过滤)
type=3 树 dialog 的 SelectDialog→tree-select 改写(1052)+ master-detail 新增分类上级选择器(2646)均补 searchable:true。amis tree-select 6.13 searchable 实测生效:输入即过滤(实测 6622 节点→匹配项)、值显层级路径(信息站/通讯工具/个人通讯录)、提交值仍 id。amis picker 装不了弹窗树(spike 证空弹窗),故保持 tree-select 加搜索为可靠惯用法。重转重导:123 页 tree-select 带 searchable。138 测试绿。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 21:12:22 +08:00 |
|
|
|
e2ddf157d5
|
fix(converter): NumberField 整型列优先于 mdec(整数输入不显小数)
字段 type=java.lang.Integer/Long/Short/BigInteger 时即便 XML 误定义 mdec 小数位(如排序号 TYPESORT type=Integer 却 mdec=2,旧版显「2.00」),也应整数输入 precision=0+step=1;非整型(Double/BigDecimal)才按 mdec 取小数精度。live 验证:新闻收藏分类 默认类别 排序号显「1」非「1.00」。118 测试绿(+整型/Double 对照单测)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 18:25:48 +08:00 |
|
|
|
4468616e88
|
fix(converter): master-detail 右侧 service→form initApi + pageId 放 api.data(picker 加载显名)
spike 实证:amis picker 仅挂载时值已在才经 source 解析,service 包裹异步填值→裸id;form initApi 载入时正确触发解析。改 buildEditableTreeMasterDetail 右侧 service(api)>form → form initApi。pageId 必须放 api.data(GET 时 amis 拼成 query 发出)——url 内联 ?pageId= amis 不可靠发出致后端收不到、退化裸id(真实页网络实证)。配合后端 ?pageId 把引用字段解析成 {_id,_label} 对象,picker 自带 label 即显名(切节点动态重取每次都显名);提交值仍 _id。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 17:58:23 +08:00 |
|
|
|
84a64624ff
|
feat(converter): 可编辑 type=3 树 → master-detail(左树+右 pageid 编辑表单)
<node edit=true pageid=X>+<buttons>(有 save 服务名)的声明式树不再转「工具栏+弹窗」,改转 master-detail:左 input-tree(source /api/template/{id}/tree,name=selId) + 右 service(选中节点经 /api/entity/{表}/${selId} 载入)内嵌由 pageid 的 view_page 经 UiTypeMapper 生成的表单(忠实字段 uitype:SelectDialog+dialogid→picker/tree-select,ComboBox→select,TextField→input-text),添加/删除/保存接 <node><buttons> servicename。convertForm 解析 pageid→字段段抽成 buildFormItemsFromPage 复用;convertTree 穿入 pageResolver;parseNodeButtons/selectEditableNode(多 node 选 edit=true+pageid)辅助。覆盖新闻/公告/通知收藏分类 + 菜单维护等所有可编辑树,统一取代手写 overlay。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 16:39:24 +08:00 |
|
|
|
598f4f9662
|
feat(converter): 通用模板 P0 收口——日历 type5 / 树 type3 接端点 / 组合 type6 真加载
type5 日历:isCalendarTemplate 分流根元素<crud>但语义日历的模板→convertCalendar(amis calendar,largeMode,items→schedules,scheduleAction drawer),不再被当普通表格丢班次/调度语义。type3 声明式树:currentTemplateId 把 source 指向 /api/template/{templateId}/tree(TemplateTreeController 构 {label,value}),修 source 用 /api/flow 返 {items:[{TYPENAME}]} 显「undefined」根因;树型选择框同源复用 /api/template/{dialogId}/tree。type6 组合:convertGroup 每 tab 发 service schemaApi get:/api/page/schema/{tempId}?format=amis + amis mountOnEnter 懒加载,真接子模板远程加载,不再 tpl 占位。分级清单.csv 同步重生。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-16 14:08:49 +08:00 |
|
|
|
4c02019da0
|
fix(converter): 树加节点复用实体真实编辑视图(node@pageid),不再瞎合成
问题:buildTreeAddFormFields 按实体 ismandatory 列合成加节点表单——
①把会话上下文列 USER_ID/ORGID/DEPARTID 拉进来(出现不该填的「*用户/*组织/*部门」);
②非必填业务列(菜单的 功能/分类/上级/根级)被漏掉,菜单维护只剩 2 字段。
修复:树节点 XML 带 pageid(指向实体真实编辑视图),applyTreeNodeCrudFromNode 读
node@pageid,有则 buildTreeNodeAddButtonFromPage——像列表「添加」弹窗一样
service+schemaApi 载入该编辑页(字段/必填/初值/版面忠实;会话列由 ADD 服务补)+
/api/form/{table}/defaults 预填{CURRENTUSER}+保存 submit→POST /api/flow/{addSvc}
close&reload树。无 pageid 回退旧合成(保测试兼容)。
验证(浏览器,admin):
- 收藏分类(平铺无父列): 类别名称/排序号,无组织部门,保存落库+树reload出现新节点;
- 菜单维护(层级): 菜单名称/功能/分类名称/排序号/上级菜单(可加子菜单)/根级菜单 6字段,无组织部门。
converter 108 测试绿;本地全量重转+导入(145 upsert)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-15 21:28:06 +08:00 |
|
|
|
360999d299
|
feat(converter): 列表点击整行即选中(checkOnItemClick)
老系统列表点行任意处即选中,新系统只能精准点第一列单选框(用户反馈不好用)。
crud/treeGrid 右表加 checkOnItemClick:true → 点行任意区域即勾选/选中,
selectedItems 随之就绪、工具栏修改/查看/删除按钮启用。
验证:converter 108 测试绿;本地全量重转+导入(1092 upsert);
浏览器实测 通知管理/新闻管理 点行体单元格→is-checked、三按钮启用。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-15 17:36:49 +08:00 |
|
|
|
eafb88abcd
|
fix(converter): 查看(只读)态真只读——子表静态化+隐藏「添加」按钮
根因:列表「查看」「修改」共用同一可编辑表单 schema,查看 dialog 给
service 包 static:true 想做只读。但 amis 的 static 传导不到 schemaApi 动态
加载表单里的 input-table 子表与「添加」按钮(type:button),故查看态子表仍
渲可编辑 input、添加按钮照样可点(浏览器实测确认)。
修复(三处协同,据 dialog 注入的 ${__readonly} 条件化):
- buildFormDialog:查看态 dialog.data 注入 __readonly:true(编辑态不注入)。
- UiTypeMapper EditGrid input-table:staticOn:"${__readonly}" → 查看整体静态。
- buildEditGridAddButton:hiddenOn:"${__readonly}" → 查看隐藏 picker 按钮。
必填 * 与添加按钮本身是对老模板(required="true"+onlybutton MultiSelectDialog)
的忠实迁移、存在没错,问题只是只读态未关闭。
验证:converter 测试 108 绿(+__readonly 断言);本地 eip4dev 全量重转+导入
(2056 upsert);浏览器真实13行采购申请双向实测——查看:子表0可编辑input/添加按钮
隐藏;修改:子表104 input/添加按钮可见。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-15 17:18:41 +08:00 |
|
|
|
3b416e8f70
|
feat(editgrid): A3 批量「添加用品」——MultiSelectDialog onlybutton → 多选弹窗追加子表行
老模板里 onlybutton 的 MultiSelectDialog(如采购申请「添加用品」)是「批量选用品 → 追加明细行」的
按钮,原映射成普通多选 picker 表单项不可用。改建为:按钮 → 选择弹窗(crud 多选,走 /api/picker/<dialogid>
含规格/单位/现存量列) → 确认把选中行 addItem 追加到本页子表 input-table。
机制(浏览器实证):
- UiTypeMapper.buildEditGridAddButton:onlybutton MultiSelectDialog → 按钮+选择弹窗(crud selectable
multiple);crud onEvent.selectedChange → setValue 把 ${event.data.selectedItems} 存进弹窗 scope
变量 __egpicked(amis 不经 componentId 暴露 crud.selectedItems,故经事件落 scope);确认按钮
onEvent.click = [addItem ${ARRAYMAP(__egpicked, item => ({...item}))}, closeDialog](closeDialog
仅关本弹窗、不连父表单 dialog;括号包对象字面量——箭头函数仅认单表达式)。
- TemplateToAmisConverter.wireEditGridAddButtons:后置把 addItem 的 componentId 占位符替换为本页
input-table 真实 id(eg-<field>)。
- 关键坑:amis 表达式 ${id.x} 里连字符被当减法 → crud/弹窗 id 一律无连字符。
实证:采购「添加用品」弹出 123 用品多选→确认→子表追加 2 行(GOODS_ID 引用列 + 计量单位 + 现存量),
父表单 dialog 保持打开。converter 108 测试绿。
注:引用列映射(GOODS_ID←OA_OFFICE_GOODS_ID 等 picker<实体>_ID 列)是 per-entity 的,本批用 raw-spread
({...item}) 兜底(同名列规格/单位直接带);采购实例的精确映射已在 live schema 验证(recipe 记于项目记忆)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-15 12:17:44 +08:00 |
|
|
|
13d6b4cdf8
|
feat(editgrid): 主子表编辑页可用——默认值/编号+子表选品picker+数值校验+行内脚本引擎+日期coerce+保存端到端
以「办公用品采购申请编辑页」为镜补齐主子表(EditGrid)功能模板转换缺口,子表 editgrid 从「不可用」到可加行/选品/算金额/保存落库。
D 数值校验: UiTypeMapper NumberField 读 vmin/vmax → amis min/max(applyNumberBound)。
B 默认值/编号: FormDefaultsController(/api/form/{table}/defaults)服务端解析 initvalue 宏
(复用 GetDefaultValueFunction) + {AUTOGENERATECODE}→CodeRuleService.getCode + _DISPLAY__回填;
LegacyXmlWiring 注册 codeRuleService bean(零改 com.dsasp);转换器添加 dialog 接 defaults + 补 {CURRENTDEPART}。
A 子表行内交互: EditGridScriptRunner(faithful 跑原 Groovy,类型保真,绑定 event/group/group.parent/loadPOJO)
+ EditGridScriptController(/api/script/execute-editgrid-row);转换器 buildEditGridColumns 挂 quickEdit.onEvent.change
(outputVar/row=${__rendererData}/componentId+index)+子表内只读 SelectDialog→picker 列+addable;input-table/form 加 id。
picker 400 修复: PickerController.resolveByViewTemplate 支持 <tree><treetemplate><gridtemplate> 树+网格选择窗
(取 gridtemplate 网格实体作数据源),修「子表选用品 400 非法实体」。
日期写流缺口(引擎级通用): FlowInputCoercer 补 DATE/TIME → joda DateTime(毫秒/ISO/yyyy-MM-dd[ HH:mm:ss]),
修一切含日期列表单写流 ClassCastException(String→DateTime)崩。
compute-on-save: EditGridDerivedFieldComputer(两遍:行内派生→父聚合)+FlowController ?__egtpl= 入口,
落库前补算 editgrid 派生字段(对 display-only 非列键 no-op,对有派生列模板通用生效)。
验证: 主子表 _ADD 端到端实证落库(master+2子行,FK PURCHASE_ID 自动回填,APPLYDATE coerce 落库);
picker/默认值浏览器实证;converter 108 + metadata 相关 67 测试绿。
注: 本提交亦携带工作区既有未提交改动(FlowController normalize 深度上限保护等)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-15 11:05:55 +08:00 |
|
|
|
dc4c07ecf4
|
fix(converter): per-button 降级——脚本未引用的业务按钮不再永久灰(提交审批)
WS-B 给业务按钮 baseline disabled:true,靠 onselectedscript 脚本 enableButton("X")
点亮。但某些业务按钮从不被脚本引用(如新闻 ddb75614「提交审批」脚本只点亮发布/显示/
隐藏/置顶/取消置顶/文件归档,从无 enableButton(提交审批)) → 永久置灰、点不动。WS-B 的
demoteUnscriptedBusinessButtons 只兜底「整页无 onselected」的页,漏了「页有脚本但某按钮
未被脚本引用」。
修(per-button):
- TemplateToAmisConverter.parseEnableButtonTargets:从脚本文本抽 enableButton 目标按钮名集。
- attachScriptOnEvent 6 参重载 + demoteButtonsNotEnabledByScript:对有 onselected 的页,
不在脚本 enableButton 目标集的 baseline 禁用业务按钮降级 disabledOn(选中即可点),在集合
内的保持 disabled:true(脚本控)。降级在 buildButtonResetActions 之前,故 selectedChange
复位链只含脚本控按钮,不复位已降级按钮。
- BatchConvertCli.enableButtonTargets/readScriptText:读 onselected 绑定的盘上 rewritten
脚本正文解析目标集传入;5 参旧重载传 null=未知(不降级,保留整页脚本控口径,单测兼容)。
测试:TemplateToAmisConverterTest +6、BatchConvertCliTest +3(parseEnableButtonTargets、
per-button 降级、reset 仅含脚本控、未知集不降级、空集全降级、readScriptText、enableButtonTargets)。
全量重转对齐告警 0;浏览器实证:选中新闻行→提交审批点亮可点、POST /api/flow/OA_NEWSMANAGE_SUBMIT
返 status:0;发布/取消置顶仍按 STATUS 联动不退化。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-14 19:10:31 +08:00 |
|
|
|
5d12613034
|
perf(WS-D I1): /api/file/list 去函数包列 + sys_doc 函数式部分索引(全表扫→Index Scan)
I1 性能(必修):
- 根因: GET /api/file/list 原查询 WHERE UPPER(tablename)=? AND TRIM(businesskey)=?
AND isactive=1 —— 列被函数包裹(非 sargable),sys_doc 33.8 万行仅 PK 索引
→ 每次附件页渲染 Parallel Seq Scan 全表(amis service 容器每渲必打本端点;
EXPLAIN cost ~18572)。
- 修(FileController.list 查询):
· tablename 列本就全大写(DB 实测 tablename<>upper(tablename) 计数 0),app 侧已
tableName.trim().toUpperCase() → 去 UPPER 改 tablename = ?(sargable)。
· businesskey 不能简单 = trimmed: DB 实测 13000 行存「32 位 UUID + 4 空格 padding
至 36」CHAR 补白遗留(业务 PK 为 character(36)),naive businesskey=trimmed 会
漏列这 13000 行附件 → 保留 trim 语义改 rtrim(businesskey) = ?,配函数式索引使其
sargable。全程 ? 绑定(防注入,无拼接)。
- 索引 DDL: docs/sql/SYS_DOC_INDEX.sql
CREATE INDEX IF NOT EXISTS ix_sys_doc_biz
ON eip3.sys_doc (tablename, rtrim(businesskey)) WHERE isactive = 1;
已应用到 eip4dev(含 COMMENT,幂等)。客户库排切流窗口执行(与现有 docs/sql/* 同放
同风格;P5 Flyway 待办同 SYS_PAGE_SCHEMA.sql)。
- 验证(eip4dev): EXPLAIN Seq Scan(cost 18572) → Index Scan using ix_sys_doc_biz
(cost 8.44, exec 0.038ms); 补白键 OA_NOTICEMANAGE + 横线键 OA_NEWSMANAGE 均命中。
8093 重启含新 jar 后 /api/file/list 两种键风格均正常返附件(含 13000 行补白键场景)。
补测试:
- FileControllerTest #5 注入安全(priority 契约): 恶意 tableName/businessKey 不抛、返空,
ArgumentCaptor 断言走 ? 绑定(SQL 文本为静态参数化语句不含用户串,用户原串作绑定值)。
- TemplateToAmisConverterTest 新增 skip-guard: 表名 ORPHAN_*(SYS_ENTITY 解析不到)→
enrichAttachmentFields 降级守卫生效,附件字段保留原 input-file 不包 service。
- 测试全绿: FileControllerTest 5/5, TemplateToAmisConverterTest 93/93(JDK21)。
M4: buildAttachmentField 加注释说明 service.name 与内层 input-file 同名(DOCUMENT)
仅作布局归位 key,表单值由内层 input-file 绑定,amis 容忍(已浏览器验证)。
I2(已知系统级后续项,本次不修): /api/file/list 及 download 无行级数据权限——任意已认证
用户可枚举任意业务记录附件,与现有 download/flow 同 posture(生产仅认证可访问)。
TODO 注释标于 FileController.list javadoc。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-14 18:20:38 +08:00 |
|
|
|
ad65c51ad1
|
feat(WS-D): 查看页附件只读下载列表 + 用户引用列(发布人)显示名
D.2 附件查看下载列表(对齐老系统):
- 附件按 sys_doc.tablename+businesskey 关联业务记录(非物理列),老
MultiFileUploadField→input-file 在只读查看态渲染空上传按钮、不显已有附件。
- FileController 新增 GET /api/file/list(按 tableName+businessKey 列 sys_doc),
返回 {status,data:{items:[{id,name,size,sizeKb,url}]}};空业务键不查库防全表扫。
- 转换器 enrichAttachmentFields:把附件字段(input-file)就地包成 service 容器——
api 按业务主键 ${<TABLE>_ID} 拉 /api/file/list,each 渲染已有附件下载链接
(文件名(大小KB)+/api/file/${id}),并保留上传控件(编辑态加附件)。
service 纳入 isWideField(独占整行)。convertViewPage/convertForm 均接入。
D.3 用户引用列(发布人)显示名:
- 根因:查看新闻列表走命名读流 OA_NEWSMANAGE_SEARCH_LOOK,FlowController
NAMED_READ 分支此前 table=null 跳过 UserColumnResolver→USERSEND_ID_DISPLAY__
不填→发布人显「-」。USERSEND_ID 本就是 SYS_USER 引用,解析器口径无误。
- FlowNameResolver 新增 entityTableForNamedFlow(经 sys_serviceflow.entityid→
sys_entity.tablename 解析命名读流数据源实体表,缓存+失败哨兵);FlowController
NAMED_READ 分支据此传 table 给 ok(...),解析器补出 _DISPLAY__ 显示名。
测试:
- TemplateToAmisConverterTest 92 绿(改 3 既有附件断言+新增查看态下载列表断言)。
- FlowControllerTest 29 绿(#16 改命名读流解析不到表跳过,#16b 新增命名读流
解析出表→发布人 id→姓名)。FileControllerTest 4 绿(list/空键/空集/小文件KB)。
实证(8093 live + 5173 playwright):查看新闻列表发布人显 顾竟蓝[000031]/
李文娟[000010]/沈波恩[000008](非「-」);查看含附件新闻→附件下载列表显
文件名+KB+下载链(3 项),真实文件下载 200+attachment;console 0 错。
全量重转(保 onEvent 501)+SchemaImportCli upsert 1163,JDK21。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-14 18:01:42 +08:00 |
|
|
|
1108fbd961
|
fix(converter): WS-B B4 两 Critical——删除恢复 fanout(ids-only)+无脚本页业务按钮 disabledOn 解除永久灰
修 B4(8df37e9) code-review 两个 Critical:
C1 多选删除只删第一行(dual-key 抑制 fanout):
B4 真删除按钮 data 同送 ids(逗号串)+PK(首行),但删除族流 <input> 声明
<PK> required → FlowInputCoercer.missingRequiredIdInput 因 map.containsKey(PK)
返 null → FlowController fanout 分支(291-318)被跳过 → 只对 selectedItems.0
执行一次(确认文案却说删全部)。改:按分支拆 data——
· 真删除按钮(ajaxPostDeleteApi):data 只送 {ids},恢复 fanout 批量删除;
· 业务动作按钮(ajaxPostBusinessApi):data 只送 {<PK>}(业务流读 map[PK])。
PK 表达式改 bracket 记法 ${selectedItems[0].<PK>}(与既有 ${selectedItems[0]}
一致,非 dot-zero);纠正 B4 javadoc(写 bracket 实际 emit dot)。
C2 无脚本页业务按钮永久置灰(55 模板,含「提交审批」):
buildToolbar 给业务按钮无条件 baseline disabled:true,靠 onselectedscript
脚本点亮;但 DB 实测 55 个 crud 模板有 disabled:true 业务按钮却无 onEvent
→ 永久灰、点不动。新增 demoteUnscriptedBusinessButtons:仅当页面无
onEvent.selectedChange(无脚本控启停)时,把带 /api/flow/ 的 baseline disabled
业务按钮降级为 disabledOn:"${!selectedItems...}"(选中即可用,贴老 bulkActions
选中态语义);有脚本控则 no-op(保持 disabled:true 由脚本点亮)。调用点:
attachScriptOnEvent 内(仅 onload 无 onselected 时)+ BatchConvertCli 对
bindings.isEmpty() 的无绑定页兜底(attachScriptOnEvent 不被调用)。
测试(TDD):
· TemplateToAmisConverterTest +5:删除 data 只含 ids、业务 data 只含 PK(bracket)、
有脚本页保持 disabled:true、仅 onload 降级 disabledOn、无脚本页 demote 降级、
有脚本控 demote no-op;改写 2 个 B4 既有用例至 C1 拆分契约。converter 107 绿。
· FlowControllerTest +1(17d):body 只送 ids="a,b,c"(不含 PK) → 删除族(PK required)
fanout 执行 3 次,锁住「ids-only→fanout」。metadata 60 绿(未改 metadata 生产代码)。
重转+入库(eip4dev):crud 956/956、[WS-B]对齐告警 0,SchemaImportCli upsert 782。
DB 复核:C2 victims 55→0。
浏览器端到端实证(8093 live + 5173,admin/111111):
· C1 fanout:POST /api/flow/OA_NEWSMANAGE_DELETE {ids:"3 主键"} → count:3、
3 行真删除(DB count 3→0),证明 fanout 恢复(API 实证,避免破坏真实数据)。
· C2:8093 实服 schema 中 PM_REWARDSANDPUNISHMENTS「提交审批」按钮已为
disabledOn(非 disabled:true)、data=PK-only;删除按钮 data=ids-only。
· 新闻不退化:ddb75614 选中可见行→隐藏/置顶/删除点亮、发布灰(B4 行为保持)。
· console 0 ajax 报错。
边角现状:少数「页面有 onselectedscript 但某业务按钮未被脚本 enableButton 引用」
仍可能永久灰——属脚本覆盖问题,本次未处理(demote 仅作用于 no-script 页,
有 selectedChange 页保守 no-op,避免覆盖脚本控语义)。
base=8df37e9
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-14 17:25:28 +08:00 |
|
|
|
8df37e99f7
|
feat(converter): 业务动作按钮脚本联动真生效——迁 headerToolbar+id+选中行+复位
WS-B 最后一环:让新闻管理 8 个业务动作按钮(发布/显示/隐藏/置顶/文件归档/
取消置顶/提交审批/删除)的脚本联动(选中行→按 STATUS 点亮/置灰)在 UI 真生效。
根因(修前):type=delete+servicename 的业务按钮走 bulkActions 分支,bulkActions
按钮无 id → onselectedscript 脚本的 enabled/disabled 指令(componentId=按钮中文名)
定位不到 → 静默 no-op;且 amis 选中行自动点亮全部 bulkActions → 全亮失真。
改法(buildToolbar):业务/删除按钮全部改挂 headerToolbar,补 id=中文名(供脚本
componentId 精准启停),不再用 bulkActions 槽(删除 buildToolbar 的 bulkActions 形参
+ "bulkActions" 占位 token;convertCrud/treegrid 两调用点同步)。
四处 amis 6.13 实证(playwright 真实渲染+抓包,spike 2026-06-14)决定的关键细节:
1) 选中行表达式:${ids} 仅 bulkActions 路径注入、headerToolbar 取不到(POST 空);
改 ${selectedItems|pick:<PK>|join:','} 在 headerToolbar 作用域可读。
2) baseline:业务按钮 disabled:true(贴老 Vaadin「先禁用、脚本据 STATUS 点亮」,见
rewritten/ddb75614 seq1 仅 enableButton(...,true) 不复位);脚本 enabled 指令
覆盖 baseline、无冲突。删除是「选中即可」语义 → disabledOn 随选中态。
3) 切行防残留:attachScriptOnEvent 在 selectedChange 链最前对所有 baseline 禁用业务
按钮发 disabled 复位,再跑脚本(脚本只 enable 不 disable 对侧,不复位则 ISSHOW=1
行点亮「隐藏」切到 ISSHOW=0 行仍亮)。
4) api 形态+data 键:字符串式 api("POST:...")同级 data 被 amis 当局部数据域、请求体
只剩 {page:1} 丢选中行 → 改对象式 api 内嵌 data;且业务流(PUBLISH/ISSHOW…)input
只声明 map、脚本读 map[<PK>],须把单选主键放 data[<PK>]=${selectedItems.0.<PK>}
(放 ids 不识别 → status:0 但 result:null 空转),删除族(input 声明 <PK> required)
仍带 ids 走 FlowController fanout,一份 schema 覆盖两族。
浏览器端到端实证(8093 live + 5173,admin):初始全业务按钮灰;选 STATUS=3/ISSEND=1/
ISSHOW=1 行→隐藏+置顶点亮、发布灰;切 ISSHOW=0 行→显示点亮、隐藏复位转灰;点亮的
「显示」点击→POST /api/flow/OA_NEWSMANAGE_ISSHOW 带正确选中行 id、200、DB 行 ISSHOW
0→1 真落库;console 0 ajax 报错。
测试:platform-converter 102 绿(TemplateToAmisConverterTest 新增「新闻业务动作按钮挂
headerToolbar 脚本可联动」「selectedChange 先复位再跑脚本」「无业务按钮不加复位」3 用例,
改写 delete/业务 delete/安全中和/index 偏移等既有用例至 headerToolbar+对象式 api 契约)。
全量重转 crud 956/956、[WS-B]对齐告警 0,SchemaImportCli upsert 659。
base=47d03b7
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-14 16:47:22 +08:00 |
|
|
|
47d03b714b
|
fix(converter): scriptKeyToSeq 复刻改写器枚举(C2)+缺脚本 fail-closed/no-op(C1)+去重(I2)
re-review 修 WS-B 两 Critical + 两 Important。
C2(最关键,静默挂错脚本):scriptKeyToSeq 旧实现按 <scripts> 直接子、无长度过滤
1-based 编号,与改写器盘上 seq 枚举不一致 → 多脚本模板挂错 seq。改写器真实枚举
(run_eval.py::load_corpus_db + run_rewrite.py 核实):xpath('//script/text()') 全局
范围(非仅 <scripts> 子)+ strip 后 length<5 跳过(continue 不占号)+ 对保留者
1-based 连续编号。新实现用 selectNodes("//script") 文档序 + getText() + SCRIPT_MIN_LEN=5
过滤 + 连续编号逐位对齐。新增 countKeptScripts 供对齐校验。
- 全库实证(psql eip4dev,721 个有盘模板):新规则 key→seq 总数 701/701 == 盘上文件数
(旧版 32 模板偏差/1 模板 key 错位 d1f64d77: K_FILTER 旧算 seq=3 盘上无→运行时「未找到」,
新算 seq=2 命中);999 事件绑定 997 命中盘上文件、2 为悬挂/被过滤 key(C1 fail-closed)。
C1-a(有绑定但文件不存在不挂):attachScriptOnEvent 增 Predicate<Integer> seqExists
重载(converter 不碰 FS,由 BatchConvertCli 注入盘上 existingSeqs);seq 无对应
rewritten/<id>/<seq>.*.groovy 则跳过该绑定(fail-closed)。BatchConvertCli 接线
existingSeqs(镜像 RewrittenScriptStore prefix+.groovy 匹配)+ 重转期对齐校验告警
(转换器算 keyed-script 数 ≠ 盘上文件数则 System.out 提示)。
C1-b(运行时兜底):ScriptExecuteController.executeTemplateRewritten 当 load 返 null/blank
改返 {passed:true, commands:[], commandCount:0}(no-op)而非 {passed:false,error},残余
缺脚本退化为「无联动」而非用户可见 ajax 报错;保留 blank templateId→{passed:false}。
I2(去重):extractEventBindings 按 (eventType,scriptKey) 去重,免同脚本多处绑定致 ajax 双发。
M3/M2:清理 BatchConvertCli javadoc 的 full_auto_index/<scripts> 文档序漂移;bulkActions
删除按钮无 id(enableButton 定位不到)记 note(删除极少被联动启停,不强制修)。
测试:platform-converter 92 绿(TemplateToAmisConverterTest 83 含新增 C2 短脚本跳过/外部
script 计入/keyless 占号、C1-a seqExists、I2 去重;BatchConvertCliTest 9 新建:parseKeyToSeq/
parseEventBindings/parseCountKeptScripts/existingSeqs/attached-seq 命中盘上文件契约)。
platform-metadata ScriptExecuteControllerTest 5 绿(缺 templateId→false / 脚本未找到→no-op 拆分)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-14 15:21:04 +08:00 |
|
|
|
79eb8e2087
|
feat(converter): onEvent 脚本挂回改由 XML 事件绑定驱动,覆盖 NO_S3+按钮联动
WS-B Phase1-3:把老模板事件脚本按事件类型正确挂回 amis onEvent。
Phase1 解析:
- scriptKeyToSeq(Element):<scripts><script key> → key→1-based 文档序(对齐 rewriter 落盘 seq)。
- extractEventBindings(Element):递归收集 onselectedscript/onloadscript 属性 → List<EventBinding>(新增 public static EventBinding{eventType,scriptKey})。
Phase2 重写 attachScriptOnEvent(schema,templateId,List<EventBinding>,Map<key,seq>):
- onselectedscript → crud selectedChange,item=${event.data.selectedItems[0]}(行选中按钮联动)。
- onloadscript → inited,item=${&}(加载只读/显隐联动)。
- seq 由 keyToSeq 解析,引用不存在 key 则跳过(fail-closed);覆盖 NO_S3+FULL_AUTO,不再读 full_auto_index 决定挂哪段。
- scriptActionChain 重载支持自定义 item 表达式,原方法委托传 ${&}。
- 废弃旧「只挂 FULL_AUTO/每段同挂 inited+change」语义。
Phase3:buildToolbar 每按钮补 id=中文名(=label=enableButton 实参,三者同源),供 amis enabled/disabled 动作按 componentId 精准启停工具栏按钮。
BatchConvertCli:删 loadFullAutoIndex,改从每模板源 XML 解析 bindings+keyToSeq 调新 attach;rewriterDir 仍作 onEvent 总开关。
测试:platform-converter 85 绿(TemplateToAmisConverterTest 78,含新增 9 例:scriptKeyToSeq 文档序/extractEventBindings 收集/scriptActionChain 自定义 item/onselected→selectedChange+onload→inited/NO_S3 也挂/引用不存在 key 跳过/按钮含 id)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-14 14:58:27 +08:00 |
|
|
|
3d483b1009
|
refactor(converter): 删除零调用死方法 resolveTreeParentCol(Element)
重构后该方法已被 resolveTreeParentColFromNode(Element) 取代,无任何生产
调用点(rg 确认仅自身 Javadoc 引用)。删除方法体+Javadoc,行为不变。
TemplateToAmisConverterTest 71 绿。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-14 14:37:49 +08:00 |
|