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,57 @@
|
||||
// === EIP4 P4 脚本迁移产出 ===
|
||||
// template_id : c3d10a37-a373-4a1e-9c4f-b6e66672547c
|
||||
// template_name: 安全日志-审批
|
||||
// seq : 1
|
||||
// label : FULL_AUTO
|
||||
// 处置 : 全自动改写完成,直接入 P4 转换流水线
|
||||
import com.dsasp.server.common.dataDic.bean.Enumerate;
|
||||
def weather = Enumerate.getEnumerateItems("weather");//天气
|
||||
def wind = Enumerate.getEnumerateItems("wind");//风力
|
||||
def temperature = Enumerate.getEnumerateItems("temperature");//温度
|
||||
|
||||
|
||||
//在下拉列表框调用removeAllItems()方法前,应清空下拉列表中的值,之后赋值才能生效
|
||||
def dayWeahtervalue = getFieldValue('DAYWEATHER');
|
||||
bindField("DAYWEATHER",null);
|
||||
|
||||
clearFieldData("DAYWEATHER");
|
||||
|
||||
weather?.each{
|
||||
def codeDes = it?.getCodeDes();
|
||||
addFieldOption("DAYWEATHER", codeDes, codeDes);
|
||||
}
|
||||
bindField("DAYWEATHER",dayWeahtervalue);
|
||||
//在下拉列表框调用removeAllItems()方法前,应清空下拉列表中的值,之后赋值才能生效
|
||||
def dayWindvalue = getFieldValue('DAYWIND');
|
||||
bindField("DAYWIND",null);
|
||||
|
||||
clearFieldData("DAYWIND");
|
||||
|
||||
wind?.each{
|
||||
def codeDes = it?.getCodeDes();
|
||||
addFieldOption("DAYWIND", codeDes, codeDes);
|
||||
}
|
||||
bindField("DAYWIND",dayWindvalue);
|
||||
|
||||
//在下拉列表框调用removeAllItems()方法前,应清空下拉列表中的值,之后赋值才能生效
|
||||
def nightWeahtervalue = getFieldValue('NIGHTWEATHER');
|
||||
bindField("NIGHTWEATHER",null);
|
||||
|
||||
clearFieldData("NIGHTWEATHER");
|
||||
|
||||
weather?.each{
|
||||
def codeDes = it?.getCodeDes();
|
||||
addFieldOption("NIGHTWEATHER", codeDes, codeDes);
|
||||
}
|
||||
bindField("NIGHTWEATHER",nightWeahtervalue);
|
||||
//在下拉列表框调用removeAllItems()方法前,应清空下拉列表中的值,之后赋值才能生效
|
||||
def nightWindvalue = getFieldValue('NIGHTWIND');
|
||||
bindField("NIGHTWIND",null);
|
||||
|
||||
clearFieldData("NIGHTWIND");
|
||||
|
||||
wind?.each{
|
||||
def codeDes = it?.getCodeDes();
|
||||
addFieldOption("NIGHTWIND", codeDes, codeDes);
|
||||
}
|
||||
bindField("NIGHTWIND",nightWindvalue);
|
||||
@@ -0,0 +1,12 @@
|
||||
// === EIP4 P4 脚本迁移产出 ===
|
||||
// template_id : c3d10a37-a373-4a1e-9c4f-b6e66672547c
|
||||
// template_name: 安全日志-审批
|
||||
// seq : 2
|
||||
// label : NO_S3
|
||||
// 处置 : 无 S3 模式,原样进 P4
|
||||
def list = new DateTime[2];
|
||||
|
||||
def currentDate= GetDefaultValueFunction.currentDate();
|
||||
list[0] = GetValueFunction.addMonths(currentDate,-1);//一个月
|
||||
list[1] =GetValueFunction.addDays(currentDate,1);;
|
||||
bindField("DIARYDATE",list);
|
||||
Reference in New Issue
Block a user