- run_eval: PG xpath(...)::text 保留实体转义(< → <),抽取后补 XML 预定义实体反转义 (等价手册 §5.3 dom4j getText() 语义);293 个污染产物清零,Groovy 编译失败根因消除 - 缓存重建(源=eip4dev,1428 条:1 模板改名+1 新增脚本属数据演进);全量重跑 497/30/86/815,自动化率 81.1% 守住 ≥80% - 重大发现:同模板内脚本顺序在两次抽取间会交换((templateId,seq) 非稳定键, welfare 模板 seq1↔seq2 实锤)——重批后 onEvent seq 已与磁盘对齐,长期需内容哈希键(登记 F2-4) - tools/page-schema-loader/load_page_schema.py:幂等标准入库器(etag=sha256,version 递增, 仅允许 localhost 双库);本次双库各更新 756/幂等跳过 733,e2e 28/28 保持全绿 - 坑:mvn exec:java 的 -Dexec.args 引号空参会被吞导致参数错位(密码用占位符代替空串) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
79 lines
3.0 KiB
Groovy
79 lines
3.0 KiB
Groovy
// === EIP4 P4 脚本迁移产出 ===
|
||
// template_id : fb51a8c9-3bd4-4517-b19f-74edcc34f8f7
|
||
// template_name: 发薪/扣款计划
|
||
// seq : 1
|
||
// label : HARD
|
||
// 硬 S3 原因 : 动态创建 Vaadin 组件
|
||
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
|
||
import com.vaadin.ui.Button;
|
||
import com.vaadin.ui.Button.ClickListener;
|
||
import com.vaadin.ui.Notification;
|
||
import com.vaadin.ui.Notification.Type;
|
||
import com.vaadin.ui.Button.ClickEvent;
|
||
Button button = new Button("生成明细");
|
||
|
||
|
||
def mgroup = group;
|
||
button.addClickListener(new ClickListener() {
|
||
@Override
|
||
public void buttonClick(ClickEvent event) {
|
||
|
||
def totalmoney = getFieldValue("TOTALMONEY");
|
||
def monthsize = getFieldValue("MONTHSIZE");
|
||
def monthspace = getFieldValue("MONTHSPACE");
|
||
def startmonth = getFieldValue("STARTMONTH");
|
||
def startyear = getFieldValue("STARTYEAR");
|
||
if(monthsize == null){
|
||
Notification.show("请输入月数!", Type.ERROR_MESSAGE);
|
||
return;
|
||
}
|
||
if(monthspace == null){
|
||
Notification.show("请输入间隔月数!", Type.ERROR_MESSAGE);
|
||
return;
|
||
}
|
||
|
||
if(startyear == null){
|
||
Notification.show("请输入开始年!", Type.ERROR_MESSAGE);
|
||
return;
|
||
}
|
||
if(startmonth == null){
|
||
Notification.show("请输入开始月!", Type.ERROR_MESSAGE);
|
||
return;
|
||
}
|
||
if(totalmoney == null){
|
||
Notification.show("请输入总额!", Type.ERROR_MESSAGE);
|
||
return;
|
||
}
|
||
if(monthspace >=12){
|
||
Notification.show("间隔月数要小于12!", Type.ERROR_MESSAGE);
|
||
return;
|
||
}
|
||
if(totalmoney >0){
|
||
def m = totalmoney/monthsize;
|
||
def details = [];
|
||
def syear = startyear;
|
||
def smonth = startmonth;
|
||
for(int i=0;i<monthsize;i++){
|
||
def detailitem = [:];
|
||
detailitem["YEAR"]= syear;
|
||
detailitem["MONTH"]= smonth;
|
||
detailitem["MONEY"]= m;
|
||
details.add(detailitem);
|
||
smonth=smonth+1+monthspace;
|
||
if(smonth>12){
|
||
smonth=1;
|
||
syear++;
|
||
}
|
||
}
|
||
|
||
if(details.size()>0){
|
||
bindField("PLANDETAILS",details)
|
||
}
|
||
}
|
||
|
||
}
|
||
})
|
||
|
||
|
||
group.getField("ADDDETAIL")?.parent?.addComponent(button);
|
||
|