任务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>
52 lines
2.4 KiB
Groovy
52 lines
2.4 KiB
Groovy
// === EIP4 P4 脚本迁移产出 ===
|
|
// template_id : c0684b1a-c91a-4aa1-befe-029340cb67f5
|
|
// template_name: 办公用品库-结账成本汇总
|
|
// seq : 3
|
|
// label : PARTIAL
|
|
// 余留模式 : Item 标题查询; 残留字段句柄链(未覆盖动词)
|
|
// 处置 : 大部分已自动改写,余留行人工补全(见作业单)
|
|
import org.joda.time.DateTimeZone;
|
|
|
|
|
|
|
|
|
|
def startId = getFieldValue("START_PERIOD_ID");
|
|
def endId = getFieldValue("END_PERIOD_ID");
|
|
def currentStr = "当前期间:";
|
|
if(startId != null && endId != null){//开始期间和结束期间都不为空
|
|
def startPo = GetServicesFunction.loadPOJO(startId,"OA_OFFICE_ACCOUNT_PERIOD",true);
|
|
if(startPo != null && endId == startId){//开始期间等于结束期间
|
|
currentStr += startPo.get_DisplayValue("STARTDATE",true, DateTimeZone.getDefault());
|
|
currentStr += "至";
|
|
currentStr += startPo.get_DisplayValue("ENDDATE",true, DateTimeZone.getDefault());
|
|
}else if(startPo != null && endId != startId){//开始期间不等于结束期间
|
|
def endPo = GetServicesFunction.loadPOJO(endId,"OA_OFFICE_ACCOUNT_PERIOD",true);
|
|
currentStr += startPo.get_DisplayValue("STARTDATE",true, DateTimeZone.getDefault());
|
|
currentStr += "至";
|
|
if(endPo != null){//结束期间为空
|
|
currentStr += endPo.get_DisplayValue("ENDDATE",true, DateTimeZone.getDefault());
|
|
}else{
|
|
currentStr += startPo.get_DisplayValue("ENDDATE",true, DateTimeZone.getDefault());
|
|
}
|
|
}
|
|
}else if(startId != null ){//开始期间
|
|
def startPo = GetServicesFunction.loadPOJO(startId,"OA_OFFICE_ACCOUNT_PERIOD",true);
|
|
if(startPo != null){
|
|
currentStr += startPo.get_DisplayValue("STARTDATE",true, DateTimeZone.getDefault());
|
|
currentStr += "至";
|
|
currentStr += startPo.get_DisplayValue("ENDDATE",true, DateTimeZone.getDefault());
|
|
}
|
|
|
|
}else if(endId != null){//结束期间
|
|
def endPo = GetServicesFunction.loadPOJO(endId,"OA_OFFICE_ACCOUNT_PERIOD",true);
|
|
if(endPo != null){
|
|
currentStr += endPo.get_DisplayValue("STARTDATE",true, DateTimeZone.getDefault());
|
|
currentStr += "至";
|
|
currentStr += endPo.get_DisplayValue("ENDDATE",true, DateTimeZone.getDefault());
|
|
}
|
|
}
|
|
|
|
//group.getField("START_PERIOD_ID").getItemCaption(startId) + group.getField("END_PERIOD_ID").getItemCaption(endId);
|
|
|
|
bindField("CURRENT_PERIOD",currentStr);
|