F2-4(一): 修 XML 实体污染并重批重入库,固化标准入库器
- 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>
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
// === EIP4 P4 脚本迁移产出 ===
|
||||
// template_id : 1a7f5b05-adee-4a67-a311-ac9f76af2c15
|
||||
// template_name: 物资合同评审(五建定制)
|
||||
// seq : 4
|
||||
// label : HARD
|
||||
// 硬 S3 原因 : 动态创建 Vaadin 组件
|
||||
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.Button.ClickEvent;
|
||||
import com.vaadin.ui.Button.ClickListener;
|
||||
import com.vaadin.ui.Notification;
|
||||
import com.vaadin.ui.Notification.Type;
|
||||
import com.dsasp.client.viewframework.util.TableImportExport;
|
||||
|
||||
//将自定义的按钮添加至
|
||||
def materialList = group.getField("MATERIALDETAILS");
|
||||
|
||||
materialList?.addButton(group.getField("SELECT"),0);
|
||||
//导入按钮
|
||||
def tie = new TableImportExport(materialList,"com.dsasp.pm.materialcontract.client.MaterialContractDetailImport");
|
||||
tie.addImportButton(3);
|
||||
tie.addExportButton(4);
|
||||
//绑定合计按钮
|
||||
def opertor = group.getField("BUTTON");
|
||||
def vl = opertor?.parent;
|
||||
Button button = new Button("计算合同价款");
|
||||
vl.addComponent(button,0);
|
||||
|
||||
button.addClickListener(new Button.ClickListener() {
|
||||
@Override
|
||||
public void buttonClick(Button.ClickEvent event) {
|
||||
def meterialDetails = getFieldValue("MATERIALDETAILS");
|
||||
def summoney = new BigDecimal("0");;
|
||||
if(meterialDetails != null && meterialDetails.size()>0){
|
||||
meterialDetails?.each{
|
||||
if(it.get('TOTAL') !=null && it.get('TOTAL') !=""){
|
||||
summoney = summoney.add(new BigDecimal(it.get('TOTAL')))
|
||||
}
|
||||
}
|
||||
}
|
||||
bindField("CONTRACTMONEY",summoney);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
if(getFieldValue("PM_PROJECTID")!=null&&getFieldValue("PM_PROJECTID")!=""){
|
||||
def sql1 = "select coalesce(sum(p.CONTRACTMONEY),0) as TOTALCONTROLCOST from( ";
|
||||
sql1 += "select case when c.pm_plannedcostchange_id is null then coalesce(pp.MATERIALPLANNINGCOST,0)";
|
||||
sql1 += "else coalesce(c.MATERIALPLANNINGCOSTNOW,0) end as CONTRACTMONEY ";
|
||||
sql1 += "from PM_PLANNEDCOSTDECLARATION pp ";
|
||||
sql1 += "join SYS_DATASTATUS s on s.businesskey=pp.PM_PLANNEDCOSTDECLARATION_id and s.tablename = 'PM_PLANNEDCOSTDECLARATION'and s.DATASTATUS = 3 ";
|
||||
sql1 += "left join lateral(select PM_PLANNEDCOSTCHANGE_id,MATERIALPLANNINGCOSTNOW,PM_PROJECTID ";
|
||||
sql1 += "from PM_PLANNEDCOSTCHANGE p join SYS_DATASTATUS s on s.businesskey=p.PM_PLANNEDCOSTCHANGE_id ";
|
||||
sql1 += "and s.tablename = 'PM_PLANNEDCOSTCHANGE'and s.DATASTATUS = 3 where p.PM_PROJECTID = pp.PM_PROJECTID order by p.CHANGEDATE desc,p.createtime desc limit 1)c on true ";
|
||||
sql1 += "where pp.PM_PROJECTID = '"+getFieldValue("PM_PROJECTID")+"')p ";
|
||||
def map1 = GetServicesFunction.executeQueryForMap(sql1);
|
||||
if(map1 != null){
|
||||
bindField("TOTALCONTROLCOST",map1.get("TOTALCONTROLCOST"));
|
||||
};
|
||||
def sql2 = "select coalesce(sum(v.CONTRACTMONEY),0) as TOTALCONTRACTMONEY from VIEW_PM_CONTRACT v ";
|
||||
sql2 += "where v.CONTRACTTYPE = 3 and v.PM_PROJECT_ID = '"+getFieldValue("PM_PROJECTID")+"' ";
|
||||
def map2 = GetServicesFunction.executeQueryForMap(sql2);
|
||||
if(map2 != null){
|
||||
bindField("TOTALCONTRACTMONEY",map2.get("TOTALCONTRACTMONEY"));
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user