发票拼接截断位数优化、表头备注优化

This commit is contained in:
李贵强 2025-07-18 23:41:54 +08:00
parent 11da2eb59b
commit 047d25abbd
1 changed files with 9 additions and 4 deletions

View File

@ -378,7 +378,12 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen
payData.put("def11","合同付款");//自定义项11 流程类型有合同 无合同
}
payData.put("def12",payrequestinfo.getString("billno"));//自定义项12 付款申请单的单号全局唯一才行
payData.put("def13",payrequestinfo.getString("description"));//备注传合同总金额及付款比例等拼接凭证摘要
//截取-防止BIP接口字段超长报错
String description = payrequestinfo.getString("description");
if (description != null && description.length() > 50) {
description = description.substring(0, 50);
}
payData.put("def13", description);//备注传合同总金额及付款比例等拼接凭证摘要
//------------------以下是表体组装--------------------
JSONArray jas = new JSONArray();
@ -772,10 +777,10 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen
def4Builder.append(typeName).append(":").append(String.join(",", numbers));
});
// 截取200字符
// 截取100字符
String def4Value = def4Builder.toString();
if (def4Value.length() > 200) {
def4Value = def4Value.substring(0, 200);
if (def4Value.length() > 100) {
def4Value = def4Value.substring(0, 100);
}
payData.put("def4", def4Value);
}