F2-4(一): 修 XML 实体污染并重批重入库,固化标准入库器

- run_eval: PG xpath(...)::text 保留实体转义(< → &lt;),抽取后补 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:
2026-06-11 21:27:20 +08:00
parent 8e02c0149b
commit a711ecd8f0
1000 changed files with 7612 additions and 7128 deletions

View File

@@ -1,7 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 86c05eb5-753d-46e5-b958-cdbcefe7eabc
// template_name: 销项税发票
// seq : 6
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def ordersStatus = GetServicesFunction.getEnumerateItemValue("WFSTATUS",item['STATUS']);

View File

@@ -1,9 +0,0 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 86c05eb5-753d-46e5-b958-cdbcefe7eabc
// template_name: 销项税发票
// seq : 2
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def searchMap = ["UNITTYPE":7];//建设单位
setFieldFilter("BUILDCOMPANY", searchMap);

View File

@@ -1,7 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 86c05eb5-753d-46e5-b958-cdbcefe7eabc
// template_name: 销项税发票
// seq : 4
// seq : 2
// label : PARTIAL
// 余留模式 : 残留字段句柄链(未覆盖动词)
// 处置 : 大部分已自动改写,余留行人工补全(见作业单)
@@ -16,8 +16,8 @@ if(invoiceform == 1){
smap["EXTENDATTRIBUTEONE"] = 2;
smap["SYS_ENUMERATETYPE_ID"] = "INVOICEMANAGEMENT_INVOICETYPE";
def typelist = GetServicesFunction.listSelectResult(smap,"SYS_ENUMERATE");
if(typelist!=null &amp;&amp; typelist.size()&gt;0){
for(i in 0..&lt;typelist.size()){
if(typelist!=null && typelist.size()>0){
for(i in 0..<typelist.size()){
def po = typelist[i]
getFieldDataSource("RECEIPTTYPE")?.removeItem(po.get_Value("CODEVALUE"));
}
@@ -32,8 +32,8 @@ if(invoiceform == 1){
smap["EXTENDATTRIBUTEONE"] = 1;
smap["SYS_ENUMERATETYPE_ID"] = "INVOICEMANAGEMENT_INVOICETYPE";
def typelist = GetServicesFunction.listSelectResult(smap,"SYS_ENUMERATE");
if(typelist!=null &amp;&amp; typelist.size()&gt;0){
for(i in 0..&lt;typelist.size()){
if(typelist!=null && typelist.size()>0){
for(i in 0..<typelist.size()){
def po = typelist[i]
getFieldDataSource("RECEIPTTYPE")?.removeItem(po.get_Value("CODEVALUE"));
}

View File

@@ -1,7 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 86c05eb5-753d-46e5-b958-cdbcefe7eabc
// template_name: 销项税发票
// seq : 1
// seq : 3
// label : PARTIAL
// 余留模式 : 残留字段句柄链(未覆盖动词)
// 处置 : 大部分已自动改写,余留行人工补全(见作业单)
@@ -16,8 +16,8 @@ if(invoiceform == 1){
smap["EXTENDATTRIBUTEONE"] = 2;
smap["SYS_ENUMERATETYPE_ID"] = "INVOICEMANAGEMENT_INVOICETYPE";
def typelist = GetServicesFunction.listSelectResult(smap,"SYS_ENUMERATE");
if(typelist!=null &amp;&amp; typelist.size()&gt;0){
for(i in 0..&lt;typelist.size()){
if(typelist!=null && typelist.size()>0){
for(i in 0..<typelist.size()){
def po = typelist[i]
getFieldDataSource("RECEIPTTYPE")?.removeItem(po.get_Value("CODEVALUE"));
}
@@ -29,8 +29,8 @@ if(invoiceform == 1){
smap["EXTENDATTRIBUTEONE"] = 1;
smap["SYS_ENUMERATETYPE_ID"] = "INVOICEMANAGEMENT_INVOICETYPE";
def typelist = GetServicesFunction.listSelectResult(smap,"SYS_ENUMERATE");
if(typelist!=null &amp;&amp; typelist.size()&gt;0){
for(i in 0..&lt;typelist.size()){
if(typelist!=null && typelist.size()>0){
for(i in 0..<typelist.size()){
def po = typelist[i]
getFieldDataSource("RECEIPTTYPE")?.removeItem(po.get_Value("CODEVALUE"));
}

View File

@@ -0,0 +1,50 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 86c05eb5-753d-46e5-b958-cdbcefe7eabc
// template_name: 销项税发票
// seq : 4
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def invoiceform = getFieldValue("INVOICEFORM");
def smap=[:];
switch(invoiceform){
case 1:
reloadField("RECEIPTTYPE");
//当征税方式为简易时,只绑扩展属性为一的数据
smap = [:];
smap["EXTENDATTRIBUTEONE"] = 2;
smap["SYS_ENUMERATETYPE_ID"] = "INVOICEMANAGEMENT_INVOICETYPE";
def typelist = GetServicesFunction.listSelectResult(smap,"SYS_ENUMERATE");
if(typelist!=null && typelist.size()>0){
for(i in 0..<typelist.size()){
def po = typelist[i]
getFieldDataSource("RECEIPTTYPE")?.removeItem(po.get_Value("CODEVALUE"));
}
}
//绑定默认
bindField("RECEIPTTYPE",1);
break;
case 2:
reloadField("RECEIPTTYPE");
//当征税方式为一般时,只绑扩展属性为二的数据
smap = [:];
smap["EXTENDATTRIBUTEONE"] = 1;
smap["SYS_ENUMERATETYPE_ID"] = "INVOICEMANAGEMENT_INVOICETYPE";
def typelist = GetServicesFunction.listSelectResult(smap,"SYS_ENUMERATE");
if(typelist!=null && typelist.size()>0){
for(i in 0..<typelist.size()){
def po = typelist[i]
getFieldDataSource("RECEIPTTYPE")?.removeItem(po.get_Value("CODEVALUE"));
}
}
//绑定默认
bindField("RECEIPTTYPE",3);
break;
default:
reloadField("RECEIPTTYPE");
break;
}

View File

@@ -4,47 +4,6 @@
// seq : 5
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def invoiceform = getFieldValue("INVOICEFORM");
def searchMap = ["UNITTYPE":7];//建设单位
def smap=[:];
switch(invoiceform){
case 1:
reloadField("RECEIPTTYPE");
//当征税方式为简易时,只绑扩展属性为一的数据
smap = [:];
smap["EXTENDATTRIBUTEONE"] = 2;
smap["SYS_ENUMERATETYPE_ID"] = "INVOICEMANAGEMENT_INVOICETYPE";
def typelist = GetServicesFunction.listSelectResult(smap,"SYS_ENUMERATE");
if(typelist!=null &amp;&amp; typelist.size()&gt;0){
for(i in 0..&lt;typelist.size()){
def po = typelist[i]
getFieldDataSource("RECEIPTTYPE")?.removeItem(po.get_Value("CODEVALUE"));
}
}
//绑定默认
bindField("RECEIPTTYPE",1);
break;
case 2:
reloadField("RECEIPTTYPE");
//当征税方式为一般时,只绑扩展属性为二的数据
smap = [:];
smap["EXTENDATTRIBUTEONE"] = 1;
smap["SYS_ENUMERATETYPE_ID"] = "INVOICEMANAGEMENT_INVOICETYPE";
def typelist = GetServicesFunction.listSelectResult(smap,"SYS_ENUMERATE");
if(typelist!=null &amp;&amp; typelist.size()&gt;0){
for(i in 0..&lt;typelist.size()){
def po = typelist[i]
getFieldDataSource("RECEIPTTYPE")?.removeItem(po.get_Value("CODEVALUE"));
}
}
//绑定默认
bindField("RECEIPTTYPE",3);
break;
default:
reloadField("RECEIPTTYPE");
break;
}
setFieldFilter("BUILDCOMPANY", searchMap);

View File

@@ -1,7 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 86c05eb5-753d-46e5-b958-cdbcefe7eabc
// template_name: 销项税发票
// seq : 3
// seq : 6
// label : HARD
// 硬 S3 原因 : 动态创建 Vaadin 组件
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
@@ -28,7 +28,7 @@ cb?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
Object fplists = document?.getValue();
def documentfp = [];
for (int i = 0; i &lt; fplists.size(); i++) {
for (int i = 0; i < fplists.size(); i++) {
def item = fplists.get(i);
if(item.get("DOCUMENT")!=null){
documentfp.addAll(item.get("DOCUMENT"));
@@ -39,11 +39,11 @@ cb?.addClickListener(new ClickListener() {
Notification.show("请先上传发票信息!", Type.ERROR_MESSAGE);
return;
};
if(documentfp &amp;&amp; documentfp.size()&gt;0){
if(documentfp && documentfp.size()>0){
def message = " ";//提示消息
documentfp.eachWithIndex{it,index-&gt;
documentfp.eachWithIndex{it,index->
//批量选择发票类型后给子表赋值
if(it &amp;&amp; it.get("TEMPFILE")){
if(it && it.get("TEMPFILE")){
// 表示本地路径
def filePath = it.get("TEMPFILE");
//String endpointUrl = "http://192.168.20.63:5020/detection";//内网环境
@@ -56,79 +56,79 @@ cb?.addClickListener(new ClickListener() {
message += "第"+(index+GetValueFunction.toDecimal(1))+"张发票接口请求超时,请检查该发票或联系管理员!\n"
}else{
def json = HTTPClientUtils.stringToJson(responseBody);
if(json &amp;&amp; json.getString("message") &amp;&amp; json.get("message")=="ok"){
if(json && json.getString("message") && json.get("message")=="ok"){
def rows = json.get("data");
def item = rows?.get("data");
if(rows &amp;&amp; item){
if(rows && item){
//Console.debug(item);
def fplist = [:];
fplist.put("DOCUMENT",[it]);//附件图片
//发票类型
if(rows?.get("invoiceType")!=null &amp;&amp; rows?.get("invoiceType")!="null" &amp;&amp; rows?.get("invoiceType")!="无"){
if(rows?.get("invoiceType")!=null && rows?.get("invoiceType")!="null" && rows?.get("invoiceType")!="无"){
fplist.put("RECEIPTTYPE",rows.get("invoiceType").contains("专用") ? 3 : rows.get("invoiceType").contains("普通") ? 2 : 1);
}else{
fplist.put("RECEIPTTYPE",null);
};
if(item?.get("buyer_name")!=null &amp;&amp; item?.getString("buyer_name")!="null" &amp;&amp; item?.getString("buyer_name")!="无"){
if(item?.get("buyer_name")!=null && item?.getString("buyer_name")!="null" && item?.getString("buyer_name")!="无"){
fplist.put("PURCHASER",item.get("buyer_name"));
}else{
fplist.put("PURCHASER",null);
};
if(item?.get("seller_name")!=null &amp;&amp; item?.getString("seller_name")!="null" &amp;&amp; item?.getString("seller_name")!="无"){
if(item?.get("seller_name")!=null && item?.getString("seller_name")!="null" && item?.getString("seller_name")!="无"){
fplist.put("SALESPARTY",item.get("seller_name"));
}else{
fplist.put("SALESPARTY",null);
};
if(item?.get("invoice_code")!=null &amp;&amp; item?.getString("invoice_code")!="null" &amp;&amp; item?.getString("invoice_code")!="无"){
if(item?.get("invoice_code")!=null && item?.getString("invoice_code")!="null" && item?.getString("invoice_code")!="无"){
fplist.put("INVOICECODE",item.get("invoice_code"));
}else{
fplist.put("INVOICECODE",null);
};
if(item?.get("invoice_number")!=null &amp;&amp; item?.getString("invoice_number")!="null" &amp;&amp; item?.getString("invoice_number")!="无"){
if(item?.get("invoice_number")!=null && item?.getString("invoice_number")!="null" && item?.getString("invoice_number")!="无"){
fplist.put("INVOICENO",item.get("invoice_number"));
}else{
fplist.put("INVOICENO",null);
};
if(item?.get("money")!=null &amp;&amp; item?.getString("money")!="null" &amp;&amp; item?.getString("money")!="无"){
if(item?.get("money")!=null && item?.getString("money")!="null" && item?.getString("money")!="无"){
fplist.put("INVOICEMONEY",transformnum(item.getString("money")));
}else{
fplist.put("INVOICEMONEY",null);
};
if(item?.get("tax")!=null &amp;&amp; item?.getString("tax")!="null" &amp;&amp; item?.getString("tax")!="无"){
if(item?.get("tax")!=null && item?.getString("tax")!="null" && item?.getString("tax")!="无"){
fplist.put("TAX",transformnum(item.getString("tax")));
}else{
fplist.put("TAX",null);
};
if(item?.get("price")!=null &amp;&amp; item?.getString("price")!="null" &amp;&amp; item?.getString("price")!="无"){
if(item?.get("price")!=null && item?.getString("price")!="null" && item?.getString("price")!="无"){
fplist.put("TOTALMONEY",transformnum(item.getString("price")));
}else{
fplist.put("TOTALMONEY",null);
};
if(item?.get("invoice_date")!=null &amp;&amp; item?.getString("invoice_date")!="null" &amp;&amp; item?.getString("invoice_date")!="无"){
if(item?.get("invoice_date")!=null && item?.getString("invoice_date")!="null" && item?.getString("invoice_date")!="无"){
def date = item.getString("invoice_date");
fplist.put("INVOICEDATE",GetValueFunction.toDate(date,"yyyy年MM月dd日"));
}else{
fplist.put("INVOICEDATE",null);
};
if(item?.get("tax_rate")!=null &amp;&amp; item?.getString("tax_rate")!="null" &amp;&amp; item?.getString("tax_rate")!="无"){
if(item?.get("tax_rate")!=null && item?.getString("tax_rate")!="null" && item?.getString("tax_rate")!="无"){
fplist.put("TAXRATE",transformnum(item.getString("tax_rate")));
}else{
fplist.put("TAXRATE",null);
};
if(item?.get("electronic_number")!=null &amp;&amp; item?.getString("electronic_number")!="null" &amp;&amp; item?.getString("electronic_number")!="无"){
if(item?.get("electronic_number")!=null && item?.getString("electronic_number")!="null" && item?.getString("electronic_number")!="无"){
def electronic_number = item.getString("electronic_number");
fplist.put("GLFPHM",electronic_number);
}else{
fplist.put("GLFPHM",null);
};
if(item?.get("buyer_code")!=null &amp;&amp; item?.getString("buyer_code")!="null" &amp;&amp; item?.getString("buyer_code")!="无"){
if(item?.get("buyer_code")!=null && item?.getString("buyer_code")!="null" && item?.getString("buyer_code")!="无"){
def buyer_code = item.getString("buyer_code");
fplist.put("KHSH",buyer_code);
}else{
fplist.put("KHSH",null);
};
if(item?.get("seller_code")!=null &amp;&amp; item?.getString("seller_code")!="null" &amp;&amp; item?.getString("seller_code")!="无"){
if(item?.get("seller_code")!=null && item?.getString("seller_code")!="null" && item?.getString("seller_code")!="无"){
def seller_code = item.getString("seller_code");
fplist.put("XFSH",seller_code);
}else{
@@ -136,10 +136,10 @@ cb?.addClickListener(new ClickListener() {
};
if(fplist!=null){
def flag = true;
if(invoicelist.getValue() &amp;&amp; invoicelist.getValue().size()&gt;0){
for (int j = 0; j &lt; invoicelist.getValue().size(); j++) {
if(invoicelist.getValue() && invoicelist.getValue().size()>0){
for (int j = 0; j < invoicelist.getValue().size(); j++) {
def tempitem = invoicelist.getValue().get(j);
if((fplist.get("INVOICENO")==null || (fplist.get("INVOICENO")!=null &amp;&amp; tempitem.get("INVOICENO") == fplist.get("INVOICENO"))) &amp;&amp; (fplist.get("INVOICECODE")==null || (fplist.get("INVOICECODE")!=null &amp;&amp; tempitem.get("INVOICECODE") == fplist.get("INVOICECODE")))){
if((fplist.get("INVOICENO")==null || (fplist.get("INVOICENO")!=null && tempitem.get("INVOICENO") == fplist.get("INVOICENO"))) && (fplist.get("INVOICECODE")==null || (fplist.get("INVOICECODE")!=null && tempitem.get("INVOICECODE") == fplist.get("INVOICECODE")))){
flag = false;;
}
};
@@ -150,7 +150,7 @@ cb?.addClickListener(new ClickListener() {
}
}
}else{
if(json &amp;&amp; json.getString("message")){
if(json && json.getString("message")){
message += "第"+(index+GetValueFunction.toDecimal(1))+"张发票"+json.getString("message")+"!\n";
} else{
message += "第"+(index+GetValueFunction.toDecimal(1))+"张发票接口请求超时,请检查该发票或联系管理员!\n";