From 1e92f4bc2593367823c198dfd0baf93d21070727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=B4=B5=E5=BC=BA?= Date: Thu, 9 Oct 2025 09:56:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=98=E6=AC=BE=E5=A4=84=E7=90=86=E6=8E=A8sa?= =?UTF-8?q?p=E8=A1=A5=E5=85=85url=E5=AD=97=E6=AE=B5=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fi/fi/plugin/operate/PaybillOperation.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/main/java/shjh/jhzj7/fi/fi/plugin/operate/PaybillOperation.java b/main/java/shjh/jhzj7/fi/fi/plugin/operate/PaybillOperation.java index bfa9993..37cec34 100644 --- a/main/java/shjh/jhzj7/fi/fi/plugin/operate/PaybillOperation.java +++ b/main/java/shjh/jhzj7/fi/fi/plugin/operate/PaybillOperation.java @@ -10,6 +10,7 @@ import kd.bos.entity.plugin.AbstractOperationServicePlugIn; import kd.bos.entity.plugin.args.AfterOperationArgs; import kd.bos.orm.query.QCP; import kd.bos.orm.query.QFilter; +import kd.bos.servicehelper.AttachmentServiceHelper; import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.bos.servicehelper.operation.SaveServiceHelper; import kd.bos.util.StringUtils; @@ -19,6 +20,8 @@ import java.time.LocalDate; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Date; +import java.util.List; +import java.util.Map; import static shjh.jhzj7.fi.fi.utils.SapUtils.withholding_billing; @@ -168,7 +171,15 @@ public class PaybillOperation extends AbstractOperationServicePlugIn implements header.put("FM_ExpenseTypeCode", FM_ExpenseTypeCode);// 业务大类编码(EQ49,EQ44,EQ1101) header.put("FM_CurrencyCode", "RMB");// 币种编码,默认:RMB header.put("FM_RequestName", bill.getString("description"));// 单据主题_拼接 - header.put("FM_AttachUrl", null);//附件URL地址:array + List> attachments = AttachmentServiceHelper.getAttachments(bill.getDataEntityType().getName(), bill.getLong("id"), "attachmentpanel"); + if (attachments.size()!=0){ + JSONArray attachUrls = new JSONArray(); + for (Map attachment : attachments) { + String url = (String)attachment.get("url"); + attachUrls.add(url); + } + header.put("FM_AttachUrl", attachUrls);//附件URL地址:array + } header.put("FM_BudType", 0);//预算类别0-组织预算,1-全年预算,当前只处理0 int header.put("Remark", bill.getString("description"));// 事项描述_摘要