P4-2 脚本迁移线:全量改写产出 + facade 动词表运行时实现
任务1 全量改写执行: - run_rewrite.py 对客户库缓存 1,427 条逐条改写,按 template_id+脚本序号落盘 output/rewritten/(497 FULL_AUTO + 30 PARTIAL + 85 HARD + 815 NO_S3) - 人工作业单 115 份(PARTIAL 30 + HARD 85),每份附原文/已改部分/余留模式/建议改法/工时口径 - 自动化率 81.2% 复现 C4 实测,0 误改 任务2 facade 动词表运行时: - ScriptFacade 把 31 改写目标动词 + bindField 作为 Groovy 闭包注入 Bindings (PoC enableButton 模式扩展);服务端语义动词直接求值,UI 语义动词捕获为 amis 事件动作指令 JSON(actionType/componentId/args) - 保真层纪律:全在 com.eip4 现代层,com.dsasp 源码零改,ArchUnit 复跑通过 - ScriptExecuteController 提供 /api/script/execute 与 /api/script/execute-template 验证: - 单测 17 方法逐动词覆盖,均经真实 Groovy 过保真层引擎,BUILD SUCCESS - 集成 6 条真实 FULL_AUTO 改写脚本经 8086 执行,amis 指令协议合规 - 回归 PoC script-test 通过,ArchUnit 架构纪律通过 报告 tools/s3_rewriter/P4脚本迁移执行报告.md;新坑入 docs/迁移手册.md 5.39/9.3 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
// === EIP4 P4 脚本迁移产出 ===
|
||||
// template_id : 5a51c93c-a758-413a-b174-63b3ba05efaa
|
||||
// template_name: 文件监控
|
||||
// seq : 1
|
||||
// label : HARD
|
||||
// 硬 S3 原因 : 动态创建 Vaadin 组件; 同步确认框 showConfirmDialog
|
||||
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.Button.ClickEvent;
|
||||
import com.vaadin.ui.Button.ClickListener;
|
||||
import com.vaadin.data.Property.ValueChangeListener;
|
||||
import com.vaadin.data.Property.ValueChangeEvent;
|
||||
import com.dsasp.client.viewframework.listener.ConfirmDialogListener;
|
||||
def reads = group.getField("UNDERTAKES");
|
||||
final Button cb = new Button("催办");
|
||||
final Object table = reads?.table;
|
||||
table?.setImmediate(true);
|
||||
final group1 = group;
|
||||
cb?.addClickListener(new ClickListener() {
|
||||
public void buttonClick(ClickEvent event) {
|
||||
Object o = table?.getValue();
|
||||
if (o == null)
|
||||
return;
|
||||
final id = o?.getField("VIEW_OA_UNDERTAKETOME_ID")?.getValue();
|
||||
final pojo = GetServicesFunction.loadPOJO(id,"VIEW_OA_UNDERTAKETOME",true);
|
||||
def user = GetServicesFunction.loadPOJO(pojo?.get_Value("RECEIVER"),"SYS_USER",true)?.get_Value("NAME");
|
||||
showConfirmDialog("确定要对" + user + "进行催办吗?",new ConfirmDialogListener(){
|
||||
public void yes(){
|
||||
def message = [:];
|
||||
message.put("title", "收到新的承办催办");
|
||||
message.put("file", "文件名称:" + pojo?.get_Value("FILENAME")); //文件名
|
||||
message.put("user", pojo?.get_Value("RECEIVER")); //接收人
|
||||
message.put("type", 6); //阅读消息
|
||||
message.put("id", id); //uuid
|
||||
/*
|
||||
if ("收文".equals(pojo?.get_Value("FILECLASS"))) //标记
|
||||
message.put("flag", "#R");
|
||||
else
|
||||
message.put("flag", "#S");
|
||||
*/
|
||||
message.put("flag", "");
|
||||
GetServicesFunction.excuteFlow(message,"VIEW_OA_FILEMONITORING_MESSAGE");
|
||||
}
|
||||
public void no(){}
|
||||
});
|
||||
}
|
||||
});
|
||||
table?.addValueChangeListener(new ValueChangeListener() {
|
||||
public void valueChange(Property.ValueChangeEvent event) {
|
||||
Object o = table?.getValue();
|
||||
final id = o?.getField("VIEW_OA_UNDERTAKETOME_ID")?.getValue();
|
||||
final pojo = GetServicesFunction.loadPOJO(id,"VIEW_OA_UNDERTAKETOME",true);
|
||||
if (o == null || pojo.get_Value("ISFINISH") == 1)
|
||||
cb.setEnabled(false);
|
||||
else
|
||||
cb.setEnabled(true);
|
||||
|
||||
}
|
||||
});
|
||||
cb?.setEnabled(false);
|
||||
reads?.addButton(cb, 1);
|
||||
@@ -0,0 +1,61 @@
|
||||
// === EIP4 P4 脚本迁移产出 ===
|
||||
// template_id : 5a51c93c-a758-413a-b174-63b3ba05efaa
|
||||
// template_name: 文件监控
|
||||
// seq : 2
|
||||
// label : HARD
|
||||
// 硬 S3 原因 : 动态创建 Vaadin 组件; 同步确认框 showConfirmDialog
|
||||
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.Button.ClickEvent;
|
||||
import com.vaadin.ui.Button.ClickListener;
|
||||
import com.vaadin.data.Property.ValueChangeListener;
|
||||
import com.vaadin.data.Property.ValueChangeEvent;
|
||||
import com.dsasp.client.viewframework.listener.ConfirmDialogListener;
|
||||
def reads = group.getField("READS");
|
||||
final Button cb = new Button("催办");
|
||||
final Object table = reads?.table;
|
||||
table?.setImmediate(true);
|
||||
final group1 = group;
|
||||
cb?.addClickListener(new ClickListener() {
|
||||
public void buttonClick(ClickEvent event) {
|
||||
Object o = table?.getValue();
|
||||
if (o == null)
|
||||
return;
|
||||
final id = o?.getField("VIEW_OA_FILETOME_ID")?.getValue();
|
||||
final pojo = GetServicesFunction.loadPOJO(id,"VIEW_OA_FILETOME",true);
|
||||
def user = GetServicesFunction.loadPOJO(pojo?.get_Value("RECEIVER"),"SYS_USER",true)?.get_Value("NAME");
|
||||
showConfirmDialog("确定要对" + user + "进行催办吗?",new ConfirmDialogListener(){
|
||||
public void yes(){
|
||||
def message = [:];
|
||||
message.put("title", "收到新的阅读催办");
|
||||
message.put("file", "文件名称:" + pojo?.get_Value("FILENAME")); //文件名
|
||||
message.put("user", pojo?.get_Value("RECEIVER")); //接收人
|
||||
message.put("type", 7); //阅读消息
|
||||
message.put("id", id); //uuid
|
||||
/*
|
||||
if ("收文".equals(pojo?.get_Value("FILECLASS"))) //标记
|
||||
message.put("flag", "#R");
|
||||
else
|
||||
message.put("flag", "#S");
|
||||
*/
|
||||
message.put("flag", "");
|
||||
GetServicesFunction.excuteFlow(message,"VIEW_OA_FILEMONITORING_MESSAGE");
|
||||
}
|
||||
public void no(){}
|
||||
});
|
||||
}
|
||||
});
|
||||
table?.addValueChangeListener(new ValueChangeListener() {
|
||||
public void valueChange(Property.ValueChangeEvent event) {
|
||||
Object o = table?.getValue();
|
||||
final id = o?.getField("VIEW_OA_FILETOME_ID")?.getValue();
|
||||
final pojo = GetServicesFunction.loadPOJO(id,"VIEW_OA_FILETOME",true);
|
||||
if (o == null || pojo.get_Value("ISREAD") == 1)
|
||||
cb.setEnabled(false);
|
||||
else
|
||||
cb.setEnabled(true);
|
||||
|
||||
}
|
||||
});
|
||||
cb?.setEnabled(false);
|
||||
reads.addButton(cb, 1);
|
||||
Reference in New Issue
Block a user