From 6453839d00996210cd9923348e05a4b4764fa329 Mon Sep 17 00:00:00 2001 From: "tanfengling@x-ri.com" <123456> Date: Fri, 17 Oct 2025 17:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=B3=9B=E5=BE=AE=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E3=80=91=E5=A4=84=E7=90=86=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=B8=8E=E6=8F=90=E4=BA=A4=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E5=8C=BA=E5=88=86=20=E3=80=90=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=8E=A8=E9=80=81=E6=B3=9B=E5=BE=AE=E3=80=91?= =?UTF-8?q?=E5=8C=BA=E5=88=86=E5=88=9B=E5=BB=BA=E6=B5=81=E7=A8=8B=E4=B8=8E?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc123/cloud/app/plugin/trd/FWImpl.java | 6 +---- .../app/plugin/utils/FWRestfulUtils.java | 23 +++++++++++-------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/lc123/cloud/app/plugin/trd/FWImpl.java b/lc123/cloud/app/plugin/trd/FWImpl.java index 188feb8..ba45a47 100644 --- a/lc123/cloud/app/plugin/trd/FWImpl.java +++ b/lc123/cloud/app/plugin/trd/FWImpl.java @@ -499,11 +499,7 @@ public class FWImpl { String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCGDD"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - boolean isCreate = true; - if(StringUtils.isNotBlank(tqq9_fwrequestid)){ - isCreate = false; - } - String resultStr = fwRestfulUtils.doBillAction(mainArr, detailRootArr, "新增采购单", fw_wfid_xzcgdd, billno, isCreate); + String resultStr = fwRestfulUtils.doBillAction(mainArr, detailRootArr, "新增采购单", fw_wfid_xzcgdd, billno, tqq9_fwrequestid); return resultStr; } diff --git a/lc123/cloud/app/plugin/utils/FWRestfulUtils.java b/lc123/cloud/app/plugin/utils/FWRestfulUtils.java index 0a243ea..39ac7a8 100644 --- a/lc123/cloud/app/plugin/utils/FWRestfulUtils.java +++ b/lc123/cloud/app/plugin/utils/FWRestfulUtils.java @@ -175,7 +175,7 @@ public class FWRestfulUtils { * @param billno * @return */ - public String doBillAction(JSONArray mainData, JSONArray detailData, String requestName, String workflowid, String billno, boolean isCreate){ + public String doBillAction(JSONArray mainData, JSONArray detailData, String requestName, String workflowid, String billno, String requestId){ Map registMap = regist(); if(registMap != null && registMap.size() > 0){ String spk = StrUtil.nullToEmpty((String) registMap.get("spk")); @@ -185,12 +185,21 @@ public class FWRestfulUtils { if(StringUtils.isNotBlank(token)){ CloseableHttpResponse response;// 响应类, CloseableHttpClient httpClient = HttpClients.createDefault(); + + //装填参数 + List list = new ArrayList<>(); + list.add(new BasicNameValuePair("mainData", JSON.toJSONString(mainData))); + list.add(new BasicNameValuePair("detailData", JSON.toJSONString(detailData))); + //restful接口url String url = "http://180.166.208.42:8043/"; - if(isCreate){ - url = url + "api/workflow/paService/doCreateRequest"; - }else{ + if(StringUtils.isNotBlank(requestId)){ url = url + "api/workflow/paService/submitRequest"; + list.add(new BasicNameValuePair("requestId", requestId)); + }else{ + url = url + "api/workflow/paService/doCreateRequest"; + list.add(new BasicNameValuePair("requestName", requestName)); + list.add(new BasicNameValuePair("workflowId", workflowid)); } HttpPost httpPost = new HttpPost(url); //当前日期 @@ -202,12 +211,6 @@ public class FWRestfulUtils { RSA rsa = new RSA(null,spk); //对用户信息进行加密传输,暂仅支持传输OA用户ID String encryptUserid = rsa.encryptBase64("363", CharsetUtil.CHARSET_UTF_8, KeyType.PublicKey); - //装填参数 - List list = new ArrayList<>(); - list.add(new BasicNameValuePair("mainData", JSON.toJSONString(mainData))); - list.add(new BasicNameValuePair("detailData", JSON.toJSONString(detailData))); - list.add(new BasicNameValuePair("requestName", requestName)); - list.add(new BasicNameValuePair("workflowId", workflowid)); DynamicObject pushlog = BusinessDataServiceHelper.newDynamicObject("tqq9_fwpushlog"); pushlog.set("name", requestName);