From 726a8bc9ec03c2181ef54af2c20d23bfca4c9d5e Mon Sep 17 00:00:00 2001 From: weiyunlong Date: Tue, 22 Apr 2025 18:08:33 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20--s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shjh/jhzj7/fi/fi/plugin/form/RecBillFromPlugin.java | 2 +- .../fi/fi/plugin/operate/PaybillPushSapOperation.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/main/java/shjh/jhzj7/fi/fi/plugin/form/RecBillFromPlugin.java b/main/java/shjh/jhzj7/fi/fi/plugin/form/RecBillFromPlugin.java index 56bc2cb..526d30e 100644 --- a/main/java/shjh/jhzj7/fi/fi/plugin/form/RecBillFromPlugin.java +++ b/main/java/shjh/jhzj7/fi/fi/plugin/form/RecBillFromPlugin.java @@ -73,7 +73,7 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin { } DynamicObject shjhBizsmall = (DynamicObject)this.getModel().getValue("shjh_bizsmall"); if (null == shjhBizsmall) { -// this.getModel().setValue("shjh_bizsmall", entry.getDynamicObject("shjh_e_bizsmall")); + this.getModel().setValue("shjh_bizsmall", entry.getDynamicObject("shjh_e_bizsmall")); } DynamicObject shjhCostcenter = (DynamicObject)this.getModel().getValue("shjh_costcenter"); if (null == shjhCostcenter) { diff --git a/main/java/shjh/jhzj7/fi/fi/plugin/operate/PaybillPushSapOperation.java b/main/java/shjh/jhzj7/fi/fi/plugin/operate/PaybillPushSapOperation.java index 3ad57b6..5bda61d 100644 --- a/main/java/shjh/jhzj7/fi/fi/plugin/operate/PaybillPushSapOperation.java +++ b/main/java/shjh/jhzj7/fi/fi/plugin/operate/PaybillPushSapOperation.java @@ -16,8 +16,10 @@ import kd.bos.orm.query.QFilter; import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.bos.servicehelper.operation.SaveServiceHelper; import kd.sdk.plugin.Plugin; +import shjh.jhzj7.fi.fi.utils.ApiUtils; import shjh.jhzj7.fi.fi.utils.JhzjUtils; import shjh.jhzj7.fi.fi.utils.SysUtils; +import shjh.jhzj7.fi.fi.utils.domin.ResponseData; import java.math.BigDecimal; import java.text.SimpleDateFormat; @@ -118,6 +120,11 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl //是否推送SAP:shjh_ispushsap,推送成功更新状态 JSONObject jsonObject = sap_accounVoucher(data, bill.getString("billno")); if (jsonObject.getIntValue("code") == 0) { + ResponseData responseData = ApiUtils.getResponseData(jsonObject); + if (responseData!=null){ + bill.set("shjh_credentialnum",responseData.getNumber()); + bill.set("shjh_sapfiscalyear",responseData.getYear()); + } bill.set("shjh_ispushsap", true); SaveServiceHelper.save(new DynamicObject[]{bill}); }else {